Skip to content

Commit 28a07f2

Browse files
BongHwiBong-Hwi Lim
andauthored
[PWGLF] omega2012TrainingTable: write only extracted truth tables for MC (#18356)
Co-authored-by: Bong-Hwi Lim <lim@cns.s.u-tokyo.ac.jp>
1 parent ea53c75 commit 28a07f2

2 files changed

Lines changed: 226 additions & 9 deletions

File tree

‎PWGLF/DataModel/LFOmega2012MlTables.h‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
/// Mode A (XiK0s): Omega(2012)- -> Xi- K0S. Mode B (Xi1530K): Omega(2012)- -> Xi(1530)0 K- -> Xi- pi+ K-.
1717
/// Only the input-object tables (events, cascades, V0s, tracks) are common; every event row belongs to one
1818
/// decay mode (column omDecayMode), so the object rows of the two modes never mix either.
19+
/// Event rows are written only for collisions with at least one written candidate. In reconstructed MC the
20+
/// object MC labels and the pruned McParticles rows replace the source MC tables, which are not written.
1921
///
2022
/// Cumulative pass bits (each bit requires all lower bits):
2123
/// mode A: 1 loose (valid canonical candidate inside the rapidity window), 2 Xi selection, 4 K0s selection,
@@ -234,6 +236,38 @@ DECLARE_SOA_TABLE(Omega2012MlGenAudit, "AOD", "OMMLGENAUDIT",
234236
o2::soa::Index<>, omega2012ml::OmRecoCollisionId, omega2012ml::OmOriginalMcParticleId,
235237
omega2012ml::OmPdg, omega2012ml::OmDaughterPdg1, omega2012ml::OmDaughterPdg2,
236238
omega2012ml::OmGenChannel, omega2012ml::OmGenPt, omega2012ml::OmGenY);
239+
240+
// MC truth of reconstructed MC: daughter labels of the written objects and the pruned source McParticles rows
241+
// (Omega(2012) decay trees and ancestry of the daughter labels). Source rows are DF-local scalar values.
242+
namespace omega2012ml
243+
{
244+
DECLARE_SOA_INDEX_COLUMN_FULL_CUSTOM(Omega2012MlTrack, omega2012MlTrack, int, Omega2012MlTracks, "OmmlTracks", "");
245+
DECLARE_SOA_COLUMN(OmMcCollisionRow, omMcCollisionRow, int64_t); //! row of the MC collision in the input McCollisions table
246+
DECLARE_SOA_COLUMN(OmCascadeMcLabels, omCascadeMcLabels, int[3]); //! McParticles rows of the cascade daughters, order of omCascadeIndices; -1 if absent
247+
DECLARE_SOA_COLUMN(OmV0McLabels, omV0McLabels, int[2]); //! McParticles rows of the V0 daughters, order of omV0Indices; -1 if absent
248+
DECLARE_SOA_COLUMN(OmMcLabel, omMcLabel, int); //! McParticles row of the track; -1 if absent
249+
DECLARE_SOA_COLUMN(OmMcRow, omMcRow, int64_t); //! row of the particle in the input McParticles table
250+
DECLARE_SOA_COLUMN(OmMcSelection, omMcSelection, uint8_t); //! 1 Omega(2012) decay tree, 2 ancestry of a written daughter label
251+
DECLARE_SOA_COLUMN(OmNMothers, omNMothers, uint8_t); //! number of mothers in the input row
252+
DECLARE_SOA_COLUMN(OmMotherRows, omMotherRows, int[2]); //! first two McParticles mother rows; -1 if absent
253+
DECLARE_SOA_COLUMN(OmDaughterRows, omDaughterRows, int[2]); //! McParticles daughter slice (first, last) as stored in the input row
254+
DECLARE_SOA_COLUMN(OmE, omE, float);
255+
DECLARE_SOA_COLUMN(OmWeight, omWeight, float);
256+
} // namespace omega2012ml
257+
258+
DECLARE_SOA_TABLE(Omega2012MlEventMcs, "AOD", "OMMLEVENTMC",
259+
o2::soa::Index<>, omega2012ml::Omega2012MlEventId, omega2012ml::OmMcCollisionRow);
260+
DECLARE_SOA_TABLE(Omega2012MlCascadeMcs, "AOD", "OMMLCASCMC",
261+
o2::soa::Index<>, omega2012ml::Omega2012MlCascadeId, omega2012ml::OmCascadeMcLabels);
262+
DECLARE_SOA_TABLE(Omega2012MlV0Mcs, "AOD", "OMMLV0MC",
263+
o2::soa::Index<>, omega2012ml::Omega2012MlV0Id, omega2012ml::OmV0McLabels);
264+
DECLARE_SOA_TABLE(Omega2012MlTrackMcs, "AOD", "OMMLTRACKMC",
265+
o2::soa::Index<>, omega2012ml::Omega2012MlTrackId, omega2012ml::OmMcLabel);
266+
DECLARE_SOA_TABLE(Omega2012MlMcParticles, "AOD", "OMMLMCPART",
267+
o2::soa::Index<>, omega2012ml::OmMcRow, omega2012ml::OmMcSelection, omega2012ml::OmPdg,
268+
omega2012ml::OmMcCollisionRow, omega2012ml::OmNMothers, omega2012ml::OmMotherRows,
269+
omega2012ml::OmDaughterRows, omega2012ml::OmPx, omega2012ml::OmPy, omega2012ml::OmPz,
270+
omega2012ml::OmE, omega2012ml::OmWeight);
237271
} // namespace o2::aod
238272

239273
#endif // PWGLF_DATAMODEL_LFOMEGA2012MLTABLES_H_

0 commit comments

Comments
 (0)