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
131 changes: 106 additions & 25 deletions PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
Configurable<bool> enableAl{"enableAl", true, "Flag to enable alpha analysis."};

Configurable<bool> enableTrackingEff{"enableTrackingEff", 0, "Flag to enable tracking efficiency histos."};
Configurable<std::string> ccdbUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Check failure on line 81 in PWGLF/Tasks/Nuspex/LFNucleiBATask.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

// Set the triggered events skimming scheme
struct : ConfigurableGroup {
Expand Down Expand Up @@ -330,17 +330,29 @@
LOG(fatal) << "Can't enable processData and processMCReco in the same time, pick one!";
}
if (doprocessEvSgLossMC) {
evLossHistos.add<TH1>("evLoss/hEvent", "Event loss histograms; ; counts", HistType::kTH1F, {{3, 0., 3.}});
evLossHistos.add<TH1>("evLoss/hEvent", "Event loss histograms; ; counts", HistType::kTH1F, {{4, 0., 4.}});
evLossHistos.get<TH1>(HIST("evLoss/hEvent"))->GetXaxis()->SetBinLabel(1, "All Gen.");
evLossHistos.get<TH1>(HIST("evLoss/hEvent"))->GetXaxis()->SetBinLabel(2, "TVX (reco.)");
evLossHistos.get<TH1>(HIST("evLoss/hEvent"))->GetXaxis()->SetBinLabel(3, "Sel8 (reco.)");
evLossHistos.get<TH1>(HIST("evLoss/hEvent"))->GetXaxis()->SetBinLabel(3, "MC Sel8 (TVX + NoTFB) (reco.)");
evLossHistos.get<TH1>(HIST("evLoss/hEvent"))->GetXaxis()->SetBinLabel(4, "Sel8 (reco.)");

evLossHistos.add<TH1>("evLoss/pt/hDeuteronTriggeredTVX", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hDeuteronTriggeredSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hDeuteronTriggeredMCSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hDeuteronGen", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hAntiDeuteronTriggeredTVX", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hAntiDeuteronTriggeredMCSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hAntiDeuteronTriggeredSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hAntiDeuteronGen", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});

evLossHistos.add<TH1>("evLoss/pt/hHeliumTriggeredTVX", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hHeliumTriggeredSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hHeliumTriggeredMCSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hHeliumGen", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hAntiHeliumTriggeredTVX", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hAntiHeliumTriggeredSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hAntiHeliumTriggeredMCSel8", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
evLossHistos.add<TH1>("evLoss/pt/hAntiHeliumGen", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{100, 0., 5.}});
}
if (doprocessMCRecoLfPidEv) {
spectraGen.add<TH1>("LfEv/pT_nocut", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
Expand All @@ -356,15 +368,27 @@
spectraGen.add<TH1>("LfEv/helium/pT_ITSROFBorder_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/pT_sel8_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/pT_MCsel8_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/pT_MCsel8_HePrim", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});

spectraGen.add<TH1>("LfEv/helium/prim/pT_nocut_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/prim/pT_TVXtrigger_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/prim/pT_TFrameBorder_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/prim/pT_ITSROFBorder_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/prim/pT_sel8_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/prim/pT_MCsel8_He", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});

spectraGen.add<TH1>("LfEv/helium/pT_nocut_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/pT_TVXtrigger_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/pT_TFrameBorder_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/pT_ITSROFBorder_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/pT_sel8_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/pT_MCsel8_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/pT_MCsel8_antiHePrim", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});

spectraGen.add<TH1>("LfEv/helium/prim/pT_nocut_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/prim/pT_TVXtrigger_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/prim/pT_TFrameBorder_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/prim/pT_ITSROFBorder_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/prim/pT_sel8_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
spectraGen.add<TH1>("LfEv/helium/prim/pT_MCsel8_antiHe", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{ptHeAxis}});
}

