From a9221be1ae8c992e1f67789f6c2d7e1f470ba891 Mon Sep 17 00:00:00 2001 From: ffionda Date: Tue, 21 Apr 2026 17:05:59 +0200 Subject: [PATCH 1/2] add decay length vars for MCtruth pairs to direct task --- PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx b/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx index 745e0833de4..a325cffc123 100644 --- a/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx +++ b/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -1151,6 +1152,8 @@ struct AnalysisSameEventPairing { } fConfigCCDB; Service fCCDB; + // PDG database + Service pdgDB; HistogramManager* fHistMan; @@ -2076,6 +2079,16 @@ struct AnalysisSameEventPairing { mcDecision |= (static_cast(1) << isig); VarManager::FillPairMC(t1_raw, t2_raw); // cout << " Filled VarManager for the pair." << endl; + // check if t1_raw and t2_raw have same mother to compute decay length related variables + if(t1_raw.has_mothers() && t2_raw.has_mothers()){ + auto motherMCParticle_t1 = t1_raw.template mothers_first_as(); + auto motherMCParticle_t2 = t2_raw.template mothers_first_as(); + if(motherMCParticle_t1 == motherMCParticle_t2){ + auto mcEvent = mcEvents.rawIteratorAt(motherMCParticle_t1.mcCollisionId()); + std::array collVtxPos = {mcEvent.posX(), mcEvent.posY(), mcEvent.posZ()}; + VarManager::FillTrackCollisionMC(motherMCParticle_t1,collVtxPos,pdgDB->Mass(motherMCParticle_t1.pdgCode())); + } + } if (fUseMCGenAccCut) { if (!fMCGenAccCut.IsSelected(VarManager::fgValues)) { continue; From d0c1758144523eed1f59a66f5171e351535864b1 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 21 Apr 2026 15:08:40 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx b/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx index a325cffc123..0b704a56616 100644 --- a/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx +++ b/PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx @@ -47,9 +47,9 @@ #include #include #include +#include #include #include -#include #include #include @@ -2079,15 +2079,15 @@ struct AnalysisSameEventPairing { mcDecision |= (static_cast(1) << isig); VarManager::FillPairMC(t1_raw, t2_raw); // cout << " Filled VarManager for the pair." << endl; - // check if t1_raw and t2_raw have same mother to compute decay length related variables - if(t1_raw.has_mothers() && t2_raw.has_mothers()){ - auto motherMCParticle_t1 = t1_raw.template mothers_first_as(); - auto motherMCParticle_t2 = t2_raw.template mothers_first_as(); - if(motherMCParticle_t1 == motherMCParticle_t2){ - auto mcEvent = mcEvents.rawIteratorAt(motherMCParticle_t1.mcCollisionId()); - std::array collVtxPos = {mcEvent.posX(), mcEvent.posY(), mcEvent.posZ()}; - VarManager::FillTrackCollisionMC(motherMCParticle_t1,collVtxPos,pdgDB->Mass(motherMCParticle_t1.pdgCode())); - } + // check if t1_raw and t2_raw have same mother to compute decay length related variables + if (t1_raw.has_mothers() && t2_raw.has_mothers()) { + auto motherMCParticle_t1 = t1_raw.template mothers_first_as(); + auto motherMCParticle_t2 = t2_raw.template mothers_first_as(); + if (motherMCParticle_t1 == motherMCParticle_t2) { + auto mcEvent = mcEvents.rawIteratorAt(motherMCParticle_t1.mcCollisionId()); + std::array collVtxPos = {mcEvent.posX(), mcEvent.posY(), mcEvent.posZ()}; + VarManager::FillTrackCollisionMC(motherMCParticle_t1, collVtxPos, pdgDB->Mass(motherMCParticle_t1.pdgCode())); + } } if (fUseMCGenAccCut) { if (!fMCGenAccCut.IsSelected(VarManager::fgValues)) {