From b5a080215719a88139d7a4922bf5fb8c97bcc6de Mon Sep 17 00:00:00 2001 From: ariffero Date: Wed, 21 May 2025 15:55:30 +0200 Subject: [PATCH 1/2] Test fix for TLorentzVector errors from MegaLinter --- PWGUD/Tasks/FwdMuonsUPC.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PWGUD/Tasks/FwdMuonsUPC.cxx b/PWGUD/Tasks/FwdMuonsUPC.cxx index d8fb035d7d3..8adec18e3d2 100644 --- a/PWGUD/Tasks/FwdMuonsUPC.cxx +++ b/PWGUD/Tasks/FwdMuonsUPC.cxx @@ -32,6 +32,7 @@ #include "TSystem.h" #include "TMath.h" #include "TRandom3.h" +#include "Math.h/Vector4D.h" // table for saving tree with info on data namespace dimu @@ -162,6 +163,8 @@ using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; +using LorentzVectorD = ROOT::Math::LorentzVector>; + // constants used in the track selection const float kRAbsMin = 17.6; const float kRAbsMid = 26.5; @@ -461,9 +464,10 @@ struct FwdMuonsUPC { { 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; From 63110284efb5489daa746267ff2aef5a682bcf64 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 21 May 2025 13:56:07 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- PWGUD/Tasks/FwdMuonsUPC.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGUD/Tasks/FwdMuonsUPC.cxx b/PWGUD/Tasks/FwdMuonsUPC.cxx index 8adec18e3d2..e0f80eac0f4 100644 --- a/PWGUD/Tasks/FwdMuonsUPC.cxx +++ b/PWGUD/Tasks/FwdMuonsUPC.cxx @@ -464,10 +464,10 @@ struct FwdMuonsUPC { { float rAbs = fwdTrack.rAtAbsorberEnd(); float pDca = fwdTrack.pDca(); - //TLorentzVector p; + // TLorentzVector p; auto mMu = particleMass(13); LorentzVectorD p(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu); - //p.SetXYZM(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;