|
1 | | -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
| 1 | +// Copyright 2019-2020 CERN and copyOAright holders of ALICE O2. |
2 | 2 | // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. |
3 | 3 | // All rights not expressly granted are reserved. |
4 | 4 | // |
|
17 | 17 |
|
18 | 18 | #include "PWGUD/DataModel/UDTables.h" |
19 | 19 |
|
| 20 | +#include "TPDGCode.h" |
20 | 21 | #include "CCDB/BasicCCDBManager.h" |
21 | 22 | #include "DataFormatsParameters/GRPECSObject.h" |
22 | 23 | #include "DataFormatsParameters/GRPLHCIFData.h" |
|
25 | 26 | #include "Framework/O2DatabasePDGPlugin.h" |
26 | 27 | #include "Framework/runDataProcessing.h" |
27 | 28 |
|
28 | | -#include "TLorentzVector.h" |
| 29 | +#include "LorentzVector.h" |
29 | 30 | #include "TMath.h" |
30 | 31 | #include "TRandom3.h" |
31 | 32 | #include "TSystem.h" |
32 | 33 |
|
33 | 34 | #include <unordered_map> |
34 | 35 | #include <vector> |
35 | 36 |
|
| 37 | +#include "Math/Vector4D.h" |
| 38 | + |
| 39 | +using namespace ROOT::Math; |
| 40 | + |
36 | 41 | // table for saving tree with info on data |
37 | 42 | namespace dimu |
38 | 43 | { |
@@ -69,8 +74,7 @@ const int kReqMatchMFTTracks = 2; |
69 | 74 | const int kMaxChi2MFTMatch = 30; |
70 | 75 | const float kMaxZDCTime = 2.; |
71 | 76 | const float kMaxZDCTimeHisto = 10.; |
72 | | -const int kMuonPDG = 13; |
73 | | - |
| 77 | +const PDG_t kMuonPDG = kMuonPlus; |
74 | 78 | struct upcPolarisationJPsiIncorr { |
75 | 79 |
|
76 | 80 | // a pdg object |
@@ -209,9 +213,8 @@ struct upcPolarisationJPsiIncorr { |
209 | 213 | { |
210 | 214 | float rAbs = fwdTrack.rAtAbsorberEnd(); |
211 | 215 | float pDca = fwdTrack.pDca(); |
212 | | - TLorentzVector p; |
213 | 216 | auto mMu = particleMass(kMuonPDG); |
214 | | - p.SetXYZM(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu); |
| 217 | + LorentzVector<PxPyPzM4D<float>> p(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu); |
215 | 218 | float eta = p.Eta(); |
216 | 219 | float pt = p.Pt(); |
217 | 220 |
|
@@ -273,11 +276,10 @@ struct upcPolarisationJPsiIncorr { |
273 | 276 | return; |
274 | 277 |
|
275 | 278 | // form Lorentz vectors |
276 | | - TLorentzVector p1, p2; |
277 | 279 | auto mMu = particleMass(kMuonPDG); |
278 | | - p1.SetXYZM(tr1.px(), tr1.py(), tr1.pz(), mMu); |
279 | | - p2.SetXYZM(tr2.px(), tr2.py(), tr2.pz(), mMu); |
280 | | - TLorentzVector p = p1 + p2; |
| 280 | + LorentzVector<PxPyPzM4D<float>> p1(tr1.px(), tr1.py(), tr1.pz(), mMu); |
| 281 | + LorentzVector<PxPyPzM4D<float>> p2(tr2.px(), tr2.py(), tr2.pz(), mMu); |
| 282 | + LorentzVector p = p1 + p2; |
281 | 283 |
|
282 | 284 | // cut on pair kinematics |
283 | 285 | // select mass |
|
0 commit comments