From d15b1012e7429d42e0b234779d9e72d7dfb9654f Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Tue, 6 Jan 2026 18:17:11 -0300 Subject: [PATCH 01/14] Converted data process function to templated version. It allows the processing of D0 and Lc jets. --- PWGJE/Tasks/hfFragmentationFunction.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 50e1e2b0ef0..43a81ddbfee 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -194,6 +194,7 @@ struct HfFragmentationFunction { Configurable vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"}; Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; + Configurable chosenHadron{"chosenHadron", "D0", "choose hadron for analysis: D0 or Lc"}; std::vector eventSelectionBits; From 3e68e60556d13c6eb796ae9241a40524eebe41ba Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Mon, 26 Jan 2026 18:43:08 -0300 Subject: [PATCH 02/14] Changed name convention to hf instead of D0, removed chosenHadron not used variable --- PWGJE/Tasks/hfFragmentationFunction.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 43a81ddbfee..50e1e2b0ef0 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -194,7 +194,6 @@ struct HfFragmentationFunction { Configurable vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"}; Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; - Configurable chosenHadron{"chosenHadron", "D0", "choose hadron for analysis: D0 or Lc"}; std::vector eventSelectionBits; From 30a710d9eb15c24a3f1b5098be1c4af04651cd8c Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Mon, 26 Jan 2026 19:26:41 -0300 Subject: [PATCH 03/14] Templatization of matched MC process function so that it can be called for D0/Lc jets --- PWGJE/Tasks/hfFragmentationFunction.cxx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 50e1e2b0ef0..8e4478d9ce2 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -19,6 +19,7 @@ #include "PWGJE/Core/JetDerivedDataUtilities.h" #include "PWGJE/Core/JetUtilities.h" +#include "PWGJE/Core/JetHFUtilities.h" #include "PWGJE/DataModel/Jet.h" #include "PWGJE/DataModel/JetReducedData.h" @@ -442,6 +443,28 @@ struct HfFragmentationFunction { selectedAs = -1; } + // reflection information for storage: HF = +1, HFbar = -1, neither = 0 + int matchedFrom = 0; + int decayChannel = 0; + if (jethfutilities::isD0Table()) { + decayChannel = o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK; + } else if (jethfutilities::isLcTable()) { + decayChannel = o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi; + } + int selectedAs = 0; + + if (mcdcand.flagMcMatchRec() == decayChannel) { // matched to HF on truth level + matchedFrom = 1; + } else if (mcdcand.flagMcMatchRec() == -decayChannel) { // matched to HFbar on truth level + matchedFrom = -1; + } + // bitwise AND operation: Checks whether BIT(i) is set, regardless of other bits + if (mcdcand.candidateSelFlag() & BIT(0)) { // CandidateSelFlag == BIT(0) -> selected as HF + selectedAs = 1; + } else if (mcdcand.candidateSelFlag() & BIT(1)) { // CandidateSelFlag == BIT(1) -> selected as HFbar + selectedAs = -1; + } + // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF From 0cc1f040720ccba16e14e99ef8a7b03794d53f29 Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Tue, 27 Jan 2026 16:30:50 -0300 Subject: [PATCH 04/14] Fix: clang-formatting done manually --- PWGJE/Tasks/hfFragmentationFunction.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 8e4478d9ce2..42f1ef70d26 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -18,11 +18,13 @@ /// profile and/or jet momentum fraction for charmed hadrons #include "PWGJE/Core/JetDerivedDataUtilities.h" -#include "PWGJE/Core/JetUtilities.h" #include "PWGJE/Core/JetHFUtilities.h" +#include "PWGJE/Core/JetUtilities.h" #include "PWGJE/DataModel/Jet.h" #include "PWGJE/DataModel/JetReducedData.h" +#include "PWGHF/Core/DecayChannels.h" + #include "Common/Core/RecoDecay.h" #include From e954161ed8b580b1f9ddd9e3f0c4e6bfa3b2f14c Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Thu, 26 Mar 2026 00:46:10 -0300 Subject: [PATCH 05/14] Added collision selection from jetderiveddatautilities for MC collisions too. --- PWGJE/Tasks/hfFragmentationFunction.cxx | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 42f1ef70d26..6d06d7d6775 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -444,28 +444,6 @@ struct HfFragmentationFunction { } else if (mcdcand.candidateSelFlag() & BIT(1)) { // CandidateSelFlag == BIT(1) -> selected as HFbar selectedAs = -1; } - - // reflection information for storage: HF = +1, HFbar = -1, neither = 0 - int matchedFrom = 0; - int decayChannel = 0; - if (jethfutilities::isD0Table()) { - decayChannel = o2::hf_decay::hf_cand_2prong::DecayChannelMain::D0ToPiK; - } else if (jethfutilities::isLcTable()) { - decayChannel = o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi; - } - int selectedAs = 0; - - if (mcdcand.flagMcMatchRec() == decayChannel) { // matched to HF on truth level - matchedFrom = 1; - } else if (mcdcand.flagMcMatchRec() == -decayChannel) { // matched to HFbar on truth level - matchedFrom = -1; - } - // bitwise AND operation: Checks whether BIT(i) is set, regardless of other bits - if (mcdcand.candidateSelFlag() & BIT(0)) { // CandidateSelFlag == BIT(0) -> selected as HF - selectedAs = 1; - } else if (mcdcand.candidateSelFlag() & BIT(1)) { // CandidateSelFlag == BIT(1) -> selected as HFbar - selectedAs = -1; - } // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet From aaf74647e8df5cc8f1e663f956c6ed872a516dd9 Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Sun, 26 Apr 2026 10:46:30 -0300 Subject: [PATCH 06/14] Minor but important changes were applied: - jeNConst changed to "int" type - HfMatchedFrom table column now stores the decay channel from which it was originated (no need for the matchedFrom usage anymore) - removed duplicated includes at the top of the file --- PWGJE/Tasks/hfFragmentationFunction.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 6d06d7d6775..ed364ea492d 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -456,11 +456,11 @@ struct HfFragmentationFunction { } else { // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet - mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF - -2, -2, -2, -2, -2, // no detector-level jet found - -2, -2, -2, -2, -2, -2, // no detector-level jet found - -2, -2, -2, // no detector-level jet found - -2, -2); // no detector-level jet found + mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF + -2, -2, -2, -2, -2, // no detector-level jet found + -2, -2, -2, -2, -2, -2, // no detector-level jet found + -2, -2, -2, // no detector-level jet found + -2, -2); // no detector-level jet found } } // end of mcpjets loop } // end of mccollisions loop From 72501b79ae79006c4417f1d88d99bc8760b27301 Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Thu, 17 Sep 2026 13:55:11 -0300 Subject: [PATCH 07/14] Added configurable flag to turn on/off event selection for MC and Reco levels --- PWGJE/Tasks/hfFragmentationFunction.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index ed364ea492d..e3ac08d4fac 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -197,6 +197,8 @@ struct HfFragmentationFunction { Configurable vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"}; Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; + Configurable applyMcEventSelection{"applyMcEventSelection", false, "Choose a boolean value"}; + Configurable applyRecoEventSelection{"applyRecoEventSelection", true, "Choose a boolean value"}; std::vector eventSelectionBits; @@ -244,7 +246,7 @@ struct HfFragmentationFunction { { // apply event selection and fill histograms for sanity check registry.fill(HIST("h_collision_counter"), 2.0); - if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut)) { + if (applyRecoEventSelection && (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut))) { return; } registry.fill(HIST("h_collision_counter"), 3.0); @@ -320,7 +322,7 @@ struct HfFragmentationFunction { registry.fill(HIST("h_collision_counter"), 0.0); // skip collisions outside of |z| < vertexZCut - if (!jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits) || !(std::abs(mccollision.posZ()) < vertexZCut)) { + if (applyMcEventSelection && (!jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits) || !(std::abs(mccollision.posZ()) < vertexZCut))) { continue; } registry.fill(HIST("h_collision_counter"), 1.0); @@ -330,7 +332,7 @@ struct HfFragmentationFunction { for (const auto& collision : collisionsPerMCCollision) { registry.fill(HIST("h_collision_counter"), 2.0); - if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut)) { + if (applyRecoEventSelection && (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut))) { continue; } registry.fill(HIST("h_collision_counter"), 3.0); @@ -404,7 +406,7 @@ struct HfFragmentationFunction { for (const auto& mccollision : mccollisions) { registry.fill(HIST("h_collision_counter"), 0.0); // skip collisions outside of |z| < vertexZCut - if (!jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits) || !(std::abs(mccollision.posZ()) < vertexZCut)) { + if (applyMcEventSelection && (!jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits) || !(std::abs(mccollision.posZ()) < vertexZCut))) { continue; } registry.fill(HIST("h_collision_counter"), 1.0); @@ -428,7 +430,7 @@ struct HfFragmentationFunction { // apply collision sel8 selection on detector level jet's collision const auto& collision = collisions.iteratorAt(mcdjet.collisionId()); registry.fill(HIST("h_collision_counter"), 2.0); - if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut)) { + if (applyRecoEventSelection && (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut))) { continue; } registry.fill(HIST("h_collision_counter"), 3.0); From 50598af4b3b9047ff14095ad8ab53d594d98abfd Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Sat, 19 Sep 2026 21:35:24 -0300 Subject: [PATCH 08/14] analyseMC() function updated for more robust event selection handling and QA --- PWGJE/Tasks/hfFragmentationFunction.cxx | 169 ++++++++++++++++++------ 1 file changed, 132 insertions(+), 37 deletions(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index e3ac08d4fac..19579abf389 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -65,6 +65,25 @@ double deltaPhi(double phi1, double phi2) return std::abs(dphi); } +// +/// Collision counter selection indexes +/// +/// The collision selection is done and stored in multiple steps, for later QA analysis. +/// In order not to hard code which bins should be filled throughout different process +/// function, this namespace with enums is create +namespace collisionSelections +{ + enum CollisionSelectionStep { + kMCCollisions = 0, ///< raw mccollisions with no selection, starts with 0 + kMCCollisionsZCut, ///< mccollisions with z vtx selection + kMCCollisionsZCutSel8, ///< mccollisions with z vtx and sel8 mc emulated selections + kMCCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions + kMCCollisionsZCutSel8SplitCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with no split reconstructed collisions + kRecoCollisions, ///< raw reconstructed collisions after previous mccollisions selection + kRecoCollisionsZcut, ///< reconstructed collisions with z vtx selection after previous mccollisions selection + kRecoCollisionsZcutSel8 ///< reconstructed collisions with z vtx and sel8 selections after previous mccollisions selection + }; +} // creating table for storing distance data namespace o2::aod { @@ -199,6 +218,7 @@ struct HfFragmentationFunction { Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; Configurable applyMcEventSelection{"applyMcEventSelection", false, "Choose a boolean value"}; Configurable applyRecoEventSelection{"applyRecoEventSelection", true, "Choose a boolean value"}; + Configurable rejectSplitCollisions{"rejectSplitCollisions", true, "reject generated events associated to more than one reconstructed collision"}; std::vector eventSelectionBits; @@ -208,12 +228,12 @@ struct HfFragmentationFunction { eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits(static_cast(eventSelections)); // create histograms - // collision system histograms - std::vector histLabels = {"mccollisions", "z_cut", "collisions", "sel8"}; + // collision counter histograms + std::vector histLabels = {"mccollisions", "mccollisions+z_cut", "mccollisions+z_{cut}+sel8", "mccollisions+z_{cut}+sel8+HasCollisions", "mccollisions+z_{cut}+sel8+NoSplitVtx", "collisions", "collisions+z_{cut}", "collisions+z_{cut}+sel8"}; registry.add("h_collision_counter", ";# of collisions;", HistType::kTH1F, {{static_cast(histLabels.size()), 0.0, static_cast(histLabels.size())}}); - auto counter = registry.get(HIST("h_collision_counter")); + auto collCounter = registry.get(HIST("h_collision_counter")); for (std::vector::size_type iCounter = 0; iCounter < histLabels.size(); iCounter++) { - counter->GetXaxis()->SetBinLabel(iCounter + 1, histLabels[iCounter].data()); + collCounter->GetXaxis()->SetBinLabel(iCounter + 1, histLabels[iCounter].data()); } registry.add("h_jet_counter", ";# of jets;", {HistType::kTH1F, {{6, 0., 3.0}}}); auto jetCounter = registry.get(HIST("h_jet_counter")); @@ -245,11 +265,11 @@ struct HfFragmentationFunction { aod::JetTracks const&) { // apply event selection and fill histograms for sanity check - registry.fill(HIST("h_collision_counter"), 2.0); + registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisions); if (applyRecoEventSelection && (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut))) { return; } - registry.fill(HIST("h_collision_counter"), 3.0); + registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisionsZcutSel8); for (const auto& jet : jets) { // fill jet counter histogram @@ -320,22 +340,22 @@ struct HfFragmentationFunction { { for (const auto& mccollision : mccollisions) { - registry.fill(HIST("h_collision_counter"), 0.0); + registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisions); // skip collisions outside of |z| < vertexZCut if (applyMcEventSelection && (!jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits) || !(std::abs(mccollision.posZ()) < vertexZCut))) { continue; } - registry.fill(HIST("h_collision_counter"), 1.0); + registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCutSel8); // reconstructed collisions associated to same mccollision const auto collisionsPerMCCollision = collisions.sliceBy(collisionsPerMCCollisionPreslice, mccollision.globalIndex()); for (const auto& collision : collisionsPerMCCollision) { - registry.fill(HIST("h_collision_counter"), 2.0); + registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisions); if (applyRecoEventSelection && (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut))) { continue; } - registry.fill(HIST("h_collision_counter"), 3.0); + registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisionsZcutSel8); // d0 detector level jets associated to the current same collision const auto d0mcdJetsPerCollision = mcdjets.sliceBy(d0MCDJetsPerCollisionPreslice, collision.globalIndex()); @@ -392,25 +412,65 @@ struct HfFragmentationFunction { } PROCESS_SWITCH(HfFragmentationFunction, processMcEfficiency, "non-matched and matched MC HF and jets", false); - template + template void analyzeMC(TMCPJetsPerMCCollisionPreslice const& MCPJetsPerMCCollisionPreslice, + TMCDJetsPerCollisionPreslice const& MCDJetsPerCollisionPreslice, aod::JetMcCollisions const& mccollisions, aod::JetCollisionsMCD const& collisions, - TJetsMCD const&, TJetsMCP const& mcpjets, - TCandidatesMCD const&, + TJetsMCD const& mcdjets, TCandidatesMCP const&, - aod::JetTracks const&, - aod::JetParticles const&) + TCandidatesMCD const&, + aod::JetParticles const&, + aod::JetTracks const&) { for (const auto& mccollision : mccollisions) { - registry.fill(HIST("h_collision_counter"), 0.0); + + // --- begin event selection + registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisions); // skip collisions outside of |z| < vertexZCut - if (applyMcEventSelection && (!jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits) || !(std::abs(mccollision.posZ()) < vertexZCut))) { + if (applyMcEventSelection && !(std::abs(mccollision.posZ()) < vertexZCut)) { + continue; + } + registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCut); + if (applyMcEventSelection && !jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits)) { + continue; + } + registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCutSel8); + + // reconstructed collisions associated to same mccollision + const auto collisionsPerMCCollision = collisions.sliceBy(collisionsPerMCCollisionPreslice, mccollision.globalIndex()); + // only consider events with at least one reconstructed collision + if (collisionsPerMCCollision.size() == 0) { + continue; + } + // only consider events with no split vertices (one mccollision-to-one collision) + registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCutSel8HasCollisions); + if (rejectSplitCollisions && collisionsPerMCCollision.size() > 1) { continue; } - registry.fill(HIST("h_collision_counter"), 1.0); + registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCutSel8SplitCollisions); + bool hasSelectedCollision = false; + for (const auto& collision : collisionsPerMCCollision) { + + registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisions); + if (applyRecoEventSelection && !(std::abs(collision.posZ()) < vertexZCut)) { + continue; + } + registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisionsZcut); + if (applyRecoEventSelection && !jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) { + continue; + } + registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisionsZcutSel8); + hasSelectedCollision = true; + } // end of collisions loop + + if (!hasSelectedCollision) { + continue; + } + + // --- begin particle level jets storage // hf particle level jets associated to same mccollision const auto mcpJetsPerMCCollision = mcpjets.sliceBy(MCPJetsPerMCCollisionPreslice, mccollision.globalIndex()); for (const auto& mcpjet : mcpJetsPerMCCollision) { @@ -427,14 +487,6 @@ struct HfFragmentationFunction { for (const auto& mcdjet : mcpjet.template matchedJetCand_as()) { registry.fill(HIST("h_jet_counter"), 2.0); - // apply collision sel8 selection on detector level jet's collision - const auto& collision = collisions.iteratorAt(mcdjet.collisionId()); - registry.fill(HIST("h_collision_counter"), 2.0); - if (applyRecoEventSelection && (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut))) { - continue; - } - registry.fill(HIST("h_collision_counter"), 3.0); - // obtain leading HF candidate in jet auto mcdcand = mcdjet.template candidates_first_as(); @@ -460,37 +512,80 @@ struct HfFragmentationFunction { matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF -2, -2, -2, -2, -2, // no detector-level jet found - -2, -2, -2, -2, -2, -2, // no detector-level jet found + -2, -2, -2, -2, -2, false, // no detector-level jet found -2, -2, -2, // no detector-level jet found -2, -2); // no detector-level jet found } } // end of mcpjets loop + + // --- begin non-matched detector level jets storage (fake candidates and correlated background if present) + // reconstructed collisions associated to same mccollision + for (const auto& collision : collisionsPerMCCollision) { + + // Also apply the reconstructed level collisions selections + if (applyRecoEventSelection && (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut))) { + continue; + } + + // d0 detector level jets associated to the current same collision + const auto mcdJetsPerCollision = mcdjets.sliceBy(MCDJetsPerCollisionPreslice, collision.globalIndex()); + for (const auto& mcdjet : mcdJetsPerCollision) { + + registry.fill(HIST("h_jet_counter"), 0.5); + + // obtain leading HF candidate in jet + auto mcdcand = mcdjet.template candidates_first_as(); + + if (mcdjet.has_matchedJetCand()) { + registry.fill(HIST("h_jet_counter"), 1.5); + } else { // store the detector level non-matched candidates + + // reflection information for storage: D0 = +1, D0bar = -1, neither = 0 + int selectedAs = 0; + + // bitwise AND operation: Checks whether BIT(i) is set, regardless of other bits + if (mcdcand.candidateSelFlag() & BIT(0)) { // CandidateSelFlag == BIT(0) -> selected as D0 + selectedAs = 1; + } else if (mcdcand.candidateSelFlag() & BIT(1)) { // CandidateSelFlag == BIT(1) -> selected as D0bar + selectedAs = -1; + } + + // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) + matchJetTable(-2, -2, -2, -2, -2, // particle level jet + -2, -2, -2, -2, false, // particle level HF + jetutilities::deltaR(mcdjet, mcdcand), mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.template tracks_as().size() + mcdjet.template candidates_as().size(), // detector level jet + mcdcand.pt(), mcdcand.eta(), mcdcand.phi(), mcdcand.m(), mcdcand.y(), (mcdcand.originMcRec() == RecoDecay::OriginType::Prompt), // detector level HF + mcdcand.mlScores()[0], mcdcand.mlScores()[1], mcdcand.mlScores()[2], // Machine Learning PID scores: background, prompt, non-prompt + static_cast(mcdcand.flagMcMatchRec()), selectedAs); // HF = +1, HFbar = -1, neither = 0 + } + } // end of non-matched detector level jets loop + } // end of collisions loop } // end of mccollisions loop } // end of analyzeMC function void processD0MC(aod::JetMcCollisions const& mccollisions, aod::JetCollisionsMCD const& collisions, - JetD0MCDTable const& mcdjets, JetD0MCPTable const& mcpjets, - aod::CandidatesD0MCD const& mcdcands, + JetD0MCDTable const& mcdjets, aod::CandidatesD0MCP const& mcpcands, - aod::JetTracks const& jettracks, - aod::JetParticles const& jetparticles) + aod::CandidatesD0MCD const& mcdcands, + aod::JetParticles const& jetparticles, + aod::JetTracks const& jettracks) { - analyzeMC, JetD0MCDTable, JetD0MCPTable, aod::CandidatesD0MCD, aod::CandidatesD0MCP>(d0MCPJetsPerMCCollisionPreslice, mccollisions, collisions, mcdjets, mcpjets, mcdcands, mcpcands, jettracks, jetparticles); + analyzeMC, Preslice, JetD0MCPTable, JetD0MCDTable, aod::CandidatesD0MCP, aod::CandidatesD0MCD>(d0MCPJetsPerMCCollisionPreslice, d0MCDJetsPerCollisionPreslice, mccollisions, collisions, mcpjets, mcdjets, mcpcands, mcdcands, jetparticles, jettracks); } PROCESS_SWITCH(HfFragmentationFunction, processD0MC, "Store all simulated D0 jets information with matched candidate (if any found)", false); void processLcMC(aod::JetMcCollisions const& mccollisions, aod::JetCollisionsMCD const& collisions, - JetLcMCDTable const& mcdjets, JetLcMCPTable const& mcpjets, - aod::CandidatesLcMCD const& mcdcands, + JetLcMCDTable const& mcdjets, aod::CandidatesLcMCP const& mcpcands, - aod::JetTracks const& jettracks, - aod::JetParticles const& jetparticles) + aod::CandidatesLcMCD const& mcdcands, + aod::JetParticles const& jetparticles, + aod::JetTracks const& jettracks) { - analyzeMC, JetLcMCDTable, JetLcMCPTable, aod::CandidatesLcMCD, aod::CandidatesLcMCP>(lcMCPJetsPerMCCollisionPreslice, mccollisions, collisions, mcdjets, mcpjets, mcdcands, mcpcands, jettracks, jetparticles); + analyzeMC, Preslice, JetLcMCPTable, JetLcMCDTable, aod::CandidatesLcMCP, aod::CandidatesLcMCD>(lcMCPJetsPerMCCollisionPreslice, lcMCDJetsPerCollisionPreslice, mccollisions, collisions, mcpjets, mcdjets, mcpcands, mcdcands, jetparticles, jettracks); } PROCESS_SWITCH(HfFragmentationFunction, processLcMC, "Store all simulated Lc jets information with matched candidate (if any found)", false); }; From e9231cc7bb62540b7dcd5ab3479596b0d1fd9162 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Sun, 20 Sep 2026 00:50:52 +0000 Subject: [PATCH 09/14] Please consider the following formatting changes --- PWGJE/Tasks/hfFragmentationFunction.cxx | 51 ++++++++++++------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 19579abf389..a43351d3f2f 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -17,14 +17,13 @@ /// The task store data relevant to the calculation of hadronization observables radial /// profile and/or jet momentum fraction for charmed hadrons +#include "PWGHF/Core/DecayChannels.h" #include "PWGJE/Core/JetDerivedDataUtilities.h" #include "PWGJE/Core/JetHFUtilities.h" #include "PWGJE/Core/JetUtilities.h" #include "PWGJE/DataModel/Jet.h" #include "PWGJE/DataModel/JetReducedData.h" -#include "PWGHF/Core/DecayChannels.h" - #include "Common/Core/RecoDecay.h" #include @@ -65,7 +64,7 @@ double deltaPhi(double phi1, double phi2) return std::abs(dphi); } -// +// /// Collision counter selection indexes /// /// The collision selection is done and stored in multiple steps, for later QA analysis. @@ -73,16 +72,16 @@ double deltaPhi(double phi1, double phi2) /// function, this namespace with enums is create namespace collisionSelections { - enum CollisionSelectionStep { - kMCCollisions = 0, ///< raw mccollisions with no selection, starts with 0 - kMCCollisionsZCut, ///< mccollisions with z vtx selection - kMCCollisionsZCutSel8, ///< mccollisions with z vtx and sel8 mc emulated selections - kMCCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions - kMCCollisionsZCutSel8SplitCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with no split reconstructed collisions - kRecoCollisions, ///< raw reconstructed collisions after previous mccollisions selection - kRecoCollisionsZcut, ///< reconstructed collisions with z vtx selection after previous mccollisions selection - kRecoCollisionsZcutSel8 ///< reconstructed collisions with z vtx and sel8 selections after previous mccollisions selection - }; +enum CollisionSelectionStep { + kMCCollisions = 0, ///< raw mccollisions with no selection, starts with 0 + kMCCollisionsZCut, ///< mccollisions with z vtx selection + kMCCollisionsZCutSel8, ///< mccollisions with z vtx and sel8 mc emulated selections + kMCCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions + kMCCollisionsZCutSel8SplitCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with no split reconstructed collisions + kRecoCollisions, ///< raw reconstructed collisions after previous mccollisions selection + kRecoCollisionsZcut, ///< reconstructed collisions with z vtx selection after previous mccollisions selection + kRecoCollisionsZcutSel8 ///< reconstructed collisions with z vtx and sel8 selections after previous mccollisions selection +}; } // creating table for storing distance data namespace o2::aod @@ -469,7 +468,7 @@ struct HfFragmentationFunction { if (!hasSelectedCollision) { continue; } - + // --- begin particle level jets storage // hf particle level jets associated to same mccollision const auto mcpJetsPerMCCollision = mcpjets.sliceBy(MCPJetsPerMCCollisionPreslice, mccollision.globalIndex()); @@ -498,7 +497,7 @@ struct HfFragmentationFunction { } else if (mcdcand.candidateSelFlag() & BIT(1)) { // CandidateSelFlag == BIT(1) -> selected as HFbar selectedAs = -1; } - + // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF @@ -510,11 +509,11 @@ struct HfFragmentationFunction { } else { // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet - mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF - -2, -2, -2, -2, -2, // no detector-level jet found - -2, -2, -2, -2, -2, false, // no detector-level jet found - -2, -2, -2, // no detector-level jet found - -2, -2); // no detector-level jet found + mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF + -2, -2, -2, -2, -2, // no detector-level jet found + -2, -2, -2, -2, -2, false, // no detector-level jet found + -2, -2, -2, // no detector-level jet found + -2, -2); // no detector-level jet found } } // end of mcpjets loop @@ -551,12 +550,12 @@ struct HfFragmentationFunction { } // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) - matchJetTable(-2, -2, -2, -2, -2, // particle level jet - -2, -2, -2, -2, false, // particle level HF - jetutilities::deltaR(mcdjet, mcdcand), mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.template tracks_as().size() + mcdjet.template candidates_as().size(), // detector level jet - mcdcand.pt(), mcdcand.eta(), mcdcand.phi(), mcdcand.m(), mcdcand.y(), (mcdcand.originMcRec() == RecoDecay::OriginType::Prompt), // detector level HF - mcdcand.mlScores()[0], mcdcand.mlScores()[1], mcdcand.mlScores()[2], // Machine Learning PID scores: background, prompt, non-prompt - static_cast(mcdcand.flagMcMatchRec()), selectedAs); // HF = +1, HFbar = -1, neither = 0 + matchJetTable(-2, -2, -2, -2, -2, // particle level jet + -2, -2, -2, -2, false, // particle level HF + jetutilities::deltaR(mcdjet, mcdcand), mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.template tracks_as().size() + mcdjet.template candidates_as().size(), // detector level jet + mcdcand.pt(), mcdcand.eta(), mcdcand.phi(), mcdcand.m(), mcdcand.y(), (mcdcand.originMcRec() == RecoDecay::OriginType::Prompt), // detector level HF + mcdcand.mlScores()[0], mcdcand.mlScores()[1], mcdcand.mlScores()[2], // Machine Learning PID scores: background, prompt, non-prompt + static_cast(mcdcand.flagMcMatchRec()), selectedAs); // HF = +1, HFbar = -1, neither = 0 } } // end of non-matched detector level jets loop } // end of collisions loop From 5455b42f3df56fed56da462551ef21d19e86cf69 Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Tue, 22 Sep 2026 00:10:04 -0300 Subject: [PATCH 10/14] Added MC and RECO collisions diagnosis columns to tables, corrected associated configurables, removed unused library includes, corrected reflection bitmaps usage --- PWGJE/Tasks/hfFragmentationFunction.cxx | 87 +++++++++++++++---------- 1 file changed, 51 insertions(+), 36 deletions(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 19579abf389..f5093d58959 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -18,13 +18,10 @@ /// profile and/or jet momentum fraction for charmed hadrons #include "PWGJE/Core/JetDerivedDataUtilities.h" -#include "PWGJE/Core/JetHFUtilities.h" #include "PWGJE/Core/JetUtilities.h" #include "PWGJE/DataModel/Jet.h" #include "PWGJE/DataModel/JetReducedData.h" -#include "PWGHF/Core/DecayChannels.h" - #include "Common/Core/RecoDecay.h" #include @@ -77,7 +74,7 @@ namespace collisionSelections kMCCollisions = 0, ///< raw mccollisions with no selection, starts with 0 kMCCollisionsZCut, ///< mccollisions with z vtx selection kMCCollisionsZCutSel8, ///< mccollisions with z vtx and sel8 mc emulated selections - kMCCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions + kMCCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions kMCCollisionsZCutSel8SplitCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with no split reconstructed collisions kRecoCollisions, ///< raw reconstructed collisions after previous mccollisions selection kRecoCollisionsZcut, ///< reconstructed collisions with z vtx selection after previous mccollisions selection @@ -106,6 +103,8 @@ DECLARE_SOA_COLUMN(HfMlScore1, hfMlScore1, float); DECLARE_SOA_COLUMN(HfMlScore2, hfMlScore2, float); DECLARE_SOA_COLUMN(HfMatchedFrom, hfMatchedFrom, int); DECLARE_SOA_COLUMN(HfSelectedAs, hfSelectedAs, int); +DECLARE_SOA_COLUMN(RecoCollZCut, recoCollZCut, bool); +DECLARE_SOA_COLUMN(RecoCollSel8, recoCollSel8, bool); DECLARE_SOA_COLUMN(McJetHfDist, mcJetHfDist, float); DECLARE_SOA_COLUMN(McJetPt, mcJetPt, float); DECLARE_SOA_COLUMN(McJetEta, mcJetEta, float); @@ -117,6 +116,10 @@ DECLARE_SOA_COLUMN(McHfPhi, mcHfPhi, float); DECLARE_SOA_COLUMN(McHfY, mcHfY, float); DECLARE_SOA_COLUMN(McHfPrompt, mcHfPrompt, bool); DECLARE_SOA_COLUMN(McHfMatch, mcHfMatch, bool); +DECLARE_SOA_COLUMN(McCollZCut, mcCollZCut, bool); +DECLARE_SOA_COLUMN(McCollSel8, mcCollSel8, bool); +DECLARE_SOA_COLUMN(McCollNumCollisions, mcCollNumCollisions, int); +DECLARE_SOA_COLUMN(McCollNumSelectedCollisions, mcCollNumSelectedCollisions, int); } // namespace jet_distance DECLARE_SOA_TABLE(JetDistanceTable, "AOD", "JETDISTTABLE", jet_distance::JetHfDist, @@ -173,6 +176,10 @@ DECLARE_SOA_TABLE(MatchJetDistanceTable, "AOD", "MATCHTABLE", jet_distance::McHfPhi, jet_distance::McHfY, jet_distance::McHfPrompt, + jet_distance::McCollZCut, + jet_distance::McCollSel8, + jet_distance::McCollNumCollisions, + jet_distance::McCollNumSelectedCollisions, jet_distance::JetHfDist, jet_distance::JetPt, jet_distance::JetEta, @@ -188,7 +195,9 @@ DECLARE_SOA_TABLE(MatchJetDistanceTable, "AOD", "MATCHTABLE", jet_distance::HfMlScore1, jet_distance::HfMlScore2, jet_distance::HfMatchedFrom, - jet_distance::HfSelectedAs); + jet_distance::HfSelectedAs, + jet_distance::RecoCollZCut, + jet_distance::RecoCollSel8); } // namespace o2::aod struct HfFragmentationFunction { @@ -217,8 +226,9 @@ struct HfFragmentationFunction { Configurable vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"}; Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; Configurable applyMcEventSelection{"applyMcEventSelection", false, "Choose a boolean value"}; - Configurable applyRecoEventSelection{"applyRecoEventSelection", true, "Choose a boolean value"}; - Configurable rejectSplitCollisions{"rejectSplitCollisions", true, "reject generated events associated to more than one reconstructed collision"}; + Configurable applyRecoEventSelection{"applyRecoEventSelection", false, "Choose a boolean value"}; + Configurable rejectMCCollisionNoRecoCollision{"rejectMCCollisionNoRecoCollision", false, "reject generated events with no reconstructed collision"}; + Configurable rejectSplitCollisions{"rejectSplitCollisions", false, "reject generated events associated to more than one reconstructed collision"}; std::vector eventSelectionBits; @@ -374,9 +384,9 @@ struct HfFragmentationFunction { int selectedAs = 0; // bitwise AND operation: Checks whether BIT(i) is set, regardless of other bits - if (mcdd0cand.candidateSelFlag() & BIT(0)) { // CandidateSelFlag == BIT(0) -> selected as D0 + if ((mcdd0cand.candidateSelFlag() & BIT(0)) != 0) { // CandidateSelFlag == BIT(0) -> selected as D0 selectedAs = 1; - } else if (mcdd0cand.candidateSelFlag() & BIT(1)) { // CandidateSelFlag == BIT(1) -> selected as D0bar + } else if ((mcdd0cand.candidateSelFlag() & BIT(1)) != 0) { // CandidateSelFlag == BIT(1) -> selected as D0bar selectedAs = -1; } @@ -438,10 +448,10 @@ struct HfFragmentationFunction { } registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCutSel8); - // reconstructed collisions associated to same mccollision + // reconstructed collisions associated to this mccollision const auto collisionsPerMCCollision = collisions.sliceBy(collisionsPerMCCollisionPreslice, mccollision.globalIndex()); // only consider events with at least one reconstructed collision - if (collisionsPerMCCollision.size() == 0) { + if (rejectMCCollisionNoRecoCollision && (collisionsPerMCCollision.size() == 0)) { continue; } // only consider events with no split vertices (one mccollision-to-one collision) @@ -451,25 +461,26 @@ struct HfFragmentationFunction { } registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCutSel8SplitCollisions); - bool hasSelectedCollision = false; + int numSelectedCollisions = 0; for (const auto& collision : collisionsPerMCCollision) { registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisions); - if (applyRecoEventSelection && !(std::abs(collision.posZ()) < vertexZCut)) { + if (!(std::abs(collision.posZ()) < vertexZCut)) { continue; } registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisionsZcut); - if (applyRecoEventSelection && !jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) { + if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) { continue; } registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisionsZcutSel8); - hasSelectedCollision = true; + numSelectedCollisions++; } // end of collisions loop - if (!hasSelectedCollision) { + // separate reconstructed collision selection from the case with no existing reconstructed collision per mccollision + if (applyRecoEventSelection && (numSelectedCollisions == 0) && (collisionsPerMCCollision.size() != 0)) { continue; } - + // --- begin particle level jets storage // hf particle level jets associated to same mccollision const auto mcpJetsPerMCCollision = mcpjets.sliceBy(MCPJetsPerMCCollisionPreslice, mccollision.globalIndex()); @@ -493,28 +504,35 @@ struct HfFragmentationFunction { int selectedAs = 0; // bitwise AND operation: Checks whether BIT(i) is set, regardless of other bits - if (mcdcand.candidateSelFlag() & BIT(0)) { // CandidateSelFlag == BIT(0) -> selected as HF + if ((mcdcand.candidateSelFlag() & BIT(0)) != 0) { // CandidateSelFlag == BIT(0) -> selected as HF selectedAs = 1; - } else if (mcdcand.candidateSelFlag() & BIT(1)) { // CandidateSelFlag == BIT(1) -> selected as HFbar + } else if ((mcdcand.candidateSelFlag() & BIT(1)) != 0) { // CandidateSelFlag == BIT(1) -> selected as HFbar selectedAs = -1; } - + + // fetch collision associated to the detector level jet + const auto& collision = mcdjet.template collision_as(); + // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF + std::abs(mccollision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits), static_cast(collisionsPerMCCollision.size()), numSelectedCollisions, // MC collision selections jetutilities::deltaR(mcdjet, mcdcand), mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.template tracks_as().size() + mcdjet.template candidates_as().size(), // detector level jet mcdcand.pt(), mcdcand.eta(), mcdcand.phi(), mcdcand.m(), mcdcand.y(), (mcdcand.originMcRec() == RecoDecay::OriginType::Prompt), // detector level HF mcdcand.mlScores()[0], mcdcand.mlScores()[1], mcdcand.mlScores()[2], // Machine Learning PID scores: background, prompt, non-prompt - static_cast(mcdcand.flagMcMatchRec()), selectedAs); // HF = +1, HFbar = -1, neither = 0 + static_cast(mcdcand.flagMcMatchRec()), selectedAs, // HF = +1, HFbar = -1, neither = 0 + std::abs(collision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(collision, eventSelectionBits)); // Reconstructed collision selections } } else { // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) - matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet - mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF - -2, -2, -2, -2, -2, // no detector-level jet found - -2, -2, -2, -2, -2, false, // no detector-level jet found - -2, -2, -2, // no detector-level jet found - -2, -2); // no detector-level jet found + matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet + mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF + std::abs(mccollision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits), static_cast(collisionsPerMCCollision.size()), numSelectedCollisions, // MC collision selections + -2, -2, -2, -2, -2, // no detector-level jet found + -2, -2, -2, -2, -2, false, // no detector-level jet found + -2, -2, -2, // no detector-level jet found + -2, -2, // no detector-level jet found + false, false); // no detector-level jet found } } // end of mcpjets loop @@ -522,11 +540,6 @@ struct HfFragmentationFunction { // reconstructed collisions associated to same mccollision for (const auto& collision : collisionsPerMCCollision) { - // Also apply the reconstructed level collisions selections - if (applyRecoEventSelection && (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut))) { - continue; - } - // d0 detector level jets associated to the current same collision const auto mcdJetsPerCollision = mcdjets.sliceBy(MCDJetsPerCollisionPreslice, collision.globalIndex()); for (const auto& mcdjet : mcdJetsPerCollision) { @@ -544,19 +557,21 @@ struct HfFragmentationFunction { int selectedAs = 0; // bitwise AND operation: Checks whether BIT(i) is set, regardless of other bits - if (mcdcand.candidateSelFlag() & BIT(0)) { // CandidateSelFlag == BIT(0) -> selected as D0 + if ((mcdcand.candidateSelFlag() & BIT(0)) != 0) { // CandidateSelFlag == BIT(0) -> selected as D0 selectedAs = 1; - } else if (mcdcand.candidateSelFlag() & BIT(1)) { // CandidateSelFlag == BIT(1) -> selected as D0bar + } else if ((mcdcand.candidateSelFlag() & BIT(1)) != 0) { // CandidateSelFlag == BIT(1) -> selected as D0bar selectedAs = -1; } // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) matchJetTable(-2, -2, -2, -2, -2, // particle level jet - -2, -2, -2, -2, false, // particle level HF + -2, -2, -2, -2, false, // particle level HF + std::abs(mccollision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits), static_cast(collisionsPerMCCollision.size()), numSelectedCollisions, // MC collision selections jetutilities::deltaR(mcdjet, mcdcand), mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.template tracks_as().size() + mcdjet.template candidates_as().size(), // detector level jet mcdcand.pt(), mcdcand.eta(), mcdcand.phi(), mcdcand.m(), mcdcand.y(), (mcdcand.originMcRec() == RecoDecay::OriginType::Prompt), // detector level HF mcdcand.mlScores()[0], mcdcand.mlScores()[1], mcdcand.mlScores()[2], // Machine Learning PID scores: background, prompt, non-prompt - static_cast(mcdcand.flagMcMatchRec()), selectedAs); // HF = +1, HFbar = -1, neither = 0 + static_cast(mcdcand.flagMcMatchRec()), selectedAs, // HF = +1, HFbar = -1, neither = 0 + std::abs(collision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(collision, eventSelectionBits)); // Reconstructed collision selections } } // end of non-matched detector level jets loop } // end of collisions loop From 361af9dbe903cb2ebc283d5d1523f7e5410fc01b Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Tue, 22 Sep 2026 00:23:11 -0300 Subject: [PATCH 11/14] Remove unused include; restore reco event selection default for data --- PWGJE/Tasks/hfFragmentationFunction.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 3540743a343..82ee901ed93 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -17,7 +17,6 @@ /// The task store data relevant to the calculation of hadronization observables radial /// profile and/or jet momentum fraction for charmed hadrons -#include "PWGHF/Core/DecayChannels.h" #include "PWGJE/Core/JetDerivedDataUtilities.h" #include "PWGJE/Core/JetUtilities.h" #include "PWGJE/DataModel/Jet.h" @@ -227,7 +226,7 @@ struct HfFragmentationFunction { Configurable vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"}; Configurable eventSelections{"eventSelections", "sel8", "choose event selection"}; Configurable applyMcEventSelection{"applyMcEventSelection", false, "Choose a boolean value"}; - Configurable applyRecoEventSelection{"applyRecoEventSelection", false, "Choose a boolean value"}; + Configurable applyRecoEventSelection{"applyRecoEventSelection", true, "data: apply z-vertex and event selection; MC: reject generated events whose reconstructed collisions all fail them"}; Configurable rejectMCCollisionNoRecoCollision{"rejectMCCollisionNoRecoCollision", false, "reject generated events with no reconstructed collision"}; Configurable rejectSplitCollisions{"rejectSplitCollisions", false, "reject generated events associated to more than one reconstructed collision"}; From 610fd2e39d7de94c66cb08d18738ee0ac895a60e Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 22 Sep 2026 03:24:34 +0000 Subject: [PATCH 12/14] Please consider the following formatting changes --- PWGJE/Tasks/hfFragmentationFunction.cxx | 52 ++++++++++++------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 82ee901ed93..cf5cfeccb20 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -70,16 +70,16 @@ double deltaPhi(double phi1, double phi2) /// function, this namespace with enums is create namespace collisionSelections { - enum CollisionSelectionStep { - kMCCollisions = 0, ///< raw mccollisions with no selection, starts with 0 - kMCCollisionsZCut, ///< mccollisions with z vtx selection - kMCCollisionsZCutSel8, ///< mccollisions with z vtx and sel8 mc emulated selections - kMCCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions - kMCCollisionsZCutSel8SplitCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with no split reconstructed collisions - kRecoCollisions, ///< raw reconstructed collisions after previous mccollisions selection - kRecoCollisionsZcut, ///< reconstructed collisions with z vtx selection after previous mccollisions selection - kRecoCollisionsZcutSel8 ///< reconstructed collisions with z vtx and sel8 selections after previous mccollisions selection - }; +enum CollisionSelectionStep { + kMCCollisions = 0, ///< raw mccollisions with no selection, starts with 0 + kMCCollisionsZCut, ///< mccollisions with z vtx selection + kMCCollisionsZCutSel8, ///< mccollisions with z vtx and sel8 mc emulated selections + kMCCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions + kMCCollisionsZCutSel8SplitCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with no split reconstructed collisions + kRecoCollisions, ///< raw reconstructed collisions after previous mccollisions selection + kRecoCollisionsZcut, ///< reconstructed collisions with z vtx selection after previous mccollisions selection + kRecoCollisionsZcutSel8 ///< reconstructed collisions with z vtx and sel8 selections after previous mccollisions selection +}; } // creating table for storing distance data namespace o2::aod @@ -525,14 +525,14 @@ struct HfFragmentationFunction { } } else { // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) - matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet - mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF - std::abs(mccollision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits), static_cast(collisionsPerMCCollision.size()), numSelectedCollisions, // MC collision selections - -2, -2, -2, -2, -2, // no detector-level jet found - -2, -2, -2, -2, -2, false, // no detector-level jet found - -2, -2, -2, // no detector-level jet found - -2, -2, // no detector-level jet found - false, false); // no detector-level jet found + matchJetTable(jetutilities::deltaR(mcpjet, mcpcand), mcpjet.pt(), mcpjet.eta(), mcpjet.phi(), mcpjet.template tracks_as().size() + mcpjet.template candidates_as().size(), // particle level jet + mcpcand.pt(), mcpcand.eta(), mcpcand.phi(), mcpcand.y(), (mcpcand.originMcGen() == RecoDecay::OriginType::Prompt), // particle level HF + std::abs(mccollision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits), static_cast(collisionsPerMCCollision.size()), numSelectedCollisions, // MC collision selections + -2, -2, -2, -2, -2, // no detector-level jet found + -2, -2, -2, -2, -2, false, // no detector-level jet found + -2, -2, -2, // no detector-level jet found + -2, -2, // no detector-level jet found + false, false); // no detector-level jet found } } // end of mcpjets loop @@ -564,14 +564,14 @@ struct HfFragmentationFunction { } // store matched particle and detector level data in one single table (calculate angular distance in eta-phi plane on the fly) - matchJetTable(-2, -2, -2, -2, -2, // particle level jet - -2, -2, -2, -2, false, // particle level HF - std::abs(mccollision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits), static_cast(collisionsPerMCCollision.size()), numSelectedCollisions, // MC collision selections - jetutilities::deltaR(mcdjet, mcdcand), mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.template tracks_as().size() + mcdjet.template candidates_as().size(), // detector level jet - mcdcand.pt(), mcdcand.eta(), mcdcand.phi(), mcdcand.m(), mcdcand.y(), (mcdcand.originMcRec() == RecoDecay::OriginType::Prompt), // detector level HF - mcdcand.mlScores()[0], mcdcand.mlScores()[1], mcdcand.mlScores()[2], // Machine Learning PID scores: background, prompt, non-prompt - static_cast(mcdcand.flagMcMatchRec()), selectedAs, // HF = +1, HFbar = -1, neither = 0 - std::abs(collision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(collision, eventSelectionBits)); // Reconstructed collision selections + matchJetTable(-2, -2, -2, -2, -2, // particle level jet + -2, -2, -2, -2, false, // particle level HF + std::abs(mccollision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits), static_cast(collisionsPerMCCollision.size()), numSelectedCollisions, // MC collision selections + jetutilities::deltaR(mcdjet, mcdcand), mcdjet.pt(), mcdjet.eta(), mcdjet.phi(), mcdjet.template tracks_as().size() + mcdjet.template candidates_as().size(), // detector level jet + mcdcand.pt(), mcdcand.eta(), mcdcand.phi(), mcdcand.m(), mcdcand.y(), (mcdcand.originMcRec() == RecoDecay::OriginType::Prompt), // detector level HF + mcdcand.mlScores()[0], mcdcand.mlScores()[1], mcdcand.mlScores()[2], // Machine Learning PID scores: background, prompt, non-prompt + static_cast(mcdcand.flagMcMatchRec()), selectedAs, // HF = +1, HFbar = -1, neither = 0 + std::abs(collision.posZ()) < vertexZCut, jetderiveddatautilities::selectCollision(collision, eventSelectionBits)); // Reconstructed collision selections } } // end of non-matched detector level jets loop } // end of collisions loop From 06859a44b07fa7d4aa750e2f48429397e4028248 Mon Sep 17 00:00:00 2001 From: Christian Reckziegel Date: Tue, 22 Sep 2026 00:47:15 -0300 Subject: [PATCH 13/14] Fix namespace closing comment for cpplint (MegaLinter complained) --- PWGJE/Tasks/hfFragmentationFunction.cxx | 48 ++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 82ee901ed93..fc95d2b4931 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -68,19 +68,19 @@ double deltaPhi(double phi1, double phi2) /// The collision selection is done and stored in multiple steps, for later QA analysis. /// In order not to hard code which bins should be filled throughout different process /// function, this namespace with enums is create -namespace collisionSelections +namespace collision_selections { enum CollisionSelectionStep { - kMCCollisions = 0, ///< raw mccollisions with no selection, starts with 0 - kMCCollisionsZCut, ///< mccollisions with z vtx selection - kMCCollisionsZCutSel8, ///< mccollisions with z vtx and sel8 mc emulated selections - kMCCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions - kMCCollisionsZCutSel8SplitCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with no split reconstructed collisions - kRecoCollisions, ///< raw reconstructed collisions after previous mccollisions selection - kRecoCollisionsZcut, ///< reconstructed collisions with z vtx selection after previous mccollisions selection - kRecoCollisionsZcutSel8 ///< reconstructed collisions with z vtx and sel8 selections after previous mccollisions selection + StepMcCollisions = 0, ///< raw mccollisions with no selection, starts with 0 + StepMcCollisionsZCut, ///< mccollisions with z vtx selection + StepMcCollisionsZCutSel8, ///< mccollisions with z vtx and sel8 mc emulated selections + StepMcCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions + StepMcCollisionsZCutSel8NoSplitCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with no split reconstructed collisions + StepRecoCollisions, ///< raw reconstructed collisions after previous mccollisions selection + StepRecoCollisionsZcut, ///< reconstructed collisions with z vtx selection after previous mccollisions selection + StepRecoCollisionsZcutSel8 ///< reconstructed collisions with z vtx and sel8 selections after previous mccollisions selection }; -} +} // namespace collision_selections // creating table for storing distance data namespace o2::aod { @@ -275,11 +275,11 @@ struct HfFragmentationFunction { aod::JetTracks const&) { // apply event selection and fill histograms for sanity check - registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisions); + registry.fill(HIST("h_collision_counter"), collision_selections::StepRecoCollisions); if (applyRecoEventSelection && (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut))) { return; } - registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisionsZcutSel8); + registry.fill(HIST("h_collision_counter"), collision_selections::StepRecoCollisionsZcutSel8); for (const auto& jet : jets) { // fill jet counter histogram @@ -350,22 +350,22 @@ struct HfFragmentationFunction { { for (const auto& mccollision : mccollisions) { - registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisions); + registry.fill(HIST("h_collision_counter"), collision_selections::StepMcCollisions); // skip collisions outside of |z| < vertexZCut if (applyMcEventSelection && (!jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits) || !(std::abs(mccollision.posZ()) < vertexZCut))) { continue; } - registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCutSel8); + registry.fill(HIST("h_collision_counter"), collision_selections::StepMcCollisionsZCutSel8); // reconstructed collisions associated to same mccollision const auto collisionsPerMCCollision = collisions.sliceBy(collisionsPerMCCollisionPreslice, mccollision.globalIndex()); for (const auto& collision : collisionsPerMCCollision) { - registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisions); + registry.fill(HIST("h_collision_counter"), collision_selections::StepRecoCollisions); if (applyRecoEventSelection && (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits) || !(std::abs(collision.posZ()) < vertexZCut))) { continue; } - registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisionsZcutSel8); + registry.fill(HIST("h_collision_counter"), collision_selections::StepRecoCollisionsZcutSel8); // d0 detector level jets associated to the current same collision const auto d0mcdJetsPerCollision = mcdjets.sliceBy(d0MCDJetsPerCollisionPreslice, collision.globalIndex()); @@ -437,16 +437,16 @@ struct HfFragmentationFunction { for (const auto& mccollision : mccollisions) { // --- begin event selection - registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisions); + registry.fill(HIST("h_collision_counter"), collision_selections::StepMcCollisions); // skip collisions outside of |z| < vertexZCut if (applyMcEventSelection && !(std::abs(mccollision.posZ()) < vertexZCut)) { continue; } - registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCut); + registry.fill(HIST("h_collision_counter"), collision_selections::StepMcCollisionsZCut); if (applyMcEventSelection && !jetderiveddatautilities::selectCollision(mccollision, eventSelectionBits)) { continue; } - registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCutSel8); + registry.fill(HIST("h_collision_counter"), collision_selections::StepMcCollisionsZCutSel8); // reconstructed collisions associated to this mccollision const auto collisionsPerMCCollision = collisions.sliceBy(collisionsPerMCCollisionPreslice, mccollision.globalIndex()); @@ -455,24 +455,24 @@ struct HfFragmentationFunction { continue; } // only consider events with no split vertices (one mccollision-to-one collision) - registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCutSel8HasCollisions); + registry.fill(HIST("h_collision_counter"), collision_selections::StepMcCollisionsZCutSel8HasCollisions); if (rejectSplitCollisions && collisionsPerMCCollision.size() > 1) { continue; } - registry.fill(HIST("h_collision_counter"), collisionSelections::kMCCollisionsZCutSel8SplitCollisions); + registry.fill(HIST("h_collision_counter"), collision_selections::StepMcCollisionsZCutSel8NoSplitCollisions); int numSelectedCollisions = 0; for (const auto& collision : collisionsPerMCCollision) { - registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisions); + registry.fill(HIST("h_collision_counter"), collision_selections::StepRecoCollisions); if (!(std::abs(collision.posZ()) < vertexZCut)) { continue; } - registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisionsZcut); + registry.fill(HIST("h_collision_counter"), collision_selections::StepRecoCollisionsZcut); if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits)) { continue; } - registry.fill(HIST("h_collision_counter"), collisionSelections::kRecoCollisionsZcutSel8); + registry.fill(HIST("h_collision_counter"), collision_selections::StepRecoCollisionsZcutSel8); numSelectedCollisions++; } // end of collisions loop From 488d52bc424d97434b31fcffd14e39843874de3d Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 22 Sep 2026 03:50:19 +0000 Subject: [PATCH 14/14] Please consider the following formatting changes --- PWGJE/Tasks/hfFragmentationFunction.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/PWGJE/Tasks/hfFragmentationFunction.cxx b/PWGJE/Tasks/hfFragmentationFunction.cxx index 0c5d97a122d..054cae8ea42 100644 --- a/PWGJE/Tasks/hfFragmentationFunction.cxx +++ b/PWGJE/Tasks/hfFragmentationFunction.cxx @@ -70,16 +70,16 @@ double deltaPhi(double phi1, double phi2) /// function, this namespace with enums is create namespace collision_selections { - enum CollisionSelectionStep { - StepMcCollisions = 0, ///< raw mccollisions with no selection, starts with 0 - StepMcCollisionsZCut, ///< mccollisions with z vtx selection - StepMcCollisionsZCutSel8, ///< mccollisions with z vtx and sel8 mc emulated selections - StepMcCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions - StepMcCollisionsZCutSel8NoSplitCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with no split reconstructed collisions - StepRecoCollisions, ///< raw reconstructed collisions after previous mccollisions selection - StepRecoCollisionsZcut, ///< reconstructed collisions with z vtx selection after previous mccollisions selection - StepRecoCollisionsZcutSel8 ///< reconstructed collisions with z vtx and sel8 selections after previous mccollisions selection - }; +enum CollisionSelectionStep { + StepMcCollisions = 0, ///< raw mccollisions with no selection, starts with 0 + StepMcCollisionsZCut, ///< mccollisions with z vtx selection + StepMcCollisionsZCutSel8, ///< mccollisions with z vtx and sel8 mc emulated selections + StepMcCollisionsZCutSel8HasCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with at least one reconstructed collisions + StepMcCollisionsZCutSel8NoSplitCollisions, ///< mccollisions with z vtx and sel8 mc emulated selections, with no split reconstructed collisions + StepRecoCollisions, ///< raw reconstructed collisions after previous mccollisions selection + StepRecoCollisionsZcut, ///< reconstructed collisions with z vtx selection after previous mccollisions selection + StepRecoCollisionsZcutSel8 ///< reconstructed collisions with z vtx and sel8 selections after previous mccollisions selection +}; } // namespace collision_selections // creating table for storing distance data namespace o2::aod