From 8420c8cf7a710742adfe787fe32a62b915914b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Wed, 11 Mar 2026 13:46:36 +0000 Subject: [PATCH 1/3] [PWGHF] Add variables to derivedDataCreatorBplusToD0Pi.cxx --- PWGHF/DataModel/DerivedTables.h | 24 +++++++++++++ .../derivedDataCreatorBplusToD0Pi.cxx | 34 +++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/PWGHF/DataModel/DerivedTables.h b/PWGHF/DataModel/DerivedTables.h index 174b435788b..82051b55bf2 100644 --- a/PWGHF/DataModel/DerivedTables.h +++ b/PWGHF/DataModel/DerivedTables.h @@ -610,9 +610,14 @@ DECLARE_SOA_TABLE_STAGED(HfBplusPars, "HFBPPAR", //! Table with candidate proper DECLARE_SOA_TABLE_STAGED(HfBplusParD0s, "HFBPPARD0", //! Table with D0 candidate properties used for selection of B+ hf_cand_par_charm::CpaCharm, + hf_cand_par_charm::DecayLengthXYCharm, + hf_cand_par_charm::DecayLengthNormalisedCharm, + hf_cand_par_charm::DecayLengthXYNormalisedCharm, hf_cand_par_charm::DecayLengthCharm, hf_cand_par_charm::ImpactParameter0Charm, hf_cand_par_charm::ImpactParameter1Charm, + hf_cand_par_charm::ImpactParameterNormalised0Charm, + hf_cand_par_charm::ImpactParameterNormalised1Charm, hf_cand_par_charm::ImpactParameterProductCharm, hf_cand_par_charm::NSigTpcPiExpPiCharm, hf_cand_par_charm::NSigTofPiExpPiCharm, @@ -627,6 +632,21 @@ DECLARE_SOA_TABLE_STAGED(HfBplusParD0s, "HFBPPARD0", //! Table with D0 candidate hf_cand_par_charm::NSigTofKaExpKaCharm, hf_cand_par_charm::NSigTpcTofKaExpKaCharm); +DECLARE_SOA_TABLE_STAGED(HfBplusParD0Es, "HFBPPARD0E", //! Table with additional D0 candidate properties used for selection of B+ + hf_cand_par_charm::Chi2PCACharm, + hf_cand_par_charm::NProngsContributorsPVCharm, + hf_cand_par_charm::InvMassCharm, + hf_cand_par_charm::MaxNormalisedDeltaIPCharm, + hf_cand_par_charm::PxProng0Charm, + hf_cand_par_charm::PyProng0Charm, + hf_cand_par_charm::PzProng0Charm, + hf_cand_par_charm::PxProng1Charm, + hf_cand_par_charm::PyProng1Charm, + hf_cand_par_charm::PzProng1Charm, + hf_cand_par_charm::PtProng0Charm, + hf_cand_par_charm::PtProng1Charm + ); + DECLARE_SOA_TABLE_STAGED(HfBplusParEs, "HFBPPARE", //! Table with additional candidate properties used for selection hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, @@ -638,6 +658,10 @@ DECLARE_SOA_TABLE_STAGED(HfBplusParEs, "HFBPPARE", //! Table with additional can hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1, + hf_cand_par::PProng0, + hf_cand::PxProng0, + hf_cand::PyProng0, + hf_cand::PzProng0, hf_cand::ErrorImpactParameter1, hf_cand_par::CosThetaStar, hf_cand_par::Ct, diff --git a/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx index 3efeb95a145..3abd59b484d 100644 --- a/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx @@ -72,6 +72,7 @@ struct HfDerivedDataCreatorBplusToD0Pi { // Candidates Produces rowCandidatePar; Produces rowCandidateParD0; + Produces rowCandidateParD0E; Produces rowCandidateParE; Produces rowCandidateSel; Produces rowCandidateMl; @@ -83,6 +84,7 @@ struct HfDerivedDataCreatorBplusToD0Pi { HfConfigurableDerivedData confDerData; Configurable fillCandidatePar{"fillCandidatePar", true, "Fill candidate parameters"}; Configurable fillCandidateParD0{"fillCandidateParD0", true, "Fill D0 candidate parameters"}; + Configurable fillCandidateParD0E{"fillCandidateParD0E", true, "Fill additional D0 candidate parameters"}; Configurable fillCandidateParE{"fillCandidateParE", true, "Fill candidate extended parameters"}; Configurable fillCandidateSel{"fillCandidateSel", true, "Fill candidate selection flags"}; Configurable fillCandidateMl{"fillCandidateMl", true, "Fill candidate selection ML scores"}; @@ -181,8 +183,13 @@ struct HfDerivedDataCreatorBplusToD0Pi { rowCandidateParD0( prongCharm.cpa(), prongCharm.decayLength(), + prongCharm.decayLengthXY(), + prongCharm.decayLengthNormalised(), + prongCharm.decayLengthXYNormalised(), prongCharm.impactParameter0(), prongCharm.impactParameter1(), + prongCharm.impactParameterNormalised0(), + prongCharm.impactParameterNormalised1(), prongCharm.impactParameterProduct(), sigmas[HfProngSpecies::Pion][HfProngSpecies::Pion][0], sigmas[HfProngSpecies::Pion][HfProngSpecies::Pion][1], @@ -197,6 +204,28 @@ struct HfDerivedDataCreatorBplusToD0Pi { sigmas[HfProngSpecies::Kaon][HfProngSpecies::Kaon][1], sigmas[HfProngSpecies::Kaon][HfProngSpecies::Kaon][2]); } + if (fillCandidateParD0E) { + float invMassD0; + if (candFlag == 0) { + invMassD0 = HfHelper::invMassD0ToPiK(prongCharm); + } else if (candFlag == 1) { + invMassD0 = HfHelper::invMassD0barToKPi(prongCharm); + } + rowCandidateParD0E( + prongCharm.chi2PCA(), + prongCharm.nProngsContributorsPV(), + invMassD0, + prongCharm.maxNormalisedDeltaIP(), + prongCharm.pxProng0(), + prongCharm.pyProng0(), + prongCharm.pzProng0(), + prongCharm.pxProng1(), + prongCharm.pyProng1(), + prongCharm.pzProng1(), + prongCharm.ptProng0(), + prongCharm.ptProng1() + ); + } if (fillCandidateParE) { rowCandidateParE( candidate.xSecondaryVertex(), @@ -209,6 +238,10 @@ struct HfDerivedDataCreatorBplusToD0Pi { candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1(), + RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), + candidate.pxProng0(), + candidate.pyProng0(), + candidate.pzProng0(), candidate.errorImpactParameter1(), HfHelper::cosThetaStarBplus(candidate), ct); @@ -277,6 +310,7 @@ struct HfDerivedDataCreatorBplusToD0Pi { reserveTable(rowCandidatePar, fillCandidatePar, sizeTableCand); reserveTable(rowCandidateParD0, fillCandidateParD0, sizeTableCand); reserveTable(rowCandidateParE, fillCandidateParE, sizeTableCand); + reserveTable(rowCandidateParD0E, fillCandidateParD0E, sizeTableCand); reserveTable(rowCandidateSel, fillCandidateSel, sizeTableCand); reserveTable(rowCandidateMl, fillCandidateMl, sizeTableCand); reserveTable(rowCandidateMlD0, fillCandidateMlD0, sizeTableCand); From 8e95937e4d1daef7169216412b3c673f8725426d Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 11 Mar 2026 15:19:50 +0000 Subject: [PATCH 2/3] Please consider the following formatting changes --- PWGHF/DataModel/DerivedTables.h | 3 +-- PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/PWGHF/DataModel/DerivedTables.h b/PWGHF/DataModel/DerivedTables.h index 82051b55bf2..e54e8c5f0ce 100644 --- a/PWGHF/DataModel/DerivedTables.h +++ b/PWGHF/DataModel/DerivedTables.h @@ -644,8 +644,7 @@ DECLARE_SOA_TABLE_STAGED(HfBplusParD0Es, "HFBPPARD0E", //! Table with additional hf_cand_par_charm::PyProng1Charm, hf_cand_par_charm::PzProng1Charm, hf_cand_par_charm::PtProng0Charm, - hf_cand_par_charm::PtProng1Charm - ); + hf_cand_par_charm::PtProng1Charm); DECLARE_SOA_TABLE_STAGED(HfBplusParEs, "HFBPPARE", //! Table with additional candidate properties used for selection hf_cand::XSecondaryVertex, diff --git a/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx index 3abd59b484d..b0c775a9e91 100644 --- a/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx @@ -223,8 +223,7 @@ struct HfDerivedDataCreatorBplusToD0Pi { prongCharm.pyProng1(), prongCharm.pzProng1(), prongCharm.ptProng0(), - prongCharm.ptProng1() - ); + prongCharm.ptProng1()); } if (fillCandidateParE) { rowCandidateParE( From 1e12da96a77a5f7ccb28d2ec84d42de3face1c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Thu, 12 Mar 2026 16:08:02 +0000 Subject: [PATCH 3/3] Fix uninitialised variable warning --- PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx b/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx index b0c775a9e91..08d1bc7a80a 100644 --- a/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx +++ b/PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx @@ -205,7 +205,7 @@ struct HfDerivedDataCreatorBplusToD0Pi { sigmas[HfProngSpecies::Kaon][HfProngSpecies::Kaon][2]); } if (fillCandidateParD0E) { - float invMassD0; + float invMassD0 = 0.; if (candFlag == 0) { invMassD0 = HfHelper::invMassD0ToPiK(prongCharm); } else if (candFlag == 1) {