Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions PWGUD/Tasks/FwdMuonsUPC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/runDataProcessing.h"

#include "TLorentzVector.h"

Check failure on line 26 in PWGUD/Tasks/FwdMuonsUPC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
#include "TRandom3.h"
#include <Math/Vector4D.h>

#include <unordered_map>
#include <vector>
Expand Down Expand Up @@ -349,9 +350,15 @@
{
float rAbs = fwdTrack.rAtAbsorberEnd();
float pDca = fwdTrack.pDca();
TLorentzVector p;
auto mMu = particleMass(kMuonPDG);
p.SetXYZM(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu);
ROOT::Math::PxPyPzMVector p{
fwdTrack.px(),
fwdTrack.py(),
fwdTrack.pz(),
mMu};
// TLorentzVector p;
// auto mMu = particleMass(kMuonPDG);
// p.SetXYZM(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu);
float eta = p.Eta();
float pt = p.Pt();
float pDcaMax = rAbs < kRAbsMid ? kPDca1 : kPDca2;
Expand All @@ -368,9 +375,9 @@
}

// function to compute phi for azimuth anisotropy
void computePhiAnis(TLorentzVector p1, TLorentzVector p2, int sign1, float& phiAverage, float& phiCharge)

Check failure on line 378 in PWGUD/Tasks/FwdMuonsUPC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
{
TLorentzVector tSum, tDiffAv, tDiffCh;

Check failure on line 380 in PWGUD/Tasks/FwdMuonsUPC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
tSum = p1 + p2;
float halfUnity = 0.5;
if (sign1 > 0) {
Expand Down Expand Up @@ -453,11 +460,11 @@
return;

// form Lorentz vectors
TLorentzVector p1, p2;

Check failure on line 463 in PWGUD/Tasks/FwdMuonsUPC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
auto mMu = particleMass(kMuonPDG);
p1.SetXYZM(tr1.px(), tr1.py(), tr1.pz(), mMu);
p2.SetXYZM(tr2.px(), tr2.py(), tr2.pz(), mMu);
TLorentzVector p = p1 + p2;

Check failure on line 467 in PWGUD/Tasks/FwdMuonsUPC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.

// cut on pair kinematics
// select mass
Expand Down Expand Up @@ -549,11 +556,11 @@
}

// create Lorentz vectors
TLorentzVector p1, p2;

Check failure on line 559 in PWGUD/Tasks/FwdMuonsUPC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
auto mMu = particleMass(kMuonPDG);
p1.SetXYZM(McPart1.px(), McPart1.py(), McPart1.pz(), mMu);
p2.SetXYZM(McPart2.px(), McPart2.py(), McPart2.pz(), mMu);
TLorentzVector p = p1 + p2;

Check failure on line 563 in PWGUD/Tasks/FwdMuonsUPC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.

// cut on pair kinematics
// select mass
Expand Down Expand Up @@ -655,11 +662,11 @@
return;

// form Lorentz vectors
TLorentzVector p1, p2;

Check failure on line 665 in PWGUD/Tasks/FwdMuonsUPC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
auto mMu = particleMass(kMuonPDG);
p1.SetXYZM(tr1.px(), tr1.py(), tr1.pz(), mMu);
p2.SetXYZM(tr2.px(), tr2.py(), tr2.pz(), mMu);
TLorentzVector p = p1 + p2;

Check failure on line 669 in PWGUD/Tasks/FwdMuonsUPC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.

// cut on pair kinematics (reco candidates)
// select mass
Expand All @@ -684,7 +691,7 @@
computePhiAnis(p1, p2, tr1.sign(), phiAverage, phiCharge);

// gen particle
TLorentzVector p1Mc, p2Mc;

Check failure on line 694 in PWGUD/Tasks/FwdMuonsUPC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
p1Mc.SetXYZM(McPart1.px(), McPart1.py(), McPart1.pz(), mMu);
p2Mc.SetXYZM(McPart2.px(), McPart2.py(), McPart2.pz(), mMu);
TLorentzVector pMc = p1Mc + p2Mc;
Expand Down
Loading