From ab6839ed29b1795eb7574f048fa25dc13f4d32d2 Mon Sep 17 00:00:00 2001 From: "mingze.li" Date: Thu, 10 Jul 2025 17:33:40 +0200 Subject: [PATCH 01/13] Add task directory --- PWGHF/HFJ/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PWGHF/HFJ/CMakeLists.txt b/PWGHF/HFJ/CMakeLists.txt index bbfd7adac2b..99ff0609258 100644 --- a/PWGHF/HFJ/CMakeLists.txt +++ b/PWGHF/HFJ/CMakeLists.txt @@ -8,3 +8,5 @@ # In applying this license CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. + +add_subdirectory(Tasks) From 3663be7f82f67acac4abf1263388985ba2257c5d Mon Sep 17 00:00:00 2001 From: "mingze.li" Date: Wed, 16 Jul 2025 16:08:30 +0200 Subject: [PATCH 02/13] Correct error in mass assignment --- PWGHF/DataModel/DerivedTables.h | 4 ++++ PWGHF/HFJ/CMakeLists.txt | 4 +--- .../derivedDataCreatorDstarToD0Pi.cxx | 23 +++++++++++++++---- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/PWGHF/DataModel/DerivedTables.h b/PWGHF/DataModel/DerivedTables.h index 49632f85a95..b532188391e 100644 --- a/PWGHF/DataModel/DerivedTables.h +++ b/PWGHF/DataModel/DerivedTables.h @@ -899,7 +899,11 @@ DECLARE_SOA_TABLE_STAGED(HfDstarMls, "HFDSTML", //! Table with candidate selecti DECLARE_SOA_TABLE_STAGED(HfDstarMcs, "HFDSTMC", //! Table with MC candidate info hf_cand_mc::FlagMcMatchRec, + hf_cand_mc_charm::FlagMcMatchRecCharm, hf_cand_mc::OriginMcRec, + hf_cand::PtBhadMotherPart, + hf_cand::PdgBhadMotherPart, + hf_cand::NTracksDecayed, o2::soa::Marker); } // namespace o2::aod diff --git a/PWGHF/HFJ/CMakeLists.txt b/PWGHF/HFJ/CMakeLists.txt index 99ff0609258..62f88c324cf 100644 --- a/PWGHF/HFJ/CMakeLists.txt +++ b/PWGHF/HFJ/CMakeLists.txt @@ -7,6 +7,4 @@ # # In applying this license CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization -# or submit itself to any jurisdiction. - -add_subdirectory(Tasks) +# or submit itself to any jurisdiction. \ No newline at end of file diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index a11c0d94a71..5b5a22182ee 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -127,7 +127,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { template void fillTablesCandidate(const T& candidate, const U& prong0, const U& prong1, const U& prongSoftPi, int candFlag, double invMass, - double y, int8_t flagMc, int8_t origin, const std::vector& mlScores) + double y, int8_t flagMc, int8_t flagMcD0, int8_t origin, int8_t nTracksDecayed, double ptBhad, int pdgBhad, const std::vector& mlScores) { rowsCommon.fillTablesCandidate(candidate, invMass, y); if (fillCandidatePar) { @@ -196,7 +196,11 @@ struct HfDerivedDataCreatorDstarToD0Pi { if (fillCandidateMc) { rowCandidateMc( flagMc, - origin); + flagMcD0, + origin, + ptBhad, + pdgBhad, + nTracksDecayed); } } @@ -242,7 +246,9 @@ struct HfDerivedDataCreatorDstarToD0Pi { if constexpr (isMc) { reserveTable(rowCandidateMc, fillCandidateMc, sizeTableCand); } - int8_t flagMcRec = 0, origin = 0; + int8_t flagMcRec = 0, flagMcRecD0 = 0, origin = 0, nTracksDecayed = 0; + double ptBhadMotherPart = 0; + int pdgBhadMotherPart = 0; for (const auto& candidate : candidatesThisColl) { if constexpr (isMl) { if (!TESTBIT(candidate.isSelDstarToD0Pi(), aod::SelectionStep::RecoMl)) { @@ -251,7 +257,11 @@ struct HfDerivedDataCreatorDstarToD0Pi { } if constexpr (isMc) { flagMcRec = candidate.flagMcMatchRec(); + flagMcRecD0 = candidate.flagMcMatchRecD0(); origin = candidate.originMcRec(); + nTracksDecayed = candidate.nTracksDecayed(); + ptBhadMotherPart = candidate.ptBhadMotherPart(); + pdgBhadMotherPart = candidate.pdgBhadMotherPart(); if constexpr (onlyBkg) { if (std::abs(flagMcRec) == hf_decay::hf_cand_dstar::DecayChannelMain::DstarToPiKPi) { continue; @@ -279,7 +289,12 @@ struct HfDerivedDataCreatorDstarToD0Pi { if constexpr (isMl) { std::copy(candidate.mlProbDstarToD0Pi().begin(), candidate.mlProbDstarToD0Pi().end(), std::back_inserter(mlScoresDstarToD0Pi)); } - fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, isD0 ? 0 : 1, y, massDstar, flagMcRec, origin, mlScoresDstarToD0Pi); + if (candidate.signSoftPi() > 0){ + fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, 0, massDstar, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); + } else { + fillTablesCandidate(candidate, prong1, prong0, prongSoftPi, 1, massDstar, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); + } + } } } From a305b65a1e3f549e926c8dfdae9d6aeccfe185f8 Mon Sep 17 00:00:00 2001 From: "mingze.li" Date: Wed, 16 Jul 2025 16:14:26 +0200 Subject: [PATCH 03/13] del isD0 variable --- PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index 5b5a22182ee..440694910f1 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -285,7 +285,6 @@ struct HfDerivedDataCreatorDstarToD0Pi { double y = candidate.y(o2::constants::physics::MassDStar); double massDstar = candidate.invMassDstar(); std::vector mlScoresDstarToD0Pi; - bool isD0 = prongSoftPi.sign() < 0; if constexpr (isMl) { std::copy(candidate.mlProbDstarToD0Pi().begin(), candidate.mlProbDstarToD0Pi().end(), std::back_inserter(mlScoresDstarToD0Pi)); } From 27d994ce21d63f2c069f47ab7a9884f788ab1189 Mon Sep 17 00:00:00 2001 From: "mingze.li" Date: Wed, 16 Jul 2025 16:16:42 +0200 Subject: [PATCH 04/13] update --- PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index 440694910f1..05c6511a943 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -293,7 +293,6 @@ struct HfDerivedDataCreatorDstarToD0Pi { } else { fillTablesCandidate(candidate, prong1, prong0, prongSoftPi, 1, massDstar, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); } - } } } From a8227d5f9aed52985ab97d4b24022118e5ec5bba Mon Sep 17 00:00:00 2001 From: "mingze.li" Date: Wed, 16 Jul 2025 17:06:52 +0200 Subject: [PATCH 05/13] Use UpperCamelCase for names of constexpr constants --- .../derivedDataCreatorDstarToD0Pi.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index 05c6511a943..64984310e80 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -84,7 +84,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { Configurable ptMaxForDownSample{"ptMaxForDownSample", 10., "Maximum pt for the application of the downsampling factor"}; SliceCache cache; - static constexpr double mass{o2::constants::physics::MassDStar}; + static constexpr double Mass{o2::constants::physics::MassDStar}; using CollisionsWCentMult = soa::Join; using CollisionsWMcCentMult = soa::Join; @@ -315,7 +315,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { { rowsCommon.preProcessMcCollisions(mcCollisions, mcParticlesPerMcCollision, mcParticles); processCandidates(collisions, candidatesMcSig, tracks, bcs); - rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, mass); + rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, Mass); } PROCESS_SWITCH(HfDerivedDataCreatorDstarToD0Pi, processMcSig, "Process MC only for signals", false); @@ -328,7 +328,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { { rowsCommon.preProcessMcCollisions(mcCollisions, mcParticlesPerMcCollision, mcParticles); processCandidates(collisions, candidatesMcBkg, tracks, bcs); - rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, mass); + rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, Mass); } PROCESS_SWITCH(HfDerivedDataCreatorDstarToD0Pi, processMcBkg, "Process MC only for background", false); @@ -341,7 +341,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { { rowsCommon.preProcessMcCollisions(mcCollisions, mcParticlesPerMcCollision, mcParticles); processCandidates(collisions, candidatesMcAll, tracks, bcs); - rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, mass); + rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, Mass); } PROCESS_SWITCH(HfDerivedDataCreatorDstarToD0Pi, processMcAll, "Process MC", false); @@ -365,7 +365,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { { rowsCommon.preProcessMcCollisions(mcCollisions, mcParticlesPerMcCollision, mcParticles); processCandidates(collisions, candidatesMcMlSig, tracks, bcs); - rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, mass); + rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, Mass); } PROCESS_SWITCH(HfDerivedDataCreatorDstarToD0Pi, processMcMlSig, "Process MC with ML only for signals", false); @@ -378,7 +378,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { { rowsCommon.preProcessMcCollisions(mcCollisions, mcParticlesPerMcCollision, mcParticles); processCandidates(collisions, candidatesMcMlBkg, tracks, bcs); - rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, mass); + rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, Mass); } PROCESS_SWITCH(HfDerivedDataCreatorDstarToD0Pi, processMcMlBkg, "Process MC with ML only for background", false); @@ -391,14 +391,14 @@ struct HfDerivedDataCreatorDstarToD0Pi { { rowsCommon.preProcessMcCollisions(mcCollisions, mcParticlesPerMcCollision, mcParticles); processCandidates(collisions, candidatesMcMlAll, tracks, bcs); - rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, mass); + rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, Mass); } PROCESS_SWITCH(HfDerivedDataCreatorDstarToD0Pi, processMcMlAll, "Process MC with ML", false); void processMcGenOnly(TypeMcCollisions const& mcCollisions, MatchedGenCandidatesMc const& mcParticles) { - rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, mass); + rowsCommon.processMcParticles(mcCollisions, mcParticlesPerMcCollision, mcParticles, Mass); } PROCESS_SWITCH(HfDerivedDataCreatorDstarToD0Pi, processMcGenOnly, "Process MC gen. only", false); }; From 5e83bffb89b84092fd39b385fa37f46edb3497bf Mon Sep 17 00:00:00 2001 From: "mingze.li" Date: Wed, 16 Jul 2025 17:11:41 +0200 Subject: [PATCH 06/13] update --- .../TableProducer/derivedDataCreatorDstarToD0Pi.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index 64984310e80..f4266dd0c40 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -126,7 +126,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { } template - void fillTablesCandidate(const T& candidate, const U& prong0, const U& prong1, const U& prongSoftPi, int candFlag, double invMass, + void fillTablesCandidate(const T& candidate, const U& prong0, const U& prong1, const U& prongSoftPi, int candFlag, double invMass, double invMassD0, double y, int8_t flagMc, int8_t flagMcD0, int8_t origin, int8_t nTracksDecayed, double ptBhad, int pdgBhad, const std::vector& mlScores) { rowsCommon.fillTablesCandidate(candidate, invMass, y); @@ -160,7 +160,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1(), - candidate.invMassD0(), + invMassD0, candidate.impactParameter0(), candidate.impactParameter1(), candidate.impactParameterNormalised0(), @@ -283,15 +283,18 @@ struct HfDerivedDataCreatorDstarToD0Pi { auto prong1 = candidate.template prong1_as(); auto prongSoftPi = candidate.template prongPi_as(); double y = candidate.y(o2::constants::physics::MassDStar); - double massDstar = candidate.invMassDstar(); std::vector mlScoresDstarToD0Pi; if constexpr (isMl) { std::copy(candidate.mlProbDstarToD0Pi().begin(), candidate.mlProbDstarToD0Pi().end(), std::back_inserter(mlScoresDstarToD0Pi)); } if (candidate.signSoftPi() > 0){ - fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, 0, massDstar, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); + double massDstar = candidate.invMassDstar(); + double invMassD0 = candidate.invMassD0(); + fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, 0, massDstar, invMassD0, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); } else { - fillTablesCandidate(candidate, prong1, prong0, prongSoftPi, 1, massDstar, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); + double massDstar = candidate.invMassAntiDstar(); + double invMassD0 = candidate.invMassD0Bar(); + fillTablesCandidate(candidate, prong1, prong0, prongSoftPi, 1, massDstar, invMassD0, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); } } } From 23a15bbe690d4391347a05a3b3d21776415d3cae Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 16 Jul 2025 15:12:31 +0000 Subject: [PATCH 07/13] Please consider the following formatting changes --- PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index f4266dd0c40..e5fdb243161 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -287,7 +287,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { if constexpr (isMl) { std::copy(candidate.mlProbDstarToD0Pi().begin(), candidate.mlProbDstarToD0Pi().end(), std::back_inserter(mlScoresDstarToD0Pi)); } - if (candidate.signSoftPi() > 0){ + if (candidate.signSoftPi() > 0) { double massDstar = candidate.invMassDstar(); double invMassD0 = candidate.invMassD0(); fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, 0, massDstar, invMassD0, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); From b660c8723f802da3b4a91c840d66dfaeff5c62f7 Mon Sep 17 00:00:00 2001 From: Mingze Li Date: Thu, 17 Jul 2025 00:34:20 +0200 Subject: [PATCH 08/13] Update Dstarfill method in JetHFUtilities --- PWGJE/Core/JetHFUtilities.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/PWGJE/Core/JetHFUtilities.h b/PWGJE/Core/JetHFUtilities.h index c77afec8060..fe30d256ef6 100644 --- a/PWGJE/Core/JetHFUtilities.h +++ b/PWGJE/Core/JetHFUtilities.h @@ -885,7 +885,13 @@ void fillDstarCandidateTable(T const& candidate, U& DstarParTable, V& DstarParDa DstarMlTable(mlScoresVector); if constexpr (isMc) { - DstarMCDTable(candidate.flagMcMatchRec(), candidate.originMcRec()); + DstarMCDTable( + candidate.flagMcMatchRec(), + candidate.flagMcMatchRecCharm(), + candidate.originMcRec(), + candidate.ptBhadMotherPart(), + candidate.pdgBhadMotherPart(), + candidate.nTracksDecayed()); } } From dcc403d8d58cf53d8d6e2a502ec6b046ff836b22 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 16 Jul 2025 22:34:49 +0000 Subject: [PATCH 09/13] Please consider the following formatting changes --- PWGJE/Core/JetHFUtilities.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGJE/Core/JetHFUtilities.h b/PWGJE/Core/JetHFUtilities.h index fe30d256ef6..9c3edc54f13 100644 --- a/PWGJE/Core/JetHFUtilities.h +++ b/PWGJE/Core/JetHFUtilities.h @@ -886,7 +886,7 @@ void fillDstarCandidateTable(T const& candidate, U& DstarParTable, V& DstarParDa if constexpr (isMc) { DstarMCDTable( - candidate.flagMcMatchRec(), + candidate.flagMcMatchRec(), candidate.flagMcMatchRecCharm(), candidate.originMcRec(), candidate.ptBhadMotherPart(), From 51ffa5cd2ec0e16b2603c1223fd60b1a2420a5c8 Mon Sep 17 00:00:00 2001 From: Mingze Li Date: Fri, 18 Jul 2025 09:54:08 +0200 Subject: [PATCH 10/13] Update derivedDataCreatorDstarToD0Pi.cxx Void duplicating function call --- PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index e5fdb243161..d2b0faa362b 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -290,12 +290,13 @@ struct HfDerivedDataCreatorDstarToD0Pi { if (candidate.signSoftPi() > 0) { double massDstar = candidate.invMassDstar(); double invMassD0 = candidate.invMassD0(); - fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, 0, massDstar, invMassD0, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); + int flagSign = 0; } else { double massDstar = candidate.invMassAntiDstar(); double invMassD0 = candidate.invMassD0Bar(); - fillTablesCandidate(candidate, prong1, prong0, prongSoftPi, 1, massDstar, invMassD0, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); + int flagSign = 1 } + fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, flagSign, massDstar, invMassD0, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); } } } From 4d45e2d9041fd903ff1d7c231ea37261d23b1c06 Mon Sep 17 00:00:00 2001 From: "mingze.li" Date: Fri, 18 Jul 2025 10:41:48 +0200 Subject: [PATCH 11/13] update --- .../derivedDataCreatorDstarToD0Pi.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index d2b0faa362b..a95c72de145 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -283,18 +283,20 @@ struct HfDerivedDataCreatorDstarToD0Pi { auto prong1 = candidate.template prong1_as(); auto prongSoftPi = candidate.template prongPi_as(); double y = candidate.y(o2::constants::physics::MassDStar); + int flagSign = -1; + double massDstar = 0, invMassD0 = 0; std::vector mlScoresDstarToD0Pi; if constexpr (isMl) { std::copy(candidate.mlProbDstarToD0Pi().begin(), candidate.mlProbDstarToD0Pi().end(), std::back_inserter(mlScoresDstarToD0Pi)); } if (candidate.signSoftPi() > 0) { - double massDstar = candidate.invMassDstar(); - double invMassD0 = candidate.invMassD0(); - int flagSign = 0; + massDstar = candidate.invMassDstar(); + invMassD0 = candidate.invMassD0(); + flagSign = 1; } else { - double massDstar = candidate.invMassAntiDstar(); - double invMassD0 = candidate.invMassD0Bar(); - int flagSign = 1 + massDstar = candidate.invMassAntiDstar(); + invMassD0 = candidate.invMassD0Bar(); + flagSign = 1 } fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, flagSign, massDstar, invMassD0, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); } From 677f297e7a665d779985681b6318745b015a0e9a Mon Sep 17 00:00:00 2001 From: "mingze.li" Date: Fri, 18 Jul 2025 10:49:58 +0200 Subject: [PATCH 12/13] update --- PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index a95c72de145..a4eecd417a2 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -292,7 +292,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { if (candidate.signSoftPi() > 0) { massDstar = candidate.invMassDstar(); invMassD0 = candidate.invMassD0(); - flagSign = 1; + flagSign = 0; } else { massDstar = candidate.invMassAntiDstar(); invMassD0 = candidate.invMassD0Bar(); From 628cf57605d48da2c479e22bcd78ffc4effce404 Mon Sep 17 00:00:00 2001 From: "mingze.li" Date: Fri, 18 Jul 2025 11:27:25 +0200 Subject: [PATCH 13/13] update --- PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx index a4eecd417a2..f1b14a5769f 100644 --- a/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx @@ -296,7 +296,7 @@ struct HfDerivedDataCreatorDstarToD0Pi { } else { massDstar = candidate.invMassAntiDstar(); invMassD0 = candidate.invMassD0Bar(); - flagSign = 1 + flagSign = 1; } fillTablesCandidate(candidate, prong0, prong1, prongSoftPi, flagSign, massDstar, invMassD0, y, flagMcRec, flagMcRecD0, origin, nTracksDecayed, ptBhadMotherPart, pdgBhadMotherPart, mlScoresDstarToD0Pi); }