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
32 changes: 16 additions & 16 deletions PWGUD/Tasks/upcTauTau13topo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,7 @@
{
return std::sqrt(px * px + py * py + pz * pz + mass * mass);
}

// float calculateDeltaPhi(TLorentzVector p, TLorentzVector p1)
float calculateDeltaPhi(ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> p, ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> p1)
{
Expand Down Expand Up @@ -1825,7 +1825,7 @@
{
bool isGlobalTrack = true;
registry.get<TH1>(HIST("global/hTrackEfficiencyPVGlobal"))->Fill(0., 1.);
if (track.tpcNClsCrossedRows() > 70) {

Check failure on line 1828 in PWGUD/Tasks/upcTauTau13topo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.get<TH1>(HIST("global/hTrackEfficiencyPVGlobal"))->Fill(1., 1.);
} else {
isGlobalTrack = false;
Expand All @@ -1833,38 +1833,38 @@
if (track.tpcNClsFindable() == 0) {
isGlobalTrack = false;
} else {
if (track.tpcNClsCrossedRows() / track.tpcNClsFindable() > 0.8) {

Check failure on line 1836 in PWGUD/Tasks/upcTauTau13topo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.get<TH1>(HIST("global/hTrackEfficiencyPVGlobal"))->Fill(2., 1.);
} else {
isGlobalTrack = false;
}
}
if (track.tpcChi2NCl() < 4.) {

Check failure on line 1842 in PWGUD/Tasks/upcTauTau13topo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.get<TH1>(HIST("global/hTrackEfficiencyPVGlobal"))->Fill(3., 1.);
} else {
isGlobalTrack = false;
}
if (track.itsChi2NCl() < 36.) {

Check failure on line 1847 in PWGUD/Tasks/upcTauTau13topo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.get<TH1>(HIST("global/hTrackEfficiencyPVGlobal"))->Fill(4., 1.);
} else {
isGlobalTrack = false;
}
if (track.dcaZ() < 2.) {

Check failure on line 1852 in PWGUD/Tasks/upcTauTau13topo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.get<TH1>(HIST("global/hTrackEfficiencyPVGlobal"))->Fill(5., 1.);
} else {
isGlobalTrack = false;
}
if (track.dcaXY() < 0.0105 * 0.035 / std::pow(track.pt(), 1.1)) {

Check failure on line 1857 in PWGUD/Tasks/upcTauTau13topo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.get<TH1>(HIST("global/hTrackEfficiencyPVGlobal"))->Fill(6., 1.);
} else {
isGlobalTrack = false;
}
if (track.pt() > 0.1) {

Check failure on line 1862 in PWGUD/Tasks/upcTauTau13topo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.get<TH1>(HIST("global/hTrackEfficiencyPVGlobal"))->Fill(7., 1.);
} else {
isGlobalTrack = false;
}
if (std::abs(eta(track.px(), track.py(), track.pz())) < 0.8) {

Check failure on line 1867 in PWGUD/Tasks/upcTauTau13topo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.get<TH1>(HIST("global/hTrackEfficiencyPVGlobal"))->Fill(8., 1.);
} else {
isGlobalTrack = false;
Expand Down Expand Up @@ -1914,12 +1914,12 @@
} else {
isGoodTrack = false;
}
if (track.tpcChi2NCl() < 4.) {

Check failure on line 1917 in PWGUD/Tasks/upcTauTau13topo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.get<TH1>(HIST("global/hTrackPVGood"))->Fill(2., 1.);
} else {
isGoodTrack = false;
}
if (track.itsChi2NCl() < 36.) {

Check failure on line 1922 in PWGUD/Tasks/upcTauTau13topo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
registry.get<TH1>(HIST("global/hTrackPVGood"))->Fill(3., 1.);
} else {
isGoodTrack = false;
Expand Down Expand Up @@ -2395,7 +2395,7 @@
if (trk1.hasTPC())
nPiHasTPC[trk.index()]++;
// p1.SetXYZM(trk1.px(), trk1.py(), trk1.pz(), MassElectron);
p1.SetXYZT(trk1.px(), trk1.py(), trk1.pz(), energy(trk1.px(), trk1.py(), trk1.pz(), MassElectron));
p1.SetXYZT(trk1.px(), trk1.py(), trk1.pz(), energy(trk1.px(), trk1.py(), trk1.pz(), MassElectron));
invMass2El[(counterTmp < 3 ? counterTmp : 5 - counterTmp)][(counterTmp < 3 ? 0 : 1)] = (p + p1).mag2();
gammaPair[(counterTmp < 3 ? counterTmp : 5 - counterTmp)][(counterTmp < 3 ? 0 : 1)] = (p + p1);
registry.get<TH1>(HIST("control/cut0/hInvMass2ElAll"))->Fill((p + p1).mag2());
Expand Down Expand Up @@ -2492,7 +2492,7 @@
trkTimeRes[counterTmp] = trk.trackTimeRes();

// p1.SetXYZM(trk.px(), trk.py(), trk.pz(), MassPiPlus);
p1.SetXYZT(trk.px(), trk.py(), trk.pz(), energy(trk.px(), trk.py(), trk.pz(),MassPiPlus));
p1.SetXYZT(trk.px(), trk.py(), trk.pz(), energy(trk.px(), trk.py(), trk.pz(), MassPiPlus));
tmpMomentum[counterTmp] = p1.P();
tmpPt[counterTmp] = p1.Pt();
tmpDedx[counterTmp] = trk.tpcSignal();
Expand Down Expand Up @@ -3363,7 +3363,7 @@
if (mcParticle.isPhysicalPrimary()) {
countBoth++;
// if (mcParticle.pdgCode() != 22 && std::abs(mcParticle.pdgCode()) != 12 && std::abs(mcParticle.pdgCode()) != 14 && std::abs(mcParticle.pdgCode()) != 16 && mcParticle.pdgCode() != 130 && mcParticle.pdgCode() != 111) {
if (mcParticle.pdgCode() != kGamma && std::abs(mcParticle.pdgCode()) != kNuE && std::abs(mcParticle.pdgCode()) != kNuMu && std::abs(mcParticle.pdgCode()) != kNuTau && mcParticle.pdgCode() != kK0Long && mcParticle.pdgCode() != kPi0) {
if (mcParticle.pdgCode() != kGamma && std::abs(mcParticle.pdgCode()) != kNuE && std::abs(mcParticle.pdgCode()) != kNuMu && std::abs(mcParticle.pdgCode()) != kNuTau && mcParticle.pdgCode() != kK0Long && mcParticle.pdgCode() != kPi0) {
countCharged++;

registryMC.get<TH1>(HIST("globalMC/hMCetaGen"))->Fill(mcParticle.eta());
Expand All @@ -3374,7 +3374,7 @@
if (mcParticle.has_mothers()) {
auto const& mother = mcParticle.mothers_first_as<aod::McParticles>();
// if (std::abs(mother.pdgCode()) == 15) {
if (std::abs(mother.pdgCode()) == kTauMinus) {
if (std::abs(mother.pdgCode()) == kTauMinus) {
countChargedFromTau++;
} // mother is tau
} // mc particle has mother
Expand Down Expand Up @@ -3427,7 +3427,7 @@
} // end of electron check
// muon from tau
if (std::abs(daughter.pdgCode()) == kMuonMinus) { // 13
if (daughter.pdgCode() == kMuonMinus) // 13
if (daughter.pdgCode() == kMuonMinus) // 13
flagMuPlusMuMinus = true;
muonFound = !muonFound;
partPt = static_cast<float>(daughter.pt());
Expand Down Expand Up @@ -3599,7 +3599,7 @@
// LOGF(info, "<tautau13topo_MC> mcParticle pdg %d", mcParticle.pdgCode());
if (mcParticle.isPhysicalPrimary()) {
// if (mcParticle.pdgCode() != 22 && std::abs(mcParticle.pdgCode()) != 12 && std::abs(mcParticle.pdgCode()) != 14 && std::abs(mcParticle.pdgCode()) != 16 && mcParticle.pdgCode() != 130 && mcParticle.pdgCode() != 111) {
if (mcParticle.pdgCode() != kGamma && std::abs(mcParticle.pdgCode()) != kNuE && std::abs(mcParticle.pdgCode()) != kNuMu && std::abs(mcParticle.pdgCode()) != kNuTau && mcParticle.pdgCode() != kK0Long && mcParticle.pdgCode() != kPi0) {
if (mcParticle.pdgCode() != kGamma && std::abs(mcParticle.pdgCode()) != kNuE && std::abs(mcParticle.pdgCode()) != kNuMu && std::abs(mcParticle.pdgCode()) != kNuTau && mcParticle.pdgCode() != kK0Long && mcParticle.pdgCode() != kPi0) {
if (mcParticle.has_mothers()) {
auto const& mother = mcParticle.mothers_first_as<aod::UDMcParticles>();
// LOGF(info, "<tautau13topo_MC> mcParticle has mother %d",mother.pdgCode());
Expand Down Expand Up @@ -3679,7 +3679,7 @@
// if (!onlyPi) LOGF(info, "ERROR: should be 4 pions, but they are not!");
} // end of special check for pi + 3pi

int index3ProngMC[3] = {0, 0, 0}; // initialised of request
int index3ProngMC[3] = {0, 0, 0}; // initialised of request
if (index1ProngMC > 0) { // electron or muon case + 3pi
int index3pi = 0;
for (int i = 0; i < 4; i++) {
Expand All @@ -3698,7 +3698,7 @@
auto const& tmpPion2MC = mcParticles.begin() + index3ProngMC[1];
auto const& tmpPion3MC = mcParticles.begin() + index3ProngMC[2];

//if (std::abs(tmpPion1MC.pdgCode()) == 211 && std::abs(tmpPion2MC.pdgCode()) == 211 && std::abs(tmpPion3MC.pdgCode()) == 211)
// if (std::abs(tmpPion1MC.pdgCode()) == 211 && std::abs(tmpPion2MC.pdgCode()) == 211 && std::abs(tmpPion3MC.pdgCode()) == 211)
if (std::abs(tmpPion1MC.pdgCode()) == kPiPlus && std::abs(tmpPion2MC.pdgCode()) == kPiPlus && std::abs(tmpPion3MC.pdgCode()) == kPiPlus) // 211 211 211
is3prong3PiMC = true;

Expand Down Expand Up @@ -4030,9 +4030,9 @@
registryMC.get<TH1>(HIST("global1MCrec/hNTracksPV"))->Fill(nPVTracks);

// TLorentzVector p, p1;
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> p, p1;
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> p, p1;
// p.SetXYZM(0., 0., 0., 0.);
p.SetXYZT(0., 0., 0., 0.);
p.SetXYZT(0., 0., 0., 0.);
TVector3 v1(0, 0, 0);
TVector3 v2(0, 0, 0);
float scalarPtsum = 0;
Expand Down Expand Up @@ -4067,12 +4067,12 @@
registryMC.get<TH2>(HIST("global1MCrec/hTrackEtaPhiPV"))->Fill(tmpEtaData, tmpPhiData);
registryMC.get<TH1>(HIST("global1MCrec/hTrackPtPV"))->Fill(tmptrack.pt());
// p1.SetXYZM(v1.X(), v1.Y(), v1.Z(), MassPiPlus); // in case of ghost
p1.SetXYZT(v1.X(), v1.Y(), v1.Z(), energy(v1.X(), v1.Y(), v1.Z(), MassPiPlus)); // in case of ghost
p1.SetXYZT(v1.X(), v1.Y(), v1.Z(), energy(v1.X(), v1.Y(), v1.Z(), MassPiPlus)); // in case of ghost

if (trackMCId[i] >= 0) {
// p1.SetXYZM(v1.X(), v1.Y(), v1.Z(), (std::abs(tmptrack.udMcParticle().pdgCode()) == 211 ? MassPiPlus : MassElectron));
// p1.SetXYZT(v1.X(), v1.Y(), v1.Z(), energy(v1.X(), v1.Y(), v1.Z(), (std::abs(tmptrack.udMcParticle().pdgCode()) == 211 ? MassPiPlus : MassElectron)));
p1.SetXYZT(v1.X(), v1.Y(), v1.Z(), energy(v1.X(), v1.Y(), v1.Z(), (std::abs(tmptrack.udMcParticle().pdgCode()) == kPiPlus ? MassPiPlus : MassElectron))); // 211
// p1.SetXYZT(v1.X(), v1.Y(), v1.Z(), energy(v1.X(), v1.Y(), v1.Z(), (std::abs(tmptrack.udMcParticle().pdgCode()) == 211 ? MassPiPlus : MassElectron)));
p1.SetXYZT(v1.X(), v1.Y(), v1.Z(), energy(v1.X(), v1.Y(), v1.Z(), (std::abs(tmptrack.udMcParticle().pdgCode()) == kPiPlus ? MassPiPlus : MassElectron))); // 211
float tmpPt = pt(tmptrack.udMcParticle().px(), tmptrack.udMcParticle().py());
float tmpEta = eta(tmptrack.udMcParticle().px(), tmptrack.udMcParticle().py(), tmptrack.udMcParticle().pz());
float tmpPhi = phi(tmptrack.udMcParticle().px(), tmptrack.udMcParticle().py());
Expand Down Expand Up @@ -4231,10 +4231,10 @@
// if (tmptrack.hasTOF()) trkHasTof[i] = true;
v1.SetXYZ(tmptrack.px(), tmptrack.py(), tmptrack.pz());
// p1.SetXYZM(v1.X(), v1.Y(), v1.Z(), MassPiPlus); // in case of ghost
p1.SetXYZT(v1.X(), v1.Y(), v1.Z(), energy(v1.X(), v1.Y(), v1.Z(), MassPiPlus)); // in case of ghost
p1.SetXYZT(v1.X(), v1.Y(), v1.Z(), energy(v1.X(), v1.Y(), v1.Z(), MassPiPlus)); // in case of ghost
if (trackMCId[i] >= 0) {
// p1.SetXYZM(v1.X(), v1.Y(), v1.Z(), (i == matchedElIndexToData ? MassElectron : MassPiPlus));
p1.SetXYZT(v1.X(), v1.Y(), v1.Z(), energy(v1.X(), v1.Y(), v1.Z(), (i == matchedElIndexToData ? MassElectron : MassPiPlus)));
p1.SetXYZT(v1.X(), v1.Y(), v1.Z(), energy(v1.X(), v1.Y(), v1.Z(), (i == matchedElIndexToData ? MassElectron : MassPiPlus)));
}

nSigmaEl[counterTmp] = tmptrack.tpcNSigmaEl();
Expand Down
Loading