@@ -295,14 +295,13 @@ struct HigherMassResonances {
295295 // For MC
296296 hMChists.add (" events_check" , " No. of events in the generated MC" , kTH1I , {{20 , 0 , 20 }});
297297 hMChists.add (" events_checkrec" , " No. of events in the reconstructed MC" , kTH1I , {{20 , 0 , 20 }});
298- hMChists.add (" Genf1710" , " Gen f_{0}(1710)" , kTHnSparseF , {multiplicityAxis, ptAxis});
299- hMChists.add (" Recf1710_pt1" , " Rec f_{0}(1710) p_{T}" , kTHnSparseF , {multiplicityAxis, ptAxis, glueballMassAxis});
300- hMChists.add (" Recf1710_pt2" , " Rec f_{0}(1710) p_{T}" , kTHnSparseF , {multiplicityAxis, ptAxis, glueballMassAxis});
301- hMChists.add (" Recf1710_p" , " Rec f_{0}(1710) p" , kTH1F , {ptAxis});
298+ hMChists.add (" Genf1710" , " Gen f_{0}(1710)" , kTHnSparseF , {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL });
299+ hMChists.add (" Recf1710_pt1" , " Rec f_{0}(1710) p_{T}" , kTHnSparseF , {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL });
300+ hMChists.add (" Recf1710_pt2" , " Rec f_{0}(1710) p_{T}" , kTHnSparseF , {multiplicityAxis, ptAxis, glueballMassAxis, thnAxisPOL });
301+ // hMChists.add("Recf1710_p", "Rec f_{0}(1710) p", kTH1F, {ptAxis});
302302 hMChists.add (" h1Recsplit" , " Rec p_{T}2" , kTH1F , {ptAxis});
303-
304- hMChists.add (" Recf1710_mass" , " Rec f_{0}(1710) mass" , kTH1F , {glueballMassAxis});
305- hMChists.add (" Genf1710_mass" , " Gen f_{0}(1710) mass" , kTH1F , {glueballMassAxis});
303+ // hMChists.add("Recf1710_mass", "Rec f_{0}(1710) mass", kTH1F, {glueballMassAxis});
304+ // hMChists.add("Genf1710_mass", "Gen f_{0}(1710) mass", kTH1F, {glueballMassAxis});
306305 hMChists.add (" GenEta" , " Gen Eta" , kTHnSparseF , {ptAxis, {100 , -1 .0f , 1 .0f }});
307306 hMChists.add (" GenPhi" , " Gen Phi" , kTH1F , {{70 , -3 .5f , 3 .5f }});
308307 hMChists.add (" GenRapidity" , " Gen Rapidity" , kTHnSparseF , {ptAxis, {100 , -1 .0f , 1 .0f }});
@@ -963,7 +962,7 @@ struct HigherMassResonances {
963962 float multiplicityGen = 0.0 ;
964963 void processGen (aod::McCollision const & mcCollision, aod::McParticles const & mcParticles, const soa::SmallGroups<EventCandidatesMC>& collisions)
965964 {
966- TLorentzVector genvec ;
965+ TLorentzVector lResonance_gen ;
967966 hMChists.fill (HIST (" events_check" ), 0.5 );
968967 if (std::abs (mcCollision.posZ ()) < config.cutzvertex ) {
969968 hMChists.fill (HIST (" events_check" ), 1.5 );
@@ -1049,12 +1048,19 @@ struct HigherMassResonances {
10491048 if (std::abs (kCurrentDaughter .pdgCode ()) == 310 ) {
10501049 passKs = true ;
10511050 hMChists.fill (HIST (" events_check" ), 9.5 );
1051+ fourVecDau1 = ROOT::Math::PxPyPzMVector (kCurrentDaughter .px (), kCurrentDaughter .py (), kCurrentDaughter .pz (), o2::constants::physics::MassK0Short);
10521052 }
10531053 }
10541054 if (passKs) {
1055- genvec.SetPtEtaPhiE (mcParticle.pt (), mcParticle.eta (), mcParticle.phi (), mcParticle.e ());
1056- hMChists.fill (HIST (" Genf1710_mass" ), genvec.M ());
1057- hMChists.fill (HIST (" Genf1710" ), multiplicityGen, mcParticle.pt ());
1055+ lResonance_gen.SetPtEtaPhiE (mcParticle.pt (), mcParticle.eta (), mcParticle.phi (), mcParticle.e ());
1056+ fourVecMother = ROOT::Math::PxPyPzMVector (lResonance_gen.Px (), lResonance_gen.Py (), lResonance_gen.Pz (), lResonance_gen.M ());
1057+ ROOT::Math::Boost boost{fourVecMother.BoostToCM ()};
1058+ fourVecDauCM = boost (fourVecDau1); // boost the frame of daughter to the center of mass frame
1059+
1060+ auto helicity_gen = fourVecDau1.Vect ().Dot (fourVecDauCM.Vect ()) / (std::sqrt (fourVecDauCM.Vect ().Mag2 ()) * std::sqrt (fourVecDau1.Vect ().Mag2 ()));
1061+
1062+ hMChists.fill (HIST (" Genf1710" ), multiplicityGen, mcParticle.pt (), lResonance_gen.M (), helicity_gen);
1063+ // hMChists.fill(HIST("Genf1710_mass"), lResonance_gen.M());
10581064 }
10591065 }
10601066 }
@@ -1226,7 +1232,7 @@ struct HigherMassResonances {
12261232 pvec0 = std::array{v01.px (), v01.py (), v01.pz ()};
12271233 pvec1 = std::array{v02.px (), v02.py (), v02.pz ()};
12281234 auto arrMomrec = std::array{pvec0, pvec1};
1229- auto motherP = mothertrack1.p ();
1235+ // auto motherP = mothertrack1.p();
12301236 // auto motherE = mothertrack1.e();
12311237 // auto genMass = std::sqrt(motherE * motherE - motherP * motherP);
12321238 auto recMass = RecoDecay::m (arrMomrec, std::array{o2::constants::physics::MassK0Short, o2::constants::physics::MassK0Short});
@@ -1235,12 +1241,18 @@ struct HigherMassResonances {
12351241 lDecayDaughter1.SetXYZM (v01.px (), v01.py (), v01.pz (), o2::constants::physics::MassK0Short);
12361242 lDecayDaughter2.SetXYZM (v02.px (), v02.py (), v02.pz (), o2::constants::physics::MassK0Short);
12371243 lResonance = lDecayDaughter1 + lDecayDaughter2;
1238-
1239- hMChists.fill (HIST (" Recf1710_p" ), motherP);
1240- hMChists.fill (HIST (" Recf1710_mass" ), recMass);
1241- hMChists.fill (HIST (" Recf1710_pt1" ), multiplicity, mothertrack1.pt (), recMass);
1244+ // fourVecDau1, fourVecMother, fourVecDauCM
1245+ fourVecMother = ROOT::Math::PxPyPzMVector (lResonance.Px (), lResonance.Py (), lResonance.Pz (), lResonance.M ());
1246+ fourVecDau1 = ROOT::Math::PxPyPzMVector (lDecayDaughter1.Px (), lDecayDaughter1.Py (), lDecayDaughter1.Pz (), o2::constants::physics::MassK0Short);
1247+ ROOT::Math::Boost boost{fourVecMother.BoostToCM ()};
1248+ fourVecDauCM = boost (fourVecDau1); // boost the frame of daughter to the center of mass frame
1249+ auto helicity_rec = fourVecDau1.Vect ().Dot (fourVecDauCM.Vect ()) / (std::sqrt (fourVecDauCM.Vect ().Mag2 ()) * std::sqrt (fourVecDau1.Vect ().Mag2 ()));
1250+
1251+ // hMChists.fill(HIST("Recf1710_p"), motherP);
1252+ // hMChists.fill(HIST("Recf1710_mass"), recMass);
1253+ hMChists.fill (HIST (" Recf1710_pt1" ), multiplicity, mothertrack1.pt (), recMass, helicity_rec);
12421254 // hMChists.fill(HIST("Genf1710_mass"), genMass);
1243- hMChists.fill (HIST (" Recf1710_pt2" ), multiplicity, lResonance.Pt (), recMass);
1255+ hMChists.fill (HIST (" Recf1710_pt2" ), multiplicity, lResonance.Pt (), recMass, helicity_rec );
12441256
12451257 hMChists.fill (HIST (" RecRapidity" ), mothertrack1.y ());
12461258 hMChists.fill (HIST (" RecPhi" ), mothertrack1.phi ());
0 commit comments