@@ -73,7 +73,8 @@ struct lambdapolsp {
7373 Configurable<bool > additionalEvSel{" additionalEvSel" , false , " additionalEvSel" };
7474 Configurable<bool > additionalEvSel2{" additionalEvSel2" , false , " additionalEvSel2" };
7575 Configurable<bool > additionalEvSel3{" additionalEvSel3" , false , " additionalEvSel3" };
76- Configurable<bool > correction{" correction" , false , " fill histograms including corrections" };
76+ Configurable<bool > correction1{" correction1" , false , " fill histograms including corrections 1" };
77+ Configurable<bool > correction2{" correction2" , false , " fill histograms including corrections 2" };
7778 Configurable<bool > QA{" QA" , false , " flag for QA" };
7879 Configurable<bool > mycut{" mycut" , false , " select tracks based on my cuts" };
7980 Configurable<bool > tofhit{" tofhit" , true , " select tracks based on tof hit" };
@@ -143,17 +144,21 @@ struct lambdapolsp {
143144 Configurable<int > spNbins{" spNbins" , 2000 , " Number of bins in sp" };
144145 Configurable<float > lbinsp{" lbinsp" , -1.0 , " lower bin value in sp histograms" };
145146 Configurable<float > hbinsp{" hbinsp" , 1.0 , " higher bin value in sp histograms" };
147+ Configurable<int > phiNbins{" phiNbins" , 30 , " Number of bins in phi" };
146148
147149 ConfigurableAxis configcentAxis{" configcentAxis" , {VARIABLE_WIDTH, 0.0 , 10.0 , 40.0 , 80.0 }, " Cent V0M" };
148150 ConfigurableAxis configthnAxispT{" configthnAxisPt" , {VARIABLE_WIDTH, 0.2 , 0.5 , 1.0 , 1.5 , 2.0 , 2.5 , 3.0 , 4.0 , 5.0 , 6.5 , 8.0 , 10.0 , 100.0 }, " #it{p}_{T} (GeV/#it{c})" };
149- ConfigurableAxis configetaAxis{" configetaAxis" , {VARIABLE_WIDTH, -0.8 , -0.4 , 0 , 0.4 , 0.8 }, " Eta" };
151+ ConfigurableAxis configetaAxis{" configetaAxis" , {VARIABLE_WIDTH, -0.8 , -0.4 , -0.2 , 0 , 0.2 , 0.4 , 0.8 }, " Eta" };
152+ ConfigurableAxis configthnAxisPol{" configthnAxisPol" , {VARIABLE_WIDTH, -1.0 , -0.6 , -0.2 , 0 , 0.2 , 0.4 , 0.8 }, " Pol" };
153+ ConfigurableAxis configphiAxis{" configphiAxis" , {VARIABLE_WIDTH, 0.0 , 0.2 , 0.4 , 0.8 , 1.0 , 2.0 , 2.5 , 3.0 , 4.0 , 5.0 , 5.5 , 6.28 }, " PhiAxis" };
150154
151155 SliceCache cache;
152156 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
153157
154158 void init (o2::framework::InitContext&)
155159 {
156160 AxisSpec thnAxispT{ptNbins, lbinpt, hbinpt, " #it{p}_{T} (GeV/#it{c})" };
161+ AxisSpec thnAxisRap{100 , -0.5 , 0.5 , " Rapidity" };
157162 AxisSpec thnAxisres{resNbins, lbinres, hbinres, " Reso" };
158163 AxisSpec thnAxisInvMass{IMNbins, lbinIM, hbinIM, " #it{M} (GeV/#it{c}^{2})" };
159164 AxisSpec thnAxisPol{PolNbins, lbinPol, hbinPol, " Sin(#phi - #psi)" };
@@ -162,7 +167,7 @@ struct lambdapolsp {
162167 AxisSpec etaAxis = {etaNbins, lbineta, hbineta, " Eta" };
163168 AxisSpec spAxis = {spNbins, lbinsp, hbinsp, " Sp" };
164169 AxisSpec qxZDCAxis = {QxyNbins, lbinQxy, hbinQxy, " Qx" };
165- // AxisSpec psiACAxis = {120, -6.28 , 6.28, "psiAC "};
170+ AxisSpec phiAxis = {phiNbins, 0.0 , 6.28 , " phi-phiStar " };
166171
167172 if (checkwithpub) {
168173 if (useprofile == 1 ) {
@@ -222,29 +227,36 @@ struct lambdapolsp {
222227
223228 if (!checkwithpub) {
224229 // histos.add("hVtxZ", "Vertex distribution in Z;Z (cm)", kTH1F, {{20, -10.0, 10.0}});
225- histos.add (" hpRes" , " hpRes" , HistType::kTHnSparseF , {centAxis , thnAxisres});
230+ histos.add (" hpRes" , " hpRes" , HistType::kTHnSparseF , {configcentAxis , thnAxisres});
226231 if (QA) {
227- histos.add (" hpResSin" , " hpResSin" , HistType::kTHnSparseF , {centAxis , thnAxisres});
228- histos.add (" hpCosPsiA" , " hpCosPsiA" , HistType::kTHnSparseF , {centAxis , thnAxisres});
229- histos.add (" hpCosPsiC" , " hpCosPsiC" , HistType::kTHnSparseF , {centAxis , thnAxisres});
230- histos.add (" hpSinPsiA" , " hpSinPsiA" , HistType::kTHnSparseF , {centAxis , thnAxisres});
231- histos.add (" hpSinPsiC" , " hpSinPsiC" , HistType::kTHnSparseF , {centAxis , thnAxisres});
232- histos.add (" hcentQxZDCA" , " hcentQxZDCA" , kTH2F , {{centAxis}, {qxZDCAxis}});
232+ histos.add (" hpResSin" , " hpResSin" , HistType::kTHnSparseF , {configcentAxis , thnAxisres});
233+ histos.add (" hpCosPsiA" , " hpCosPsiA" , HistType::kTHnSparseF , {configcentAxis , thnAxisres});
234+ histos.add (" hpCosPsiC" , " hpCosPsiC" , HistType::kTHnSparseF , {configcentAxis , thnAxisres});
235+ histos.add (" hpSinPsiA" , " hpSinPsiA" , HistType::kTHnSparseF , {configcentAxis , thnAxisres});
236+ histos.add (" hpSinPsiC" , " hpSinPsiC" , HistType::kTHnSparseF , {configcentAxis , thnAxisres});
237+ /* histos.add("hcentQxZDCA", "hcentQxZDCA", kTH2F, {{centAxis}, {qxZDCAxis}});
233238 histos.add("hcentQyZDCA", "hcentQyZDCA", kTH2F, {{centAxis}, {qxZDCAxis}});
234239 histos.add("hcentQxZDCC", "hcentQxZDCC", kTH2F, {{centAxis}, {qxZDCAxis}});
235- histos.add (" hcentQyZDCC" , " hcentQyZDCC" , kTH2F , {{centAxis}, {qxZDCAxis}});
240+ histos.add("hcentQyZDCC", "hcentQyZDCC", kTH2F, {{centAxis}, {qxZDCAxis}});*/
236241 }
237- if (!correction) {
238- histos.add (" hSparseLambdaPolA" , " hSparseLambdaPolA" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxispT, thnAxisPol, centAxis}, true );
239- histos.add (" hSparseLambdaPolC" , " hSparseLambdaPolC" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxispT, thnAxisPol, centAxis}, true );
240- histos.add (" hSparseAntiLambdaPolA" , " hSparseAntiLambdaPolA" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxispT, thnAxisPol, centAxis}, true );
241- histos.add (" hSparseAntiLambdaPolC" , " hSparseAntiLambdaPolC" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxispT, thnAxisPol, centAxis}, true );
242+ histos.add (" hSparseLambdaPolA" , " hSparseLambdaPolA" , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis}, true );
243+ histos.add (" hSparseLambdaPolC" , " hSparseLambdaPolC" , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis}, true );
244+ histos.add (" hSparseAntiLambdaPolA" , " hSparseAntiLambdaPolA" , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis}, true );
245+ histos.add (" hSparseAntiLambdaPolC" , " hSparseAntiLambdaPolC" , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis}, true );
246+
247+ if (correction1) {
248+ histos.add (" hSparseLambda_corr1a" , " hSparseLambda_corr1a" , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis}, true );
249+ histos.add (" hSparseLambda_corr1b" , " hSparseLambda_corr1b" , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis}, true );
250+ histos.add (" hSparseLambda_corr1c" , " hSparseLambda_corr1c" , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configphiAxis, configcentAxis}, true );
251+ histos.add (" hSparseAntiLambda_corr1a" , " hSparseAntiLambda_corr1a" , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis}, true );
252+ histos.add (" hSparseAntiLambda_corr1b" , " hSparseAntiLambda_corr1b" , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis}, true );
253+ histos.add (" hSparseAntiLambda_corr1c" , " hSparseAntiLambda_corr1c" , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configphiAxis, configcentAxis}, true );
242254 }
243- if (correction ) {
244- histos.add (" hSparseLambdaPolA_corr " , " hSparseLambdaPolA_corr " , HistType::kTHnSparseF , {thnAxisInvMass, thnAxispT, thnAxisCosThetaStar, thnAxisPol, thnAxisPol, thnAxisPol, centAxis }, true );
245- histos.add (" hSparseLambdaPolC_corr " , " hSparseLambdaPolC_corr " , HistType::kTHnSparseF , {thnAxisInvMass, thnAxispT, thnAxisCosThetaStar, thnAxisPol, thnAxisPol, thnAxisPol, centAxis }, true );
246- histos.add (" hSparseAntiLambdaPolA_corr " , " hSparseAntiLambdaPolA_corr " , HistType::kTHnSparseF , {thnAxisInvMass, thnAxispT, thnAxisCosThetaStar, thnAxisPol, thnAxisPol, thnAxisPol, centAxis }, true );
247- histos.add (" hSparseAntiLambdaPolC_corr " , " hSparseAntiLambdaPolC_corr " , HistType::kTHnSparseF , {thnAxisInvMass, thnAxispT, thnAxisCosThetaStar, thnAxisPol, thnAxisPol, thnAxisPol, centAxis }, true );
255+ if (correction2 ) {
256+ histos.add (" hSparseLambda_corr2a " , " hSparseLambda_corr2a " , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis }, true );
257+ histos.add (" hSparseLambda_corr2b " , " hSparseLambda_corr2b " , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis }, true );
258+ histos.add (" hSparseAntiLambda_corr2a " , " hSparseAntiLambda_corr2a " , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis }, true );
259+ histos.add (" hSparseAntiLambda_corr2b " , " hSparseAntiLambda_corr2b " , HistType::kTHnSparseF , {thnAxisInvMass, configthnAxispT, configetaAxis, configthnAxisPol, configcentAxis }, true );
248260 }
249261 }
250262 }
@@ -395,8 +407,7 @@ struct lambdapolsp {
395407 return ;
396408 }
397409 auto centrality = collision.centFT0C ();
398-
399- histos.fill (HIST (" hCentrality0" ), centrality);
410+ // histos.fill(HIST("hCentrality0"), centrality);
400411 if (!collision.triggereventsp ()) {
401412 return ;
402413 }
@@ -432,10 +443,10 @@ struct lambdapolsp {
432443 histos.fill (HIST (" hpCosPsiC" ), centrality, (TMath::Cos (GetPhiInRange (psiZDCC))));
433444 histos.fill (HIST (" hpSinPsiA" ), centrality, (TMath::Sin (GetPhiInRange (psiZDCA))));
434445 histos.fill (HIST (" hpSinPsiC" ), centrality, (TMath::Sin (GetPhiInRange (psiZDCC))));
435- histos.fill (HIST (" hcentQxZDCA" ), centrality, qxZDCA);
446+ /* histos.fill(HIST("hcentQxZDCA"), centrality, qxZDCA);
436447 histos.fill(HIST("hcentQyZDCA"), centrality, qyZDCA);
437448 histos.fill(HIST("hcentQxZDCC"), centrality, qxZDCC);
438- histos.fill (HIST (" hcentQyZDCC" ), centrality, qyZDCC);
449+ histos.fill(HIST("hcentQyZDCC"), centrality, qyZDCC);*/
439450 }
440451 }
441452
@@ -574,30 +585,40 @@ struct lambdapolsp {
574585 // histos.fill(HIST("hphiminuspsiC"), (phiminuspsiC));
575586 // auto cosThetaStar = eventplaneVecNorm.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()) / std::sqrt(eventplaneVecNorm.Mag2());
576587 auto cosThetaStar = fourVecDauCM.Pz () / fourVecDauCM.P (); // A0 correction
588+ auto sinThetaStar = TMath::Sqrt (1 - (cosThetaStar * cosThetaStar));
577589 auto PolC = TMath::Sin (phiminuspsiC);
578590 auto PolA = TMath::Sin (phiminuspsiA);
579591
580592 // needed for corrections
581593 auto sinPhiStar = TMath::Sin (GetPhiInRange (phiangle));
582594 auto cosPhiStar = TMath::Cos (GetPhiInRange (phiangle));
583- // auto sinThetaStarcosphiphiStar=sinThetaStar*TMath::Cos(2* GetPhiInRange((Lambda.Phi()-phiangle))); //A2 correction
595+ auto sinThetaStarcosphiphiStar = sinThetaStar * TMath::Cos (2 * GetPhiInRange (Lambda.Phi () - phiangle)); // A2 correction
596+ auto phiphiStar = GetPhiInRange (Lambda.Phi () - phiangle);
584597
585598 if (LambdaTag) {
586- if (correction) {
587- histos.fill (HIST (" hSparseLambdaPolA_corr" ), v0.mLambda (), v0.pt (), cosThetaStar, sinPhiStar, cosPhiStar, PolA, centrality);
588- histos.fill (HIST (" hSparseLambdaPolC_corr" ), v0.mLambda (), v0.pt (), cosThetaStar, sinPhiStar, cosPhiStar, PolC, centrality);
589- } else {
590- histos.fill (HIST (" hSparseLambdaPolA" ), v0.mLambda (), v0.pt (), PolA, centrality);
591- histos.fill (HIST (" hSparseLambdaPolC" ), v0.mLambda (), v0.pt (), PolC, centrality);
599+ histos.fill (HIST (" hSparseLambdaPolA" ), v0.mLambda (), v0.pt (), v0.eta (), PolA, centrality);
600+ histos.fill (HIST (" hSparseLambdaPolC" ), v0.mLambda (), v0.pt (), v0.eta (), PolC, centrality);
601+ if (correction1) {
602+ histos.fill (HIST (" hSparseLambda_corr1a" ), v0.mLambda (), v0.pt (), v0.eta (), sinPhiStar, centrality);
603+ histos.fill (HIST (" hSparseLambda_corr1b" ), v0.mLambda (), v0.pt (), v0.eta (), cosPhiStar, centrality);
604+ histos.fill (HIST (" hSparseLambda_corr1c" ), v0.mLambda (), v0.pt (), v0.eta (), phiphiStar, centrality);
605+ if (correction2) {
606+ histos.fill (HIST (" hSparseLambda_corr2a" ), v0.mLambda (), v0.pt (), v0.eta (), sinThetaStar, centrality);
607+ histos.fill (HIST (" hSparseLambda_corr2b" ), v0.mLambda (), v0.pt (), v0.eta (), sinThetaStarcosphiphiStar, centrality);
608+ }
592609 }
593610 }
594611 if (aLambdaTag) {
595- if (correction) {
596- histos.fill (HIST (" hSparseAntiLambdaPolA_corr" ), v0.mAntiLambda (), v0.pt (), cosThetaStar, sinPhiStar, cosPhiStar, PolA, centrality);
597- histos.fill (HIST (" hSparseAntiLambdaPolC_corr" ), v0.mAntiLambda (), v0.pt (), cosThetaStar, sinPhiStar, cosPhiStar, PolC, centrality);
598- } else {
599- histos.fill (HIST (" hSparseAntiLambdaPolA" ), v0.mAntiLambda (), v0.pt (), PolA, centrality);
600- histos.fill (HIST (" hSparseAntiLambdaPolC" ), v0.mAntiLambda (), v0.pt (), PolC, centrality);
612+ histos.fill (HIST (" hSparseAntiLambdaPolA" ), v0.mAntiLambda (), v0.pt (), v0.eta (), PolA, centrality);
613+ histos.fill (HIST (" hSparseAntiLambdaPolC" ), v0.mAntiLambda (), v0.pt (), v0.eta (), PolC, centrality);
614+ if (correction1) {
615+ histos.fill (HIST (" hSparseAntiLambda_corr1a" ), v0.mAntiLambda (), v0.pt (), v0.eta (), sinPhiStar, centrality);
616+ histos.fill (HIST (" hSparseAntiLambda_corr1b" ), v0.mAntiLambda (), v0.pt (), v0.eta (), cosPhiStar, centrality);
617+ histos.fill (HIST (" hSparseAntiLambda_corr1c" ), v0.mAntiLambda (), v0.pt (), v0.eta (), phiphiStar, centrality);
618+ if (correction2) {
619+ histos.fill (HIST (" hSparseAntiLambda_corr2a" ), v0.mAntiLambda (), v0.pt (), v0.eta (), sinThetaStar, centrality);
620+ histos.fill (HIST (" hSparseAntiLambda_corr2b" ), v0.mAntiLambda (), v0.pt (), v0.eta (), sinThetaStarcosphiphiStar, centrality);
621+ }
601622 }
602623 }
603624 }
0 commit comments