Skip to content

Commit de27cdb

Browse files
committed
Refactored Data Creator MC matching
1 parent 2cbc85b commit de27cdb

5 files changed

Lines changed: 1143 additions & 428 deletions

File tree

PWGHF/Core/DecayChannels.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,40 @@ enum DecayChannelToJpsiResonant : int8_t {
215215
NChannelsToJpsiResonant = BsToJpsiPhi // last channel
216216
};
217217
} // namespace hf_cand_beauty
218+
219+
namespace hf_cand_reso
220+
{
221+
/// @brief resonance candidates: main channels
222+
enum DecayChannelMain : int8_t {
223+
// D1(2420)0
224+
D1zeroToDstarPi = 1, // D*+ π-
225+
// D2*(2460)0
226+
D2starzeroToDplusPi = 2, // D+ π−
227+
D2starzeroToDstarPi = 3, // D*+ π-
228+
// D2*(2460)+
229+
D2starplusToD0Pi = 4, // D0 π+
230+
// Ds1(2536)+
231+
Ds1ToDstarK0s = 5, // D*+ K0s
232+
// Ds2*(2573)+
233+
Ds2starToD0Kplus = 6, // D0 K+
234+
Ds2starToDplusK0s = 7, // D+ K0s
235+
Ds2starToDstarK0s = 8, // D*+ K0s
236+
// Ds1*(2700)+
237+
Ds1star2700ToDstarK0s = 9, // D*+ K0s
238+
// Ds1*(2860)+
239+
Ds1star2860ToDstarK0s = 10, // D*+ K0s
240+
// Ds3*(2860)+
241+
Ds3star2860ToDstarK0s = 11, // D*+ K0s
242+
// Xic(3055)0
243+
Xic3055zeroToD0Lambda = 12, // D0 Λ
244+
// Xic(3055)+
245+
Xic3055plusToDplusLambda = 13, // D+ Λ
246+
// Xic(3080)0
247+
Xic3080zeroToD0Lambda = 14, // D0 Λ
248+
// Xic(3080)+
249+
Xic3080plusToDplusLambda = 15 // D+ Λ
250+
};
251+
}
218252
} // namespace o2::hf_decay
219253

220254
#endif // PWGHF_CORE_DECAYCHANNELS_H_

PWGHF/D2H/DataModel/ReducedDataModel.h

Lines changed: 81 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,11 +1340,14 @@ DECLARE_SOA_COLUMN(InvMassProng1, invMassProng1, float); //! Invariant Mass of V
13401340
DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign of the Resonance candidate
13411341
DECLARE_SOA_COLUMN(BachSignProduct, bachSignProduct, int8_t); //! Product of the bachelors signs
13421342

