@@ -90,6 +90,7 @@ struct lambdapolsp {
9090 TH1D* hwgtAL;
9191 TH1D* heffL;
9292 TH1D* heffAL;
93+ TH1D* hwgtRESO;
9394 // fill output
9495 struct : ConfigurableGroup {
9596 Configurable<bool > additionalEvSel{" additionalEvSel" , false , " additionalEvSel" };
@@ -154,13 +155,16 @@ struct lambdapolsp {
154155 Configurable<float > ConfDaughPIDCuts{" ConfDaughPIDCuts" , 3 , " PID selections for Lambda daughters" };
155156 Configurable<bool > usesubdet{" usesubdet" , false , " use subdet" };
156157 Configurable<bool > useAccCorr{" useAccCorr" , false , " use acceptance correction" };
158+ Configurable<bool > useResoRBR{" useResoRBR" , false , " use resolution correction RBR" };
157159 Configurable<bool > useyldwgt{" useyldwgt" , false , " use yield weight" };
158160 Configurable<bool > useeffwgt{" useeffwgt" , false , " use eff weight" };
161+ Configurable<bool > usepsisubbeforeshift{" usepsisubbeforeshift" , false , " use psi for sub detectors before shift modification" };
159162 Configurable<std::string> ConfAccPathL{" ConfAccPathL" , " Users/p/prottay/My/Object/From379780/Fulldata/NewPbPbpass4_28032025/acccorrL" , " Path to acceptance correction for Lambda" };
160163 Configurable<std::string> ConfAccPathAL{" ConfAccPathAL" , " Users/p/prottay/My/Object/From379780/Fulldata/NewPbPbpass4_28032025/acccorrAL" , " Path to acceptance correction for AntiLambda" };
161164 Configurable<std::string> ConfWgtPathAL{" ConfWgtPathAL" , " Users/p/prottay/My/Object/From379780/Fulldata/NewPbPbpass4_10082025/yieldweight2050" , " Path to yield weight correction for AntiLambda" };
162165 Configurable<std::string> ConfEffWgtPathL{" ConfEffWgtPathL" , " Users/p/prottay/My/Object/From379780/Fulldata/NewPbPbpass4_10082025/yieldweight2050" , " Path to eff weight correction for Lambda" };
163166 Configurable<std::string> ConfEffWgtPathAL{" ConfEffWgtPathAL" , " Users/p/prottay/My/Object/From379780/Fulldata/NewPbPbpass4_10082025/yieldweight2050" , " Path to eff weight correction for AntiLambda" };
167+ Configurable<std::string> ConfResoPath{" ConfResoPath" , " Users/p/prottay/My/Object/From379780/Fulldata/NewPbPbpass4_28032025/acccorrL" , " Path to resolution correction run by run" };
164168
165169 struct : ConfigurableGroup {
166170 Configurable<int > QxyNbins{" QxyNbins" , 100 , " Number of bins in QxQy histograms" };
@@ -213,12 +217,13 @@ struct lambdapolsp {
213217 ConfigurableAxis configthnAxisPol{" configthnAxisPol" , {VARIABLE_WIDTH, -1.0 , -0.6 , -0.2 , 0 , 0.2 , 0.4 , 0.8 }, " Pol" };
214218 ConfigurableAxis configbinAxis{" configbinAxis" , {VARIABLE_WIDTH, -0.8 , -0.4 , -0.2 , 0 , 0.2 , 0.4 , 0.8 }, " BA" };
215219 } axisGrp;
220+ /*
216221 struct : ConfigurableGroup {
217222 ConfigurableAxis axisVertex{"axisVertex", {5, -10, 10}, "vertex axis for bin"};
218223 ConfigurableAxis axisMultiplicityClass{"axisMultiplicityClass", {8, 0, 80}, "multiplicity percentile for bin"};
219224 Configurable<int> nMix{"nMix", 5, "number of event mixing"};
220225 } meGrp;
221-
226+ */
222227 struct : ConfigurableGroup {
223228 ConfigurableAxis axisCosine{" axisCosine" , {100 , 0 , 1 }, " cosine axis" };
224229 ConfigurableAxis axisRadius{" axisRadius" , {200 , 0 , 100 }, " radius axis" };
@@ -230,6 +235,8 @@ struct lambdapolsp {
230235 Configurable<bool > filldist{" filldist" , true , " fill topo distr" };
231236 Configurable<float > lowmasscut{" lowmasscut" , 1.11 , " low mass cut" };
232237 Configurable<float > highmasscut{" highmasscut" , 1.12 , " high mass cut" };
238+ ConfigurableAxis axiscosphiminuspsi{" axiscosphiminuspsi" , {200 , -1 , 1 }, " cosphiminuspsi" };
239+ ConfigurableAxis axiseta{" axiseta" , {16 , -0.8 , 0.8 }, " eta axis" };
233240 } distGrp;
234241
235242 RCTFlagsChecker rctChecker;
@@ -436,7 +443,7 @@ struct lambdapolsp {
436443 }
437444
438445 if (distGrp.filldist ) {
439- histos.add (" hcosinelambda" , " hcosinelambda" , HistType::kTH1D , {distGrp.axisCosine }, true );
446+ /* histos.add("hcosinelambda", "hcosinelambda", HistType::kTH1D, {distGrp.axisCosine}, true);
440447 histos.add("hdcabwv0daughlambda", "hdcabwv0daughlambda", HistType::kTH1D, {distGrp.axisDca}, true);
441448 histos.add("hlifetimelambda", "hlifetimelambda", HistType::kTH1D, {distGrp.axisLT}, true);
442449 histos.add("hradiuslambda", "hradiuslambda", HistType::kTH1D, {distGrp.axisRadius}, true);
@@ -459,6 +466,13 @@ struct lambdapolsp {
459466 histos.add("htpcnegantilambda", "htpcnegantilambda", HistType::kTH1D, {distGrp.axisnsig}, true);
460467 histos.add("hptposantilambda", "hptposantilambda", HistType::kTH1D, {distGrp.axispt}, true);
461468 histos.add("hptnegantilambda", "hptnegantilambda", HistType::kTH1D, {distGrp.axispt}, true);
469+ */
470+ histos.add (" hALcosphiminuspsiCvseta" , " hALcosphiminuspsiCvseta" , HistType::kTH2D , {{distGrp.axiscosphiminuspsi }, {distGrp.axiseta }});
471+ histos.add (" hALcosphiminuspsiAvseta" , " hALcosphiminuspsiAvseta" , HistType::kTH2D , {{distGrp.axiscosphiminuspsi }, {distGrp.axiseta }});
472+ histos.add (" hALcosphiminuspsivseta" , " hALcosphiminuspsivseta" , HistType::kTH2D , {{distGrp.axiscosphiminuspsi }, {distGrp.axiseta }});
473+ histos.add (" hLcosphiminuspsiCvseta" , " hLcosphiminuspsiCvseta" , HistType::kTH2D , {{distGrp.axiscosphiminuspsi }, {distGrp.axiseta }});
474+ histos.add (" hLcosphiminuspsiAvseta" , " hLcosphiminuspsiAvseta" , HistType::kTH2D , {{distGrp.axiscosphiminuspsi }, {distGrp.axiseta }});
475+ histos.add (" hLcosphiminuspsivseta" , " hLcosphiminuspsivseta" , HistType::kTH2D , {{distGrp.axiscosphiminuspsi }, {distGrp.axiseta }});
462476 }
463477
464478 histos.add (" hSparseGenLambda" , " hSparseGenLambda" , HistType::kTHnSparseF , runaxes2, true );
@@ -499,8 +513,12 @@ struct lambdapolsp {
499513 ccdb->setCreatedNotAfter (std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now ().time_since_epoch ()).count ());
500514 LOGF (info, " Getting alignment offsets from the CCDB..." );
501515 hwgtAL = ccdb->getForTimeStamp <TH1D>(ConfWgtPathAL.value , cfgCcdbParam.nolaterthan .value );
502- heffL = ccdb->getForTimeStamp <TH1D>(ConfEffWgtPathL.value , cfgCcdbParam.nolaterthan .value );
503- heffAL = ccdb->getForTimeStamp <TH1D>(ConfEffWgtPathAL.value , cfgCcdbParam.nolaterthan .value );
516+ if (useeffwgt) {
517+ heffL = ccdb->getForTimeStamp <TH1D>(ConfEffWgtPathL.value , cfgCcdbParam.nolaterthan .value );
518+ heffAL = ccdb->getForTimeStamp <TH1D>(ConfEffWgtPathAL.value , cfgCcdbParam.nolaterthan .value );
519+ }
520+ if (useResoRBR)
521+ hwgtRESO = ccdb->getForTimeStamp <TH1D>(ConfResoPath.value , cfgCcdbParam.nolaterthan .value );
504522 }
505523
506524 template <typename T>
@@ -733,7 +751,7 @@ struct lambdapolsp {
733751 void fillHistograms (bool tag1, bool tag2, const ROOT::Math::PxPyPzMVector& particle,
734752 const ROOT::Math::PxPyPzMVector& daughter,
735753 double psiZDCC, double psiZDCA, double psiZDC, double centrality,
736- double candmass, double candpt, float desbinvalue, double acvalue, double wgtfactor)
754+ double candmass, double candpt, float desbinvalue, double acvalue, double wgtfactor, double resowgt )
737755 {
738756 TRandom3 randPhi (0 );
739757
@@ -761,6 +779,11 @@ struct lambdapolsp {
761779 // auto phiphiStar = GetPhiInRange(particle.Phi() - phiangle);
762780
763781 acvalue = (4 / 3.14 ) * acvalue;
782+ if (useResoRBR) {
783+ Pol = Pol / resowgt;
784+ PolA = PolA / resowgt;
785+ PolC = PolC / resowgt;
786+ }
764787 // PolC = PolC / acvalue;
765788 // PolA = PolA / acvalue;
766789 // Pol = Pol / acvalue;
@@ -985,7 +1008,10 @@ struct lambdapolsp {
9851008 auto qyZDCC = collision.qyZDCC ();
9861009 auto psiZDCC = collision.psiZDCC ();
9871010 auto psiZDCA = collision.psiZDCA ();
988-
1011+ if (usepsisubbeforeshift) {
1012+ psiZDCC = 1.0 * std::atan2 (qyZDCC, qxZDCC);
1013+ psiZDCA = 1.0 * std::atan2 (qyZDCA, qxZDCA);
1014+ }
9891015 if (cqvas) {
9901016 modqxZDCA = TMath::Sqrt ((qxZDCA * qxZDCA) + (qyZDCA * qyZDCA)) * TMath::Cos (psiZDCA);
9911017 modqyZDCA = TMath::Sqrt ((qxZDCA * qxZDCA) + (qyZDCA * qyZDCA)) * TMath::Sin (psiZDCA);
@@ -999,6 +1025,7 @@ struct lambdapolsp {
9991025 }
10001026
10011027 auto psiZDC = TMath::ATan2 ((modqyZDCC - modqyZDCA), (modqxZDCC - modqxZDCA)); // full event plane*/
1028+
10021029 /* if (useonlypsis) {
10031030 psiZDC = psiZDCC - psiZDCA;
10041031 }*/
@@ -1043,6 +1070,15 @@ struct lambdapolsp {
10431070 }
10441071 }
10451072
1073+ double resowgt = 1.0 ;
1074+
1075+ if (useResoRBR) {
1076+ int binxreso = hwgtRESO->GetXaxis ()->FindBin (centrality + 0.000001 );
1077+ resowgt = hwgtRESO->GetBinContent (binxreso);
1078+ } else {
1079+ resowgt = 1.0 ;
1080+ }
1081+
10461082 // /////////checking v1////////////////////////////////
10471083 if (checkwithpub) {
10481084
@@ -1262,7 +1298,7 @@ struct lambdapolsp {
12621298 acvalue = 1.0 ;
12631299 }
12641300 if (distGrp.filldist && aLambdaTag == 0 && Lambda.M () > distGrp.lowmasscut && Lambda.M () < distGrp.highmasscut ) {
1265- histos.fill (HIST (" hcosinelambda" ), v0.v0cosPA ());
1301+ /* histos.fill(HIST("hcosinelambda"), v0.v0cosPA());
12661302 histos.fill(HIST("hdcabwv0daughlambda"), v0.dcaV0daughters());
12671303 histos.fill(HIST("hlifetimelambda"), TMath::Abs(v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * massLambda));
12681304 histos.fill(HIST("hradiuslambda"), v0.v0radius());
@@ -1272,9 +1308,16 @@ struct lambdapolsp {
12721308 histos.fill(HIST("htpcposlambda"), postrack.tpcNSigmaPr());
12731309 histos.fill(HIST("htpcneglambda"), negtrack.tpcNSigmaPi());
12741310 histos.fill(HIST("hptposlambda"), Proton.Pt());
1275- histos.fill (HIST (" hptneglambda" ), AntiPion.Pt ());
1311+ histos.fill(HIST("hptneglambda"), AntiPion.Pt());*/
1312+ auto phiL = TMath::ATan2 (v0.py (), v0.px ());
1313+ auto LcosphiminuspsiC = TMath::Cos (GetPhiInRange (phiL - psiZDCC));
1314+ auto LcosphiminuspsiA = TMath::Cos (GetPhiInRange (phiL - psiZDCA));
1315+ auto Lcosphiminuspsi = TMath::Cos (GetPhiInRange (phiL - psiZDC));
1316+ histos.fill (HIST (" hLcosphiminuspsiCvseta" ), LcosphiminuspsiC, v0.eta ());
1317+ histos.fill (HIST (" hLcosphiminuspsiAvseta" ), LcosphiminuspsiA, v0.eta ());
1318+ histos.fill (HIST (" hLcosphiminuspsivseta" ), Lcosphiminuspsi, v0.eta ());
12761319 }
1277- fillHistograms (taga, tagb, Lambda, Proton, psiZDCC, psiZDCA, psiZDC, centrality, v0.mLambda (), v0.pt (), v0.eta (), acvalue, 1.0 );
1320+ fillHistograms (taga, tagb, Lambda, Proton, psiZDCC, psiZDCA, psiZDC, centrality, v0.mLambda (), v0.pt (), v0.eta (), acvalue, 1.0 , resowgt );
12781321 }
12791322
12801323 tagb = aLambdaTag;
@@ -1289,7 +1332,7 @@ struct lambdapolsp {
12891332 acvalue = 1.0 ;
12901333 }
12911334 if (distGrp.filldist && LambdaTag == 0 && AntiLambda.M () > distGrp.lowmasscut && AntiLambda.M () < distGrp.highmasscut ) {
1292- histos.fill (HIST (" hcosineantilambda" ), v0.v0cosPA ());
1335+ /* histos.fill(HIST("hcosineantilambda"), v0.v0cosPA());
12931336 histos.fill(HIST("hdcabwv0daughantilambda"), v0.dcaV0daughters());
12941337 histos.fill(HIST("hlifetimeantilambda"), TMath::Abs(v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * massLambda));
12951338 histos.fill(HIST("hradiusantilambda"), v0.v0radius());
@@ -1299,9 +1342,16 @@ struct lambdapolsp {
12991342 histos.fill(HIST("htpcposantilambda"), postrack.tpcNSigmaPi());
13001343 histos.fill(HIST("htpcnegantilambda"), negtrack.tpcNSigmaPr());
13011344 histos.fill(HIST("hptposantilambda"), Pion.Pt());
1302- histos.fill (HIST (" hptnegantilambda" ), AntiProton.Pt ());
1345+ histos.fill(HIST("hptnegantilambda"), AntiProton.Pt());*/
1346+ auto phiAL = TMath::ATan2 (v0.py (), v0.px ());
1347+ auto ALcosphiminuspsiC = TMath::Cos (GetPhiInRange (phiAL - psiZDCC));
1348+ auto ALcosphiminuspsiA = TMath::Cos (GetPhiInRange (phiAL - psiZDCA));
1349+ auto ALcosphiminuspsi = TMath::Cos (GetPhiInRange (phiAL - psiZDC));
1350+ histos.fill (HIST (" hALcosphiminuspsiCvseta" ), ALcosphiminuspsiC, v0.eta ());
1351+ histos.fill (HIST (" hALcosphiminuspsiAvseta" ), ALcosphiminuspsiA, v0.eta ());
1352+ histos.fill (HIST (" hALcosphiminuspsivseta" ), ALcosphiminuspsi, v0.eta ());
13031353 }
1304- fillHistograms (taga, tagb, AntiLambda, AntiProton, psiZDCC, psiZDCA, psiZDC, centrality, v0.mAntiLambda (), v0.pt (), v0.eta (), acvalue, wgtvalue);
1354+ fillHistograms (taga, tagb, AntiLambda, AntiProton, psiZDCC, psiZDCA, psiZDC, centrality, v0.mAntiLambda (), v0.pt (), v0.eta (), acvalue, wgtvalue, resowgt );
13051355 }
13061356 }
13071357 }
@@ -1374,7 +1424,10 @@ struct lambdapolsp {
13741424 auto qyZDCC = collision.qyZDCC ();
13751425 auto psiZDCC = collision.psiZDCC ();
13761426 auto psiZDCA = collision.psiZDCA ();
1377-
1427+ if (usepsisubbeforeshift) {
1428+ psiZDCC = 1.0 * std::atan2 (qyZDCC, qxZDCC);
1429+ psiZDCA = 1.0 * std::atan2 (qyZDCA, qxZDCA);
1430+ }
13781431 if (cqvas) {
13791432 modqxZDCA = TMath::Sqrt ((qxZDCA * qxZDCA) + (qyZDCA * qyZDCA)) * TMath::Cos (psiZDCA);
13801433 modqyZDCA = TMath::Sqrt ((qxZDCA * qxZDCA) + (qyZDCA * qyZDCA)) * TMath::Sin (psiZDCA);
@@ -1451,6 +1504,14 @@ struct lambdapolsp {
14511504 }
14521505 }
14531506
1507+ double resowgt = 1.0 ;
1508+ if (useResoRBR) {
1509+ int binxreso = hwgtRESO->GetXaxis ()->FindBin (centrality + 0.000001 );
1510+ resowgt = hwgtRESO->GetBinContent (binxreso);
1511+ } else {
1512+ resowgt = 1.0 ;
1513+ }
1514+
14541515 // ___________________________________________________________________________________________________
14551516 // loop over V0s as necessary
14561517 for (const auto & v0 : V0s) {
@@ -1509,7 +1570,7 @@ struct lambdapolsp {
15091570 if (analyzeK0s && K0sTag) {
15101571 K0s = Pion + AntiPion;
15111572 double acvalue = 1.0 ;
1512- fillHistograms (tagc, 0 , K0s, Pion, psiZDCC, psiZDCA, psiZDC, centrality, v0.mK0Short (), v0.pt (), v0.eta (), acvalue, 1.0 );
1573+ fillHistograms (tagc, 0 , K0s, Pion, psiZDCC, psiZDCA, psiZDC, centrality, v0.mK0Short (), v0.pt (), v0.eta (), acvalue, 1.0 , resowgt );
15131574 }
15141575
15151576 int binxwgt;
@@ -1544,8 +1605,18 @@ struct lambdapolsp {
15441605 } else {
15451606 acvalue = 1.0 ;
15461607 }
1547- // double acvalue = 1.0;
1548- fillHistograms (taga, tagb, Lambda, Proton, psiZDCC, psiZDCA, psiZDC, centrality, v0.mLambda (), v0.pt (), v0.eta (), acvalue, (1 . / effwgtvalueL));
1608+
1609+ if (distGrp.filldist && aLambdaTag == 0 && Lambda.M () > distGrp.lowmasscut && Lambda.M () < distGrp.highmasscut ) {
1610+ auto phiL = TMath::ATan2 (v0.py (), v0.px ());
1611+ auto LcosphiminuspsiC = TMath::Cos (GetPhiInRange (phiL - psiZDCC));
1612+ auto LcosphiminuspsiA = TMath::Cos (GetPhiInRange (phiL - psiZDCA));
1613+ auto Lcosphiminuspsi = TMath::Cos (GetPhiInRange (phiL - psiZDC));
1614+ histos.fill (HIST (" hLcosphiminuspsiCvseta" ), LcosphiminuspsiC, v0.eta ());
1615+ histos.fill (HIST (" hLcosphiminuspsiAvseta" ), LcosphiminuspsiA, v0.eta ());
1616+ histos.fill (HIST (" hLcosphiminuspsivseta" ), Lcosphiminuspsi, v0.eta ());
1617+ }
1618+
1619+ fillHistograms (taga, tagb, Lambda, Proton, psiZDCC, psiZDCA, psiZDC, centrality, v0.mLambda (), v0.pt (), v0.eta (), acvalue, (1 . / effwgtvalueL), resowgt);
15491620 }
15501621
15511622 tagb = aLambdaTag;
@@ -1560,7 +1631,18 @@ struct lambdapolsp {
15601631 } else {
15611632 acvalue = 1.0 ;
15621633 }
1563- fillHistograms (taga, tagb, AntiLambda, AntiProton, psiZDCC, psiZDCA, psiZDC, centrality, v0.mAntiLambda (), v0.pt (), v0.eta (), acvalue, wgtvalue * (1 . / effwgtvalueAL));
1634+
1635+ if (distGrp.filldist && LambdaTag == 0 && AntiLambda.M () > distGrp.lowmasscut && AntiLambda.M () < distGrp.highmasscut ) {
1636+ auto phiAL = TMath::ATan2 (v0.py (), v0.px ());
1637+ auto ALcosphiminuspsiC = TMath::Cos (GetPhiInRange (phiAL - psiZDCC));
1638+ auto ALcosphiminuspsiA = TMath::Cos (GetPhiInRange (phiAL - psiZDCA));
1639+ auto ALcosphiminuspsi = TMath::Cos (GetPhiInRange (phiAL - psiZDC));
1640+ histos.fill (HIST (" hALcosphiminuspsiCvseta" ), ALcosphiminuspsiC, v0.eta ());
1641+ histos.fill (HIST (" hALcosphiminuspsiAvseta" ), ALcosphiminuspsiA, v0.eta ());
1642+ histos.fill (HIST (" hALcosphiminuspsivseta" ), ALcosphiminuspsi, v0.eta ());
1643+ }
1644+
1645+ fillHistograms (taga, tagb, AntiLambda, AntiProton, psiZDCC, psiZDCA, psiZDC, centrality, v0.mAntiLambda (), v0.pt (), v0.eta (), acvalue, wgtvalue * (1 . / effwgtvalueAL), resowgt);
15641646 }
15651647 }
15661648 // lastRunNumber = currentRunNumber;
0 commit comments