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
8 changes: 6 additions & 2 deletions PWGUD/Tasks/FwdMuonsUPC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
#include "DataFormatsParameters/GRPECSObject.h"
#include "PWGUD/DataModel/UDTables.h"

#include "TLorentzVector.h"

Check failure on line 31 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 "TSystem.h"
#include "TMath.h"
#include "TRandom3.h"
#include "Math.h/Vector4D.h"

// table for saving tree with info on data
namespace dimu
Expand Down Expand Up @@ -162,6 +163,8 @@
using namespace o2::framework;
using namespace o2::framework::expressions;

using LorentzVectorD = ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double>>;

// constants used in the track selection
const float kRAbsMin = 17.6;
const float kRAbsMid = 26.5;
Expand Down Expand Up @@ -461,9 +464,10 @@
{
float rAbs = fwdTrack.rAtAbsorberEnd();
float pDca = fwdTrack.pDca();
TLorentzVector p;
// TLorentzVector p;
auto mMu = particleMass(13);
p.SetXYZM(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu);
LorentzVectorD p(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu);
// 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 @@ -480,10 +484,10 @@
}

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

Check failure on line 487 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 490 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;
if (sign1 > 0) {
tDiffCh = p1 - p2;
Expand Down Expand Up @@ -560,11 +564,11 @@
return;

// form Lorentz vectors
TLorentzVector p1, p2;

Check failure on line 567 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(13);
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 571 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 @@ -688,11 +692,11 @@
LOGF(debug, "PDG codes: %d | %d", McPart1.pdgCode(), McPart2.pdgCode());

// create Lorentz vectors
TLorentzVector p1, p2;

Check failure on line 695 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(13);
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 699 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 @@ -803,11 +807,11 @@
return;

// form Lorentz vectors
TLorentzVector p1, p2;

Check failure on line 810 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(13);
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 814 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 @@ -832,7 +836,7 @@
computePhiAnis(p1, p2, tr1.sign(), phiAverage, phiCharge);

// gen particle
TLorentzVector p1Mc, p2Mc;

Check failure on line 839 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