@@ -105,6 +105,7 @@ struct phipbpb {
105105 Configurable<bool > additionalEvsel{" additionalEvsel" , false , " Additional event selcection" };
106106 Configurable<bool > timFrameEvsel{" timFrameEvsel" , false , " TPC Time frame boundary cut" };
107107 Configurable<bool > isMC{" isMC" , false , " use MC" };
108+ Configurable<bool > genacceptancecut{" genacceptancecut" , true , " use acceptance cut for generated" };
108109 Configurable<bool > avoidsplitrackMC{" avoidsplitrackMC" , false , " avoid split track in MC" };
109110 Configurable<bool > islike{" islike" , false , " use like" };
110111 Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
@@ -211,13 +212,15 @@ struct phipbpb {
211212 histos.add (" h1PhiRecsplit" , " Phi meson Rec split" , kTH1F , {{100 , 0 .0f , 10 .0f }});
212213 histos.add (" CentPercentileMCRecHist" , " MC Centrality" , kTH1F , {{100 , 0 .0f , 100 .0f }});
213214 if (!fillRapidity) {
215+ histos.add (" hSparseV2SASameEvent_costhetastarOP_beam_MCGen" , " hSparseV2SASameEvent_costhetastar_beamOP_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisPhiminusPsi, thnAxisCentrality});
214216 histos.add (" hSparseV2SASameEvent_costhetastarOP_MCGen" , " hSparseV2SASameEvent_costhetastarOP_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisPhiminusPsi, thnAxisCentrality});
215217 histos.add (" hSparseV2SASameEvent_costhetastarIP_MCGen" , " hSparseV2SASameEvent_costhetastarIP_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisPhiminusPsi, thnAxisCentrality});
216218 histos.add (" hSparseV2SASameEvent_SA_MCGen" , " hSparseV2SASameEvent_SA_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisPhiminusPsi, thnAxisCentrality});
217219 histos.add (" hSparseV2SASameEvent_costheta_SA_MCGen" , " hSparseV2SASameEvent_costheta_SA_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxiscosthetaSA, thnAxisPhiminusPsi, thnAxisCentrality});
218220 histos.add (" hSparseV2SASameEvent_SA_A0_MCGen" , " hSparseV2SASameEvent_SA_A0_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisPhiminusPsi, thnAxisCentrality});
219221 histos.add (" hSparseV2SASameEvent_V2_MCGen" , " hSparseV2SASameEvent_V2_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisCentrality});
220222
223+ histos.add (" hSparseV2SASameEvent_costhetastarOP_beam_MCRec" , " hSparseV2SASameEvent_costhetastar_beamOP_MCRec" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisPhiminusPsi, thnAxisCentrality});
221224 histos.add (" hSparseV2SASameEvent_costhetastarOP_MCRec" , " hSparseV2SASameEvent_costhetastarOP_MCRec" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisPhiminusPsi, thnAxisCentrality});
222225 histos.add (" hSparseV2SASameEvent_costhetastarIP_MCRec" , " hSparseV2SASameEvent_costhetastarIP_MCRec" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisPhiminusPsi, thnAxisCentrality});
223226 histos.add (" hSparseV2SASameEvent_SA_MCRec" , " hSparseV2SASameEvent_SA_MCRec" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisPhiminusPsi, thnAxisCentrality});
@@ -226,13 +229,15 @@ struct phipbpb {
226229 histos.add (" hSparseV2SASameEvent_V2_MCRec" , " hSparseV2SASameEvent_V2_MCRec" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisCentrality});
227230 }
228231 if (fillRapidity) {
232+ histos.add (" hSparseV2SASameEvent_costhetastarOP_beam_MCGen" , " hSparseV2SASameEvent_costhetastar_beamOP_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisRapidity, thnAxisCentrality});
229233 histos.add (" hSparseV2SASameEvent_costhetastarOP_MCGen" , " hSparseV2SASameEvent_costhetastarOP_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisRapidity, thnAxisCentrality});
230234 histos.add (" hSparseV2SASameEvent_costhetastarIP_MCGen" , " hSparseV2SASameEvent_costhetastarIP_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisRapidity, thnAxisCentrality});
231235 histos.add (" hSparseV2SASameEvent_SA_MCGen" , " hSparseV2SASameEvent_SA_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisRapidity, thnAxisCentrality});
232236 histos.add (" hSparseV2SASameEvent_costheta_SA_MCGen" , " hSparseV2SASameEvent_costheta_SA_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxiscosthetaSA, thnAxisRapidity, thnAxisCentrality});
233237 histos.add (" hSparseV2SASameEvent_SA_A0_MCGen" , " hSparseV2SASameEvent_SA_A0_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisRapidity, thnAxisCentrality});
234238 histos.add (" hSparseV2SASameEvent_V2_MCGen" , " hSparseV2SASameEvent_V2_MCGen" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisCentrality});
235239
240+ histos.add (" hSparseV2SASameEvent_costhetastarOP_beam_MCRec" , " hSparseV2SASameEvent_costhetastar_beamOP_MCRec" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisRapidity, thnAxisCentrality});
236241 histos.add (" hSparseV2SASameEvent_costhetastarOP_MCRec" , " hSparseV2SASameEvent_costhetastarOP_MCRec" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisRapidity, thnAxisCentrality});
237242 histos.add (" hSparseV2SASameEvent_costhetastarIP_MCRec" , " hSparseV2SASameEvent_costhetastarIP_MCRec" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisRapidity, thnAxisCentrality});
238243 histos.add (" hSparseV2SASameEvent_SA_MCRec" , " hSparseV2SASameEvent_SA_MCRec" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisRapidity, thnAxisCentrality});
@@ -366,7 +371,7 @@ struct phipbpb {
366371
367372 using BinningTypeVertexContributor = ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentFT0C, aod::epcalibrationtable::PsiFT0C>;
368373 ROOT::Math::PxPyPzMVector PhiMesonMother, KaonPlus, KaonMinus, fourVecDauCM;
369- ROOT::Math::XYZVector threeVecDauCM, threeVecDauCMXY, eventplaneVec, eventplaneVecNorm;
374+ ROOT::Math::XYZVector threeVecDauCM, threeVecDauCMXY, eventplaneVec, eventplaneVecNorm, beamvector ;
370375
371376 void processSameEvent (EventCandidates::iterator const & collision, TrackCandidates const & tracks, aod::BCs const &)
372377 {
@@ -762,7 +767,7 @@ struct phipbpb {
762767 if (mothertrack1 != mothertrack2) {
763768 continue ;
764769 }
765- if (std::abs (mothertrack1.y ()) > 0.5 ) {
770+ if (std::abs (mothertrack1.y ()) > confRapidity ) {
766771 continue ;
767772 }
768773 if (std::abs (mothertrack1.pdgCode ()) != 333 ) {
@@ -792,20 +797,23 @@ struct phipbpb {
792797 ROOT::Math::Boost boost{PhiMesonMother.BoostToCM ()};
793798 fourVecDauCM = boost (KaonMinus);
794799 threeVecDauCM = fourVecDauCM.Vect ();
800+ beamvector = ROOT::Math::XYZVector (0.0 , 0.0 , 1.0 );
795801 threeVecDauCMXY = ROOT::Math::XYZVector (threeVecDauCM.X (), threeVecDauCM.Y (), 0 .);
796802 eventplaneVec = ROOT::Math::XYZVector (std::cos (2.0 * psiFT0C), std::sin (2.0 * psiFT0C), 0 );
797803 eventplaneVecNorm = ROOT::Math::XYZVector (std::sin (2.0 * psiFT0C), -std::cos (2.0 * psiFT0C), 0 );
798804 auto cosPhistarminuspsi = GetPhiInRange (fourVecDauCM.Phi () - psiFT0C);
799805 auto SA = TMath::Cos (2.0 * cosPhistarminuspsi);
800806 // auto cosThetaStarOP = TMath::Abs(eventplaneVecNorm.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()) / std::sqrt(eventplaneVecNorm.Mag2()));
801807 auto cosThetaStarOP = eventplaneVecNorm.Dot (threeVecDauCM) / std::sqrt (threeVecDauCM.Mag2 ()) / std::sqrt (eventplaneVecNorm.Mag2 ());
808+ auto cosThetaStarOPbeam = beamvector.Dot (threeVecDauCM) / std::sqrt (threeVecDauCM.Mag2 ()) / std::sqrt (beamvector.Mag2 ());
802809 auto SA_A0 = 1 - (cosThetaStarOP * cosThetaStarOP);
803810 // auto cosThetaStarIP = TMath::Abs(eventplaneVec.Dot(threeVecDauCM) / std::sqrt(threeVecDauCM.Mag2()) / std::sqrt(eventplaneVec.Mag2()));
804811 auto cosThetaStarIP = eventplaneVec.Dot (threeVecDauCM) / std::sqrt (threeVecDauCM.Mag2 ()) / std::sqrt (eventplaneVec.Mag2 ());
805812 auto phiminuspsi = GetPhiInRange (PhiMesonMother.Phi () - psiFT0C);
806813 auto v2 = TMath::Cos (2.0 * phiminuspsi);
807814 if (!fillRapidity) {
808815 histos.fill (HIST (" hSparseV2SASameEvent_costhetastarOP_MCRec" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOP, phiminuspsi, centrality);
816+ histos.fill (HIST (" hSparseV2SASameEvent_costhetastarOP_beam_MCRec" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOPbeam, phiminuspsi, centrality);
809817 histos.fill (HIST (" hSparseV2SASameEvent_costheta_SA_MCRec" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOP * cosThetaStarOP, phiminuspsi, centrality);
810818 histos.fill (HIST (" hSparseV2SASameEvent_costhetastarIP_MCRec" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarIP, phiminuspsi, centrality);
811819 histos.fill (HIST (" hSparseV2SASameEvent_SA_MCRec" ), PhiMesonMother.M (), PhiMesonMother.Pt (), SA, phiminuspsi, centrality);
@@ -814,6 +822,7 @@ struct phipbpb {
814822 }
815823 if (fillRapidity) {
816824 histos.fill (HIST (" hSparseV2SASameEvent_costhetastarOP_MCRec" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOP, TMath::Abs (PhiMesonMother.Rapidity ()), centrality);
825+ histos.fill (HIST (" hSparseV2SASameEvent_costhetastarOP_beam_MCRec" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOPbeam, TMath::Abs (PhiMesonMother.Rapidity ()), centrality);
817826 histos.fill (HIST (" hSparseV2SASameEvent_costheta_SA_MCRec" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOP * cosThetaStarOP, TMath::Abs (PhiMesonMother.Rapidity ()), centrality);
818827 histos.fill (HIST (" hSparseV2SASameEvent_costhetastarIP_MCRec" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarIP, TMath::Abs (PhiMesonMother.Rapidity ()), centrality);
819828 histos.fill (HIST (" hSparseV2SASameEvent_SA_MCRec" ), PhiMesonMother.M (), PhiMesonMother.Pt (), SA, TMath::Abs (PhiMesonMother.Rapidity ()), centrality);
@@ -826,7 +835,7 @@ struct phipbpb {
826835 }
827836 // loop over generated particle
828837 for (auto & mcParticle : GenParticles) {
829- if (std::abs (mcParticle.y ()) > 0.5 ) {
838+ if (std::abs (mcParticle.y ()) > confRapidity ) {
830839 continue ;
831840 }
832841 if (mcParticle.pdgCode () != 333 ) {
@@ -843,10 +852,20 @@ struct phipbpb {
843852 continue ;
844853 }
845854 if (kCurrentDaughter .pdgCode () == +321 ) {
846- daughtp = true ;
855+ if (genacceptancecut && kCurrentDaughter .pt () > cfgCutPT && TMath::Abs (kCurrentDaughter .eta ()) < cfgCutEta) {
856+ daughtp = true ;
857+ }
858+ if (!genacceptancecut) {
859+ daughtp = true ;
860+ }
847861 KaonPlus = ROOT::Math::PxPyPzMVector (kCurrentDaughter .px (), kCurrentDaughter .py (), kCurrentDaughter .pz (), massKa);
848862 } else if (kCurrentDaughter .pdgCode () == -321 ) {
849- daughtm = true ;
863+ if (genacceptancecut && kCurrentDaughter .pt () > cfgCutPT && TMath::Abs (kCurrentDaughter .eta ()) < cfgCutEta) {
864+ daughtm = true ;
865+ }
866+ if (!genacceptancecut) {
867+ daughtm = true ;
868+ }
850869 KaonMinus = ROOT::Math::PxPyPzMVector (kCurrentDaughter .px (), kCurrentDaughter .py (), kCurrentDaughter .pz (), massKa);
851870 }
852871 }
@@ -856,17 +875,20 @@ struct phipbpb {
856875 fourVecDauCM = boost (KaonMinus);
857876 threeVecDauCM = fourVecDauCM.Vect ();
858877 threeVecDauCMXY = ROOT::Math::XYZVector (threeVecDauCM.X (), threeVecDauCM.Y (), 0 .);
878+ beamvector = ROOT::Math::XYZVector (0.0 , 0.0 , 1.0 );
859879 eventplaneVec = ROOT::Math::XYZVector (std::cos (2.0 * psiFT0C), std::sin (2.0 * psiFT0C), 0 );
860880 eventplaneVecNorm = ROOT::Math::XYZVector (std::sin (2.0 * psiFT0C), -std::cos (2.0 * psiFT0C), 0 );
861881 auto cosPhistarminuspsi = GetPhiInRange (fourVecDauCM.Phi () - psiFT0C);
862882 auto SA = TMath::Cos (2.0 * cosPhistarminuspsi);
863883 auto cosThetaStarOP = TMath::Abs (eventplaneVecNorm.Dot (threeVecDauCM) / std::sqrt (threeVecDauCM.Mag2 ()) / std::sqrt (eventplaneVecNorm.Mag2 ()));
884+ auto cosThetaStarOPbeam = TMath::Abs (beamvector.Dot (threeVecDauCM) / std::sqrt (threeVecDauCM.Mag2 ()) / std::sqrt (beamvector.Mag2 ()));
864885 auto SA_A0 = 1 - (cosThetaStarOP * cosThetaStarOP);
865886 auto cosThetaStarIP = TMath::Abs (eventplaneVec.Dot (threeVecDauCM) / std::sqrt (threeVecDauCM.Mag2 ()) / std::sqrt (eventplaneVec.Mag2 ()));
866887 auto phiminuspsi = GetPhiInRange (PhiMesonMother.Phi () - psiFT0C);
867888 auto v2 = TMath::Cos (2.0 * phiminuspsi);
868889 if (!fillRapidity) {
869890 histos.fill (HIST (" hSparseV2SASameEvent_costhetastarOP_MCGen" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOP, phiminuspsi, centrality);
891+ histos.fill (HIST (" hSparseV2SASameEvent_costhetastarOP_beam_MCGen" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOPbeam, phiminuspsi, centrality);
870892 histos.fill (HIST (" hSparseV2SASameEvent_costheta_SA_MCGen" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOP * cosThetaStarOP, phiminuspsi, centrality);
871893 histos.fill (HIST (" hSparseV2SASameEvent_costhetastarIP_MCGen" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarIP, phiminuspsi, centrality);
872894 histos.fill (HIST (" hSparseV2SASameEvent_SA_MCGen" ), PhiMesonMother.M (), PhiMesonMother.Pt (), SA, phiminuspsi, centrality);
@@ -875,6 +897,7 @@ struct phipbpb {
875897 }
876898 if (fillRapidity) {
877899 histos.fill (HIST (" hSparseV2SASameEvent_costhetastarOP_MCGen" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOP, TMath::Abs (PhiMesonMother.Rapidity ()), centrality);
900+ histos.fill (HIST (" hSparseV2SASameEvent_costhetastarOP_beam_MCGen" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOPbeam, TMath::Abs (PhiMesonMother.Rapidity ()), centrality);
878901 histos.fill (HIST (" hSparseV2SASameEvent_costheta_SA_MCGen" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarOP * cosThetaStarOP, TMath::Abs (PhiMesonMother.Rapidity ()), centrality);
879902 histos.fill (HIST (" hSparseV2SASameEvent_costhetastarIP_MCGen" ), PhiMesonMother.M (), PhiMesonMother.Pt (), cosThetaStarIP, TMath::Abs (PhiMesonMother.Rapidity ()), centrality);
880903 histos.fill (HIST (" hSparseV2SASameEvent_SA_MCGen" ), PhiMesonMother.M (), PhiMesonMother.Pt (), SA, TMath::Abs (PhiMesonMother.Rapidity ()), centrality);
0 commit comments