@@ -56,6 +56,9 @@ constexpr double massSigmaParameters[4][2]{
5656 {1.03468e-1 , 0.1898 }};
5757static const std::vector<std::string> massSigmaParameterNames{" p0" , " p1" , " p2" , " p3" };
5858static const std::vector<std::string> speciesNames{" Xi" , " Omega" };
59+ const double AlphaXi[2 ] = {-0.390 , 0.371 }; // decay parameter of XiMinus and XiPlus
60+ const double AlphaOmega[2 ] = {0.0154 , -0.018 }; // decay parameter of OmegaMinus and OmegaPlus
61+ const double AlphaLambda[2 ] = {0.747 , -0.757 }; // decay parameter of Lambda and AntiLambda
5962
6063std::shared_ptr<TH2> hMassBeforeSelVsPt[2 ];
6164std::shared_ptr<TH2> hMassAfterSelVsPt[2 ];
@@ -125,10 +128,29 @@ static const std::vector<std::string> labelsCutScore = {"Background score", "Sig
125128
126129struct cascadeFlow {
127130
131+ // Output filling criteria
132+ Configurable<bool > isFillTree{" isFillTree" , 1 , " " };
133+ Configurable<bool > isFillTHNXi{" isFillTHNXi" , 1 , " " };
134+ Configurable<bool > isFillTHNOmega{" isFillTHNOmega" , 1 , " " };
135+
128136 // axes
129137 ConfigurableAxis axisQVs{" axisQVs" , {500 , -10 .f , 10 .f }, " axisQVs" };
130138 ConfigurableAxis axisQVsNorm{" axisQVsNorm" , {200 , -1 .f , 1 .f }, " axisQVsNorm" };
131139
140+ // THN axes
141+ ConfigurableAxis thnConfigAxisFT0C{" thnConfigAxisFT0C" , {80 , 0 , 80 }, " " };
142+ ConfigurableAxis thnConfigAxisPt{" thnConfigAxisPt" , {50 , 0 , 10 }, " " };
143+ ConfigurableAxis thnConfigAxisCharge{" thnConfigAxisCharge" , {2 , 0 , 2 }, " " };
144+ ConfigurableAxis thnConfigAxisMassXi{" thnConfigAxisMassXi" , {45 , 1.300 , 1.345 }, " " };
145+ ConfigurableAxis thnConfigAxisMassOmega{" thnConfigAxisMassOmega" , {45 , 1.655 , 1.690 }, " " };
146+ ConfigurableAxis thnConfigAxisMassLambda{" thnConfigAxisMassLambda" , {60 , 1.1 , 1.13 }, " " };
147+ ConfigurableAxis thnConfigAxisBDTScore{" thnConfigAxisBDTScore" , {60 , 0.4 , 1 }, " " };
148+ ConfigurableAxis thnConfigAxisV2{" thnConfigAxiV2" , {100 , -1 ., 1 .}, " " };
149+ ConfigurableAxis thnConfigAxisPzs2Xi{" thnConffigAxiPzs2Xi" , {200 , -2.8 , 2.8 }, " " };
150+ ConfigurableAxis thnConfigAxisPzs2Omega{" thnConfigAxiPzs2Omega" , {200 , -65 , 65 }, " " };
151+ ConfigurableAxis thnConfigAxisPzs2Lambda{" thnConfigAxiPzs2Lambda" , {200 , -2 , 2 }, " " };
152+ ConfigurableAxis thnConfigAxisCos2Theta{" thnConfigAxiCos2Theta" , {100 , 0 , 1 }, " " };
153+
132154 // Event selection criteria
133155 Configurable<bool > isStoreTrueCascOnly{" isStoreTrueCascOnly" , 1 , " " };
134156 Configurable<float > cutzvertex{" cutzvertex" , 10 .0f , " Accepted z-vertex range (cm)" };
@@ -157,6 +179,7 @@ struct cascadeFlow {
157179 Configurable<float > nsigmatpcPi{" nsigmatpcPi" , 5 , " nsigmatpcPi" };
158180 Configurable<float > mintpccrrows{" mintpccrrows" , 70 , " mintpccrrows" };
159181 Configurable<float > etaCascMCGen{" etaCascMCGen" , 0.8 , " etaCascMCGen" };
182+ Configurable<float > etaCasc{" etaCasc" , 0.8 , " etaCasc" };
160183 Configurable<float > yCascMCGen{" yCascMCGen" , 0.5 , " yCascMCGen" };
161184
162185 Configurable<std::string> ccdbUrl{" ccdbUrl" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
@@ -390,6 +413,7 @@ struct cascadeFlow {
390413 casc.pt (),
391414 casc.eta (),
392415 casc.phi (),
416+ casc.mLambda (),
393417 casc.mXi (),
394418 casc.mOmega (),
395419 v2CSP,
@@ -463,6 +487,30 @@ struct cascadeFlow {
463487 histos.add (" hv1EPvsv1SP" , " hV1EPvsV1SP" , HistType::kTH2F , {{100 , -1 , 1 }, {100 , -1 , 1 }});
464488 histos.add (" hv1SP_ZDCA_vs_ZDCC" , " hv1SP_ZDCA_vs_ZDCC" , HistType::kTH2F , {{100 , -1 , 1 }, {100 , -1 , 1 }});
465489
490+ const AxisSpec thnAxisFT0C{thnConfigAxisFT0C, " FT0C (%)" };
491+ const AxisSpec thnAxisPt{thnConfigAxisPt, " p_{T}" };
492+ const AxisSpec thnAxisCharge{thnConfigAxisCharge, " Charge" };
493+ const AxisSpec thnAxisMassXi{thnConfigAxisMassXi, " inv. mass (#Lambda #pi) (GeV/#it{c}^{2})" };
494+ const AxisSpec thnAxisMassOmega{thnConfigAxisMassOmega, " inv. mass (#Lambda K) (GeV/#it{c}^{2})" };
495+ const AxisSpec thnAxisMassLambda{thnConfigAxisMassLambda, " inv. mass (p #pi) (GeV/#it{c}^{2})" };
496+ const AxisSpec thnAxisBDTScore{thnConfigAxisBDTScore, " BDT score" };
497+ const AxisSpec thnAxisV2{thnConfigAxisV2, " v_{2}" };
498+ const AxisSpec thnAxisPzs2Xi{thnConfigAxisPzs2Xi, " Pzs2Xi" };
499+ const AxisSpec thnAxisPzs2Omega{thnConfigAxisPzs2Omega, " Pzs2Omega" };
500+ const AxisSpec thnAxisPzs2Lambda{thnConfigAxisPzs2Lambda, " Pzs2Lambda" };
501+ const AxisSpec thnAxisCos2Theta{thnConfigAxisCos2Theta, " Cos2Theta" };
502+
503+ if (isFillTHNXi) {
504+ histos.add (" hXiV2" , " THn for v2 of Xi" , HistType::kTHnSparseF , {thnAxisFT0C, thnAxisCharge, thnAxisPt, thnAxisMassXi, thnAxisBDTScore, thnAxisV2});
505+ histos.add (" hXiPzs2" , " THn for Pzs2 of Xi" , HistType::kTHnSparseF , {thnAxisFT0C, thnAxisCharge, thnAxisPt, thnAxisMassXi, thnAxisMassLambda, thnAxisBDTScore, thnAxisPzs2Xi, thnAxisPzs2Lambda});
506+ histos.add (" hXiCos2Theta" , " THn for Cos2Theta of Xi" , HistType::kTHnSparseF , {thnAxisFT0C, thnAxisCharge, thnAxisPt, thnAxisMassXi, thnAxisMassLambda, thnAxisBDTScore, thnAxisCos2Theta, thnAxisCos2Theta});
507+ }
508+ if (isFillTHNOmega) {
509+ histos.add (" hOmegaV2" , " THn for v2 of Omega" , HistType::kTHnSparseF , {thnAxisFT0C, thnAxisCharge, thnAxisPt, thnAxisMassOmega, thnAxisBDTScore, thnAxisV2});
510+ histos.add (" hOmegaPzs2" , " THn for Pzs2 of Omega" , HistType::kTHnSparseF , {thnAxisFT0C, thnAxisCharge, thnAxisPt, thnAxisMassOmega, thnAxisMassLambda, thnAxisBDTScore, thnAxisPzs2Omega, thnAxisPzs2Lambda});
511+ histos.add (" hOmegaCos2Theta" , " THn for Cos2Theta of Omega" , HistType::kTHnSparseF , {thnAxisFT0C, thnAxisCharge, thnAxisPt, thnAxisMassOmega, thnAxisMassLambda, thnAxisBDTScore, thnAxisCos2Theta, thnAxisCos2Theta});
512+ }
513+
466514 histosMCGen.add (" h2DGenXiEta08" , " h2DGenXiEta08" , HistType::kTH2F , {{100 , 0 , 100 }, {400 , 0 , 20 }});
467515 histosMCGen.add (" h2DGenOmegaEta08" , " h2DGenOmegaEta08" , HistType::kTH2F , {{100 , 0 , 100 }, {400 , 0 , 20 }});
468516 histosMCGen.add (" h2DGenXiY05" , " h2DGenXiY05" , HistType::kTH2F , {{100 , 0 , 100 }, {400 , 0 , 20 }});
@@ -712,12 +760,42 @@ struct cascadeFlow {
712760 float v1SP = 0.5 * (v1SP_ZDCA - v1SP_ZDCC);
713761 float v1EP = 0.5 * (v1EP_ZDCA - v1EP_ZDCC); // same as v1SP
714762
763+ // polarization variables
764+ double masses[2 ]{o2::constants::physics::MassXiMinus, o2::constants::physics::MassOmegaMinus};
765+ ROOT::Math::PxPyPzMVector cascadeVector[2 ], lambdaVector, protonVector;
766+ float cosThetaStarLambda[2 ], cosThetaStarProton;
767+ lambdaVector.SetCoordinates (casc.pxlambda (), casc.pylambda (), casc.pzlambda (), o2::constants::physics::MassLambda);
768+ ROOT::Math::Boost lambdaBoost{lambdaVector.BoostToCM ()};
769+ if (casc.sign () > 0 ) {
770+ protonVector.SetCoordinates (casc.pxneg (), casc.pyneg (), casc.pzneg (), o2::constants::physics::MassProton);
771+ } else {
772+ protonVector.SetCoordinates (casc.pxpos (), casc.pypos (), casc.pzpos (), o2::constants::physics::MassProton);
773+ }
774+ auto boostedProton{lambdaBoost (protonVector)};
775+ cosThetaStarProton = boostedProton.Pz () / boostedProton.P ();
776+ for (int i{0 }; i < 2 ; ++i) {
777+ cascadeVector[i].SetCoordinates (casc.px (), casc.py (), casc.pz (), masses[i]);
778+ ROOT::Math::Boost cascadeBoost{cascadeVector[i].BoostToCM ()};
779+ auto boostedLambda{cascadeBoost (lambdaVector)};
780+ cosThetaStarLambda[i] = boostedLambda.Pz () / boostedLambda.P ();
781+ }
782+ int ChargeIndex = 0 ;
783+ if (casc.sign () > 0 )
784+ ChargeIndex = 1 ;
785+ double Pzs2Xi = cosThetaStarLambda[0 ] * std::sin (2 * (casc.phi () - PsiT0C)) / cascadev2::AlphaXi[ChargeIndex];
786+ double Pzs2Omega = cosThetaStarLambda[1 ] * std::sin (2 * (casc.phi () - PsiT0C)) / cascadev2::AlphaOmega[ChargeIndex];
787+ double Cos2ThetaXi = cosThetaStarLambda[0 ] * cosThetaStarLambda[0 ];
788+ double Cos2ThetaOmega = cosThetaStarLambda[1 ] * cosThetaStarLambda[1 ];
789+ double Pzs2LambdaFromCasc = cosThetaStarProton * std::sin (2 * (casc.phi () - PsiT0C)) / cascadev2::AlphaLambda[ChargeIndex];
790+ double Cos2ThetaLambda = cosThetaStarProton * cosThetaStarProton;
791+
715792 histos.fill (HIST (" hv2CEPvsFT0C" ), coll.centFT0C (), v2CEP);
716793 histos.fill (HIST (" hv2CEPvsv2CSP" ), v2CSP, v2CEP);
717794 histos.fill (HIST (" hv1EPvsv1SP" ), v1SP, v1EP);
718795 histos.fill (HIST (" hv1SP_ZDCA_vs_ZDCC" ), v1SP_ZDCC, v1SP_ZDCA);
719796 histos.fill (HIST (" hCascadePhi" ), casc.phi ());
720797 histos.fill (HIST (" hcascminuspsiT0C" ), cascminuspsiT0C);
798+
721799 double values[4 ]{casc.mXi (), casc.pt (), v2CSP, coll.centFT0C ()};
722800 if (isSelectedCasc[0 ]) {
723801 cascadev2::hSparseV2C[0 ]->Fill (values);
@@ -732,8 +810,24 @@ struct cascadeFlow {
732810 BDTresponse[0 ] = bdtScore[0 ][1 ];
733811 BDTresponse[1 ] = bdtScore[1 ][1 ];
734812 }
735- if (isSelectedCasc[0 ] || isSelectedCasc[1 ])
736- fillAnalysedTable (coll, hasEventPlane, hasSpectatorPlane, casc, v2CSP, v2CEP, v1SP_ZDCA, v1SP_ZDCC, PsiT0C, BDTresponse[0 ], BDTresponse[1 ], 0 );
813+
814+ if (std::abs (casc.eta ()) < etaCasc) {
815+ if (isFillTHNXi) {
816+ histos.get <THnSparse>(HIST (" hXiV2" ))->Fill (coll.centFT0C (), ChargeIndex, casc.pt (), casc.mXi (), BDTresponse[0 ], v2CEP);
817+ histos.get <THnSparse>(HIST (" hXiPzs2" ))->Fill (coll.centFT0C (), ChargeIndex, casc.pt (), casc.mXi (), casc.mLambda (), BDTresponse[0 ], Pzs2Xi, Pzs2LambdaFromCasc);
818+ histos.get <THnSparse>(HIST (" hXiCos2Theta" ))->Fill (coll.centFT0C (), ChargeIndex, casc.pt (), casc.mXi (), casc.mLambda (), BDTresponse[0 ], Cos2ThetaXi, Cos2ThetaLambda);
819+ }
820+ if (isFillTHNOmega) {
821+ histos.get <THnSparse>(HIST (" hOmegaV2" ))->Fill (coll.centFT0C (), ChargeIndex, casc.pt (), casc.mOmega (), BDTresponse[1 ], v2CEP);
822+ histos.get <THnSparse>(HIST (" hOmegaPzs2" ))->Fill (coll.centFT0C (), ChargeIndex, casc.pt (), casc.mOmega (), casc.mLambda (), BDTresponse[1 ], Pzs2Omega, Pzs2LambdaFromCasc);
823+ histos.get <THnSparse>(HIST (" hOmegaCos2Theta" ))->Fill (coll.centFT0C (), ChargeIndex, casc.pt (), casc.mOmega (), casc.mLambda (), BDTresponse[1 ], Cos2ThetaOmega, Cos2ThetaLambda);
824+ }
825+ }
826+
827+ if (isSelectedCasc[0 ] || isSelectedCasc[1 ]) {
828+ if (isFillTree)
829+ fillAnalysedTable (coll, hasEventPlane, hasSpectatorPlane, casc, v2CSP, v2CEP, v1SP_ZDCA, v1SP_ZDCC, PsiT0C, BDTresponse[0 ], BDTresponse[1 ], 0 );
830+ }
737831 }
738832 }
739833
@@ -884,7 +978,8 @@ struct cascadeFlow {
884978 BDTresponse[1 ] = bdtScore[1 ][1 ];
885979 }
886980 if (isSelectedCasc[0 ] || isSelectedCasc[1 ])
887- fillAnalysedTable (coll, hasEventPlane, hasSpectatorPlane, casc, v2CSP, v2CEP, v1SP_ZDCA, v1SP_ZDCC, PsiT0C, BDTresponse[0 ], BDTresponse[1 ], 0 );
981+ if (isFillTree)
982+ fillAnalysedTable (coll, hasEventPlane, hasSpectatorPlane, casc, v2CSP, v2CEP, v1SP_ZDCA, v1SP_ZDCC, PsiT0C, BDTresponse[0 ], BDTresponse[1 ], 0 );
888983 }
889984 }
890985
0 commit comments