diff --git a/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx b/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx index 4a38eab9952..9630c8275b5 100644 --- a/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx +++ b/PWGDQ/Tasks/dqEfficiency_withAssoc.cxx @@ -1252,7 +1252,7 @@ struct AnalysisSameEventPairing { Configurable recSignals{"cfgBarrelMCRecSignals", "", "Comma separated list of MC signals (reconstructed)"}; Configurable recSignalsJSON{"cfgMCRecSignalsJSON", "", "Comma separated list of MC signals (reconstructed) via JSON"}; Configurable skimSignalOnly{"cfgSkimSignalOnly", false, "Configurable to select only matched candidates"}; - Configurable runMCGenPair{"cfgRunMCGenPair", false, "Do pairing of true MC particles"}; + // Configurable runMCGenPair{"cfgRunMCGenPair", false, "Do pairing of true MC particles"}; } fConfigMC; struct : ConfigurableGroup { @@ -2050,9 +2050,9 @@ struct AnalysisSameEventPairing { runSameEventPairing(events, trackAssocsPerCollision, barrelAssocs, barrelTracks, mcEvents, mcTracks); runSameEventPairing(events, muonAssocsPerCollision, muonAssocs, muons, mcEvents, mcTracks); // Feature replaced by processMCGen - if (fConfigMC.runMCGenPair) { + /*if (fConfigMC.runMCGenPair) { runMCGen(mcEvents, mcTracks); - } + }*/ // runSameEventPairing(event, tracks, muons); } @@ -2062,9 +2062,9 @@ struct AnalysisSameEventPairing { { runSameEventPairing(events, trackAssocsPerCollision, barrelAssocs, barrelTracks, mcEvents, mcTracks); // Feature replaced by processMCGen - if (fConfigMC.runMCGenPair) { + /*if (fConfigMC.runMCGenPair) { runMCGen(mcEvents, mcTracks); - } + }*/ } void processBarrelOnlyWithCollSkimmed(MyEventsVtxCovSelected const& events, @@ -2073,9 +2073,9 @@ struct AnalysisSameEventPairing { { runSameEventPairing(events, trackAssocsPerCollision, barrelAssocs, barrelTracks, mcEvents, mcTracks); // Feature replaced by processMCGen - if (fConfigMC.runMCGenPair) { - runMCGen(mcEvents, mcTracks); - } + /* if (fConfigMC.runMCGenPair) { + runMCGen(mcEvents, mcTracks); + }*/ } void processMuonOnlySkimmed(MyEventsVtxCovSelected const& events, @@ -2083,9 +2083,9 @@ struct AnalysisSameEventPairing { { runSameEventPairing(events, muonAssocsPerCollision, muonAssocs, muons, mcEvents, mcTracks); // Feature replaced by processMCGen - if (fConfigMC.runMCGenPair) { - runMCGen(mcEvents, mcTracks); - } + /* if (fConfigMC.runMCGenPair) { + runMCGen(mcEvents, mcTracks); + }*/ } PresliceUnsorted perReducedMcGenEvent = aod::reducedtrackMC::reducedMCeventId; @@ -2126,6 +2126,24 @@ struct AnalysisSameEventPairing { } } } // end loop over reconstructed events + if (fHasTwoProngGenMCsignals) { + for (auto& [t1, t2] : combinations(mcTracks, mcTracks)) { + auto t1_raw = mcTracks.rawIteratorAt(t1.globalIndex()); + auto t2_raw = mcTracks.rawIteratorAt(t2.globalIndex()); + if (t1_raw.reducedMCeventId() == t2_raw.reducedMCeventId()) { + for (auto& sig : fGenMCSignals) { + if (sig->GetNProngs() != 2) { // NOTE: 2-prong signals required here + continue; + } + if (sig->CheckSignal(true, t1_raw, t2_raw)) { + // mcDecision |= (static_cast(1) << isig); + VarManager::FillPairMC(t1, t2); // NOTE: This feature will only work for muons + fHistMan->FillHistClass(Form("MCTruthGenPair_%s", sig->GetName()), VarManager::fgValues); + } + } + } + } + } } void processDummy(MyEvents&)