Skip to content

Commit 23d82c4

Browse files
GiorgioAlbertoLuciaalibuildclaude
authored
[PWGLF] Add ML-based track index skim creator for tracks from double omega (#18656)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 6a0e104 commit 23d82c4

5 files changed

Lines changed: 1289 additions & 139 deletions

File tree

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
/// \file LFDoubleOmegaTrackTables.h
13+
/// \brief Tables of doubleOmegaTrackTreeCreator: the training sample of the double-Omega track selection
14+
/// (DOmegaTrackTrain) and the V0 and cascade candidates built from the tracks selected by the track
15+
/// BDT (DOmegaV0s, DOmegaCascades), analogous to aod::V0s and aod::Cascades (same index getters:
16+
/// collision, posTrack, negTrack, v0, bachelor).
17+
18+
#ifndef PWGLF_DATAMODEL_LFDOUBLEOMEGATRACKTABLES_H_
19+
#define PWGLF_DATAMODEL_LFDOUBLEOMEGATRACKTABLES_H_
20+
21+
#include <Framework/ASoA.h>
22+
#include <Framework/AnalysisDataModel.h>
23+
24+
#include <cstdint>
25+
26+
namespace o2::aod
27+
{
28+
namespace domegatrack
29+
{
30+
DECLARE_SOA_COLUMN(Pt, pt, float);
31+
DECLARE_SOA_COLUMN(Eta, eta, float);
32+
DECLARE_SOA_COLUMN(Phi, phi, float);
33+
DECLARE_SOA_COLUMN(Sign, sign, int8_t);
34+
DECLARE_SOA_COLUMN(TpcInnerParam, tpcInnerParam, float); //! Momentum at the TPC inner wall (PID)
35+
DECLARE_SOA_COLUMN(TpcSignal, tpcSignal, float);
36+
DECLARE_SOA_COLUMN(TpcNSigmaPr, tpcNSigmaPr, float);
37+
DECLARE_SOA_COLUMN(TpcNSigmaPi, tpcNSigmaPi, float);
38+
DECLARE_SOA_COLUMN(TpcNSigmaKa, tpcNSigmaKa, float);
39+
DECLARE_SOA_COLUMN(TofNSigmaPr, tofNSigmaPr, float); //! -999 without TOF
40+
DECLARE_SOA_COLUMN(TofNSigmaPi, tofNSigmaPi, float); //! -999 without TOF
41+
DECLARE_SOA_COLUMN(TofNSigmaKa, tofNSigmaKa, float); //! -999 without TOF
42+
DECLARE_SOA_COLUMN(DcaXY, dcaXY, float); //! Signed transverse DCA to the primary vertex (cm), -999 if the propagation failed
43+
DECLARE_SOA_COLUMN(DcaZ, dcaZ, float); //! Longitudinal DCA to the primary vertex (cm)
44+
DECLARE_SOA_COLUMN(SigmaDcaXY, sigmaDcaXY, float); //! Uncertainty of DcaXY, track and vertex (cm)
45+
DECLARE_SOA_COLUMN(SigmaDcaZ, sigmaDcaZ, float); //! Uncertainty of DcaZ, track and vertex (cm)
46+
DECLARE_SOA_COLUMN(ItsClusterMap, itsClusterMap, uint8_t);
47+
DECLARE_SOA_COLUMN(ItsClusterSizes, itsClusterSizes, uint32_t);
48+
DECLARE_SOA_COLUMN(ItsChi2NCl, itsChi2NCl, float);
49+
DECLARE_SOA_COLUMN(TpcNClsFound, tpcNClsFound, int16_t);
50+
DECLARE_SOA_COLUMN(TpcNClsCrossedRows, tpcNClsCrossedRows, int16_t);
51+
DECLARE_SOA_COLUMN(TpcNClsShared, tpcNClsShared, uint8_t);
52+
DECLARE_SOA_COLUMN(TpcChi2NCl, tpcChi2NCl, float);
53+
DECLARE_SOA_COLUMN(DetectorMap, detectorMap, uint8_t); //! ITS, TPC, TRD, TOF bits
54+
DECLARE_SOA_COLUMN(IsPVContributor, isPVContributor, bool);
55+
DECLARE_SOA_COLUMN(NumContrib, numContrib, uint16_t); //! Primary-vertex contributors of the collision (multiplicity proxy)
56+
DECLARE_SOA_COLUMN(PosZ, posZ, float); //! Primary-vertex z of the collision (cm)
57+
DECLARE_SOA_COLUMN(Role, role, int8_t); //! See doubleOmegaTrackTreeCreator.cxx
58+
DECLARE_SOA_COLUMN(PdgCode, pdgCode, int); //! Of the MC particle, 0 without MC particle
59+
DECLARE_SOA_COLUMN(MotherPdgCode, motherPdgCode, int);
60+
DECLARE_SOA_COLUMN(IsPhysicalPrimary, isPhysicalPrimary, bool);
61+
DECLARE_SOA_COLUMN(PtMC, ptMC, float);
62+
DECLARE_SOA_COLUMN(ProductionRadius, productionRadius, float); //! Transverse radius of the MC production vertex (cm)
63+
DECLARE_SOA_COLUMN(McKey, mcKey, int64_t); //! MC particle, unique across dataframes (dataframe << 32 | index), -1 without MC particle
64+
DECLARE_SOA_COLUMN(AncestorPdgCode, ancestorPdgCode, int); //! First particle of the decay chain (see doubleOmegaTrackTreeCreator.cxx), 0 without MC particle
65+
DECLARE_SOA_COLUMN(AncestorPtMC, ancestorPtMC, float); //! Its generated pT (GeV/c), -999 without MC particle
66+
} // namespace domegatrack
67+
68+
DECLARE_SOA_TABLE(DOmegaTrackTrain, "AOD", "DOMEGATRKTRAIN", //! Tracks for the training of the double-Omega track selection
69+
domegatrack::Pt, domegatrack::Eta, domegatrack::Phi, domegatrack::Sign,
70+
domegatrack::TpcInnerParam, domegatrack::TpcSignal,
71+
domegatrack::TpcNSigmaPr, domegatrack::TpcNSigmaPi, domegatrack::TpcNSigmaKa,
72+
domegatrack::TofNSigmaPr, domegatrack::TofNSigmaPi, domegatrack::TofNSigmaKa,
73+
domegatrack::DcaXY, domegatrack::DcaZ, domegatrack::SigmaDcaXY, domegatrack::SigmaDcaZ,
74+
domegatrack::ItsClusterMap, domegatrack::ItsClusterSizes, domegatrack::ItsChi2NCl,
75+
domegatrack::TpcNClsFound, domegatrack::TpcNClsCrossedRows,
76+
domegatrack::TpcNClsShared, domegatrack::TpcChi2NCl,
77+
domegatrack::DetectorMap, domegatrack::IsPVContributor,
78+
domegatrack::NumContrib, domegatrack::PosZ,
79+
domegatrack::Role, domegatrack::PdgCode, domegatrack::MotherPdgCode,
80+
domegatrack::IsPhysicalPrimary, domegatrack::PtMC, domegatrack::ProductionRadius, domegatrack::McKey,
81+
domegatrack::AncestorPdgCode, domegatrack::AncestorPtMC);
82+
83+
// V0 and cascade candidates from the tracks selected by the track BDT. The track indices point to the Tracks
84+
// of the AO2D the candidates were built from: like aod::V0s and aod::Cascades, the tables are used together
85+
// with it.
86+
namespace domegav0
87+
{
88+
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //! Collision index
89+
DECLARE_SOA_INDEX_COLUMN_FULL(PosTrack, posTrack, int, Tracks, "_Pos"); //! Positive track (proton of a Lambda, pion of an anti-Lambda)
90+
DECLARE_SOA_INDEX_COLUMN_FULL(NegTrack, negTrack, int, Tracks, "_Neg"); //! Negative track (pion of a Lambda, antiproton of an anti-Lambda)
91+
DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! +1 Lambda, -1 anti-Lambda
92+
} // namespace domegav0
93+
94+
DECLARE_SOA_TABLE(DOmegaV0s, "AOD", "DOMEGAV0", //! Lambda candidates, analogous to aod::V0s
95+
o2::soa::Index<>, domegav0::CollisionId, domegav0::PosTrackId, domegav0::NegTrackId, domegav0::Sign);
96+
97+
namespace domegacascade
98+
{
99+
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //! Collision index
100+
DECLARE_SOA_INDEX_COLUMN_FULL(V0, v0, int, DOmegaV0s, ""); //! Lambda candidate
101+
DECLARE_SOA_INDEX_COLUMN_FULL(Bachelor, bachelor, int, Tracks, ""); //! Bachelor kaon
102+
DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Charge of the Omega: -1 Omega-, +1 Omega+
103+
} // namespace domegacascade
104+
105+
DECLARE_SOA_TABLE(DOmegaCascades, "AOD", "DOMEGACASCADE", //! Omega candidates, analogous to aod::Cascades
106+
o2::soa::Index<>, domegacascade::CollisionId, domegacascade::V0Id, domegacascade::BachelorId, domegacascade::Sign);
107+
} // namespace o2::aod
108+
109+
#endif // PWGLF_DATAMODEL_LFDOUBLEOMEGATRACKTABLES_H_

‎PWGLF/TableProducer/Strangeness/CMakeLists.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ o2physics_add_dpl_workflow(double-omega-builder
7575
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
7676
COMPONENT_NAME Analysis)
7777

78+
o2physics_add_dpl_workflow(double-omega-track-index-skim-creator
79+
SOURCES doubleOmegaTrackIndexSkimCreator.cxx
80+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore O2::DCAFitter
81+
COMPONENT_NAME Analysis)
82+
7883
o2physics_add_dpl_workflow(lambdakzerofinder
7984
SOURCES lambdakzerofinder.cxx
8085
REUSE_FROM LfStrangenessPCH

0 commit comments

Comments
 (0)