1343-
DECLARE_SOA_COLUMN(FlagMcMatchRec, flagMcMatchRec, int8_t); // flag for decay channel classification reconstruction level
1343+
DECLARE_SOA_COLUMN(FlagMcMatchRec, flagMcMatchRec, int8_t); // flag for resonance decay channel classification reconstruction level
1344+
DECLARE_SOA_COLUMN(FlagMcMatchRecD, flagMcMatchRecD, int8_t); // flag for D meson bachelor decay channel classification reconstruction level
1345+
DECLARE_SOA_COLUMN(FlagMcMatchChanD, flagMcDecayChanD, int8_t); // flag for D meson resonant channel classification reconstruction level
13441346
DECLARE_SOA_COLUMN(FlagMcMatchGen, flagMcMatchGen, int8_t); // flag for decay channel classification generator level
1345-
DECLARE_SOA_COLUMN(DebugMcRec, debugMcRec, int8_t); // debug flag for mis-association at reconstruction level
1347+
DECLARE_SOA_COLUMN(DebugMcRec, debugMcRec, uint16_t); // debug flag for mis-association at reconstruction level
13461348
DECLARE_SOA_COLUMN(Origin, origin, int8_t); // Flag for origin of MC particle 1=promt, 2=FD
13471349
DECLARE_SOA_COLUMN(SignD0, signD0, int8_t); // Sign of the D0 in the channels with D* -> D0 pi, needed in case of non-matched D*
1350+
DECLARE_SOA_COLUMN(PtGen, ptGen, float); // Pt at generation level in GeV/c
13481351
DECLARE_SOA_COLUMN(InvMassGen, invMassGen, float); //! Invariant mass at generation level in GeV/c2
13491352
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //!
13501353
[](float pxProng0, float pxProng1, float pyProng0, float pyProng1) -> float { return RecoDecay::pt((1.f * pxProng0 + 1.f * pxProng1), (1.f * pyProng0 + 1.f * pyProng1)); });
@@ -1411,7 +1414,6 @@ DECLARE_SOA_TABLE(Hf2PrV0Ids, "AOD", "HF2PRV0ID",
14111414
hf_track_index_reduced::HfRedCollisionId,
14121415
hf_reso_2pr_v0::Prong0Id,
14131416
hf_reso_2pr_v0::Prong1Id);
1414-
14151417
DECLARE_SOA_TABLE(Hf3PrTrkIds, "AOD", "HF3PRTRKID",
14161418
hf_track_index_reduced::HfRedCollisionId,
14171419
hf_reso_3pr_trk::Prong0Id,
@@ -1427,15 +1429,82 @@ DECLARE_SOA_TABLE(Hf2PrTrkIds, "AOD", "HF2PRTRKID",
14271429

14281430
// Tables for MC Resonance analysis
14291431
// table with results of reconstruction level MC matching
1430-
DECLARE_SOA_TABLE(HfMcRecRedDV0s, "AOD", "HFMCRECREDDV0", //! Table with reconstructed MC information on DV0(<-Ds*) pairs for reduced workflow
1432+
DECLARE_SOA_TABLE(Hf3PrV0McRec, "AOD", "HF3PRV0MCREC",
14311433
hf_reso_3pr_v0::Prong0Id,
14321434
hf_reso_3pr_v0::Prong1Id,
14331435
hf_reso_cand_reduced::FlagMcMatchRec,
1436+
hf_reso_cand_reduced::FlagMcMatchRecD,
1437+
hf_reso_cand_reduced::FlagMcMatchChanD,
1438+
hf_reso_cand_reduced::DebugMcRec,
1439+
hf_reso_cand_reduced::Origin,
1440+
hf_reso_cand_reduced::PtGen,
1441+
hf_reso_cand_reduced::InvMassGen,
1442+
hf_cand::NTracksDecayed,
1443+
o2::soa::Marker<1>);
1444+
1445+
DECLARE_SOA_TABLE(HfDstarV0McRec, "AOD", "HFDSTARV0MCREC",
1446+
hf_reso_dstar_v0::Prong0Id,
1447+
hf_reso_dstar_v0::Prong1Id,
1448+
hf_reso_cand_reduced::FlagMcMatchRec,
1449+
hf_reso_cand_reduced::FlagMcMatchRecD,
1450+
hf_reso_cand_reduced::FlagMcMatchChanD,
1451+
hf_reso_cand_reduced::DebugMcRec,
1452+
hf_reso_cand_reduced::Origin,
1453+
hf_reso_cand_reduced::PtGen,
1454+
hf_reso_cand_reduced::InvMassGen,
1455+
hf_cand::NTracksDecayed,
1456+
o2::soa::Marker<1>);
1457+
1458+
DECLARE_SOA_TABLE(Hf2PrV0McRec, "AOD", "HF2PRV0MCREC",
1459+
hf_reso_2pr_v0::Prong0Id,
1460+
hf_reso_2pr_v0::Prong1Id,
1461+
hf_reso_cand_reduced::FlagMcMatchRec,
1462+
hf_reso_cand_reduced::FlagMcMatchRecD,
1463+
hf_reso_cand_reduced::FlagMcMatchChanD,
1464+
hf_reso_cand_reduced::DebugMcRec,
1465+
hf_reso_cand_reduced::Origin,
1466+
hf_reso_cand_reduced::PtGen,
1467+
hf_reso_cand_reduced::InvMassGen,
1468+
hf_cand::NTracksDecayed,
1469+
o2::soa::Marker<1>);
1470+
1471+
DECLARE_SOA_TABLE(Hf3PrTrkMcRec, "AOD", "HF3PRTRKMCREC",
1472+
hf_reso_3pr_trk::Prong0Id,
1473+
hf_reso_3pr_trk::Prong1Id,
1474+
hf_reso_cand_reduced::FlagMcMatchRec,
1475+
hf_reso_cand_reduced::FlagMcMatchRecD,
1476+
hf_reso_cand_reduced::FlagMcMatchChanD,
1477+
hf_reso_cand_reduced::DebugMcRec,
1478+
hf_reso_cand_reduced::Origin,
1479+
hf_reso_cand_reduced::PtGen,
1480+
hf_reso_cand_reduced::InvMassGen,
1481+
hf_cand::NTracksDecayed,
1482+
o2::soa::Marker<1>);
1483+
1484+
DECLARE_SOA_TABLE(HfDstarTrkMcRec, "AOD", "HFDSTARTRKMCREC",
1485+
hf_reso_dstar_trk::Prong0Id,
1486+
hf_reso_dstar_trk::Prong1Id,
1487+
hf_reso_cand_reduced::FlagMcMatchRec,
1488+
hf_reso_cand_reduced::FlagMcMatchRecD,
1489+
hf_reso_cand_reduced::FlagMcMatchChanD,
1490+
hf_reso_cand_reduced::DebugMcRec,
1491+
hf_reso_cand_reduced::Origin,
1492+
hf_reso_cand_reduced::PtGen,
1493+
hf_reso_cand_reduced::InvMassGen,
1494+
hf_cand::NTracksDecayed,
1495+
o2::soa::Marker<1>);
1496+
1497+
DECLARE_SOA_TABLE(Hf2PrTrkMcRec, "AOD", "HF2PRTRKMCREC",
1498+
hf_reso_2pr_trk::Prong0Id,
1499+
hf_reso_2pr_trk::Prong1Id,
1500+
hf_reso_cand_reduced::FlagMcMatchRec,
1501+
hf_reso_cand_reduced::FlagMcMatchRecD,
1502+
hf_reso_cand_reduced::FlagMcMatchChanD,
14341503
hf_reso_cand_reduced::DebugMcRec,
14351504
hf_reso_cand_reduced::Origin,
1436-
hf_reso_cand_reduced::SignD0,
1437-
hf_b0_mc::PtMother,
1505+
hf_reso_cand_reduced::PtGen,
14381506
hf_reso_cand_reduced::InvMassGen,
1507+
hf_cand::NTracksDecayed,
14391508
o2::soa::Marker<1>);
14401509

14411510
DECLARE_SOA_TABLE(HfMcGenRedResos, "AOD", "HFMCGENREDRESO", //! Generation-level MC information on Ds-Resonances candidates for reduced workflow
@@ -1450,23 +1519,19 @@ DECLARE_SOA_TABLE(HfMcGenRedResos, "AOD", "HFMCGENREDRESO", //! Generation-level
14501519
hf_b0_mc::PtProng1,
14511520
hf_b0_mc::YProng1,
14521521
hf_b0_mc::EtaProng1,
1522+
hf_reso_cand_reduced::InvMassGen,
1523+
hf_reduced_collision::HfCollisionRejectionMap,
14531524
o2::soa::Marker<1>);
14541525

1455-
DECLARE_SOA_TABLE(HfCandChaResTr, "AOD", "HFCANDCHARESTR", //! Table with Resonance candidate information for resonances plus tracks reduced workflow
1456-
// Static
1457-
hf_cand::PxProng0, hf_cand::PyProng0, hf_cand::PzProng0,
1458-
hf_cand::PxProng1, hf_cand::PyProng1, hf_cand::PzProng1,
1459-
hf_reso_cand_reduced::InvMass,
1460-
hf_reso_cand_reduced::InvMassProng0,
1461-
// Dynamic
1462-
hf_reso_cand_reduced::PtProng0<hf_cand::PxProng0, hf_cand::PyProng0>);
1463-
14641526
// Table with same size as HfCandCharmReso
14651527
DECLARE_SOA_TABLE(HfMcRecRedResos, "AOD", "HFMCRECREDRESO", //! Reconstruction-level MC information on Ds-Resonances candidates for reduced workflow
14661528
hf_reso_cand_reduced::FlagMcMatchRec,
1529+
hf_reso_cand_reduced::FlagMcMatchRecD,
1530+
hf_reso_cand_reduced::FlagMcMatchChanD,
14671531
hf_reso_cand_reduced::DebugMcRec,
14681532
hf_reso_cand_reduced::Origin,
1469-
hf_b0_mc::PtMother,
1533+
hf_reso_cand_reduced::PtGen,
1534+
hf_reso_cand_reduced::InvMassGen,
14701535
o2::soa::Marker<1>);
14711536
} // namespace aod
14721537

PWGHF/D2H/TableProducer/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ o2physics_add_dpl_workflow(candidate-creator-bs-reduced
3131
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter
3232
COMPONENT_NAME Analysis)
3333

34-
o2physics_add_dpl_workflow(candidate-creator-charm-reso-reduced
35-
SOURCES candidateCreatorCharmResoReduced.cxx
36-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
37-
COMPONENT_NAME Analysis)
34+
# o2physics_add_dpl_workflow(candidate-creator-charm-reso-reduced
35+
# SOURCES candidateCreatorCharmResoReduced.cxx
36+
# PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
37+
# COMPONENT_NAME Analysis)
3838

3939
o2physics_add_dpl_workflow(candidate-creator-lb-reduced
4040
SOURCES candidateCreatorLbReduced.cxx

0 commit comments

Comments
 (0)