Skip to content

Commit 9e6e178

Browse files
committed
Add B0 and D* jets
1 parent 8e5bb1e commit 9e6e178

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

+2350
-394
lines changed

PWGHF/DataModel/DerivedTables.h

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

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

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

889-
DECLARE_SOA_TABLE_STAGED(HfDstarMls, "HFDSTARML", //! Table with candidate selection ML scores
889+
DECLARE_SOA_TABLE_STAGED(HfDstarMls, "HFDSTML", //! Table with candidate selection ML scores
890890
hf_cand_mc::MlScores,
891891
o2::soa::Marker<MarkerDstar>);
892892

893-
DECLARE_SOA_TABLE_STAGED(HfDstarMcs, "HFDSTARMC", //! Table with MC candidate info
893+
DECLARE_SOA_TABLE_STAGED(HfDstarMcs, "HFDSTMC", //! Table with MC candidate info
894894
hf_cand_mc::FlagMcMatchRec,
895895
hf_cand_mc::OriginMcRec,
896896
o2::soa::Marker<MarkerDstar>);

PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ struct HfDerivedDataCreatorDstarToD0Pi {
5353
rowsCommon;
5454
// Candidates
5555
Produces<o2::aod::HfDstarPars> rowCandidatePar;
56+
Produces<o2::aod::HfDstarParD0s> rowCandidateParD0;
5657
Produces<o2::aod::HfDstarSels> rowCandidateSel;
5758
Produces<o2::aod::HfDstarMls> rowCandidateMl;
5859
Produces<o2::aod::HfDstarIds> rowCandidateId;
@@ -61,6 +62,7 @@ struct HfDerivedDataCreatorDstarToD0Pi {
6162
// Switches for filling tables
6263
HfConfigurableDerivedData confDerData;
6364
Configurable<bool> fillCandidatePar{"fillCandidatePar", true, "Fill candidate parameters"};
65+
Configurable<bool> fillCandidateParD0{"fillCandidateParD0", true, "Fill charm daughter parameters"};
6466
Configurable<bool> fillCandidateSel{"fillCandidateSel", true, "Fill candidate selection flags"};
6567
Configurable<bool> fillCandidateMl{"fillCandidateMl", true, "Fill candidate selection ML scores"};
6668
Configurable<bool> fillCandidateId{"fillCandidateId", true, "Fill original indices from the candidate table"};
@@ -118,6 +120,21 @@ struct HfDerivedDataCreatorDstarToD0Pi {
118120
rowsCommon.fillTablesCandidate(candidate, invMass, y);
119121
if (fillCandidatePar) {
120122
rowCandidatePar(
123+
candidate.pxD0(),
124+
candidate.pyD0(),
125+
candidate.pzD0(),
126+
candidate.pxSoftPi(),
127+
candidate.pySoftPi(),
128+
candidate.pzSoftPi(),
129+
candidate.signSoftPi(),
130+
candidate.impParamSoftPi(),
131+
candidate.normalisedImpParamSoftPi(),
132+
prongSoftPi.tpcNSigmaPi(),
133+
prongSoftPi.tofNSigmaPi(),
134+
prongSoftPi.tpcTofNSigmaPi());
135+
}
136+
if (fillCandidateParD0) {
137+
rowCandidateParD0(
121138
candidate.chi2PCAD0(),
122139
candidate.cpaD0(),
123140
candidate.cpaXYD0(),
@@ -131,29 +148,17 @@ struct HfDerivedDataCreatorDstarToD0Pi {
131148
candidate.pxProng1(),
132149
candidate.pyProng1(),
133150
candidate.pzProng1(),
134-
candidate.pxD0(),
135-
candidate.pyD0(),
136-
candidate.pzD0(),
137-
candidate.pxSoftPi(),
138-
candidate.pySoftPi(),
139-
candidate.pzSoftPi(),
140-
candidate.signSoftPi(),
141151
candidate.invMassD0(),
142152
candidate.impactParameter0(),
143153
candidate.impactParameter1(),
144-
candidate.impParamSoftPi(),
145154
candidate.impactParameterNormalised0(),
146155
candidate.impactParameterNormalised1(),
147-
candidate.normalisedImpParamSoftPi(),
148156
prong0.tpcNSigmaPi(),
149157
prong0.tofNSigmaPi(),
150158
prong0.tpcTofNSigmaPi(),
151159
prong1.tpcNSigmaKa(),
152160
prong1.tofNSigmaKa(),
153-
prong1.tpcTofNSigmaKa(),
154-
prongSoftPi.tpcNSigmaPi(),
155-
prongSoftPi.tofNSigmaPi(),
156-
prongSoftPi.tpcTofNSigmaPi());
161+
prong1.tpcTofNSigmaKa());
157162
}
158163
if (fillCandidateSel) {
159164
rowCandidateSel(
@@ -212,6 +217,7 @@ struct HfDerivedDataCreatorDstarToD0Pi {
212217
// Fill candidate properties
213218
rowsCommon.reserveTablesCandidates(sizeTableCand);
214219
reserveTable(rowCandidatePar, fillCandidatePar, sizeTableCand);
220+
reserveTable(rowCandidateParD0, fillCandidateParD0, sizeTableCand);
215221
reserveTable(rowCandidateSel, fillCandidateSel, sizeTableCand);
216222
reserveTable(rowCandidateMl, fillCandidateMl, sizeTableCand);
217223
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)