Skip to content

Commit 8c0800c

Browse files
committed
giving up on TLorentzVector
1 parent 7de070c commit 8c0800c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

PWGUD/Tasks/upcTauRl.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#include "PWGUD/Core/SGSelector.h"
4444

4545
// ROOT headers
46-
#include "TLorentzVector.h"
46+
#include "Math/Vector4D.h"
4747
#include "TPDGCode.h"
4848

4949
using namespace o2;
@@ -1037,7 +1037,7 @@ struct UpcTauRl {
10371037
template <typename T>
10381038
bool selectedTauEvent(T const& trkDaug1, T const& trkDaug2)
10391039
{
1040-
TLorentzVector mother, daug[2], motherOfPions, pion[2];
1040+
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> mother, daug[2], motherOfPions, pion[2];
10411041
daug[0].SetPxPyPzE(trkDaug1.px(), trkDaug1.py(), trkDaug1.pz(), energy(pdg->Mass(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)), trkDaug1.px(), trkDaug1.py(), trkDaug1.pz()));
10421042
daug[1].SetPxPyPzE(trkDaug2.px(), trkDaug2.py(), trkDaug2.pz(), energy(pdg->Mass(trackPDG(trkDaug2, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)), trkDaug2.px(), trkDaug2.py(), trkDaug2.pz()));
10431043
if (cutTauEvent.useThresholdsPID) {
@@ -1207,7 +1207,7 @@ struct UpcTauRl {
12071207
histos.get<TH1>(HIST("Events/hChannels"))->Fill(CH_EMUPI);
12081208

12091209
if (isTwoSelectedTracks && doTwoTracks) {
1210-
TLorentzVector mother, daug[2], motherOfPions, pion[2], motherOfMuons, muon[2];
1210+
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> mother, daug[2], motherOfPions, pion[2], motherOfMuons, muon[2];
12111211
const auto& trkDaug1 = reconstructedBarrelTracks.iteratorAt(cutTauEvent.useThresholdsPID ? vecPVnewPIDidx[0] : vecPVidx[0]);
12121212
const auto& trkDaug2 = reconstructedBarrelTracks.iteratorAt(cutTauEvent.useThresholdsPID ? vecPVnewPIDidx[1] : vecPVidx[1]);
12131213
daug[0].SetPxPyPzE(trkDaug1.px(), trkDaug1.py(), trkDaug1.pz(), energy(pdg->Mass(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)), trkDaug1.px(), trkDaug1.py(), trkDaug1.pz()));
@@ -1315,7 +1315,7 @@ struct UpcTauRl {
13151315
const auto& mupionP = (cutTauEvent.useThresholdsPID ? isElectronCandidate(trkDaug1) : enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[1].P() : daug[0].P();
13161316
const auto& mupionE = (cutTauEvent.useThresholdsPID ? isElectronCandidate(trkDaug1) : enumMyParticle(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)) == P_ELECTRON) ? daug[1].E() : daug[0].E();
13171317

1318-
TLorentzVector motherOfPiKaon, kaon;
1318+
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> motherOfPiKaon, kaon;
13191319
if (isElectronCandidate(trkDaug1)) {
13201320
kaon.SetPxPyPzE(trkDaug1.px(), trkDaug1.py(), trkDaug1.pz(), energy(MassKaonCharged, trkDaug1.px(), trkDaug1.py(), trkDaug1.pz()));
13211321
motherOfPiKaon = kaon + daug[1];
@@ -1629,7 +1629,7 @@ struct UpcTauRl {
16291629
} // Loop over tracks with selections
16301630

16311631
if (countPVGT == 2 && doTwoTracks) {
1632-
TLorentzVector daug[2], pion[2], muon[2];
1632+
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> daug[2], pion[2], muon[2];
16331633
const auto& trkDaug1 = reconstructedBarrelTracks.iteratorAt(vecPVnoPIDidx[0]);
16341634
const auto& trkDaug2 = reconstructedBarrelTracks.iteratorAt(vecPVnoPIDidx[1]);
16351635
daug[0].SetPxPyPzE(trkDaug1.px(), trkDaug1.py(), trkDaug1.pz(), energy(pdg->Mass(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)), trkDaug1.px(), trkDaug1.py(), trkDaug1.pz()));
@@ -1670,7 +1670,7 @@ struct UpcTauRl {
16701670
bool isElEl = (cutTauEvent.useThresholdsPID ? countPVGTelectronsAlt == 2 : countPVGTelectrons == 2);
16711671
bool isElMuPion = (cutTauEvent.useThresholdsPID ? (countPVGTelectronsAlt == 1 && countPVGTmupionsAlt == 1) : ((countPVGTelectrons == 1 && countPVGTmuons == 1) || (countPVGTelectrons == 1 && countPVGTpions == 1)));
16721672
if (isTwoSelectedTracks && doTwoTracks) {
1673-
TLorentzVector daug[2], pion[2], muon[2];
1673+
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> daug[2], pion[2], muon[2];
16741674
const auto& trkDaug1 = reconstructedBarrelTracks.iteratorAt(cutTauEvent.useThresholdsPID ? vecPVnewPIDidx[0] : vecPVidx[0]);
16751675
const auto& trkDaug2 = reconstructedBarrelTracks.iteratorAt(cutTauEvent.useThresholdsPID ? vecPVnewPIDidx[1] : vecPVidx[1]);
16761676
daug[0].SetPxPyPzE(trkDaug1.px(), trkDaug1.py(), trkDaug1.pz(), energy(pdg->Mass(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)), trkDaug1.px(), trkDaug1.py(), trkDaug1.pz()));
@@ -1869,7 +1869,7 @@ struct UpcTauRl {
18691869
bool isElEl = (cutTauEvent.useThresholdsPID ? countPVGTelectronsAlt == 2 : countPVGTelectrons == 2);
18701870
bool isElMuPion = (cutTauEvent.useThresholdsPID ? (countPVGTelectronsAlt == 1 && countPVGTmupionsAlt == 1) : ((countPVGTelectrons == 1 && countPVGTmuons == 1) || (countPVGTelectrons == 1 && countPVGTpions == 1)));
18711871
if (isTwoSelectedTracks && doTwoTracks) {
1872-
TLorentzVector daug[2];
1872+
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> daug[2];
18731873
const auto& trkDaug1 = reconstructedBarrelTracks.iteratorAt(cutTauEvent.useThresholdsPID ? vecPVnewPIDidx[0] : vecPVidx[0]);
18741874
const auto& trkDaug2 = reconstructedBarrelTracks.iteratorAt(cutTauEvent.useThresholdsPID ? vecPVnewPIDidx[1] : vecPVidx[1]);
18751875
daug[0].SetPxPyPzE(trkDaug1.px(), trkDaug1.py(), trkDaug1.pz(), energy(pdg->Mass(trackPDG(trkDaug1, cutPID.cutSiTPC, cutPID.cutSiTOF, cutPID.usePIDwTOF, cutPID.useScutTOFinTPC)), trkDaug1.px(), trkDaug1.py(), trkDaug1.pz()));

0 commit comments

Comments
 (0)