Skip to content

Commit 048e50c

Browse files
authored
[PWGHF,PWGJE] Add B0 and D* jets (#11691)
1 parent 1348d3b commit 048e50c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2368
-394
lines changed

PWGHF/DataModel/DerivedTables.h

Lines changed: 52 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,7 @@ DECLARE_SOA_COLUMN(PtProng1, ptProng1, float);
325325
DECLARE_SOA_COLUMN(PtProng2, ptProng2, float); //! transverse momentum of prong 2
326326
DECLARE_SOA_COLUMN(RSecondaryVertex, rSecondaryVertex, float); //! distance of the secondary vertex from the z axis
327327
// D*± → D0(bar) π±
328-
DECLARE_SOA_COLUMN(MassD0, massD0, float); //! invariant mass of D0
329-
DECLARE_SOA_COLUMN(CpaD0, cpaD0, float); //! cosine of pointing angle of D0
330-
DECLARE_SOA_COLUMN(CpaXYD0, cpaXYD0, float); //! cosine of pointing angle in the transverse plane of D0
331-
DECLARE_SOA_COLUMN(DecayLengthD0, decayLengthD0, float); //! decay length of D0
332-
DECLARE_SOA_COLUMN(DecayLengthXYD0, decayLengthXYD0, float); //! decay length in the transverse plane of D0
333-
DECLARE_SOA_COLUMN(DecayLengthNormalisedD0, decayLengthNormalisedD0, float); //! decay length of D0 divided by its uncertainty
334-
DECLARE_SOA_COLUMN(DecayLengthXYNormalisedD0, decayLengthXYNormalisedD0, float); //! decay length in the transverse plane of D0 divided by its uncertainty
335-
DECLARE_SOA_COLUMN(NormalisedImpParamSoftPi, normalisedImpParamSoftPi, float); //! impact parameter of soft pion divided by its uncertainty
328+
DECLARE_SOA_COLUMN(SignProng1, signProng1, int8_t);
336329
// TOF
337330
DECLARE_SOA_COLUMN(NSigTofKa0, nSigTofKa0, float);
338331
DECLARE_SOA_COLUMN(NSigTofKa1, nSigTofKa1, float);
@@ -347,7 +340,6 @@ DECLARE_SOA_COLUMN(NSigTofPiExpKa, nSigTofPiExpKa, float);
347340
DECLARE_SOA_COLUMN(NSigTofPr0, nSigTofPr0, float);
348341
DECLARE_SOA_COLUMN(NSigTofPr1, nSigTofPr1, float);
349342
DECLARE_SOA_COLUMN(NSigTofPr2, nSigTofPr2, float);
350-
DECLARE_SOA_COLUMN(NSigTofPiSoftPi, nSigTofPiSoftPi, float);
351343
// TPC
352344
DECLARE_SOA_COLUMN(NSigTpcKa0, nSigTpcKa0, float);
353345
DECLARE_SOA_COLUMN(NSigTpcKa1, nSigTpcKa1, float);
@@ -362,7 +354,6 @@ DECLARE_SOA_COLUMN(NSigTpcPiExpKa, nSigTpcPiExpKa, float);
362354
DECLARE_SOA_COLUMN(NSigTpcPr0, nSigTpcPr0, float);
363355
DECLARE_SOA_COLUMN(NSigTpcPr1, nSigTpcPr1, float);
364356
DECLARE_SOA_COLUMN(NSigTpcPr2, nSigTpcPr2, float);
365-
DECLARE_SOA_COLUMN(NSigTpcPiSoftPi, nSigTpcPiSoftPi, float);
366357
// TPC+TOF
367358
DECLARE_SOA_COLUMN(NSigTpcTofKa0, nSigTpcTofKa0, float);
368359
DECLARE_SOA_COLUMN(NSigTpcTofKa1, nSigTpcTofKa1, float);
@@ -377,7 +368,6 @@ DECLARE_SOA_COLUMN(NSigTpcTofPiExpKa, nSigTpcTofPiExpKa, float);
377368
DECLARE_SOA_COLUMN(NSigTpcTofPr0, nSigTpcTofPr0, float);
378369
DECLARE_SOA_COLUMN(NSigTpcTofPr1, nSigTpcTofPr1, float);
379370
DECLARE_SOA_COLUMN(NSigTpcTofPr2, nSigTpcTofPr2, float);
380-
DECLARE_SOA_COLUMN(NSigTpcTofPiSoftPi, nSigTpcTofPiSoftPi, float);
381371
} // namespace hf_cand_par
382372

