Skip to content

Commit a9bfe47

Browse files
[PWGLF] NucleiTask - Add mothers histo for MC (#12863)
1 parent 29a2457 commit a9bfe47

File tree

1 file changed

+139
-53
lines changed

1 file changed

+139
-53
lines changed

PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx

Lines changed: 139 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@
4242
#include "ReconstructionDataFormats/Track.h"
4343

4444
#include <TF1.h>
45-
// #include <TLorentzVector.h>
4645

46+
#include <gsl/span>
47+
#include <memory>
4748
#include <string>
4849

4950
using namespace o2;
@@ -221,12 +222,30 @@ struct LFNucleiBATask {
221222
static constexpr int PDGTriton = o2::constants::physics::Pdg::kTriton;
222223
static constexpr int PDGHelium = o2::constants::physics::Pdg::kHelium3;
223224
static constexpr int PDGAlpha = o2::constants::physics::Pdg::kAlpha;
225+
static constexpr int PDGHyperTriton = o2::constants::physics::Pdg::kHyperTriton;
224226
static constexpr float MassProtonVal = o2::constants::physics::MassProton;
225227
static constexpr float MassDeuteronVal = o2::constants::physics::MassDeuteron;
226228
static constexpr float MassTritonVal = o2::constants::physics::MassTriton;
227229
static constexpr float MassHeliumVal = o2::constants::physics::MassHelium3;
228230
static constexpr float MassAlphaVal = o2::constants::physics::MassAlpha;
229231

232+
// PDG of Mothers
233+
static constexpr int kPdgMotherlist[] = {
234+
PDGProton, // proton
235+
PDGPion, // pi+
236+
PDGKaon, // K+
237+
311, // K0
238+
PDGDeuteron, // deuteron
239+
PDGTriton, // triton
240+
PDGHelium, // He-3
241+
PDGAlpha, // Alpha
242+
1000130270, // Aluminium
243+
1000140280, // Silicon
244+
1000260560 // Iron
245+
};
246+
static constexpr int kNumMotherlist = sizeof(kPdgMotherlist) / sizeof(kPdgMotherlist[0]);
247+
static constexpr int kMaxNumMom = 4; // X: 0..4, overflow=5
248+
230249
template <typename TrackType>
231250
float averageClusterSizeTrk(const TrackType& track)
232251
{
@@ -825,24 +844,12 @@ struct LFNucleiBATask {
825844
histos.add<TH1>("tracks/triton/h1antiTritonSpectraTrueTransport", "#it{p}_{T} (#bar{t})", HistType::kTH1F, {ptAxis});
826845
}
827846
if (enableHe) {
828-
// histos.add<TH1>("tracks/helium/h1HeliumSpectraTrue", "#it{p}_{T}/z (He)", HistType::kTH1F, {ptZHeAxis});
829-
// histos.add<TH1>("tracks/helium/h1HeliumSpectraTrueWPID", "#it{p}_{T}/z (He)", HistType::kTH1F, {ptZHeAxis});
830-
// histos.add<TH1>("tracks/helium/h1HeliumSpectraTruePrim", "#it{p}_{T}/z (He)", HistType::kTH1F, {ptZHeAxis});
831-
// histos.add<TH1>("tracks/helium/h1HeliumSpectraTrueSec", "#it{p}_{T}/z (He)", HistType::kTH1F, {ptZHeAxis});
832-
// histos.add<TH1>("tracks/helium/h1HeliumSpectraTrueTransport", "#it{p}_{T}/z (He)", HistType::kTH1F, {ptZHeAxis});
833-
834847
histos.add<TH1>("tracks/helium/h1HeliumSpectraTrue_Z2", "#it{p}_{T} (He)", HistType::kTH1F, {ptHeAxis});
835848
histos.add<TH1>("tracks/helium/h1HeliumSpectraTrueWPID_Z2", "#it{p}_{T} (He)", HistType::kTH1F, {ptHeAxis});
836849
histos.add<TH1>("tracks/helium/h1HeliumSpectraTruePrim_Z2", "#it{p}_{T} (He)", HistType::kTH1F, {ptHeAxis});
837850
histos.add<TH1>("tracks/helium/h1HeliumSpectraTrueSec_Z2", "#it{p}_{T} (He)", HistType::kTH1F, {ptHeAxis});
838851
histos.add<TH1>("tracks/helium/h1HeliumSpectraTrueTransport_Z2", "#it{p}_{T} (He)", HistType::kTH1F, {ptHeAxis});
839852

840-
// histos.add<TH1>("tracks/helium/h1antiHeliumSpectraTrue", "#it{p}_{T}/z (He)", HistType::kTH1F, {ptZHeAxis});
841-
// histos.add<TH1>("tracks/helium/h1antiHeliumSpectraTrueWPID", "#it{p}_{T}/z (He)", HistType::kTH1F, {ptZHeAxis});
842-
// histos.add<TH1>("tracks/helium/h1antiHeliumSpectraTruePrim", "#it{p}_{T}/z (He)", HistType::kTH1F, {ptZHeAxis});
843-
// histos.add<TH1>("tracks/helium/h1antiHeliumSpectraTrueSec", "#it{p}_{T}/z (He)", HistType::kTH1F, {ptZHeAxis});
844-
// histos.add<TH1>("tracks/helium/h1antiHeliumSpectraTrueTransport", "#it{p}_{T}/z (He)", HistType::kTH1F, {ptZHeAxis});
845-
846853
histos.add<TH1>("tracks/helium/h1antiHeliumSpectraTrue_Z2", "#it{p}_{T} (He)", HistType::kTH1F, {ptHeAxis});
847854
histos.add<TH1>("tracks/helium/h1antiHeliumSpectraTrueWPID_Z2", "#it{p}_{T} (He)", HistType::kTH1F, {ptHeAxis});
848855
histos.add<TH1>("tracks/helium/h1antiHeliumSpectraTruePrim_Z2", "#it{p}_{T} (He)", HistType::kTH1F, {ptHeAxis});
@@ -1138,6 +1145,25 @@ struct LFNucleiBATask {
11381145
histos.add<TH2>("tracks/helium/dca/before/hDCAxyVsPtHeliumTruePrim", "DCAxy vs Pt (He); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)", HistType::kTH2F, {{ptZHeAxis}, {dcaxyAxis}});
11391146
histos.add<TH2>("tracks/helium/dca/before/hDCAxyVsPtHeliumTrueSec", "DCAxy vs Pt (He); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)", HistType::kTH2F, {{ptZHeAxis}, {dcaxyAxis}});
11401147
histos.add<TH2>("tracks/helium/dca/before/hDCAxyVsPtHeliumTrueMaterial", "DCAxy vs Pt (He); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)", HistType::kTH2F, {{ptZHeAxis}, {dcaxyAxis}});
1148+
1149+
histos.add<TH2>("tracks/helium/dca/before/hMomTrueMaterial", "MC mothers;mother index;mother PDG", HistType::kTH2I, {{kMaxNumMom + 2, -0.5, static_cast<double>(kMaxNumMom) + 1.5}, {kNumMotherlist + 2, -1.5, static_cast<double>(kNumMotherlist) + 0.5}});
1150+
1151+
// Fix for getting TH2 pointer
1152+
std::shared_ptr<TH2> hTemp = histos.get<TH2>(HIST("tracks/helium/dca/before/hMomTrueMaterial"));
1153+
TH2* hPDG = hTemp.get();
1154+
1155+
TAxis* axPDG = hPDG->GetXaxis();
1156+
for (int i = 0; i <= kMaxNumMom; ++i) {
1157+
axPDG->SetBinLabel(i + 1, Form("%d", i));
1158+
}
1159+
axPDG->SetBinLabel(kMaxNumMom + 2, ">=5");
1160+
TAxis* ayPDG = hPDG->GetYaxis();
1161+
ayPDG->SetBinLabel(1, "-1"); // undefined
1162+
ayPDG->SetBinLabel(2, "0"); // other
1163+
for (int i = 0; i < kNumMotherlist; ++i) {
1164+
ayPDG->SetBinLabel(i + 3, Form("%d", kPdgMotherlist[i]));
1165+
}
1166+
11411167
histos.add<TH2>("tracks/helium/dca/before/hDCAxyVsPtHeliumTrueTransport", "DCAxy vs Pt (He); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)", HistType::kTH2F, {{ptZHeAxis}, {dcaxyAxis}});
11421168

11431169
histos.add<TH2>("tracks/helium/dca/before/hDCAxyVsPtantiHeliumTrue", "DCAxy vs Pt (#bar{He}); #it{p}_{T} (GeV/#it{c}); DCAxy (cm)", HistType::kTH2F, {{ptZHeAxis}, {dcaxyAxis}});
@@ -2099,7 +2125,7 @@ struct LFNucleiBATask {
20992125
template <bool IsMC, bool IsFilteredData, typename CollisionType, typename TracksType, typename ParticleType>
21002126
void fillHistograms(const CollisionType& event,
21012127
const TracksType& tracks,
2102-
const ParticleType& /*particles*/)
2128+
const ParticleType& particles)
21032129
{
21042130
histos.fill(HIST("event/eventSkimming"), 0.5);
21052131
// Apply skimming
@@ -2206,7 +2232,7 @@ struct LFNucleiBATask {
22062232

22072233
tracks.copyIndexBindings(tracksWithITS);
22082234

2209-
for (auto& track : tracksWithITS) {
2235+
for (auto const& track : tracksWithITS) {
22102236
if constexpr (!IsFilteredData) {
22112237
if (!track.isGlobalTrackWoDCA() && filterOptions.enableIsGlobalTrack) {
22122238
continue;
@@ -2219,14 +2245,13 @@ struct LFNucleiBATask {
22192245
histos.fill(HIST("tracks/avgClusterSizePerCoslInvVsITSlayers"), track.p(), averageClusterSizePerCoslInv(track), track.itsNCls());
22202246
}
22212247

2222-
if (track.itsNCls() < trkqcOptions.cfgCutITSClusters)
2223-
continue;
2224-
if (track.tpcNClsCrossedRows() < trkqcOptions.cfgCutTPCXRows)
2225-
continue;
2226-
if (track.tpcNClsFound() < trkqcOptions.cfgCutTPCClusters)
2227-
continue;
2228-
if (track.tpcCrossedRowsOverFindableCls() < trkqcOptions.cfgCutTPCCROFnd)
2248+
if (track.itsNCls() < trkqcOptions.cfgCutITSClusters ||
2249+
track.tpcNClsCrossedRows() < trkqcOptions.cfgCutTPCXRows ||
2250+
track.tpcNClsFound() < trkqcOptions.cfgCutTPCClusters ||
2251+
track.tpcCrossedRowsOverFindableCls() < trkqcOptions.cfgCutTPCCROFnd) {
22292252
continue;
2253+
}
2254+
22302255
auto tpcChi2NclRange = (std::vector<float>)trkqcOptions.tpcChi2NclCuts;
22312256
if ((track.tpcChi2NCl() < tpcChi2NclRange[0]) || (track.tpcChi2NCl() > tpcChi2NclRange[1]))
22322257
continue;
@@ -2252,21 +2277,21 @@ struct LFNucleiBATask {
22522277
float shiftPtNeg = 0.f;
22532278

22542279
if (enablePtShiftHe && !fShiftPtHe) {
2255-
fShiftPtHe = new TF1("fShiftPtHe", "[0] * TMath::Exp([1] + [2] * x) + [3] + [4] * x", 0.f, 8.f);
2256-
auto par = (std::vector<float>)parShiftPtHe;
2257-
fShiftPtHe->SetParameters(par[0], par[1], par[2], par[3], par[4]);
2280+
fShiftPtHe = new TF1("fShiftPtHe", "[0] * exp([1] + [2] * x) + [3] + [4] * x", 0.f, 8.f);
2281+
auto parHe = (std::vector<float>)parShiftPtHe; // NOLINT
2282+
fShiftPtHe->SetParameters(parHe[0], parHe[1], parHe[2], parHe[3], parHe[4]);
22582283
}
22592284

22602285
if (enablePtShiftHe && !fShiftPtantiHe) {
2261-
fShiftPtantiHe = new TF1("fShiftPtantiHe", "[0] * TMath::Exp([1] + [2] * x) + [3] + [4] * x", 0.f, 8.f);
2262-
auto par = (std::vector<float>)parShiftPtAntiHe;
2263-
fShiftPtantiHe->SetParameters(par[0], par[1], par[2], par[3], par[4]);
2286+
fShiftPtantiHe = new TF1("fShiftPtantiHe", "[0] * exp([1] + [2] * x) + [3] + [4] * x", 0.f, 8.f);
2287+
auto parAntiHe = (std::vector<float>)parShiftPtAntiHe; // NOLINT
2288+
fShiftPtantiHe->SetParameters(parAntiHe[0], parAntiHe[1], parAntiHe[2], parAntiHe[3], parAntiHe[4]);
22642289
}
22652290

22662291
if (enablePtShiftAntiD && !fShiftAntiD) {
2267-
fShiftAntiD = new TF1("fShiftAntiD", "[0] * TMath::Exp([1] + [2] * x) + [3] + [4] * x", 0.f, 8.f);
2268-
auto par = (std::vector<float>)parShiftPtAntiD;
2269-
fShiftAntiD->SetParameters(par[0], par[1], par[2], par[3], par[4]);
2292+
fShiftAntiD = new TF1("fShiftAntiD", "[0] * exp([1] + [2] * x) + [3] + [4] * x", 0.f, 8.f);
2293+
auto parAntiD = (std::vector<float>)parShiftPtAntiD; // NOLINT
2294+
fShiftAntiD->SetParameters(parAntiD[0], parAntiD[1], parAntiD[2], parAntiD[3], parAntiD[4]);
22702295
}
22712296

22722297
switch (unableAntiDPtShift) {
@@ -2282,9 +2307,9 @@ struct LFNucleiBATask {
22822307
}
22832308

22842309
if (enablePtShiftD && !fShiftD) {
2285-
fShiftD = new TF1("fShiftD", "[0] * TMath::Exp([1] + [2] * x) + [3] + [4] * x", 0.f, 8.f);
2286-
auto par = (std::vector<float>)parShiftPtD;
2287-
fShiftD->SetParameters(par[0], par[1], par[2], par[3], par[4]);
2310+
fShiftD = new TF1("fShiftD", "[0] * exp([1] + [2] * x) + [3] + [4] * x", 0.f, 8.f);
2311+
auto parD = (std::vector<float>)parShiftPtD; // NOLINT
2312+
fShiftD->SetParameters(parD[0], parD[1], parD[2], parD[3], parD[4]);
22882313
}
22892314

22902315
switch (unableDPtShift) {
@@ -2475,11 +2500,16 @@ struct LFNucleiBATask {
24752500
}
24762501

24772502
// Rapidity cuts
2478-
prRapCut = track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Proton)) > kinemOptions.cfgRapidityCutLow && track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Proton)) < kinemOptions.cfgRapidityCutHigh;
2479-
deRapCut = track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Deuteron)) > kinemOptions.cfgRapidityCutLow && track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Deuteron)) < kinemOptions.cfgRapidityCutHigh;
2480-
trRapCut = track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Triton)) > kinemOptions.cfgRapidityCutLow && track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Triton)) < kinemOptions.cfgRapidityCutHigh;
2481-
heRapCut = track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Helium3)) > kinemOptions.cfgRapidityCutLow && track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Helium3)) < kinemOptions.cfgRapidityCutHigh;
2482-
alRapCut = track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Alpha)) > kinemOptions.cfgRapidityCutLow && track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Alpha)) < kinemOptions.cfgRapidityCutHigh;
2503+
auto rapCheck = [&](float m2z) {
2504+
const float rap = track.rapidity(m2z);
2505+
return (rap > kinemOptions.cfgRapidityCutLow) && (rap < kinemOptions.cfgRapidityCutHigh);
2506+
};
2507+
2508+
prRapCut = rapCheck(MassProtonVal);
2509+
deRapCut = rapCheck(MassDeuteronVal);
2510+
trRapCut = rapCheck(MassTritonVal);
2511+
heRapCut = rapCheck(MassHeliumVal / 2.0);
2512+
alRapCut = rapCheck(MassAlphaVal / 2.0);
24832513

