3434#include < unordered_map>
3535#include < vector>
3636
37+ #include " Framework/AnalysisDataModel.h"
38+ #include " Common/PhysicsConstants.h"
39+
40+ #include " Common/RecoDecay.h"
41+
3742using namespace ROOT ::Math;
3843
3944// table for saving tree with info on data
@@ -71,7 +76,6 @@ const int kReqMatchMFTTracks = 2;
7176const int kMaxChi2MFTMatch = 30 ;
7277const float kMaxZDCTime = 2 .;
7378const float kMaxZDCTimeHisto = 10 .;
74- const PDG_t kMuonPDG = kMuonPlus ;
7579struct UpcPolarisationJpsiIncoh {
7680
7781 // a pdg object
@@ -130,12 +134,6 @@ struct UpcPolarisationJpsiIncoh {
130134 registry.add (" hRapidity" , " Rapidty of muon pairs;;#counts" , kTH1D , {axisRapidity});
131135 registry.add (" hPhi" , " #varphi of muon pairs;;#counts" , kTH1D , {axisPhi});
132136 }
133- // retrieve particle mass (GeV/c^2) from TDatabasePDG
134- float particleMass (int pid)
135- {
136- auto mass = pdg->Mass (pid);
137- return mass;
138- }
139137
140138 // template function that fills a map with the collision id of each udcollision as key
141139 // and a vector with the tracks
@@ -210,11 +208,10 @@ struct UpcPolarisationJpsiIncoh {
210208 {
211209 float rAbs = fwdTrack.rAtAbsorberEnd ();
212210 float pDca = fwdTrack.pDca ();
213- auto mMu = particleMass (kMuonPDG );
214- LorentzVector<PxPyPzM4D<float >> p (fwdTrack.px (), fwdTrack.py (), fwdTrack.pz (), mMu );
215- float eta = p.Eta ();
216- float pt = p.Pt ();
217-
211+
212+ float pt = RecoDecay::pt (fwdTrack.px (), fwdTrack.py ());
213+ float eta = RecoDecay::eta (fwdTrack.px (), fwdTrack.py (), fwdTrack.pz ());
214+
218215 if (eta < kEtaMin || eta > kEtaMax )
219216 return false ;
220217 if (pt < kPtMin )
@@ -231,8 +228,7 @@ struct UpcPolarisationJpsiIncoh {
231228 // it also divides the data in neutron classes
232229 // used for real data
233230 void processCand (CandidatesFwd::iterator const & cand,
234- ForwardTracks::iterator const & tr1, ForwardTracks::iterator const & tr2,
235- ZDCinfo const & zdc)
231+ ForwardTracks::iterator const & tr1, ForwardTracks::iterator const & tr2)
236232 {
237233 // V0 selection
238234 const auto & ampsV0A = cand.amplitudesV0A ();
@@ -273,7 +269,7 @@ struct UpcPolarisationJpsiIncoh {
273269 return ;
274270
275271 // form Lorentz vectors
276- auto mMu = particleMass ( kMuonPDG ) ;
272+ auto mMu = o2::constants::physics::MassMuonCharged ;
277273 LorentzVector<PxPyPzM4D<float >> p1 (tr1.px (), tr1.py (), tr1.pz (), mMu );
278274 LorentzVector<PxPyPzM4D<float >> p2 (tr2.px (), tr2.py (), tr2.pz (), mMu );
279275 LorentzVector p = p1 + p2;
0 commit comments