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
6 changes: 3 additions & 3 deletions DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@
rK0sResolution.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(18, "INEL>1");
rK0sResolution.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(19, "Below min occup.");
rK0sResolution.get<TH1>(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(20, "Above max occup.");

rK0sResolution.add("hEventCentrality", "hEventCentrality", kTH1D, {{101, 0.0f, 101.0f}});
rK0sResolution.add("hEventOccupancy", "hEventOccupancy", kTH1D, {occupancyAxis});

rK0sResolution.add("h1_stats", "h1_stats", {HistType::kTH1D, {statAxis}});
TString hStatsLabels[5] = {"Selected Events", "All V0s", "Selected V0s", "Daughters have MC particles", "Daughters corr. rec."};
for (Int_t n = 1; n <= rK0sResolution.get<TH1>(HIST("h1_stats"))->GetNbinsX(); n++) {

Check failure on line 231 in DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
rK0sResolution.get<TH1>(HIST("h1_stats"))->GetXaxis()->SetBinLabel(n, hStatsLabels[n - 1]);
}

Expand Down Expand Up @@ -438,7 +438,7 @@
if (fillHists)
rK0sResolution.fill(HIST("hEventSelection"), 16 /* INEL > 0 */);

if (eventSelections.requireINEL1 && collision.multNTracksPVeta1() < 2) {

Check failure on line 441 in DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.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.
return false;
}
if (fillHists)
Expand Down Expand Up @@ -487,12 +487,12 @@
return false;
if (v0.dcaV0daughters() > v0Selections.dcav0dau)
return false;

if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassK0Short > v0Selections.lifetimecut->get("lifetimecutK0S")) {
return false;
}

if (v0Selections.armPodCut > 1e-4 && v0.qtarm() * v0Selections.armPodCut < std::abs(v0.alpha())) {

Check failure on line 495 in DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.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.
return false;
}

Expand All @@ -504,7 +504,7 @@
return false;
if (ntrack.itsNCls() < v0Selections.minITSclusters)
return false;
// check maximum ITS chi2 per clusters
// check maximum ITS chi2 per clusters
if (ptrack.itsChi2NCl() > v0Selections.maxITSchi2PerNcls)
return false;
if (ntrack.itsChi2NCl() > v0Selections.maxITSchi2PerNcls)
Expand Down Expand Up @@ -633,7 +633,7 @@
rK0sResolution.fill(HIST("hEventOccupancy"), occupancy);

rK0sResolution.fill(HIST("h1_stats"), 0.5);
for (auto& v0 : fullV0s) {

Check failure on line 636 in DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
rK0sResolution.fill(HIST("h1_stats"), 1.5);
const auto& posTrack = v0.posTrack_as<PIDTracksIU>();
const auto& negTrack = v0.negTrack_as<PIDTracksIU>();
Expand Down Expand Up @@ -710,7 +710,7 @@
rK0sResolution.fill(HIST("hEventOccupancy"), occupancy);

rK0sResolution.fill(HIST("h1_stats"), 0.5);
for (auto& v0 : fullV0s) {

Check failure on line 713 in DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
bool daughtersHaveMCParticles = false;
bool daughtersCorrRec = false;
rK0sResolution.fill(HIST("h1_stats"), 1.5);
Expand All @@ -723,8 +723,8 @@
if (posTrack.has_mcParticle() && negTrack.has_mcParticle()) {
daughtersHaveMCParticles = true;
rK0sResolution.fill(HIST("h1_stats"), 3.5);
bool isPositivePion = posTrack.mcParticle().pdgCode() == 211 || (doTreatPiToMuon && posTrack.mcParticle().pdgCode() == -13);

Check failure on line 726 in DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.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.

Check failure on line 726 in DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
bool isNegativePion = negTrack.mcParticle().pdgCode() == -211 || (doTreatPiToMuon && negTrack.mcParticle().pdgCode() == 13);

Check failure on line 727 in DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.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.

Check failure on line 727 in DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
if (isPositivePion && isNegativePion) {
daughtersCorrRec = true;
rK0sResolution.fill(HIST("h1_stats"), 4.5);
Expand All @@ -747,7 +747,7 @@
std::array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassPionCharged});
}

bool isTrueK0s = (v0.has_mcParticle() && std::abs(v0.mcParticle().pdgCode()) == 310 && v0.mcParticle().isPhysicalPrimary() && daughtersCorrRec);

Check failure on line 750 in DPG/Tasks/AOTTrack/V0Cascades/perfK0sResolution.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
if (requireTrueK0s && !isTrueK0s) {
continue;
}
Expand Down
Loading