diff --git a/PWGHF/DataModel/DerivedTables.h b/PWGHF/DataModel/DerivedTables.h index 174b435788b..3d15683b218 100644 --- a/PWGHF/DataModel/DerivedTables.h +++ b/PWGHF/DataModel/DerivedTables.h @@ -627,6 +627,25 @@ 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::DecayLengthXYCharm, + hf_cand_par_charm::DecayLengthNormalisedCharm, + hf_cand_par_charm::DecayLengthXYNormalisedCharm, + hf_cand_par_charm::ImpactParameterNormalised0Charm, + hf_cand_par_charm::ImpactParameterNormalised1Charm, + 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 +657,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..5baaec8dafa 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"}; @@ -197,6 +199,32 @@ struct HfDerivedDataCreatorBplusToD0Pi { sigmas[HfProngSpecies::Kaon][HfProngSpecies::Kaon][1], sigmas[HfProngSpecies::Kaon][HfProngSpecies::Kaon][2]); } + if (fillCandidateParD0E) { + float invMassD0 = 0.; + if (candFlag == 0) { + invMassD0 = HfHelper::invMassD0ToPiK(prongCharm); + } else if (candFlag == 1) { + invMassD0 = HfHelper::invMassD0barToKPi(prongCharm); + } + rowCandidateParD0E( + prongCharm.chi2PCA(), + prongCharm.nProngsContributorsPV(), + invMassD0, + prongCharm.maxNormalisedDeltaIP(), + prongCharm.decayLengthXY(), + prongCharm.decayLengthNormalised(), + prongCharm.decayLengthXYNormalised(), + prongCharm.impactParameterNormalised0(), + prongCharm.impactParameterNormalised1(), + prongCharm.pxProng0(), + prongCharm.pyProng0(), + prongCharm.pzProng0(), + prongCharm.pxProng1(), + prongCharm.pyProng1(), + prongCharm.pzProng1(), + prongCharm.ptProng0(), + prongCharm.ptProng1()); + } if (fillCandidateParE) { rowCandidateParE( candidate.xSecondaryVertex(), @@ -209,6 +237,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 +309,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); diff --git a/PWGJE/Core/JetHFUtilities.h b/PWGJE/Core/JetHFUtilities.h index f64725aa241..a018c0c177b 100644 --- a/PWGJE/Core/JetHFUtilities.h +++ b/PWGJE/Core/JetHFUtilities.h @@ -1366,6 +1366,10 @@ void fillBplusCandidateTable(T const& candidate, U& BplusParTable, V& BplusParET candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1(), + candidate.pProng0(), + candidate.pxProng0(), + candidate.pyProng0(), + candidate.pzProng0(), candidate.errorImpactParameter1(), candidate.cosThetaStar(), candidate.ct());