Skip to content

Commit c169ddb

Browse files
author
Prottay Das
committed
added x and y components for scalar product check of lambda polarisation
1 parent 8852528 commit c169ddb

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
@@ -191,7 +191,6 @@ struct lambdapolsp {
191191
Configurable<std::string> ConfNUA{"ConfNUA", "Users/p/prottay/My/Object/NUAwgtschk", "Path to NUA"};
192192

193193
Configurable<bool> fillnominal{"fillnominal", true, "flag to fill default histograms"};
194-
Configurable<bool> filldefwithsyst{"filldefwithsyst", true, "flag to fill default histograms in syst"};
195194
} QAgrp;
196195

197196
struct : ConfigurableGroup {
@@ -500,7 +499,18 @@ struct lambdapolsp {
500499
histos.add("hpQxytpvscent", "hpQxytpvscent", HistType::kTHnSparseF, {axisGrp.configcentAxis, spAxis}, true);
501500
histos.add("hpQxtQypvscent", "hpQxtQypvscent", HistType::kTHnSparseF, {axisGrp.configcentAxis, spAxis}, true);
502501
histos.add("hpQxpQytvscent", "hpQxpQytvscent", HistType::kTHnSparseF, {axisGrp.configcentAxis, spAxis}, true);
502+
503+
histos.add("hSparseLambdaPolSP_xAwgt", "hSparseLambdaPolSP_xAwgt", HistType::kTHnSparseF, runaxes, true);
504+
histos.add("hSparseLambdaPolSP_yAwgt", "hSparseLambdaPolSP_yAwgt", HistType::kTHnSparseF, runaxes, true);
505+
histos.add("hSparseLambdaPolSP_xCwgt", "hSparseLambdaPolSP_xCwgt", HistType::kTHnSparseF, runaxes, true);
506+
histos.add("hSparseLambdaPolSP_yCwgt", "hSparseLambdaPolSP_yCwgt", HistType::kTHnSparseF, runaxes, true);
507+
508+
histos.add("hSparseAntiLambdaPolSP_xAwgt", "hSparseAntiLambdaPolSP_xAwgt", HistType::kTHnSparseF, runaxes, true);
509+
histos.add("hSparseAntiLambdaPolSP_yAwgt", "hSparseAntiLambdaPolSP_yAwgt", HistType::kTHnSparseF, runaxes, true);
510+
histos.add("hSparseAntiLambdaPolSP_xCwgt", "hSparseAntiLambdaPolSP_xCwgt", HistType::kTHnSparseF, runaxes, true);
511+
histos.add("hSparseAntiLambdaPolSP_yCwgt", "hSparseAntiLambdaPolSP_yCwgt", HistType::kTHnSparseF, runaxes, true);
503512
}
513+
504514
if (usesubdet) {
505515
histos.add("hSparseLambdaCosPsiA", "hSparseLambdaCosPsiA", HistType::kTHnSparseF, runaxes, true);
506516
histos.add("hSparseLambdaSinPsiA", "hSparseLambdaSinPsiA", HistType::kTHnSparseF, runaxes, true);
@@ -545,12 +555,12 @@ struct lambdapolsp {
545555
// histos.add("hSparseLambda_corr2b", "hSparseLambda_corr2b", HistType::kTHnSparseF, runaxes, true);
546556
histos.add("hSparseAntiLambda_corr2a", "hSparseAntiLambda_corr2a", HistType::kTHnSparseF, runaxes, true);
547557
// histos.add("hSparseAntiLambda_corr2b", "hSparseAntiLambda_corr2b", HistType::kTHnSparseF, runaxes, true);
548-
if (randGrp.useSP) {
558+
/*if (randGrp.useSP) {
549559
histos.add("hSparseAntiLambda_avgux", "hSparseAntiLambda_avgux", HistType::kTHnSparseF, {thnAxisInvMass, axisGrp.configthnAxispT, axisGrp.configthnAxisPol, axisGrp.configcentAxis}, true);
550560
histos.add("hSparseAntiLambda_avguy", "hSparseAntiLambda_avguy", HistType::kTHnSparseF, {thnAxisInvMass, axisGrp.configthnAxispT, axisGrp.configthnAxisPol, axisGrp.configcentAxis}, true);
551561
histos.add("hSparseLambda_avgux", "hSparseLambda_avgux", HistType::kTHnSparseF, {thnAxisInvMass, axisGrp.configthnAxispT, axisGrp.configthnAxisPol, axisGrp.configcentAxis}, true);
552562
histos.add("hSparseLambda_avguy", "hSparseLambda_avguy", HistType::kTHnSparseF, {thnAxisInvMass, axisGrp.configthnAxispT, axisGrp.configthnAxisPol, axisGrp.configcentAxis}, true);
553-
}
563+
}*/
554564
}
555565

556566
if (distGrp.filldist) {
@@ -720,6 +730,14 @@ struct lambdapolsp {
720730
HistType::kTHnSparseF,
721731
runaxesSyst,
722732
true);
733+
734+
histos.add("hSparseAntiLambda_corr1aSyst", "hSparseAntiLambda_corr1aSyst", HistType::kTHnSparseF, runaxesSyst, true);
735+
histos.add("hSparseAntiLambda_corr1bSyst", "hSparseAntiLambda_corr1bSyst", HistType::kTHnSparseF, runaxesSyst, true);
736+
histos.add("hSparseAntiLambda_corr2aSyst", "hSparseAntiLambda_corr2aSyst", HistType::kTHnSparseF, runaxesSyst, true);
737+
738+
histos.add("hSparseLambda_corr1aSyst", "hSparseLambda_corr1aSyst", HistType::kTHnSparseF, runaxesSyst, true);
739+
histos.add("hSparseLambda_corr1bSyst", "hSparseLambda_corr1bSyst", HistType::kTHnSparseF, runaxesSyst, true);
740+
histos.add("hSparseLambda_corr2aSyst", "hSparseLambda_corr2aSyst", HistType::kTHnSparseF, runaxesSyst, true);
723741
}
724742
}
725743

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

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

10931126
if (QAgrp.fillnominal) {
@@ -1116,9 +1149,28 @@ struct lambdapolsp {
11161149
histos.fill(HIST("hSparseAntiLambda_corr2a"), candmass, candpt, sinThetaStar, centrality, desbinvalue, wgtfactor);
11171150
// histos.fill(HIST("hSparseAntiLambda_corr2b"), candmass, candpt, sinThetaStarcosphiphiStar, centrality, desbinvalue, wgtfactor);
11181151
if (randGrp.useSP) {
1119-
histos.fill(HIST("hSparseAntiLambda_avgux"), candmass, candpt, ux, centrality);
1120-
histos.fill(HIST("hSparseAntiLambda_avguy"), candmass, candpt, uy, centrality);
1152+
// histos.fill(HIST("hSparseAntiLambda_avgux"), candmass, candpt, ux, centrality);
1153+
// histos.fill(HIST("hSparseAntiLambda_avguy"), candmass, candpt, uy, centrality);
1154+
1155+
histos.fill(HIST("hSparseAntiLambdaPolwgt"), candmass, candpt, Polwgt, centrality, desbinvalue, wgtfactor);
1156+
1157+
histos.fill(HIST("hSparseAntiLambdaPolSP_xAwgt"),
1158+
candmass, candpt, PolSP_xAwgt,
1159+
centrality, desbinvalue, wgtfactor);
1160+
1161+
histos.fill(HIST("hSparseAntiLambdaPolSP_yAwgt"),
1162+
candmass, candpt, PolSP_yAwgt,
1163+
centrality, desbinvalue, wgtfactor);
1164+
1165+
histos.fill(HIST("hSparseAntiLambdaPolSP_xCwgt"),
1166+
candmass, candpt, PolSP_xCwgt,
1167+
centrality, desbinvalue, wgtfactor);
1168+
1169+
histos.fill(HIST("hSparseAntiLambdaPolSP_yCwgt"),
1170+
candmass, candpt, PolSP_yCwgt,
1171+
centrality, desbinvalue, wgtfactor);
11211172
}
1173+
11221174
} else {
11231175
if (usesubdet) {
11241176
histos.fill(HIST("hSparseAntiLambdaCosPsiA"), candmass, candpt, (TMath::Cos(GetPhiInRange(psiZDCA))), centrality, wgtfactor);
@@ -1142,8 +1194,26 @@ struct lambdapolsp {
11421194
histos.fill(HIST("hSparseAntiLambda_corr2a"), candmass, candpt, sinThetaStar, centrality, wgtfactor);
11431195
// histos.fill(HIST("hSparseAntiLambda_corr2b"), candmass, candpt, sinThetaStarcosphiphiStar, centrality, wgtfactor);
11441196
if (randGrp.useSP) {
1145-
histos.fill(HIST("hSparseAntiLambda_avgux"), candmass, candpt, ux, centrality);
1146-
histos.fill(HIST("hSparseAntiLambda_avguy"), candmass, candpt, uy, centrality);
1197+
// histos.fill(HIST("hSparseAntiLambda_avgux"), candmass, candpt, ux, centrality);
1198+
// histos.fill(HIST("hSparseAntiLambda_avguy"), candmass, candpt, uy, centrality);
1199+
1200+
histos.fill(HIST("hSparseAntiLambdaPolwgt"), candmass, candpt, Polwgt, centrality, wgtfactor);
1201+
1202+
histos.fill(HIST("hSparseAntiLambdaPolSP_xAwgt"),
1203+
candmass, candpt, PolSP_xAwgt,
1204+
centrality, wgtfactor);
1205+
1206+
histos.fill(HIST("hSparseAntiLambdaPolSP_yAwgt"),
1207+
candmass, candpt, PolSP_yAwgt,
1208+
centrality, wgtfactor);
1209+
1210+
histos.fill(HIST("hSparseAntiLambdaPolSP_xCwgt"),
1211+
candmass, candpt, PolSP_xCwgt,
1212+
centrality, wgtfactor);
1213+
1214+
histos.fill(HIST("hSparseAntiLambdaPolSP_yCwgt"),
1215+
candmass, candpt, PolSP_yCwgt,
1216+
centrality, wgtfactor);
11471217
}
11481218
}
11491219
}
@@ -1171,8 +1241,26 @@ struct lambdapolsp {
11711241
histos.fill(HIST("hSparseLambda_corr2a"), candmass, candpt, sinThetaStar, centrality, desbinvalue, wgtfactor);
11721242
// histos.fill(HIST("hSparseLambda_corr2b"), candmass, candpt, sinThetaStarcosphiphiStar, centrality, desbinvalue, wgtfactor);
11731243
if (randGrp.useSP) {
1174-
histos.fill(HIST("hSparseLambda_avgux"), candmass, candpt, ux, centrality);
1175-
histos.fill(HIST("hSparseLambda_avguy"), candmass, candpt, uy, centrality);
1244+
// histos.fill(HIST("hSparseLambda_avgux"), candmass, candpt, ux, centrality);
1245+
// histos.fill(HIST("hSparseLambda_avguy"), candmass, candpt, uy, centrality);
1246+
1247+
histos.fill(HIST("hSparseLambdaPolwgt"), candmass, candpt, Polwgt, centrality, desbinvalue, wgtfactor);
1248+
1249+
histos.fill(HIST("hSparseLambdaPolSP_xAwgt"),
1250+
candmass, candpt, PolSP_xAwgt,
1251+
centrality, desbinvalue, wgtfactor);
1252+
1253+
histos.fill(HIST("hSparseLambdaPolSP_yAwgt"),
1254+
candmass, candpt, PolSP_yAwgt,
1255+
centrality, desbinvalue, wgtfactor);
1256+
1257+
histos.fill(HIST("hSparseLambdaPolSP_xCwgt"),
1258+
candmass, candpt, PolSP_xCwgt,
1259+
centrality, desbinvalue, wgtfactor);
1260+
1261+
histos.fill(HIST("hSparseLambdaPolSP_yCwgt"),
1262+
candmass, candpt, PolSP_yCwgt,
1263+
centrality, desbinvalue, wgtfactor);
11761264
}
11771265
} else {
11781266
if (usesubdet) {
@@ -1197,8 +1285,26 @@ struct lambdapolsp {
11971285
histos.fill(HIST("hSparseLambda_corr2a"), candmass, candpt, sinThetaStar, centrality, wgtfactor);
11981286
// histos.fill(HIST("hSparseLambda_corr2b"), candmass, candpt, sinThetaStarcosphiphiStar, centrality, wgtfactor);
11991287
if (randGrp.useSP) {
1200-
histos.fill(HIST("hSparseLambda_avgux"), candmass, candpt, ux, centrality);
1201-
histos.fill(HIST("hSparseLambda_avguy"), candmass, candpt, uy, centrality);
1288+
// histos.fill(HIST("hSparseLambda_avgux"), candmass, candpt, ux, centrality);
1289+
// histos.fill(HIST("hSparseLambda_avguy"), candmass, candpt, uy, centrality);
1290+
1291+
histos.fill(HIST("hSparseLambdaPolwgt"), candmass, candpt, Polwgt, centrality, wgtfactor);
1292+
1293+
histos.fill(HIST("hSparseLambdaPolSP_xAwgt"),
1294+
candmass, candpt, PolSP_xAwgt,
1295+
centrality, wgtfactor);
1296+
1297+
histos.fill(HIST("hSparseLambdaPolSP_yAwgt"),
1298+
candmass, candpt, PolSP_yAwgt,
1299+
centrality, wgtfactor);
1300+
1301+
histos.fill(HIST("hSparseLambdaPolSP_xCwgt"),
1302+
candmass, candpt, PolSP_xCwgt,
1303+
centrality, wgtfactor);
1304+
1305+
histos.fill(HIST("hSparseLambdaPolSP_yCwgt"),
1306+
candmass, candpt, PolSP_yCwgt,
1307+
centrality, wgtfactor);
12021308
}
12031309
}
12041310
}
@@ -1223,18 +1329,9 @@ struct lambdapolsp {
12231329
static_cast<double>(isyst),
12241330
wgtfactor);
12251331

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

12391336
} else {
12401337

@@ -1246,18 +1343,9 @@ struct lambdapolsp {
12461343
static_cast<double>(isyst),
12471344
wgtfactor);
12481345

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

@@ -1275,18 +1363,9 @@ struct lambdapolsp {
12751363
static_cast<double>(isyst),
12761364
wgtfactor);
12771365

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

12911370
} else {
12921371

@@ -1298,18 +1377,9 @@ struct lambdapolsp {
12981377
static_cast<double>(isyst),
12991378
wgtfactor);
13001379

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

0 commit comments

Comments
 (0)