if (enableDebug) {
Expand Down Expand Up @@ -419,7 +443,7 @@
}

if (enableCentrality)
histos.add<TH2>("event/h1VtxZ", "V_{z};V_{z} (in cm); counts", HistType::kTH1F, {{1500, -15, 15}, {binsPercentile, "Centrality FT0M"}});
histos.add<TH2>("event/h1VtxZ", "V_{z};V_{z} (in cm); counts", HistType::kTH2F, {{1500, -15, 15}, {binsPercentile, "Centrality FT0M"}});
else
histos.add<TH1>("event/h1VtxZ", "V_{z};V_{z} (in cm); counts", HistType::kTH1F, {{1500, -15, 15}});

Expand Down Expand Up @@ -2162,14 +2186,14 @@
spectraGen.add("helium/histGenPtHe", "generated particles", HistType::kTH1F, {ptHeAxis});
spectraGen.add("helium/histGenPtHePrim", "generated particles", HistType::kTH1F, {ptHeAxis});
if (enableCentrality)
spectraGen.add("helium/histGenPtHePrim", "generated particles", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
spectraGen.add("helium/histGenPtHePrimVsMult", "generated particles", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
spectraGen.add("helium/histGenPtHeSec", "generated particles", HistType::kTH1F, {ptHeAxis});
spectraGen.add("helium/histSecTransportPtHe", "generated particles", HistType::kTH1F, {ptHeAxis});

spectraGen.add("helium/histGenPtantiHe", "generated particles", HistType::kTH1F, {ptHeAxis});
spectraGen.add("helium/histGenPtantiHePrim", "generated particles", HistType::kTH1F, {ptHeAxis});
if (enableCentrality)
spectraGen.add("helium/histGenPtantiHePrim", "generated particles", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
spectraGen.add("helium/histGenPtantiHePrimVsMult", "generated particles", HistType::kTH2F, {{ptHeAxis}, {binsPercentile}});
spectraGen.add("helium/histGenPtantiHeSec", "generated particles", HistType::kTH1F, {ptHeAxis});
spectraGen.add("helium/histSecTransportPtantiHe", "generated particles", HistType::kTH1F, {ptHeAxis});
}
Expand Down Expand Up @@ -5752,7 +5776,7 @@
if (isWeakDecay) {
histos.fill(HIST("tracks/helium/h1HeliumSpectraTrueSec_Z2"), 2 * hePt);
if (enableCentrality)
histos.fill(HIST("tracks/helium/h1HeliumSpectraTrueSecVsMult_Z2"), 2 * hePt);
histos.fill(HIST("tracks/helium/h2HeliumSpectraTrueSecVsMult_Z2"), 2 * hePt, event.centFT0M());
if (outFlagOptions.makeDCAAfterCutPlots) {
histos.fill(HIST("tracks/helium/dca/after/hDCAxyVsPtHeliumTrueSec"), hePt, track.dcaXY());
histos.fill(HIST("tracks/helium/dca/after/hDCAzVsPtHeliumTrueSec"), hePt, track.dcaZ());
Expand Down Expand Up @@ -6042,55 +6066,83 @@

// No cut
spectraGen.fill(HIST("LfEv/pT_nocut"), pt);
if (pdg == PDGHelium)
if (pdg == PDGHelium) {
spectraGen.fill(HIST("LfEv/helium/pT_nocut_He"), pt);
if (pdg == -PDGHelium)
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/prim/pT_nocut_He"), pt);
}
if (pdg == -PDGHelium) {
spectraGen.fill(HIST("LfEv/helium/pT_nocut_antiHe"), pt);
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/prim/pT_nocut_antiHe"), pt);
}
// Trigger TVX
if (hasTVX) {
spectraGen.fill(HIST("LfEv/pT_TVXtrigger"), pt);
if (pdg == PDGHelium)
if (pdg == PDGHelium) {
spectraGen.fill(HIST("LfEv/helium/pT_TVXtrigger_He"), pt);
if (pdg == -PDGHelium)
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/prim/pT_TVXtrigger_He"), pt);
}
if (pdg == -PDGHelium) {
spectraGen.fill(HIST("LfEv/helium/pT_TVXtrigger_antiHe"), pt);
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/prim/pT_TVXtrigger_antiHe"), pt);
}
}
// No Time Frame Border
if (hasNoTFB) {
spectraGen.fill(HIST("LfEv/pT_TFrameBorder"), pt);
if (pdg == PDGHelium)
if (pdg == PDGHelium) {
spectraGen.fill(HIST("LfEv/helium/pT_TFrameBorder_He"), pt);
if (pdg == -PDGHelium)
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/prim/pT_TFrameBorder_He"), pt);
}
if (pdg == -PDGHelium) {
spectraGen.fill(HIST("LfEv/helium/pT_TFrameBorder_antiHe"), pt);
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/prim/pT_TFrameBorder_antiHe"), pt);
}
}
// No ITS ROF Frame Border
if (hasNoItsRofFB) {
spectraGen.fill(HIST("LfEv/pT_ITSROFBorder"), pt);
if (pdg == PDGHelium)
if (pdg == PDGHelium) {
spectraGen.fill(HIST("LfEv/helium/pT_ITSROFBorder_He"), pt);
if (pdg == -PDGHelium)
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/prim/pT_ITSROFBorder_He"), pt);
}
if (pdg == -PDGHelium) {
spectraGen.fill(HIST("LfEv/helium/pT_ITSROFBorder_antiHe"), pt);
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/prim/pT_ITSROFBorder_antiHe"), pt);
}
}
// Sel8 MC
if (hasTVX && hasNoTFB) {
spectraGen.fill(HIST("LfEv/pT_MCsel8"), pt);
if (pdg == PDGHelium) {
spectraGen.fill(HIST("LfEv/helium/pT_MCsel8_He"), pt);
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/pT_MCsel8_HePrim"), pt);
spectraGen.fill(HIST("LfEv/helium/prim/pT_MCsel8_He"), pt);
}
if (pdg == -PDGHelium) {
spectraGen.fill(HIST("LfEv/helium/pT_MCsel8_antiHe"), pt);
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/pT_MCsel8_antiHePrim"), pt);
spectraGen.fill(HIST("LfEv/helium/prim/pT_MCsel8_antiHe"), pt);
}
}
// Sel8 tag
if (hasSel8) {
spectraGen.fill(HIST("LfEv/pT_sel8"), pt);
if (pdg == PDGHelium)
spectraGen.fill(HIST("LfEv/helium/pT_sel8_He"), pt);
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/prim/pT_sel8_He"), pt);
if (pdg == -PDGHelium)
spectraGen.fill(HIST("LfEv/helium/pT_sel8_antiHe"), pt);
if (isPhysPrim)
spectraGen.fill(HIST("LfEv/helium/prim/pT_sel8_antiHe"), pt);
}
}
}
Expand Down Expand Up @@ -6304,10 +6356,9 @@
if (pdgCode == PDGHelium) {
spectraGen.fill(HIST("helium/histGenPtHe"), ptMC);
if (isPhysPrim) {
spectraGen.fill(HIST("helium/histGenPtHePrim"), ptMC);
if (enableCentrality)
spectraGen.fill(HIST("helium/histGenPtHePrim"), ptMC, mcCollision.centFT0M());
else
spectraGen.fill(HIST("helium/histGenPtHePrim"), ptMC);
spectraGen.fill(HIST("helium/histGenPtHePrimVsMult"), ptMC, mcCollision.centFT0M());
}
if (!isPhysPrim && isProdByGen) {
{
Expand All @@ -6324,10 +6375,9 @@
if (pdgCode == -PDGHelium) {
spectraGen.fill(HIST("helium/histGenPtantiHe"), ptMC);
if (isPhysPrim) {
spectraGen.fill(HIST("helium/histGenPtantiHePrim"), ptMC);
if (enableCentrality)
spectraGen.fill(HIST("helium/histGenPtantiHePrim"), ptMC, mcCollision.centFT0M());
else
spectraGen.fill(HIST("helium/histGenPtantiHePrim"), ptMC);
spectraGen.fill(HIST("helium/histGenPtantiHePrimVsMult"), ptMC, mcCollision.centFT0M());
}
if (!isPhysPrim && isProdByGen) {
{
Expand Down Expand Up @@ -6385,6 +6435,8 @@

bool isSel8Event = false;
bool isTvxEvent = false;
bool isNoTFBEvent = false;
bool isMCSel8Event = false;

// Check if there is an event reconstructed for a generated event
for (const auto& recoColl : recoColls) {
Expand All @@ -6394,14 +6446,21 @@
isTvxEvent = true;
if (recoColl.sel8())
isSel8Event = true;
if (isTvxEvent && isSel8Event)
if (recoColl.selection_bit(aod::evsel::kNoTimeFrameBorder))
isNoTFBEvent = true;
if (isTvxEvent && isSel8Event && isNoTFBEvent)
break; // Optimize loop
}

if (isTvxEvent && isNoTFBEvent)
isMCSel8Event = true;

if (isTvxEvent)
evLossHistos.fill(HIST("evLoss/hEvent"), 1.5);
if (isSel8Event)
evLossHistos.fill(HIST("evLoss/hEvent"), 2.5);
if (isMCSel8Event)
evLossHistos.fill(HIST("evLoss/hEvent"), 3.5);

// Loop over all the Generated level particles
for (const auto& mcPart : mcParticles) {
Expand All @@ -6419,13 +6478,35 @@
evLossHistos.fill(HIST("evLoss/pt/hDeuteronTriggeredTVX"), pt);
if (isSel8Event)
evLossHistos.fill(HIST("evLoss/pt/hDeuteronTriggeredSel8"), pt);
if (isMCSel8Event)
evLossHistos.fill(HIST("evLoss/pt/hDeuteronTriggeredMCSel8"), pt);
}
if (pdg == -PDGDeuteron) {
evLossHistos.fill(HIST("evLoss/pt/hAntiDeuteronGen"), pt);
if (isTvxEvent)
evLossHistos.fill(HIST("evLoss/pt/hAntiDeuteronTriggeredTVX"), pt);
if (isSel8Event)
evLossHistos.fill(HIST("evLoss/pt/hAntiDeuteronTriggeredSel8"), pt);
if (isMCSel8Event)
evLossHistos.fill(HIST("evLoss/pt/hAntiDeuteronTriggeredMCSel8"), pt);
}
if (pdg == PDGHelium) {
evLossHistos.fill(HIST("evLoss/pt/hHeliumGen"), pt);
if (isTvxEvent)
evLossHistos.fill(HIST("evLoss/pt/hHeliumTriggeredTVX"), pt);
if (isSel8Event)
evLossHistos.fill(HIST("evLoss/pt/hHeliumTriggeredSel8"), pt);
if (isMCSel8Event)
evLossHistos.fill(HIST("evLoss/pt/hHeliumTriggeredMCSel8"), pt);
}
if (pdg == -PDGHelium) {
evLossHistos.fill(HIST("evLoss/pt/hAntiHeliumGen"), pt);
if (isTvxEvent)
evLossHistos.fill(HIST("evLoss/pt/hAntiHeliumTriggeredTVX"), pt);
if (isSel8Event)
evLossHistos.fill(HIST("evLoss/pt/hAntiHeliumTriggeredSel8"), pt);
if (isMCSel8Event)
evLossHistos.fill(HIST("evLoss/pt/hAntiHeliumTriggeredMCSel8"), pt);
}
}
}
Expand Down
Loading