1717#include < TLorentzVector.h>
1818#include < Math/GenVector/Boost.h>
1919#include < Math/Vector4D.h>
20+ #include < Math/Vector3D.h>
2021#include < TMath.h>
2122#include < fairlogger/Logger.h>
2223#include < iostream>
2324#include < iterator>
2425#include < string>
26+ #include < vector>
2527
2628#include " Framework/AnalysisTask.h"
2729#include " Framework/ASoAHelpers.h"
@@ -41,7 +43,6 @@ struct doublephimeson {
4143 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
4244
4345 Configurable<bool > fillRotation{" fillRotation" , 1 , " Fill rotation" };
44- Configurable<bool > fillPhiMass{" fillPhiMass" , 1 , " Fill phi mass" };
4546 Configurable<int > strategyPID1{" strategyPID1" , 0 , " PID strategy 1" };
4647 Configurable<int > strategyPID2{" strategyPID2" , 0 , " PID strategy 2" };
4748 Configurable<float > minPhiMass{" minPhiMass" , 1.01 , " Minimum phi mass" };
@@ -59,9 +60,10 @@ struct doublephimeson {
5960 ConfigurableAxis configThnAxisInvMassPhi{" configThnAxisInvMassPhi" , {20 , 1.01 , 1.03 }, " #it{M} (GeV/#it{c}^{2})" };
6061 ConfigurableAxis configThnAxisDaugherPt{" configThnAxisDaugherPt" , {25 , 0.0 , 50 .}, " #it{p}_{T} (GeV/#it{c})" };
6162 ConfigurableAxis configThnAxisPt{" configThnAxisPt" , {40 , 0.0 , 20 .}, " #it{p}_{T} (GeV/#it{c})" };
62- // ConfigurableAxis configThnAxisKstar{"configThnAxisKstar", {50 , 0.0, 0.5 }, "#it{k}^{*} (GeV/#it{c})"};
63+ ConfigurableAxis configThnAxisKstar{" configThnAxisKstar" , {200 , 0.0 , 2.0 }, " #it{k}^{*} (GeV/#it{c})" };
6364 ConfigurableAxis configThnAxisDeltaR{" configThnAxisDeltaR" , {200 , 0.0 , 2.0 }, " #it{k}^{*} (GeV/#it{c})" };
64- ConfigurableAxis configThnAxisPhiMult{" configThnAxisPhiMult" , {10 , 0.5 , 10.5 }, " #Phi Multiplicity" };
65+ ConfigurableAxis configThnAxisCosTheta{" configThnAxisCosTheta" , {5 , 0.0 , 1.0 }, " cos #theta{*}" };
66+ // ConfigurableAxis configThnAxisPhiMult{"configThnAxisPhiMult", {10, 0.5, 10.5}, "#Phi Multiplicity"};
6567
6668 // Initialize the ananlysis task
6769 void init (o2::framework::InitContext&)
@@ -76,20 +78,14 @@ struct doublephimeson {
7678 const AxisSpec thnAxisInvMassPhi{configThnAxisInvMassPhi, " #it{M} (GeV/#it{c}^{2})" };
7779 const AxisSpec thnAxisDaughterPt{configThnAxisDaugherPt, " #it{p}_{T} (GeV/#it{c})" };
7880 const AxisSpec thnAxisPt{configThnAxisPt, " #it{p}_{T} (GeV/#it{c})" };
79- // const AxisSpec thnAxisKstar{configThnAxisKstar, "#it{k}^{*} (GeV/#it{c})"};
81+ const AxisSpec thnAxisKstar{configThnAxisKstar, " #it{k}^{*} (GeV/#it{c})" };
8082 const AxisSpec thnAxisDeltaR{configThnAxisDeltaR, " #Delta R)" };
81- const AxisSpec thnAxisPhiMult{configThnAxisPhiMult, " #Phi Multiplicity)" };
83+ const AxisSpec thnAxisCosTheta{configThnAxisCosTheta, " cos #theta{*}" };
84+ // const AxisSpec thnAxisPhiMult{configThnAxisPhiMult, "#Phi Multiplicity)"};
8285 histos.add (" SEMass" , " SEMass" , HistType::kTHnSparseF , {thnAxisInvMassPhi, thnAxisInvMassPhi, thnAxisDaughterPt, thnAxisDaughterPt});
83- if (!fillPhiMass) {
84- histos.add (" SEMassUnlike" , " SEMassUnlike" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisDaughterPt, thnAxisDaughterPt, thnAxisDeltaR, thnAxisPhiMult});
85- histos.add (" SEMassRot" , " SEMassRot" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisDaughterPt, thnAxisDaughterPt, thnAxisDeltaR, thnAxisPhiMult});
86- histos.add (" MEMassUnlike" , " MEMassUnlike" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisDaughterPt, thnAxisDaughterPt, thnAxisDeltaR, thnAxisPhiMult});
87- }
88- if (fillPhiMass) {
89- histos.add (" SEMassUnlike" , " SEMassUnlike" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisInvMassPhi, thnAxisInvMassPhi, thnAxisDeltaR, thnAxisPhiMult});
90- histos.add (" SEMassRot" , " SEMassRot" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisInvMassPhi, thnAxisInvMassPhi, thnAxisDeltaR, thnAxisPhiMult});
91- histos.add (" MEMassUnlike" , " MEMassUnlike" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisInvMassPhi, thnAxisInvMassPhi, thnAxisDeltaR, thnAxisPhiMult});
92- }
86+ histos.add (" SEMassUnlike" , " SEMassUnlike" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisKstar, thnAxisCosTheta, thnAxisDeltaR});
87+ histos.add (" SEMassRot" , " SEMassRot" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisKstar, thnAxisCosTheta, thnAxisDeltaR});
88+ histos.add (" MEMassUnlike" , " MEMassUnlike" , HistType::kTHnSparseF , {thnAxisInvMass, thnAxisPt, thnAxisKstar, thnAxisCosTheta, thnAxisDeltaR});
9389 }
9490
9591 // get kstar
@@ -114,6 +110,25 @@ struct doublephimeson {
114110 trackRelK = PartOneCMS - PartTwoCMS;
115111 return 0.5 * trackRelK.P ();
116112 }
113+
114+ // get cosTheta
115+ TLorentzVector daughterCMS;
116+ ROOT::Math::XYZVector threeVecDauCM, threeVecMother;
117+ float getCosTheta (const TLorentzVector mother,
118+ const TLorentzVector daughter)
119+ {
120+ threeVecMother = mother.Vect ();
121+ const float beta = mother.Beta ();
122+ const float betax = beta * std::cos (mother.Phi ()) * std::sin (mother.Theta ());
123+ const float betay = beta * std::sin (mother.Phi ()) * std::sin (mother.Theta ());
124+ const float betaz = beta * std::cos (mother.Theta ());
125+ const ROOT::Math::Boost boostPRF = ROOT::Math::Boost (-betax, -betay, -betaz);
126+ daughterCMS = boostPRF (daughter);
127+ threeVecDauCM = daughterCMS.Vect ();
128+ float cosThetaStar = TMath::Abs (threeVecDauCM.Dot (threeVecMother) / std::sqrt (threeVecMother.Mag2 ()) / std::sqrt (threeVecDauCM.Mag2 ()));
129+ return cosThetaStar;
130+ }
131+
117132 bool selectionPID (float nsigmaTPC, float nsigmaTOF, int TOFHit, int PIDStrategy, float ptcand)
118133 {
119134 if (PIDStrategy == 0 ) {
@@ -202,7 +217,6 @@ struct doublephimeson {
202217 if (additionalEvsel && (collision.numPos () < 2 || collision.numNeg () < 2 )) {
203218 return ;
204219 }
205- auto phimult = phitracks.size ();
206220 for (auto phitrackd1 : phitracks) {
207221 if (phitrackd1.phiMass () < minPhiMass || phitrackd1.phiMass () > maxPhiMass) {
208222 continue ;
@@ -248,14 +262,10 @@ struct doublephimeson {
248262 }
249263 Phid2.SetXYZM (phitrackd2.phiPx (), phitrackd2.phiPy (), phitrackd2.phiPz (), phitrackd2.phiMass ());
250264 exotic = Phid1 + Phid2;
251- // auto kstar = getkstar(Phid1, Phid2);
265+ auto cosThetaStar = getCosTheta (exotic, Phid1);
266+ auto kstar = getkstar (Phid1, Phid2);
252267 auto deltaR = TMath::Sqrt (TMath::Power (Phid1.Phi () - Phid2.Phi (), 2.0 ) + TMath::Power (Phid1.Eta () - Phid2.Eta (), 2.0 ));
253- if (!fillPhiMass) {
254- histos.fill (HIST (" SEMassUnlike" ), exotic.M (), exotic.Pt (), Phid1.Pt (), Phid2.Pt (), deltaR, phimult);
255- }
256- if (fillPhiMass) {
257- histos.fill (HIST (" SEMassUnlike" ), exotic.M (), exotic.Pt (), Phid1.M (), Phid2.M (), deltaR, phimult);
258- }
268+ histos.fill (HIST (" SEMassUnlike" ), exotic.M (), exotic.Pt (), kstar, cosThetaStar, deltaR);
259269 histos.fill (HIST (" SEMass" ), Phid1.M (), Phid2.M (), Phid1.Pt (), Phid2.Pt ());
260270 if (fillRotation) {
261271 for (int nrotbkg = 0 ; nrotbkg < 5 ; nrotbkg++) {
@@ -267,14 +277,10 @@ struct doublephimeson {
267277 auto rotd1py = Phid1.Px () * std::sin (rotangle) + Phid1.Py () * std::cos (rotangle);
268278 Phid1Rot.SetXYZM (rotd1px, rotd1py, Phid1.Pz (), Phid1.M ());
269279 exoticRot = Phid1Rot + Phid2;
270- // auto kstar_rot = getkstar(Phid1Rot, Phid2);
280+ auto cosThetaStar_rot = getCosTheta (exoticRot, Phid1Rot);
281+ auto kstar_rot = getkstar (Phid1Rot, Phid2);
271282 auto deltaR_rot = TMath::Sqrt (TMath::Power (Phid1Rot.Phi () - Phid2.Phi (), 2.0 ) + TMath::Power (Phid1Rot.Eta () - Phid2.Eta (), 2.0 ));
272- if (!fillPhiMass) {
273- histos.fill (HIST (" SEMassRot" ), exoticRot.M (), exoticRot.Pt (), Phid1Rot.Pt (), Phid2.Pt (), deltaR_rot, phimult);
274- }
275- if (fillPhiMass) {
276- histos.fill (HIST (" SEMassRot" ), exoticRot.M (), exoticRot.Pt (), Phid1Rot.M (), Phid2.M (), deltaR_rot, phimult);
277- }
283+ histos.fill (HIST (" SEMassRot" ), exoticRot.M (), exoticRot.Pt (), kstar_rot, cosThetaStar_rot, deltaR_rot);
278284 }
279285 }
280286 }
@@ -299,7 +305,6 @@ struct doublephimeson {
299305 if (additionalEvsel && (collision2.numPos () < 2 || collision2.numNeg () < 2 )) {
300306 continue ;
301307 }
302- auto phimult = tracks1.size ();
303308 for (auto & [phitrackd1, phitrackd2] : o2::soa::combinations (o2::soa::CombinationsFullIndexPolicy (tracks1, tracks2))) {
304309 if (phitrackd1.phiMass () < minPhiMass || phitrackd1.phiMass () > maxPhiMass) {
305310 continue ;
@@ -326,14 +331,10 @@ struct doublephimeson {
326331 }
327332 Phid2.SetXYZM (phitrackd2.phiPx (), phitrackd2.phiPy (), phitrackd2.phiPz (), phitrackd2.phiMass ());
328333 exotic = Phid1 + Phid2;
329- // auto kstar = getkstar(Phid1, Phid2);
334+ auto cosThetaStar = getCosTheta (exotic, Phid1);
335+ auto kstar = getkstar (Phid1, Phid2);
330336 auto deltaR = TMath::Sqrt (TMath::Power (Phid1.Phi () - Phid2.Phi (), 2.0 ) + TMath::Power (Phid1.Eta () - Phid2.Eta (), 2.0 ));
331- if (!fillPhiMass) {
332- histos.fill (HIST (" MEMassUnlike" ), exotic.M (), exotic.Pt (), Phid1.Pt (), Phid2.Pt (), deltaR, phimult);
333- }
334- if (fillPhiMass) {
335- histos.fill (HIST (" MEMassUnlike" ), exotic.M (), exotic.Pt (), Phid1.M (), Phid2.M (), deltaR, phimult);
336- }
337+ histos.fill (HIST (" MEMassUnlike" ), exotic.M (), exotic.Pt (), kstar, cosThetaStar, deltaR);
337338 }
338339 }
339340 }
0 commit comments