diff --git a/PWGLF/DataModel/LFNucleiTables.h b/PWGLF/DataModel/LFNucleiTables.h index f74d3b8ed9d..2caf11a5fb2 100644 --- a/PWGLF/DataModel/LFNucleiTables.h +++ b/PWGLF/DataModel/LFNucleiTables.h @@ -33,6 +33,11 @@ DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int); DECLARE_SOA_COLUMN(RunNumber, runNumber, int); DECLARE_SOA_COLUMN(CentFV0M, centFV0M, float); DECLARE_SOA_COLUMN(CentFT0M, centFT0M, float); +DECLARE_SOA_COLUMN(MultNTracksPVeta1, multNTracksPVeta1, int); +DECLARE_SOA_DYNAMIC_COLUMN(IsInelGt0, isInelGt0, // is INEL > 0 + [](int multPveta1) -> bool { return multPveta1 > 0; }); +DECLARE_SOA_DYNAMIC_COLUMN(IsInelGt1, isInelGt1, // is INEL > 1 + [](int multPveta1) -> bool { return multPveta1 > 1; }); DECLARE_SOA_DYNAMIC_COLUMN(Selection_Bit, selection_bit, //! Dummy [](o2::aod::evsel::EventSelectionFlags /*v*/) -> bool { return true; }); } // namespace fullEvent @@ -44,6 +49,9 @@ DECLARE_SOA_TABLE(LfNuclEvents, "AOD", "LFNUCLEvent", collision::PosZ, fullEvent::CentFV0M, fullEvent::CentFT0M, + fullEvent::MultNTracksPVeta1, + fullEvent::IsInelGt0, + fullEvent::IsInelGt1, fullEvent::IsEventReject, fullEvent::RunNumber, fullEvent::Selection_Bit<>); diff --git a/PWGLF/TableProducer/Nuspex/LFTreeCreatorNuclei.cxx b/PWGLF/TableProducer/Nuspex/LFTreeCreatorNuclei.cxx index 4a255202ea5..73a9346096a 100644 --- a/PWGLF/TableProducer/Nuspex/LFTreeCreatorNuclei.cxx +++ b/PWGLF/TableProducer/Nuspex/LFTreeCreatorNuclei.cxx @@ -20,12 +20,14 @@ #include "PWGLF/DataModel/LFNucleiTables.h" #include "PWGLF/DataModel/LFParticleIdentification.h" +#include "PWGLF/Utils/inelGt.h" #include "Common/CCDB/EventSelectionParams.h" #include "Common/Core/TrackSelection.h" #include "Common/Core/TrackSelectionDefaults.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/Multiplicity.h" #include "Common/DataModel/PIDResponseTOF.h" #include "Common/DataModel/TrackSelectionTables.h" @@ -118,7 +120,7 @@ struct LfTreeCreatorNuclei { (trackSelType.value == 2) || (trackSelType.value == 3); Filter DCAcutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz); - using EventCandidates = soa::Join; + using EventCandidates = soa::Join; using TrackCandidates = soa::JoinGetXaxis()->SetBinLabel(2, "Skimmed events"); if (enableCentrality) { - histos.add("event/eventSelection", "eventSelection", HistType::kTH2D, {{8, -0.5, 7.5}, {binsPercentile, "Centrality FT0M"}}); + histos.add("event/eventSelection", "eventSelection", HistType::kTH2D, {{11, -0.5, 10.5}, {binsPercentile, "Centrality FT0M"}}); auto h2d = histos.get(HIST("event/eventSelection")); if (skimmingOptions.applySkimming) h2d->GetXaxis()->SetBinLabel(1, "Skimmed events"); @@ -511,8 +511,11 @@ struct LFNucleiBATask { h2d->GetXaxis()->SetBinLabel(6, "Sel8 cut"); h2d->GetXaxis()->SetBinLabel(7, "Z-vert Cut"); h2d->GetXaxis()->SetBinLabel(8, "Multiplicity cut"); + h2d->GetXaxis()->SetBinLabel(9, "INEL"); + h2d->GetXaxis()->SetBinLabel(10, "INEL > 0"); + h2d->GetXaxis()->SetBinLabel(11, "INEL > 1"); } else { - histos.add("event/eventSelection", "eventSelection", HistType::kTH1D, {{8, -0.5, 7.5}}); + histos.add("event/eventSelection", "eventSelection", HistType::kTH1D, {{11, -0.5, 10.5}}); auto h1d = histos.get(HIST("event/eventSelection")); if (skimmingOptions.applySkimming) h1d->GetXaxis()->SetBinLabel(1, "Skimmed events"); @@ -526,6 +529,9 @@ struct LFNucleiBATask { h1d->GetXaxis()->SetBinLabel(6, "Sel8 cut"); h1d->GetXaxis()->SetBinLabel(7, "Z-vert Cut"); h1d->GetXaxis()->SetBinLabel(8, "Multiplicity cut"); + h1d->GetXaxis()->SetBinLabel(9, "INEL"); + h1d->GetXaxis()->SetBinLabel(10, "INEL > 0"); + h1d->GetXaxis()->SetBinLabel(11, "INEL > 1"); } if (enableCentrality) @@ -2405,10 +2411,26 @@ struct LFNucleiBATask { if (enableCentrality && (centFT0M <= cfgMultCutLow || centFT0M > cfgMultCutHigh)) { return; } - if (enableCentrality) + if (enableCentrality) { histos.fill(HIST("event/eventSelection"), 7, centFT0M); - else + histos.fill(HIST("event/eventSelection"), 8, centFT0M); + } else { histos.fill(HIST("event/eventSelection"), 7); + histos.fill(HIST("event/eventSelection"), 8); + } + + if (event.isInelGt0()) { + if (enableCentrality) + histos.fill(HIST("event/eventSelection"), 9, centFT0M); + else + histos.fill(HIST("event/eventSelection"), 9); + } + if (event.isInelGt1()) { + if (enableCentrality) + histos.fill(HIST("event/eventSelection"), 10, centFT0M); + else + histos.fill(HIST("event/eventSelection"), 10); + } float gamma = 0., massTOF = 0., massTOFhe = 0., massTOFantihe = 0., heTPCmomentum = 0.f, antiheTPCmomentum = 0.f, heP = 0.f, antiheP = 0.f, hePt = 0.f, antihePt = 0.f, antiDPt = 0.f, DPt = 0.f; bool isTritonTPCpid = false; @@ -6090,7 +6112,7 @@ struct LFNucleiBATask { } } - using EventCandidates = soa::Join; + using EventCandidates = soa::Join; using EventCandidatesMC = soa::Join; using TrackCandidates0 = soa::Join