Skip to content

Commit 5e60851

Browse files
prottayCMTProttay Das
andauthored
[PWGLF] added x and y components separately for scalar product check of lambda polarisation (#17886)
Co-authored-by: Prottay Das <prottay@alipap1.cern.ch>
1 parent 0b92422 commit 5e60851

1 file changed

Lines changed: 129 additions & 59 deletions

File tree

PWGLF/Tasks/Strangeness/lambdapolsp.cxx

Lines changed: 129 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ struct lambdapolsp {
192192
Configurable<std::string> ConfNUA{"ConfNUA", "Users/p/prottay/My/Object/NUAwgtschk", "Path to NUA"};
193193

194194
Configurable<bool> fillnominal{"fillnominal", true, "flag to fill default histograms"};
195-
Configurable<bool> filldefwithsyst{"filldefwithsyst", true, "flag to fill default histograms in syst"};
196195
} QAgrp;
197196

198197
struct : ConfigurableGroup {
@@ -501,7 +500,18 @@ struct lambdapolsp {
501500
histos.add("hpQxytpvscent", "hpQxytpvscent", HistType::kTHnSparseF, {axisGrp.configcentAxis, spAxis}, true);
502501
histos.add("hpQxtQypvscent", "hpQxtQypvscent", HistType::kTHnSparseF, {axisGrp.configcentAxis, spAxis}, true);
503502
histos.add("hpQxpQytvscent", "hpQxpQytvscent", HistType::kTHnSparseF, {axisGrp.configcentAxis, spAxis}, true);
503+
504+
histos.add("hSparseLambdaPolSP_xAwgt", "hSparseLambdaPolSP_xAwgt", HistType::kTHnSparseF, runaxes, true);
505+
histos.add("hSparseLambdaPolSP_yAwgt", "hSparseLambdaPolSP_yAwgt", HistType::kTHnSparseF, runaxes, true);
506+
histos.add("hSparseLambdaPolSP_xCwgt", "hSparseLambdaPolSP_xCwgt", HistType::kTHnSparseF, runaxes, true);
507+
histos.add("hSparseLambdaPolSP_yCwgt", "hSparseLambdaPolSP_yCwgt", HistType::kTHnSparseF, runaxes, true);
508+
509+
histos.add("hSparseAntiLambdaPolSP_xAwgt", "hSparseAntiLambdaPolSP_xAwgt", HistType::kTHnSparseF, runaxes, true);
510+
histos.add("hSparseAntiLambdaPolSP_yAwgt", "hSparseAntiLambdaPolSP_yAwgt", HistType::kTHnSparseF, runaxes, true);
511+
histos.add("hSparseAntiLambdaPolSP_xCwgt", "hSparseAntiLambdaPolSP_xCwgt", HistType::kTHnSparseF, runaxes, true);
512+
histos.add("hSparseAntiLambdaPolSP_yCwgt", "hSparseAntiLambdaPolSP_yCwgt", HistType::kTHnSparseF, runaxes, true);
504513
}
514+
505515
if (usesubdet) {
506516
histos.add("hSparseLambdaCosPsiA", "hSparseLambdaCosPsiA", HistType::kTHnSparseF, runaxes, true);
507517
histos.add("hSparseLambdaSinPsiA", "hSparseLambdaSinPsiA", HistType::kTHnSparseF, runaxes, true);
@@ -546,12 +556,12 @@ struct lambdapolsp {
546556
// histos.add("hSparseLambda_corr2b", "hSparseLambda_corr2b", HistType::kTHnSparseF, runaxes, true);
547557
histos.add("hSparseAntiLambda_corr2a", "hSparseAntiLambda_corr2a", HistType::kTHnSparseF, runaxes, true);
548558
// histos.add("hSparseAntiLambda_corr2b", "hSparseAntiLambda_corr2b", HistType::kTHnSparseF, runaxes, true);
549-
if (randGrp.useSP) {
559+
/*if (randGrp.useSP) {
550560
histos.add("hSparseAntiLambda_avgux", "hSparseAntiLambda_avgux", HistType::kTHnSparseF, {thnAxisInvMass, axisGrp.configthnAxispT, axisGrp.configthnAxisPol, axisGrp.configcentAxis}, true);
551561
histos.add("hSparseAntiLambda_avguy", "hSparseAntiLambda_avguy", HistType::kTHnSparseF, {thnAxisInvMass, axisGrp.configthnAxispT, axisGrp.configthnAxisPol, axisGrp.configcentAxis}, true);
552562
histos.add("hSparseLambda_avgux", "hSparseLambda_avgux", HistType::kTHnSparseF, {thnAxisInvMass, axisGrp.configthnAxispT, axisGrp.configthnAxisPol, axisGrp.configcentAxis}, true);
553563
histos.add("hSparseLambda_avguy", "hSparseLambda_avguy", HistType::kTHnSparseF, {thnAxisInvMass, axisGrp.configthnAxispT, axisGrp.configthnAxisPol, axisGrp.configcentAxis}, true);
554-
}
564+
}*/
555565
}
556566

557567
if (distGrp.filldist) {
@@ -721,6 +731,14 @@ struct lambdapolsp {
721731
HistType::kTHnSparseF,
722732
runaxesSyst,
723733
true);
734+
735+
histos.add("hSparseAntiLambda_corr1aSyst", "hSparseAntiLambda_corr1aSyst", HistType::kTHnSparseF, runaxesSyst, true);
736+
histos.add("hSparseAntiLambda_corr1bSyst", "hSparseAntiLambda_corr1bSyst", HistType::kTHnSparseF, runaxesSyst, true);
737+
histos.add("hSparseAntiLambda_corr2aSyst", "hSparseAntiLambda_corr2aSyst", HistType::kTHnSparseF, runaxesSyst, true);
738+
739+
histos.add("hSparseLambda_corr1aSyst", "hSparseLambda_corr1aSyst", HistType::kTHnSparseF, runaxesSyst, true);
740+
histos.add("hSparseLambda_corr1bSyst", "hSparseLambda_corr1bSyst", HistType::kTHnSparseF, runaxesSyst, true);
741+
histos.add("hSparseLambda_corr2aSyst", "hSparseLambda_corr2aSyst", HistType::kTHnSparseF, runaxesSyst, true);
724742
}
725743
}
726744

@@ -1081,6 +1099,20 @@ struct lambdapolsp {
10811099
auto PolSP_A = uy * modqxZDCA - ux * modqyZDCA; // u_y QxA - u_x QyA
10821100
auto PolSP_C = uy * modqxZDCC - ux * modqyZDCC; // u_y QxC - u_x QyC
10831101

1102+
// SP numerator components separately
1103+
auto PolSP_xA = -ux * modqyZDCA;
1104+
auto PolSP_yA = uy * modqxZDCA;
1105+
1106+
auto PolSP_xC = -ux * modqyZDCC;
1107+
auto PolSP_yC = uy * modqxZDCC;
1108+
1109+
// acceptance-corrected versions
1110+
auto PolSP_xAwgt = PolSP_xA / acvalue;
1111+
auto PolSP_yAwgt = PolSP_yA / acvalue;
1112+
1113+
auto PolSP_xCwgt = PolSP_xC / acvalue;
1114+
auto PolSP_yCwgt = PolSP_yC / acvalue;
1115+
10841116
if (randGrp.useSP) {
10851117
Pol = PolSP;
10861118
PolA = PolSP_A;
@@ -1089,6 +1121,7 @@ struct lambdapolsp {
10891121
PolAwgt = PolSP_A / acvalue;
10901122
PolCwgt = PolSP_C / acvalue;
10911123
}
1124+
10921125
//////////////////////////////
10931126

10941127
if (QAgrp.fillnominal) {
@@ -1117,9 +1150,28 @@ struct lambdapolsp {
11171150
histos.fill(HIST("hSparseAntiLambda_corr2a"), candmass, candpt, sinThetaStar, centrality, desbinvalue, wgtfactor);
11181151
// histos.fill(HIST("hSparseAntiLambda_corr2b"), candmass, candpt, sinThetaStarcosphiphiStar, centrality, desbinvalue, wgtfactor);
11191152
if (randGrp.useSP) {
1120-
histos.fill(HIST("hSparseAntiLambda_avgux"), candmass, candpt, ux, centrality);
1121-
histos.fill(HIST("hSparseAntiLambda_avguy"), candmass, candpt, uy, centrality);
1153+
// histos.fill(HIST("hSparseAntiLambda_avgux"), candmass, candpt, ux, centrality);
1154+
// histos.fill(HIST("hSparseAntiLambda_avguy"), candmass, candpt, uy, centrality);
1155+
1156+
histos.fill(HIST("hSparseAntiLambdaPolwgt"), candmass, candpt, Polwgt, centrality, desbinvalue, wgtfactor);
1157+
1158+
histos.fill(HIST("hSparseAntiLambdaPolSP_xAwgt"),
1159+
candmass, candpt, PolSP_xAwgt,
1160+
centrality, desbinvalue, wgtfactor);
1161+
1162+
histos.fill(HIST("hSparseAntiLambdaPolSP_yAwgt"),
1163+
candmass, candpt, PolSP_yAwgt,
1164+
centrality, desbinvalue, wgtfactor);
1165+
1166+
histos.fill(HIST("hSparseAntiLambdaPolSP_xCwgt"),
1167+
candmass, candpt, PolSP_xCwgt,
1168+
centrality, desbinvalue, wgtfactor);
1169+
1170+
histos.fill(HIST("hSparseAntiLambdaPolSP_yCwgt"),
1171+
candmass, candpt, PolSP_yCwgt,
1172+
centrality, desbinvalue, wgtfactor);
11221173
}
1174+
11231175
} else {
11241176
if (usesubdet) {
11251177
histos.fill(HIST("hSparseAntiLambdaCosPsiA"), candmass, candpt, (TMath::Cos(GetPhiInRange(psiZDCA))), centrality, wgtfactor);
@@ -1143,8 +1195,26 @@ struct lambdapolsp {
11431195
histos.fill(HIST("hSparseAntiLambda_corr2a"), candmass, candpt, sinThetaStar, centrality, wgtfactor);
11441196
// histos.fill(HIST("hSparseAntiLambda_corr2b"), candmass, candpt, sinThetaStarcosphiphiStar, centrality, wgtfactor);
11451197
if (randGrp.useSP) {
1146-
histos.fill(HIST("hSparseAntiLambda_avgux"), candmass, candpt, ux, centrality);
1147-
histos.fill(HIST("hSparseAntiLambda_avguy"), candmass, candpt, uy, centrality);
1198+
// histos.fill(HIST("hSparseAntiLambda_avgux"), candmass, candpt, ux, centrality);
1199+
// histos.fill(HIST("hSparseAntiLambda_avguy"), candmass, candpt, uy, centrality);
1200+
1201+
histos.fill(HIST("hSparseAntiLambdaPolwgt"), candmass, candpt, Polwgt, centrality, wgtfactor);
1202+
1203+
histos.fill(HIST("hSparseAntiLambdaPolSP_xAwgt"),
1204+
candmass, candpt, PolSP_xAwgt,
1205+
centrality, wgtfactor);
1206+
1207+
histos.fill(HIST("hSparseAntiLambdaPolSP_yAwgt"),
1208+
candmass, candpt, PolSP_yAwgt,
1209+
centrality, wgtfactor);
1210+
1211+
histos.fill(HIST("hSparseAntiLambdaPolSP_xCwgt"),
1212+
candmass, candpt, PolSP_xCwgt,
1213+
centrality, wgtfactor);
1214+
1215+
histos.fill(HIST("hSparseAntiLambdaPolSP_yCwgt"),
1216+
candmass, candpt, PolSP_yCwgt,
1217+
centrality, wgtfactor);
11481218
}
11491219
}
11501220
}
@@ -1172,8 +1242,26 @@ struct lambdapolsp {
11721242
histos.fill(HIST("hSparseLambda_corr2a"), candmass, candpt, sinThetaStar, centrality, desbinvalue, wgtfactor);
11731243
// histos.fill(HIST("hSparseLambda_corr2b"), candmass, candpt, sinThetaStarcosphiphiStar, centrality, desbinvalue, wgtfactor);
11741244
if (randGrp.useSP) {
1175-
histos.fill(HIST("hSparseLambda_avgux"), candmass, candpt, ux, centrality);
1176-
histos.fill(HIST("hSparseLambda_avguy"), candmass, candpt, uy, centrality);
1245+
// histos.fill(HIST("hSparseLambda_avgux"), candmass, candpt, ux, centrality);
1246+
// histos.fill(HIST("hSparseLambda_avguy"), candmass, candpt, uy, centrality);
1247+
1248+
histos.fill(HIST("hSparseLambdaPolwgt"), candmass, candpt, Polwgt, centrality, desbinvalue, wgtfactor);
1249+
1250+
histos.fill(HIST("hSparseLambdaPolSP_xAwgt"),
1251+
candmass, candpt, PolSP_xAwgt,
1252+
centrality, desbinvalue, wgtfactor);
1253+
1254+
histos.fill(HIST("hSparseLambdaPolSP_yAwgt"),
1255+
candmass, candpt, PolSP_yAwgt,
1256+
centrality, desbinvalue, wgtfactor);
1257+
1258+
histos.fill(HIST("hSparseLambdaPolSP_xCwgt"),
1259+
candmass, candpt, PolSP_xCwgt,
1260+
centrality, desbinvalue, wgtfactor);
1261+
1262+
histos.fill(HIST("hSparseLambdaPolSP_yCwgt"),
1263+
candmass, candpt, PolSP_yCwgt,
1264+
centrality, desbinvalue, wgtfactor);
11771265
}
11781266
} else {
11791267
if (usesubdet) {
@@ -1198,8 +1286,26 @@ struct lambdapolsp {
11981286
histos.fill(HIST("hSparseLambda_corr2a"), candmass, candpt, sinThetaStar, centrality, wgtfactor);
11991287
// histos.fill(HIST("hSparseLambda_corr2b"), candmass, candpt, sinThetaStarcosphiphiStar, centrality, wgtfactor);
12001288
if (randGrp.useSP) {
1201-
histos.fill(HIST("hSparseLambda_avgux"), candmass, candpt, ux, centrality);
1202-
histos.fill(HIST("hSparseLambda_avguy"), candmass, candpt, uy, centrality);
1289+
// histos.fill(HIST("hSparseLambda_avgux"), candmass, candpt, ux, centrality);
1290+
// histos.fill(HIST("hSparseLambda_avguy"), candmass, candpt, uy, centrality);
1291+
1292+
histos.fill(HIST("hSparseLambdaPolwgt"), candmass, candpt, Polwgt, centrality, wgtfactor);
1293+
1294+
histos.fill(HIST("hSparseLambdaPolSP_xAwgt"),
1295+
candmass, candpt, PolSP_xAwgt,
1296+
centrality, wgtfactor);
1297+
1298+
histos.fill(HIST("hSparseLambdaPolSP_yAwgt"),
1299+
candmass, candpt, PolSP_yAwgt,
1300+
centrality, wgtfactor);
1301+
1302+
histos.fill(HIST("hSparseLambdaPolSP_xCwgt"),
1303+
candmass, candpt, PolSP_xCwgt,
1304+
centrality, wgtfactor);
1305+
1306+
histos.fill(HIST("hSparseLambdaPolSP_yCwgt"),
1307+
candmass, candpt, PolSP_yCwgt,
1308+
centrality, wgtfactor);
12031309
}
12041310
}
12051311
}
@@ -1224,18 +1330,9 @@ struct lambdapolsp {
12241330
static_cast<double>(isyst),
12251331
wgtfactor);
12261332

1227-
histos.fill(HIST("hSparseLambdaPolwgtSyst"),
1228-
candmass,
1229-
candpt,
1230-
Polwgt,
1231-
centrality,
1232-
desbinvalue,
1233-
static_cast<double>(isyst),
1234-
wgtfactor);
1235-
if (QAgrp.filldefwithsyst) {
1236-
histos.fill(HIST("hSparseLambdaPol"), candmass, candpt, Pol, centrality, desbinvalue, wgtfactor);
1237-
histos.fill(HIST("hSparseLambdaPolwgt"), candmass, candpt, Polwgt, centrality, desbinvalue, wgtfactor);
1238-
}
1333+
histos.fill(HIST("hSparseLambda_corr1aSyst"), candmass, candpt, sinPhiStar, centrality, desbinvalue, static_cast<double>(isyst), wgtfactor);
1334+
histos.fill(HIST("hSparseLambda_corr1bSyst"), candmass, candpt, cosPhiStar, centrality, desbinvalue, static_cast<double>(isyst), wgtfactor);
1335+
histos.fill(HIST("hSparseLambda_corr2aSyst"), candmass, candpt, sinThetaStar, centrality, desbinvalue, static_cast<double>(isyst), wgtfactor);
12391336

12401337
} else {
12411338

@@ -1247,18 +1344,9 @@ struct lambdapolsp {
12471344
static_cast<double>(isyst),
12481345
wgtfactor);
12491346

1250-
histos.fill(HIST("hSparseLambdaPolwgtSyst"),
1251-
candmass,
1252-
candpt,
1253-
Polwgt,
1254-
centrality,
1255-
static_cast<double>(isyst),
1256-
wgtfactor);
1257-
1258-
if (QAgrp.filldefwithsyst) {
1259-
histos.fill(HIST("hSparseLambdaPol"), candmass, candpt, Pol, centrality, wgtfactor);
1260-
histos.fill(HIST("hSparseLambdaPolwgt"), candmass, candpt, Polwgt, centrality, wgtfactor);
1261-
}
1347+
histos.fill(HIST("hSparseLambda_corr1aSyst"), candmass, candpt, sinPhiStar, centrality, static_cast<double>(isyst), wgtfactor);
1348+
histos.fill(HIST("hSparseLambda_corr1bSyst"), candmass, candpt, cosPhiStar, centrality, static_cast<double>(isyst), wgtfactor);
1349+
histos.fill(HIST("hSparseLambda_corr2aSyst"), candmass, candpt, sinThetaStar, centrality, static_cast<double>(isyst), wgtfactor);
12621350
}
12631351
}
12641352

@@ -1276,18 +1364,9 @@ struct lambdapolsp {
12761364
static_cast<double>(isyst),
12771365
wgtfactor);
12781366

1279-
histos.fill(HIST("hSparseAntiLambdaPolwgtSyst"),
1280-
candmass,
1281-
candpt,
1282-
Polwgt,
1283-
centrality,
1284-
desbinvalue,
1285-
static_cast<double>(isyst),
1286-
wgtfactor);
1287-
if (QAgrp.filldefwithsyst) {
1288-
histos.fill(HIST("hSparseAntiLambdaPol"), candmass, candpt, Pol, centrality, desbinvalue, wgtfactor);
1289-
histos.fill(HIST("hSparseAntiLambdaPolwgt"), candmass, candpt, Polwgt, centrality, desbinvalue, wgtfactor);
1290-
}
1367+
histos.fill(HIST("hSparseAntiLambda_corr1aSyst"), candmass, candpt, sinPhiStar, centrality, desbinvalue, static_cast<double>(isyst), wgtfactor);
1368+
histos.fill(HIST("hSparseAntiLambda_corr1bSyst"), candmass, candpt, cosPhiStar, centrality, desbinvalue, static_cast<double>(isyst), wgtfactor);
1369+
histos.fill(HIST("hSparseAntiLambda_corr2aSyst"), candmass, candpt, sinThetaStar, centrality, desbinvalue, static_cast<double>(isyst), wgtfactor);
12911370

12921371
} else {
12931372

@@ -1299,18 +1378,9 @@ struct lambdapolsp {
12991378
static_cast<double>(isyst),
13001379
wgtfactor);
13011380

1302-
histos.fill(HIST("hSparseAntiLambdaPolwgtSyst"),
1303-
candmass,
1304-
candpt,
1305-
Polwgt,
1306-
centrality,
1307-
static_cast<double>(isyst),
1308-
wgtfactor);
1309-
1310-
if (QAgrp.filldefwithsyst) {
1311-
histos.fill(HIST("hSparseAntiLambdaPol"), candmass, candpt, Pol, centrality, wgtfactor);
1312-
histos.fill(HIST("hSparseAntiLambdaPolwgt"), candmass, candpt, Polwgt, centrality, wgtfactor);
1313-
}
1381+
histos.fill(HIST("hSparseAntiLambda_corr1aSyst"), candmass, candpt, sinPhiStar, centrality, static_cast<double>(isyst), wgtfactor);
1382+
histos.fill(HIST("hSparseAntiLambda_corr1bSyst"), candmass, candpt, cosPhiStar, centrality, static_cast<double>(isyst), wgtfactor);
1383+
histos.fill(HIST("hSparseAntiLambda_corr2aSyst"), candmass, candpt, sinThetaStar, centrality, static_cast<double>(isyst), wgtfactor);
13141384
}
13151385
}
13161386
}

0 commit comments

Comments
 (0)