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
5 changes: 5 additions & 0 deletions PWGLF/Tasks/Nuspex/nucleitpcpbpb.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/Tasks/Nuspex/nucleitpcpbpb.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -332,6 +332,8 @@
// NEW: Add DCAxy vs pT histograms for MC
histomc.add("DCAxy_vs_pT_transport", "DCA_{xy} vs p_{T} (Transport);p_{T} (GeV/c);DCA_{xy} (cm)",
{HistType::kTH3F, {ptAxis, axisDCA, axisCent}});
histomc.add("DCAxy_vs_pT_primary", "DCA_{xy} vs p_{T} (primary);p_{T} (GeV/c);DCA_{xy} (cm)",
{HistType::kTH3F, {ptAxis, axisDCA, axisCent}});
histomc.add("DCAxy_vs_pT_weakdecay", "DCA_{xy} vs p_{T} (Weak Decay);p_{T} (GeV/c);DCA_{xy} (cm)",
{HistType::kTH3F, {ptAxis, axisDCA, axisCent}});
histomc.add("DCAxy_vs_pT_total", "DCA_{xy} vs p_{T} (Total);p_{T} (GeV/c);DCA_{xy} (cm)",
Expand Down Expand Up @@ -1082,7 +1084,7 @@
// ---- Primary particles ----
decayType = 0;
if (matchedMCParticle.has_mothers()) {
for (auto& motherparticle : matchedMCParticle.mothers_as<aod::McParticles>()) {

Check failure on line 1087 in PWGLF/Tasks/Nuspex/nucleitpcpbpb.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.
if (std::find(hfMothCodes.begin(), hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != hfMothCodes.end()) {
decayType = 1;
break;
Expand All @@ -1097,7 +1099,7 @@
decayType = 1;

// Check if it's from HF decay
for (auto& motherparticle : matchedMCParticle.mothers_as<aod::McParticles>()) {

Check failure on line 1102 in PWGLF/Tasks/Nuspex/nucleitpcpbpb.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.
if (std::find(hfMothCodes.begin(), hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != hfMothCodes.end()) {
break;
}
Expand All @@ -1117,7 +1119,10 @@

if (pdg == particlePdgCodes.at(i)) { // He3
histomc.fill(HIST("DCAxy_vs_pT_total"), ptDCA, track.dcaXY(), collision.centFT0C());
if (matchedMCParticle.isPhysicalPrimary()) {
histomc.fill(HIST("DCAxy_vs_pT_primary"), ptDCA, track.dcaXY(), collision.centFT0C());
}
if (decayType == 2) { // Transport/Material

Check failure on line 1125 in PWGLF/Tasks/Nuspex/nucleitpcpbpb.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.
histomc.fill(HIST("DCAxy_vs_pT_transport"), ptDCA, track.dcaXY(), collision.centFT0C());
} else if (decayType == 1) { // Weak decay (including HF)
histomc.fill(HIST("DCAxy_vs_pT_weakdecay"), ptDCA, track.dcaXY(), collision.centFT0C());
Expand Down
Loading