24842514
isDeuteron = enableDe && deRapCut;
24852515
isHelium = enableHe && heRapCut;
@@ -2615,6 +2645,7 @@ struct LFNucleiBATask {
26152645
}
26162646

26172647
if constexpr (IsMC) {
2648+
// auto const& mcParticles = particles;
26182649
bool isPhysPrim = false;
26192650
bool isProdByGen = false;
26202651
bool isWeakDecay = false;
@@ -2624,15 +2655,15 @@ struct LFNucleiBATask {
26242655
if constexpr (IsFilteredData) {
26252656
isPhysPrim = track.isPhysicalPrimary();
26262657
isProdByGen = track.producedByGenerator();
2627-
isWeakDecay = track.getProcess() == 4;
2658+
isWeakDecay = track.getProcess() == 4; // NOLINT
26282659
pdgCode = track.pdgCode();
26292660
} else {
26302661
if (!track.has_mcParticle()) {
26312662
continue;
26322663
}
26332664
isPhysPrim = track.mcParticle().isPhysicalPrimary();
26342665
isProdByGen = track.mcParticle().producedByGenerator();
2635-
isWeakDecay = track.mcParticle().getProcess() == 4;
2666+
isWeakDecay = track.mcParticle().getProcess() == 4; // NOLINT
26362667
pdgCode = track.mcParticle().pdgCode();
26372668
}
26382669

@@ -3037,6 +3068,8 @@ struct LFNucleiBATask {
30373068
break;
30383069
}
30393070
}
3071+
} else {
3072+
(void)particles;
30403073
}
30413074
// Tracks DCA histos fill
30423075
if (outFlagOptions.makeDCABeforeCutPlots) {
@@ -3114,19 +3147,27 @@ struct LFNucleiBATask {
31143147
}
31153148

31163149
if constexpr (IsMC) {
3150+
// auto const& mcParticles = particles;
31173151
bool isPhysPrim = false;
31183152
bool isProdByGen = false;
31193153
bool isWeakDecay = false;
31203154
bool hasFakeHit = false;
31213155

31223156
// PID
31233157
int pdgCode = 0;
3158+
int pdgMom = 0;
31243159
// gen Pt
31253160
float genPt = 0;
3161+
// Mothers variables
3162+
[[maybe_unused]] int firstMotherId = -1;
3163+
[[maybe_unused]] int firstMotherPdg = -1;
3164+
[[maybe_unused]] int pdgList[8];
3165+
[[maybe_unused]] int nSaved = 0;
3166+
31263167
if constexpr (IsFilteredData) {
31273168
isPhysPrim = track.isPhysicalPrimary();
31283169
isProdByGen = track.producedByGenerator();
3129-
isWeakDecay = track.getProcess() == 4;
3170+
isWeakDecay = track.getProcess() == 4; // NOLINT
31303171
pdgCode = track.pdgCode();
31313172
genPt = std::sqrt(std::pow(track.px(), 2) + std::pow(track.py(), 2));
31323173

@@ -3136,10 +3177,36 @@ struct LFNucleiBATask {
31363177
}
31373178
isPhysPrim = track.mcParticle().isPhysicalPrimary();
31383179
isProdByGen = track.mcParticle().producedByGenerator();
3139-
isWeakDecay = track.mcParticle().getProcess() == 4;
3180+
isWeakDecay = track.mcParticle().getProcess() == 4; // NOLINT
31403181
pdgCode = track.mcParticle().pdgCode();
3141-
genPt = track.mcParticle().pt();
31423182

3183+
// Access to MC particles mother
3184+
o2::aod::McParticles::iterator mc = particles.iteratorAt(track.mcParticleId());
3185+
gsl::span<const int> motherIds = mc.mothersIds();
3186+
const int nMothers = static_cast<int>(motherIds.size());
3187+
firstMotherId = -1;
3188+
firstMotherPdg = -1;
3189+
3190+
nSaved = 0;
3191+
3192+
for (int iMom = 0; iMom < nMothers; ++iMom) {
3193+
int motherId = motherIds[iMom];
3194+
if (motherId < 0 || motherId >= particles.size()) {
3195+
continue; // added check on mother
3196+
}
3197+
o2::aod::McParticles::iterator mother = particles.iteratorAt(motherId);
3198+
pdgMom = mother.pdgCode();
3199+
3200+
if (iMom == 0) {
3201+
firstMotherId = motherId;
3202+
firstMotherPdg = pdgMom;
3203+
}
3204+
if (nSaved < 8) {
3205+
pdgList[nSaved++] = pdgMom;
3206+
}
3207+
}
3208+
3209+
genPt = track.mcParticle().pt();
31433210
for (int i = 0; i < 10; i++) { // From ITS to TPC
31443211
if (track.mcMask() & 1 << i) {
31453212
hasFakeHit = true;
@@ -3400,10 +3467,30 @@ struct LFNucleiBATask {
34003467
}
34013468
if (!isPhysPrim && !isProdByGen && outFlagOptions.makeDCABeforeCutPlots) {
34023469
histos.fill(HIST("tracks/helium/dca/before/hDCAxyVsPtHeliumTrueTransport"), hePt, track.dcaXY());
3403-
if (isWeakDecay)
3470+
if (isWeakDecay) {
34043471
histos.fill(HIST("tracks/helium/dca/before/hDCAxyVsPtHeliumTrueSec"), hePt, track.dcaXY());
3405-
else
3472+
} else {
34063473
histos.fill(HIST("tracks/helium/dca/before/hDCAxyVsPtHeliumTrueMaterial"), hePt, track.dcaXY());
3474+
if (!IsFilteredData) {
3475+
if (nSaved > 0) {
3476+
for (int i = 0; i < nSaved; ++i) {
3477+
int idxComp = (i <= kMaxNumMom) ? i : (kMaxNumMom + 1);
3478+
int pdgMom = pdgList[i];
3479+
int yVal = -1;
3480+
if (pdgMom != -1) {
3481+
yVal = 0;
3482+
for (int j = 0; j < kNumMotherlist; ++j) {
3483+
if (kPdgMotherlist[j] == pdgMom) {
3484+
yVal = j + 1;
3485+
break;
3486+
}
3487+
}
3488+
}
3489+
histos.fill(HIST("tracks/helium/dca/before/hMomTrueMaterial"), idxComp, yVal);
3490+
}
3491+
}
3492+
}
3493+
}
34073494
if (track.hasTOF() && outFlagOptions.doTOFplots) {
34083495
histos.fill(HIST("tracks/helium/dca/before/TOF/hDCAxyVsPtHeliumTrueTransport"), hePt, track.dcaXY());
34093496
if (isWeakDecay)
@@ -3682,6 +3769,8 @@ struct LFNucleiBATask {
36823769
}
36833770
break;
36843771
}
3772+
} else {
3773+
(void)particles;
36853774
}
36863775

36873776
// DCA Cut
@@ -4553,11 +4642,8 @@ struct LFNucleiBATask {
45534642
histos.fill(HIST("tracks/eff/helium/hPtHe"), 2 * hePt);
45544643
histos.fill(HIST("tracks/eff/helium/h2pVsTPCmomentumHe"), heTPCmomentum, heP);
45554644
}
4556-
// histos.fill(HIST("tracks/helium/h1HeliumSpectra"), hePt);
45574645
histos.fill(HIST("tracks/helium/h1HeliumSpectra_Z2"), 2 * hePt);
4558-
// histos.fill(HIST("tracks/helium/h2HeliumYvsPt"), track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Helium3)), hePt);
45594646
histos.fill(HIST("tracks/helium/h2HeliumYvsPt_Z2"), track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Helium3)), 2 * hePt);
4560-
// histos.fill(HIST("tracks/helium/h2HeliumEtavsPt"), track.eta(), hePt);
45614647
histos.fill(HIST("tracks/helium/h2HeliumEtavsPt_Z2"), track.eta(), 2 * hePt);
45624648
if (outFlagOptions.enablePIDplot)
45634649
histos.fill(HIST("tracks/helium/h2TPCsignVsTPCmomentumHelium"), heTPCmomentum, track.tpcSignal());
@@ -4567,11 +4653,8 @@ struct LFNucleiBATask {
45674653
histos.fill(HIST("tracks/eff/helium/hPtantiHe"), 2 * antihePt);
45684654
histos.fill(HIST("tracks/eff/helium/h2pVsTPCmomentumantiHe"), antiheTPCmomentum, antiheP);
45694655
}
4570-
// histos.fill(HIST("tracks/helium/h1antiHeliumSpectra"), antihePt);
45714656
histos.fill(HIST("tracks/helium/h1antiHeliumSpectra_Z2"), 2 * antihePt);
4572-
// histos.fill(HIST("tracks/helium/h2antiHeliumYvsPt"), track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Helium3)), antihePt);
45734657
histos.fill(HIST("tracks/helium/h2antiHeliumYvsPt_Z2"), track.rapidity(o2::track::PID::getMass2Z(o2::track::PID::Helium3)), 2 * antihePt);
4574-
// histos.fill(HIST("tracks/helium/h2antiHeliumEtavsPt"), track.eta(), antihePt);
45754658
histos.fill(HIST("tracks/helium/h2antiHeliumEtavsPt_Z2"), track.eta(), 2 * antihePt);
45764659
if (outFlagOptions.enablePIDplot)
45774660
histos.fill(HIST("tracks/helium/h2TPCsignVsTPCmomentumantiHelium"), antiheTPCmomentum, track.tpcSignal());
@@ -4811,6 +4894,7 @@ struct LFNucleiBATask {
48114894
}
48124895

48134896
if constexpr (IsMC) {
4897+
// auto const& mcParticles = particles;
48144898
bool isPhysPrim = false;
48154899
bool isProdByGen = false;
48164900
bool isWeakDecay = false;
@@ -5733,6 +5817,8 @@ struct LFNucleiBATask {
57335817
default:
57345818
break;
57355819
}
5820+
} else {
5821+
(void)particles;
57365822
}
57375823
}
57385824
}
@@ -5973,7 +6059,7 @@ struct LFNucleiBATask {
59736059
spectraGen.fill(HIST("histGenVetxZ"), mcCollision.posZ());
59746060
if (mcCollision.centFT0M() < cfgMultCutLow || mcCollision.centFT0M() > cfgMultCutHigh)
59756061
return;
5976-
for (auto& mcParticleGen : mcParticles) {
6062+
for (auto& mcParticleGen : mcParticles) { // NOLINT
59776063
if (mcParticleGen.y() > kinemOptions.cfgRapidityCutHigh || mcParticleGen.y() < kinemOptions.cfgRapidityCutLow) {
59786064
continue;
59796065
}

0 commit comments

Comments
 (0)