From 9ca4e96e7fb98c87b911146e9d7b41b38ca22887 Mon Sep 17 00:00:00 2001 From: Gyula Bencedi Date: Wed, 4 Nov 2026 19:09:26 +0100 Subject: [PATCH] Fix collision table in MC DCA checks --- PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx b/PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx index a3e9d5ed97a..8eaef0ae1c8 100644 --- a/PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx +++ b/PWGMM/Mult/Tasks/dndetaMFTPbPb.cxx @@ -524,7 +524,7 @@ struct DndetaMFTPbPb { doprocessMcEfficiencyBestInclusive || doprocessMcEfficiencyBestCentFT0C || doprocessMcEfficiencyIdxBestInlusive || doprocessMcEfficiencyIdxBestCentFT0C || doprocessMcEfficiencyIdxBestLightInlusive || doprocessMcEfficiencyIdxBestLightCentFT0C || - doprocessDataCorrelationwBestTracksInclusive) { + doprocessDataCorrelationwBestTracksInclusive || doprocessMcReassocDCA) { registryQC.add("Tracks/hBestTrkSel", "Number of best tracks; Cut; #Tracks Passed Cut", {HistType::kTH1F, {{static_cast(TrkBestSel::nTrkBestSel), -0.5, +static_cast(TrkBestSel::nTrkBestSel) - 0.5}}}); std::array(TrkBestSel::nTrkBestSel)> labelTrkTrkBestSel{ "All", @@ -881,7 +881,6 @@ struct DndetaMFTPbPb { using Colls = soa::Join; using CollsCentFT0C = soa::Join; using CollsGenCentFT0C = soa::Join; - using CollsGenCentFT0CExtra = soa::Join; using CollsCorr = soa::Join; using CollsMCExtra = soa::Join; using CollsMCExtraMult = soa::Join; @@ -977,10 +976,10 @@ struct DndetaMFTPbPb { std::unordered_map mapRecToMc; std::unordered_map mapMcToRec; - PresliceUnsorted perCollMcRec = aod::mccollisionlabel::mcCollisionId; + PresliceUnsorted perCollMcRec = aod::mccollisionlabel::mcCollisionId; template - void createMCIds(MC const& mcCollisions, CollsGenCentFT0CExtra const& collisions, P const& particles) + void createMCIds(MC const& mcCollisions, CollsGenCentFT0C const& collisions, P const& particles) { const auto& nMcColls = mcCollisions.size(); LOG(info) << "MC collisions: " << nMcColls; @@ -3245,7 +3244,7 @@ struct DndetaMFTPbPb { PROCESS_SWITCH(DndetaMFTPbPb, processMcSgnEvtLossCentFT0C, "Process Signal/event loss based on MC (in FT0C centrality bins)", false); - void processMcReassocDCA(CollsGenCentFT0CExtra const& collisions, + void processMcReassocDCA(CollsGenCentFT0C const& collisions, CollsMCExtra const& mcCollisions, aod::McParticles const& particles, MftBestTracksLabeled const& besttracks, @@ -3256,7 +3255,7 @@ struct DndetaMFTPbPb { int nNoMC{0}; for (const auto& collision : collisions) { auto crec = getRecoCent(collision); - registryMC.fill(HIST("Events/Centrality/EvtGenRecReassoc"), 2., crec); + registryMC.fill(HIST("Events/Centrality/EvtGenRecReassoc"), 1., crec); if (gConf.useEvtSel && !isGoodEvent(collision)) { continue; } @@ -3270,7 +3269,7 @@ struct DndetaMFTPbPb { nNoMC++; continue; } - registryMC.fill(HIST("Events/Centrality/EvtGenRecReassoc"), 3., crec); + registryMC.fill(HIST("Events/Centrality/EvtGenRecReassoc"), 2., crec); if (gConf.rmSplitVertex && (!setRecCollSel.contains(collision.globalIndex()))) { continue; } @@ -3278,7 +3277,7 @@ struct DndetaMFTPbPb { if (eventCuts.useZVtxCutMC && (std::abs(mcColl.posZ()) >= eventCuts.maxZvtx)) { continue; } - registryMC.fill(HIST("Events/Centrality/EvtGenRecReassoc"), 4., crec); + registryMC.fill(HIST("Events/Centrality/EvtGenRecReassoc"), 3., crec); auto perCollisionASample = besttracks.sliceBy(perColBestTrks, collision.globalIndex()); for (auto const& atrack : perCollisionASample) { @@ -3287,7 +3286,6 @@ struct DndetaMFTPbPb { } const float bestDcaZ = getDCAz(atrack); auto itrack = atrack.template mfttrack_as(); - if (!isTrackSelected(itrack)) { continue; }