Skip to content
Merged
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
21 changes: 11 additions & 10 deletions PWGUD/Tasks/FwdMuonsUPC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@

/// \author Andrea Giovanni Riffero <andrea.giovanni.riffero@cern.ch>

#include <vector>
#include <unordered_map>
#include "PWGUD/DataModel/UDTables.h"

#include "Framework/runDataProcessing.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
#include "PWGUD/DataModel/UDTables.h"
#include "Framework/AnalysisTask.h"
#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 <unordered_map>
#include <vector>

// table for saving tree with info on data
namespace dimu
{
Expand Down Expand Up @@ -348,7 +349,7 @@
{
float rAbs = fwdTrack.rAtAbsorberEnd();
float pDca = fwdTrack.pDca();
TLorentzVector p;

Check failure on line 352 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);
p.SetXYZM(fwdTrack.px(), fwdTrack.py(), fwdTrack.pz(), mMu);
float eta = p.Eta();
Expand All @@ -367,9 +368,9 @@
}

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

Check failure on line 371 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 373 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 @@ -410,14 +411,14 @@
}
}

//select events with exactly 2 forward tracks
// select events with exactly 2 forward tracks
if (cand.numContrib() != 2) {
return;
}

// select opposite charge events only
if (cand.netCharge() != 0) {
//registry.fill(HIST("hSameSign"), cand.numContrib());
// registry.fill(HIST("hSameSign"), cand.numContrib());
return;
}

Expand Down Expand Up @@ -452,11 +453,11 @@
return;

// form Lorentz vectors
TLorentzVector p1, p2;

Check failure on line 456 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 460 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 @@ -539,7 +540,7 @@
{

// check that all pairs are mu+mu-
if (std::abs(McPart1.pdgCode()) != kMuonPDG || std::abs(McPart2.pdgCode()) != kMuonPDG){
if (std::abs(McPart1.pdgCode()) != kMuonPDG || std::abs(McPart2.pdgCode()) != kMuonPDG) {
LOGF(debug, "PDG codes: %d | %d", McPart1.pdgCode(), McPart2.pdgCode());
return;
}
Expand All @@ -548,11 +549,11 @@
}

// create Lorentz vectors
TLorentzVector p1, p2;

Check failure on line 552 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 556 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 @@ -619,7 +620,7 @@

// select opposite charge events only
if (cand.netCharge() != 0) {
//registry.fill(HIST("hSameSign"), cand.numContrib());
// registry.fill(HIST("hSameSign"), cand.numContrib());
return;
}

Expand Down Expand Up @@ -654,11 +655,11 @@
return;

// form Lorentz vectors
TLorentzVector p1, p2;

Check failure on line 658 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 662 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 Down
Loading