383373
// Candidate properties of the charm daughter candidate used for selection of the beauty candidate
@@ -403,13 +393,20 @@ DECLARE_SOA_COLUMN(ImpactParameterNormalised1Charm, impactParameterNormalised1Ch
403393
DECLARE_SOA_COLUMN(ImpactParameterNormalised2Charm, impactParameterNormalised2Charm, float); //! impact parameter of prong 2 divided by its uncertainty
404394
DECLARE_SOA_COLUMN(ImpactParameterProductCharm, impactParameterProductCharm, float); //! product of impact parameters of prong 0 and prong 1
405395
DECLARE_SOA_COLUMN(MaxNormalisedDeltaIPCharm, maxNormalisedDeltaIPCharm, float); //! see RecoDecay::maxNormalisedDeltaIP
396+
DECLARE_SOA_COLUMN(PxProng0Charm, pxProng0Charm, float); //! x-component of momentum of prong 0
397+
DECLARE_SOA_COLUMN(PyProng0Charm, pyProng0Charm, float); //! y-component of momentum of prong 0
398+
DECLARE_SOA_COLUMN(PzProng0Charm, pzProng0Charm, float); //! z-component of momentum of prong 0
399+
DECLARE_SOA_COLUMN(PxProng1Charm, pxProng1Charm, float); //! x-component of momentum of prong 1
400+
DECLARE_SOA_COLUMN(PyProng1Charm, pyProng1Charm, float); //! y-component of momentum of prong 1
401+
DECLARE_SOA_COLUMN(PzProng1Charm, pzProng1Charm, float); //! z-component of momentum of prong 1
406402
DECLARE_SOA_COLUMN(PProng0Charm, pProng0Charm, float); //! momentum magnitude of prong 0
407403
DECLARE_SOA_COLUMN(PProng1Charm, pProng1Charm, float); //! momentum magnitude of prong 1
408404
DECLARE_SOA_COLUMN(PProng2Charm, pProng2Charm, float); //! momentum magnitude of prong 2
409405
DECLARE_SOA_COLUMN(PtProng0Charm, ptProng0Charm, float); //! transverse momentum of prong 0
410406
DECLARE_SOA_COLUMN(PtProng1Charm, ptProng1Charm, float); //! transverse momentum of prong 1
411407
DECLARE_SOA_COLUMN(PtProng2Charm, ptProng2Charm, float); //! transverse momentum of prong 2
412408
DECLARE_SOA_COLUMN(RSecondaryVertexCharm, rSecondaryVertexCharm, float); //! distance of the secondary vertex from the z axis
409+
DECLARE_SOA_COLUMN(InvMassCharm, invMassCharm, float); //! mass of the charm daughter
413410
// TOF
414411
DECLARE_SOA_COLUMN(NSigTofKa0Charm, nSigTofKa0Charm, float);
415412
DECLARE_SOA_COLUMN(NSigTofKa1Charm, nSigTofKa1Charm, float);
@@ -846,52 +843,61 @@ DECLARE_SOA_TABLE_STAGED(HfDplusMcs, "HFDPMC", //! Table with MC candidate info
846843
// D*+
847844
// ----------------
848845

849-
DECLARE_SOA_TABLE_STAGED(HfDstarPars, "HFDSTARPAR", //! Table with candidate properties used for selection
850-
hf_cand_dstar::Chi2PCAD0,
851-
hf_cand_par::CpaD0,
852-
hf_cand_par::CpaXYD0,
853-
hf_cand_par::DecayLengthD0,
854-
hf_cand_par::DecayLengthXYD0,
855-
hf_cand_par::DecayLengthNormalisedD0,
856-
hf_cand_par::DecayLengthXYNormalisedD0,
857-
hf_cand::PxProng0,
846+
DECLARE_SOA_TABLE_STAGED(HfDstarPars, "HFDSTPAR", //! Table with candidate properties used for selection
847+
hf_cand::PxProng0, // Prong0 is the D0
858848
hf_cand::PyProng0,
859849
hf_cand::PzProng0,
860-
hf_cand::PxProng1,
850+
hf_cand::PxProng1, // Prong1 is the soft pion
861851
hf_cand::PyProng1,
862852
hf_cand::PzProng1,
863-
hf_cand_dstar::PxD0,
864-
hf_cand_dstar::PyD0,
865-
hf_cand_dstar::PzD0,
866-
hf_cand_dstar::PxSoftPi,
867-
hf_cand_dstar::PySoftPi,
868-
hf_cand_dstar::PzSoftPi,
869-
hf_cand_dstar::PtSoftPi<hf_cand_dstar::PxSoftPi, hf_cand_dstar::PySoftPi>,
870-
hf_cand_dstar::SignSoftPi,
871-
hf_cand_dstar::PtD0<hf_cand_dstar::PxD0, hf_cand_dstar::PyD0>,
872-
hf_cand_par::MassD0,
873-
hf_cand::ImpactParameter0,
853+
hf_cand::PtProng1<hf_cand::PxProng1, hf_cand::PyProng1>,
854+
hf_cand_par::SignProng1,
855+
hf_cand::PtProng0<hf_cand::PxProng0, hf_cand::PyProng0>,
874856
hf_cand::ImpactParameter1,
875-
hf_cand_dstar::ImpParamSoftPi,
876-
hf_cand_par::ImpactParameterNormalised0,
877857
hf_cand_par::ImpactParameterNormalised1,
878-
hf_cand_par::NormalisedImpParamSoftPi,
879-
hf_cand_par::NSigTpcPi0,
880-
hf_cand_par::NSigTofPi0,
881-
hf_cand_par::NSigTpcTofPi0,
882-
hf_cand_par::NSigTpcKa1,
883-
hf_cand_par::NSigTofKa1,
884-
hf_cand_par::NSigTpcTofKa1,
885-
hf_cand_par::NSigTpcPiSoftPi,
886-
hf_cand_par::NSigTofPiSoftPi,
887-
hf_cand_par::NSigTpcTofPiSoftPi,
858+
hf_cand_par::NSigTpcPi1,
859+
hf_cand_par::NSigTofPi1,
860+
hf_cand_par::NSigTpcTofPi1,
861+
o2::soa::Marker<MarkerDstar>);
862+
863+
DECLARE_SOA_TABLE_STAGED(HfDstarParD0s, "HFDSTPARD0", //! Table with candidate properties used for selection
864+
hf_cand_par_charm::Chi2PCACharm,
865+
hf_cand_par_charm::CpaCharm,
866+
hf_cand_par_charm::CpaXYCharm,
867+
hf_cand_par_charm::DecayLengthCharm,
868+
hf_cand_par_charm::DecayLengthXYCharm,
869+
hf_cand_par_charm::DecayLengthNormalisedCharm,
870+
hf_cand_par_charm::DecayLengthXYNormalisedCharm,
871+
hf_cand_par_charm::PxProng0Charm, // prong0 is the first D0 daughter
872+
hf_cand_par_charm::PyProng0Charm,
873+
hf_cand_par_charm::PzProng0Charm,
874+
hf_cand_par_charm::PxProng1Charm, // prong 1 is the second D0 daughter
875+
hf_cand_par_charm::PyProng1Charm,
876+
hf_cand_par_charm::PzProng1Charm,
877+
hf_cand_par_charm::InvMassCharm,
878+
hf_cand_par_charm::ImpactParameter0Charm,
879+
hf_cand_par_charm::ImpactParameter1Charm,
880+
hf_cand_par_charm::ImpactParameterNormalised0Charm,
881+
hf_cand_par_charm::ImpactParameterNormalised1Charm,
882+
hf_cand_par_charm::NSigTpcPi0Charm,
883+
hf_cand_par_charm::NSigTofPi0Charm,
884+
hf_cand_par_charm::NSigTpcTofPi0Charm,
885+
hf_cand_par_charm::NSigTpcKa0Charm,
886+
hf_cand_par_charm::NSigTofKa0Charm,
887+
hf_cand_par_charm::NSigTpcTofKa0Charm,
888+
hf_cand_par_charm::NSigTpcPi1Charm,
889+
hf_cand_par_charm::NSigTofPi1Charm,
890+
hf_cand_par_charm::NSigTpcTofPi1Charm,
891+
hf_cand_par_charm::NSigTpcKa1Charm,
892+
hf_cand_par_charm::NSigTofKa1Charm,
893+
hf_cand_par_charm::NSigTpcTofKa1Charm,
888894
o2::soa::Marker<MarkerDstar>);
889895

890-
DECLARE_SOA_TABLE_STAGED(HfDstarMls, "HFDSTARML", //! Table with candidate selection ML scores
896+
DECLARE_SOA_TABLE_STAGED(HfDstarMls, "HFDSTML", //! Table with candidate selection ML scores
891897
hf_cand_mc::MlScores,
892898
o2::soa::Marker<MarkerDstar>);
893899

894-
DECLARE_SOA_TABLE_STAGED(HfDstarMcs, "HFDSTARMC", //! Table with MC candidate info
900+
DECLARE_SOA_TABLE_STAGED(HfDstarMcs, "HFDSTMC", //! Table with MC candidate info
895901
hf_cand_mc::FlagMcMatchRec,
896902
hf_cand_mc::OriginMcRec,
897903
o2::soa::Marker<MarkerDstar>);

PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ struct HfDerivedDataCreatorDstarToD0Pi {
6565
rowsCommon;
6666
// Candidates
6767
Produces<o2::aod::HfDstarPars> rowCandidatePar;
68+
Produces<o2::aod::HfDstarParD0s> rowCandidateParD0;
6869
Produces<o2::aod::HfDstarSels> rowCandidateSel;
6970
Produces<o2::aod::HfDstarMls> rowCandidateMl;
7071
Produces<o2::aod::HfDstarIds> rowCandidateId;
@@ -73,6 +74,7 @@ struct HfDerivedDataCreatorDstarToD0Pi {
7374
// Switches for filling tables
7475
HfConfigurableDerivedData confDerData;
7576
Configurable<bool> fillCandidatePar{"fillCandidatePar", true, "Fill candidate parameters"};
77+
Configurable<bool> fillCandidateParD0{"fillCandidateParD0", true, "Fill charm daughter parameters"};
7678
Configurable<bool> fillCandidateSel{"fillCandidateSel", true, "Fill candidate selection flags"};
7779
Configurable<bool> fillCandidateMl{"fillCandidateMl", true, "Fill candidate selection ML scores"};
7880
Configurable<bool> fillCandidateId{"fillCandidateId", true, "Fill original indices from the candidate table"};
@@ -130,6 +132,21 @@ struct HfDerivedDataCreatorDstarToD0Pi {
130132
rowsCommon.fillTablesCandidate(candidate, invMass, y);
131133
if (fillCandidatePar) {
132134
rowCandidatePar(
135+
candidate.pxD0(),
136+
candidate.pyD0(),
137+
candidate.pzD0(),
138+
candidate.pxSoftPi(),
139+
candidate.pySoftPi(),
140+
candidate.pzSoftPi(),
141+
candidate.signSoftPi(),
142+
candidate.impParamSoftPi(),
143+
candidate.normalisedImpParamSoftPi(),
144+
prongSoftPi.tpcNSigmaPi(),
145+
prongSoftPi.tofNSigmaPi(),
146+
prongSoftPi.tpcTofNSigmaPi());
147+
}
148+
if (fillCandidateParD0) {
149+
rowCandidateParD0(
133150
candidate.chi2PCAD0(),
134151
candidate.cpaD0(),
135152
candidate.cpaXYD0(),
@@ -143,29 +160,23 @@ struct HfDerivedDataCreatorDstarToD0Pi {
143160
candidate.pxProng1(),
144161
candidate.pyProng1(),
145162
candidate.pzProng1(),
146-
candidate.pxD0(),
147-
candidate.pyD0(),
148-
candidate.pzD0(),
149-
candidate.pxSoftPi(),
150-
candidate.pySoftPi(),
151-
candidate.pzSoftPi(),
152-
candidate.signSoftPi(),
153163
candidate.invMassD0(),
154164
candidate.impactParameter0(),
155165
candidate.impactParameter1(),
156-
candidate.impParamSoftPi(),
157166
candidate.impactParameterNormalised0(),
158167
candidate.impactParameterNormalised1(),
159-
candidate.normalisedImpParamSoftPi(),
160168
prong0.tpcNSigmaPi(),
161169
prong0.tofNSigmaPi(),
162170
prong0.tpcTofNSigmaPi(),
171+
prong0.tpcNSigmaKa(),
172+
prong0.tofNSigmaKa(),
173+
prong0.tpcTofNSigmaKa(),
174+
prong1.tpcNSigmaPi(),
175+
prong1.tofNSigmaPi(),
176+
prong1.tpcTofNSigmaPi(),
163177
prong1.tpcNSigmaKa(),
164178
prong1.tofNSigmaKa(),
165-
prong1.tpcTofNSigmaKa(),
166-
prongSoftPi.tpcNSigmaPi(),
167-
prongSoftPi.tofNSigmaPi(),
168-
prongSoftPi.tpcTofNSigmaPi());
179+
prong1.tpcTofNSigmaKa());
169180
}
170181
if (fillCandidateSel) {
171182
rowCandidateSel(
@@ -224,6 +235,7 @@ struct HfDerivedDataCreatorDstarToD0Pi {
224235
// Fill candidate properties
225236
rowsCommon.reserveTablesCandidates(sizeTableCand);
226237
reserveTable(rowCandidatePar, fillCandidatePar, sizeTableCand);
238+
reserveTable(rowCandidateParD0, fillCandidateParD0, sizeTableCand);
227239
reserveTable(rowCandidateSel, fillCandidateSel, sizeTableCand);
228240
reserveTable(rowCandidateMl, fillCandidateMl, sizeTableCand);
229241
reserveTable(rowCandidateId, fillCandidateId, sizeTableCand);

PWGJE/Core/JetCandidateUtilities.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ auto matchedParticle(const T& candidate, const U& tracks, const V& particles)
205205
* @param candidate candidate that is being checked
206206
* @param table the table to be sliced
207207
*/
208-
template <typename T, typename U, typename V, typename M, typename N, typename O, typename P>
209-
auto slicedPerCandidate(T const& table, U const& candidate, V const& perD0Candidate, M const& perDplusCandidate, N const& perLcCandidate, O const& perBplusCandidate, P const& perDielectronCandidate)
208+
template <typename T, typename U, typename V, typename M, typename N, typename O, typename P, typename Q, typename R>
209+
auto slicedPerCandidate(T const& table, U const& candidate, V const& perD0Candidate, M const& perDplusCandidate, N const& perDstarCandidate, O const& perLcCandidate, P const& perB0Candidate, Q const& perBplusCandidate, R const& perDielectronCandidate)
210210
{
211211
if constexpr (jethfutilities::isHFCandidate<U>()) {
212-
return jethfutilities::slicedPerHFCandidate(table, candidate, perD0Candidate, perDplusCandidate, perLcCandidate, perBplusCandidate);
212+
return jethfutilities::slicedPerHFCandidate(table, candidate, perD0Candidate, perDplusCandidate, perDstarCandidate, perLcCandidate, perB0Candidate, perBplusCandidate);
213213
} else if constexpr (jetdqutilities::isDielectronCandidate<U>()) {
214214
return jetdqutilities::slicedPerDielectronCandidate(table, candidate, perDielectronCandidate);
215215
} else {
@@ -223,11 +223,11 @@ auto slicedPerCandidate(T const& table, U const& candidate, V const& perD0Candid
223223
* @param jet jet that the slice is based on
224224
* @param table the table to be sliced
225225
*/
226-
template <typename CandidateTable, typename T, typename U, typename V, typename M, typename N, typename O, typename P>
227-
auto slicedPerJet(T const& table, U const& jet, V const& perD0Jet, M const& perDplusJet, N const& perLcJet, O const& perBplusJet, P const& perDielectronJet)
226+
template <typename CandidateTable, typename T, typename U, typename V, typename M, typename N, typename O, typename P, typename Q, typename R>
227+
auto slicedPerJet(T const& table, U const& jet, V const& perD0Jet, M const& perDplusJet, N const& perDstarJet, O const& perLcJet, P const& perB0Jet, Q const& perBplusJet, R const& perDielectronJet)
228228
{
229229
if constexpr (jethfutilities::isHFTable<CandidateTable>() || jethfutilities::isHFMcTable<CandidateTable>()) {
230-
return jethfutilities::slicedPerHFJet<CandidateTable>(table, jet, perD0Jet, perDplusJet, perLcJet, perBplusJet);
230+
return jethfutilities::slicedPerHFJet<CandidateTable>(table, jet, perD0Jet, perDplusJet, perDstarJet, perLcJet, perB0Jet, perBplusJet);
231231
} else if constexpr (jetdqutilities::isDielectronTable<CandidateTable>() || jetdqutilities::isDielectronMcTable<CandidateTable>()) {
232232
return jetdqutilities::slicedPerDielectronJet<CandidateTable>(table, jet, perDielectronJet);
233233
} else {

0 commit comments

Comments
 (0)