Skip to content

Commit eb91dc6

Browse files
authored
[PWGCF,PWGLF] Add a dedicated pi-hypertriton workflow to LF (#17947)
1 parent 4e6f70e commit eb91dc6

7 files changed

Lines changed: 1710 additions & 167 deletions

File tree

PWGCF/Femto/FemtoNuclei/TableProducer/HadNucleiFemto.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ using std::array;
8282

8383
using CollBracket = o2::math_utils::Bracket<int>;
8484
using HyperCandidates = aod::DataHypCandsWColl;
85-
using HyperCandidatesMC = aod::MCHypCands;
85+
using HyperCandidatesMC = aod::MCHypCandsWColl;
8686
using CollisionsFull = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::FT0Mults>;
8787
using CollisionsFullMC = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0Cs, aod::FT0Mults>;
8888
using HadHyperCollisionsFull = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0As, aod::CentFT0Cs, aod::CentFT0Ms, aod::FT0Mults>;
@@ -534,14 +534,14 @@ struct HadNucleiFemto {
534534
float phiPi{0.f};
535535
bool isMatter{false};
536536

537-
float pt() const { return std::hypot(momentum[0], momentum[1]); }
538-
float eta() const
537+
[[nodiscard]] float pt() const { return std::hypot(momentum[0], momentum[1]); }
538+
[[nodiscard]] float eta() const
539539
{
540540
const float transverseMomentum = pt();
541541
return transverseMomentum > 0.f ? std::asinh(momentum[2] / transverseMomentum) : 999.f;
542542
}
543-
float phi() const { return std::atan2(momentum[1], momentum[0]); }
544-
int8_t sign() const { return isMatter ? 1 : -1; }
543+
[[nodiscard]] float phi() const { return std::atan2(momentum[1], momentum[0]); }
544+
[[nodiscard]] int8_t sign() const { return isMatter ? 1 : -1; }
545545
};
546546

547547
struct HadHyperHadron {
@@ -556,10 +556,10 @@ struct HadNucleiFemto {
556556
float phiValue{0.f};
557557
int8_t signValue{0};
558558

559-
float pt() const { return std::hypot(momentum[0], momentum[1]); }
560-
float eta() const { return etaValue; }
561-
float phi() const { return phiValue; }
562-
int8_t sign() const { return signValue; }
559+
[[nodiscard]] float pt() const { return std::hypot(momentum[0], momentum[1]); }
560+
[[nodiscard]] float eta() const { return etaValue; }
561+
[[nodiscard]] float phi() const { return phiValue; }
562+
[[nodiscard]] int8_t sign() const { return signValue; }
563563
};
564564

565565
struct HadHyperEvent {

PWGLF/DataModel/LFHypernucleiTables.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,36 @@ DECLARE_SOA_TABLE(DataHypCandsFlow, "AOD", "HYPCANDSFLOW",
134134
hyperrec::Flags, hyperrec::TrackedClSize);
135135

136136
DECLARE_SOA_TABLE(MCHypCands, "AOD", "MCHYPCANDS",
137+
o2::soa::Index<>,
138+
hyperrec::CentralityFT0A, hyperrec::CentralityFT0C, hyperrec::CentralityFT0M,
139+
hyperrec::TrackOccupancyInTimeRange, hyperrec::Ft0cOccupancyInTimeRange,
140+
hyperrec::XPrimVtx, hyperrec::YPrimVtx, hyperrec::ZPrimVtx,
141+
142+
hyperrec::RunNumber, hyperrec::IsMatter,
143+
hyperrec::PtHe3, hyperrec::PhiHe3, hyperrec::EtaHe3,
144+
hyperrec::PtPi, hyperrec::PhiPi, hyperrec::EtaPi,
145+
hyperrec::XDecVtx, hyperrec::YDecVtx, hyperrec::ZDecVtx,
146+
hyperrec::DcaV0Daug, hyperrec::DcaHe, hyperrec::DcaPi,
147+
hyperrec::NSigmaHe, hyperrec::NTPCclusHe, hyperrec::NTPCclusPi, hyperrec::NTPCpidClusHe, hyperrec::NTPCpidClusPi, hyperrec::NTPCCrossedRowsHe, hyperrec::NTPCCrossedRowsPi,
148+
hyperrec::TpcMomHe, hyperrec::TpcMomPi, hyperrec::TpcSignalHe, hyperrec::TpcSignalPi, hyperrec::TpcChi2He, hyperrec::ItsChi2He, hyperrec::ItsChi2Pi,
149+
hyperrec::TofMass,
150+
hyperrec::ItsClusterSizesHe, hyperrec::ItsClusterSizesPi,
151+
hyperrec::Flags, hyperrec::TrackedClSize,
152+
hyperrec::GenPt,
153+
hyperrec::GenPhi,
154+
hyperrec::GenEta,
155+
hyperrec::GenPtHe3,
156+
hyperrec::GenXDecVtx,
157+
hyperrec::GenYDecVtx,
158+
hyperrec::GenZDecVtx,
159+
hyperrec::IsReco,
160+
hyperrec::IsFakeHeOnITSLayer,
161+
hyperrec::IsSignal,
162+
hyperrec::IsRecoMCCollision,
163+
hyperrec::IsSurvEvSel,
164+
hyperrec::IsTwoBodyDecay, aod::mcparticle::StatusCode);
165+
166+
DECLARE_SOA_TABLE(MCHypCandsWColl, "AOD", "MCHYPCANDSWCOLL",
137167
o2::soa::Index<>,
138168
hyperrec::CollisionId, hyperrec::HeTrackId, hyperrec::PiTrackId,
139169
hyperrec::CentralityFT0A, hyperrec::CentralityFT0C, hyperrec::CentralityFT0M,
@@ -185,6 +215,7 @@ DECLARE_SOA_TABLE(DataHypCandsWColl, "AOD", "HYPCANDSWCOLL",
185215
using DataHypCand = DataHypCands::iterator;
186216
using DataHypCandFlow = DataHypCandsFlow::iterator;
187217
using MCHypCand = MCHypCands::iterator;
218+
using MCHypCandWColl = MCHypCandsWColl::iterator;
188219
using DataHypCandWColl = DataHypCandsWColl::iterator;
189220

190221
namespace hyperkink
Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
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+
///
13+
/// \file LFPiHypertritonFemtoTables.h
14+
/// \brief Slim tables for pi-hypertriton femto pairs
15+
///
16+
17+
#ifndef PWGLF_DATAMODEL_LFPIHYPERTRITONFEMTOTABLES_H_
18+
#define PWGLF_DATAMODEL_LFPIHYPERTRITONFEMTOTABLES_H_
19+
20+
#include <Framework/AnalysisDataModel.h>
21+
22+
#include <cstdint>
23+
24+
namespace o2::aod
25+
{
26+
namespace pihypertritonfemto
27+
{
28+
constexpr uint8_t ClosePairAngular = 1 << 0;
29+
constexpr uint8_t ClosePairDistance = 1 << 1;
30+
constexpr uint8_t ClosePairAngularUnavailable = 1 << 2;
31+
constexpr uint8_t ClosePairDistanceUnavailable = 1 << 3;
32+
DECLARE_SOA_COLUMN(IsMixed, isMixed, bool);
33+
// Offline CPR bits, OR-ed across same-sign daughters: 1=angular rejection, 2=distance rejection,
34+
// 4=angular unavailable, 8=distance unavailable. Zero means all applicable checks passed.
35+
// Opposite-sign comparisons require no CPR. All flagged pairs remain in the table.
36+
DECLARE_SOA_COLUMN(IsClosePairRejected, isClosePairRejected, uint8_t);
37+
DECLARE_SOA_COLUMN(MixingDepth, mixingDepth, int);
38+
DECLARE_SOA_COLUMN(PosZ, posZ, float);
39+
DECLARE_SOA_COLUMN(CentFT0C, centFT0C, float);
40+
DECLARE_SOA_COLUMN(TrackOccupancy, trackOccupancy, int);
41+
DECLARE_SOA_COLUMN(Ft0cOccupancy, ft0cOccupancy, float);
42+
DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float);
43+
DECLARE_SOA_COLUMN(XPrimVtx, xPrimVtx, float);
44+
DECLARE_SOA_COLUMN(YPrimVtx, yPrimVtx, float);
45+
DECLARE_SOA_COLUMN(ZPrimVtx, zPrimVtx, float);
46+
DECLARE_SOA_COLUMN(HypIsMatter, hypIsMatter, bool);
47+
DECLARE_SOA_COLUMN(HypPtHe3, hypPtHe3, float);
48+
DECLARE_SOA_COLUMN(HypEtaHe3, hypEtaHe3, float);
49+
DECLARE_SOA_COLUMN(HypPhiHe3, hypPhiHe3, float);
50+
DECLARE_SOA_COLUMN(HypPtPi, hypPtPi, float);
51+
DECLARE_SOA_COLUMN(HypEtaPi, hypEtaPi, float);
52+
DECLARE_SOA_COLUMN(HypPhiPi, hypPhiPi, float);
53+
DECLARE_SOA_COLUMN(HypDcaV0Daug, hypDcaV0Daug, float);
54+
DECLARE_SOA_COLUMN(HypDcaHe, hypDcaHe, float);
55+
DECLARE_SOA_COLUMN(HypDcaPi, hypDcaPi, float);
56+
DECLARE_SOA_COLUMN(HypNSigmaHe, hypNSigmaHe, float);
57+
DECLARE_SOA_COLUMN(HypNTPCCrossedRowsHe, hypNTPCCrossedRowsHe, uint8_t);
58+
DECLARE_SOA_COLUMN(HypNTPCCrossedRowsPi, hypNTPCCrossedRowsPi, uint8_t);
59+
DECLARE_SOA_COLUMN(HypTpcMomHe, hypTpcMomHe, float);
60+
DECLARE_SOA_COLUMN(HypTpcMomPi, hypTpcMomPi, float);
61+
DECLARE_SOA_COLUMN(HypTpcSignalHe, hypTpcSignalHe, uint16_t);
62+
DECLARE_SOA_COLUMN(HypTpcSignalPi, hypTpcSignalPi, uint16_t);
63+
DECLARE_SOA_COLUMN(HypItsClusterSizesHe, hypItsClusterSizesHe, uint32_t);
64+
DECLARE_SOA_COLUMN(HypItsClusterSizesPi, hypItsClusterSizesPi, uint32_t);
65+
DECLARE_SOA_COLUMN(HypXDecVtx, hypXDecVtx, float);
66+
DECLARE_SOA_COLUMN(HypYDecVtx, hypYDecVtx, float);
67+
DECLARE_SOA_COLUMN(HypZDecVtx, hypZDecVtx, float);
68+
DECLARE_SOA_COLUMN(HadPt, hadPt, float);
69+
DECLARE_SOA_COLUMN(HadEta, hadEta, float);
70+
DECLARE_SOA_COLUMN(HadPhi, hadPhi, float);
71+
DECLARE_SOA_COLUMN(HadSign, hadSign, int8_t);
72+
DECLARE_SOA_COLUMN(HadDcaXY, hadDcaXY, float);
73+
DECLARE_SOA_COLUMN(HadTpcNClsCrossedRows, hadTpcNClsCrossedRows, uint8_t);
74+
DECLARE_SOA_COLUMN(HadTpcNClsPID, hadTpcNClsPID, uint8_t);
75+
DECLARE_SOA_COLUMN(HadTpcChi2NCl, hadTpcChi2NCl, float);
76+
DECLARE_SOA_COLUMN(HadItsClusterSizes, hadItsClusterSizes, uint32_t);
77+
DECLARE_SOA_COLUMN(HadItsChi2NCl, hadItsChi2NCl, float);
78+
DECLARE_SOA_COLUMN(HadHasTOF, hadHasTOF, bool);
79+
DECLARE_SOA_COLUMN(HadTpcNSigmaPi, hadTpcNSigmaPi, float);
80+
DECLARE_SOA_COLUMN(HadTofNSigmaPi, hadTofNSigmaPi, float);
81+
DECLARE_SOA_COLUMN(HypGenPt, hypGenPt, float);
82+
DECLARE_SOA_COLUMN(HypGenEta, hypGenEta, float);
83+
DECLARE_SOA_COLUMN(HypGenPhi, hypGenPhi, float);
84+
DECLARE_SOA_COLUMN(HypGenXDecVtx, hypGenXDecVtx, float);
85+
DECLARE_SOA_COLUMN(HypGenYDecVtx, hypGenYDecVtx, float);
86+
DECLARE_SOA_COLUMN(HypGenZDecVtx, hypGenZDecVtx, float);
87+
DECLARE_SOA_COLUMN(HypIsReco, hypIsReco, bool);
88+
DECLARE_SOA_COLUMN(HypIsSignal, hypIsSignal, bool);
89+
DECLARE_SOA_COLUMN(HypIsRecoMCCollision, hypIsRecoMCCollision, bool);
90+
DECLARE_SOA_COLUMN(HypIsSurvEvSel, hypIsSurvEvSel, bool);
91+
DECLARE_SOA_COLUMN(HypIsTwoBodyDecay, hypIsTwoBodyDecay, bool);
92+
DECLARE_SOA_COLUMN(HypStatusCode, hypStatusCode, int16_t);
93+
DECLARE_SOA_COLUMN(HeGenPt, heGenPt, float);
94+
DECLARE_SOA_COLUMN(HeIsPhysicalPrimary, heIsPhysicalPrimary, bool);
95+
DECLARE_SOA_COLUMN(DecayPiIsPhysicalPrimary, decayPiIsPhysicalPrimary, bool);
96+
DECLARE_SOA_COLUMN(HadRecoPt, hadRecoPt, float);
97+
DECLARE_SOA_COLUMN(HadRecoEta, hadRecoEta, float);
98+
DECLARE_SOA_COLUMN(HadRecoPhi, hadRecoPhi, float);
99+
DECLARE_SOA_COLUMN(HadGenPt, hadGenPt, float);
100+
DECLARE_SOA_COLUMN(HadGenEta, hadGenEta, float);
101+
DECLARE_SOA_COLUMN(HadGenPhi, hadGenPhi, float);
102+
DECLARE_SOA_COLUMN(HadIsPhysicalPrimary, hadIsPhysicalPrimary, bool);
103+
DECLARE_SOA_COLUMN(HadProcess, hadProcess, int16_t);
104+
DECLARE_SOA_COLUMN(SameMCCollision, sameMCCollision, bool);
105+
DECLARE_SOA_COLUMN(MatchesHypRecoMCCollision, matchesHypRecoMCCollision, bool);
106+
DECLARE_SOA_COLUMN(MatchesPairRecoMCCollision, matchesPairRecoMCCollision, bool);
107+
DECLARE_SOA_COLUMN(IsTruthSelfCorrelation, isTruthSelfCorrelation, bool);
108+
DECLARE_SOA_COLUMN(IsTruePrimaryHadHyperPair, isTruePrimaryHadHyperPair, bool);
109+
DECLARE_SOA_COLUMN(HadIsTruePion, hadIsTruePion, bool); // Truth species, independent of SE/ME and primary status.
110+
} // namespace pihypertritonfemto
111+
112+
DECLARE_SOA_TABLE(PiHypertritonFemtoTable, "AOD", "PIHYPFEMTO",
113+
pihypertritonfemto::IsMixed,
114+
pihypertritonfemto::IsClosePairRejected,
115+
pihypertritonfemto::MixingDepth,
116+
pihypertritonfemto::PosZ,
117+
pihypertritonfemto::CentFT0C,
118+
pihypertritonfemto::TrackOccupancy,
119+
pihypertritonfemto::Ft0cOccupancy,
120+
pihypertritonfemto::MultFT0C,
121+
pihypertritonfemto::XPrimVtx,
122+
pihypertritonfemto::YPrimVtx,
123+
pihypertritonfemto::ZPrimVtx,
124+
pihypertritonfemto::HypIsMatter,
125+
pihypertritonfemto::HypPtHe3,
126+
pihypertritonfemto::HypEtaHe3,
127+
pihypertritonfemto::HypPhiHe3,
128+
pihypertritonfemto::HypPtPi,
129+
pihypertritonfemto::HypEtaPi,
130+
pihypertritonfemto::HypPhiPi,
131+
pihypertritonfemto::HypDcaV0Daug,
132+
pihypertritonfemto::HypDcaHe,
133+
pihypertritonfemto::HypDcaPi,
134+
pihypertritonfemto::HypNSigmaHe,
135+
pihypertritonfemto::HypNTPCCrossedRowsHe,
136+
pihypertritonfemto::HypNTPCCrossedRowsPi,
137+
pihypertritonfemto::HypTpcMomHe,
138+
pihypertritonfemto::HypTpcMomPi,
139+
pihypertritonfemto::HypTpcSignalHe,
140+
pihypertritonfemto::HypTpcSignalPi,
141+
pihypertritonfemto::HypItsClusterSizesHe,
142+
pihypertritonfemto::HypItsClusterSizesPi,
143+
pihypertritonfemto::HypXDecVtx,
144+
pihypertritonfemto::HypYDecVtx,
145+
pihypertritonfemto::HypZDecVtx,
146+
pihypertritonfemto::HadPt,
147+
pihypertritonfemto::HadEta,
148+
pihypertritonfemto::HadPhi,
149+
pihypertritonfemto::HadSign,
150+
pihypertritonfemto::HadDcaXY,
151+
pihypertritonfemto::HadTpcNClsCrossedRows,
152+
pihypertritonfemto::HadTpcNClsPID,
153+
pihypertritonfemto::HadTpcChi2NCl,
154+
pihypertritonfemto::HadItsClusterSizes,
155+
pihypertritonfemto::HadItsChi2NCl,
156+
pihypertritonfemto::HadHasTOF,
157+
pihypertritonfemto::HadTpcNSigmaPi,
158+
pihypertritonfemto::HadTofNSigmaPi);
159+
160+
DECLARE_SOA_TABLE(PiHypertritonFemtoTableMC, "AOD", "PIHYPFEMTOMC",
161+
pihypertritonfemto::IsMixed,
162+
pihypertritonfemto::IsClosePairRejected,
163+
pihypertritonfemto::MixingDepth,
164+
pihypertritonfemto::PosZ,
165+
pihypertritonfemto::CentFT0C,
166+
pihypertritonfemto::TrackOccupancy,
167+
pihypertritonfemto::Ft0cOccupancy,
168+
pihypertritonfemto::MultFT0C,
169+
pihypertritonfemto::XPrimVtx,
170+
pihypertritonfemto::YPrimVtx,
171+
pihypertritonfemto::ZPrimVtx,
172+
pihypertritonfemto::HypIsMatter,
173+
pihypertritonfemto::HypPtHe3,
174+
pihypertritonfemto::HypEtaHe3,
175+
pihypertritonfemto::HypPhiHe3,
176+
pihypertritonfemto::HypPtPi,
177+
pihypertritonfemto::HypEtaPi,
178+
pihypertritonfemto::HypPhiPi,
179+
pihypertritonfemto::HypDcaV0Daug,
180+
pihypertritonfemto::HypDcaHe,
181+
pihypertritonfemto::HypDcaPi,
182+
pihypertritonfemto::HypNSigmaHe,
183+
pihypertritonfemto::HypNTPCCrossedRowsHe,
184+
pihypertritonfemto::HypNTPCCrossedRowsPi,
185+
pihypertritonfemto::HypTpcMomHe,
186+
pihypertritonfemto::HypTpcMomPi,
187+
pihypertritonfemto::HypTpcSignalHe,
188+
pihypertritonfemto::HypTpcSignalPi,
189+
pihypertritonfemto::HypItsClusterSizesHe,
190+
pihypertritonfemto::HypItsClusterSizesPi,
191+
pihypertritonfemto::HypXDecVtx,
192+
pihypertritonfemto::HypYDecVtx,
193+
pihypertritonfemto::HypZDecVtx,
194+
pihypertritonfemto::HadPt,
195+
pihypertritonfemto::HadEta,
196+
pihypertritonfemto::HadPhi,
197+
pihypertritonfemto::HadSign,
198+
pihypertritonfemto::HadDcaXY,
199+
pihypertritonfemto::HadTpcNClsCrossedRows,
200+
pihypertritonfemto::HadTpcNClsPID,
201+
pihypertritonfemto::HadTpcChi2NCl,
202+
pihypertritonfemto::HadItsClusterSizes,
203+
pihypertritonfemto::HadItsChi2NCl,
204+
pihypertritonfemto::HadHasTOF,
205+
pihypertritonfemto::HadTpcNSigmaPi,
206+
pihypertritonfemto::HadTofNSigmaPi,
207+
pihypertritonfemto::HypGenPt,
208+
pihypertritonfemto::HypGenEta,
209+
pihypertritonfemto::HypGenPhi,
210+
pihypertritonfemto::HypGenXDecVtx,
211+
pihypertritonfemto::HypGenYDecVtx,
212+
pihypertritonfemto::HypGenZDecVtx,
213+
pihypertritonfemto::HypIsReco,
214+
pihypertritonfemto::HypIsSignal,
215+
pihypertritonfemto::HypIsRecoMCCollision,
216+
pihypertritonfemto::HypIsSurvEvSel,
217+
pihypertritonfemto::HypIsTwoBodyDecay,
218+
pihypertritonfemto::HypStatusCode,
219+
pihypertritonfemto::HeGenPt,
220+
pihypertritonfemto::HeIsPhysicalPrimary,
221+
pihypertritonfemto::DecayPiIsPhysicalPrimary,
222+
pihypertritonfemto::HadRecoPt,
223+
pihypertritonfemto::HadRecoEta,
224+
pihypertritonfemto::HadRecoPhi,
225+
pihypertritonfemto::HadGenPt,
226+
pihypertritonfemto::HadGenEta,
227+
pihypertritonfemto::HadGenPhi,
228+
pihypertritonfemto::HadIsPhysicalPrimary,
229+
pihypertritonfemto::HadProcess,
230+
pihypertritonfemto::SameMCCollision,
231+
pihypertritonfemto::MatchesHypRecoMCCollision,
232+
pihypertritonfemto::MatchesPairRecoMCCollision,
233+
pihypertritonfemto::IsTruthSelfCorrelation,
234+
pihypertritonfemto::IsTruePrimaryHadHyperPair,
235+
pihypertritonfemto::HadIsTruePion);
236+
237+
} // namespace o2::aod
238+
239+
#endif // PWGLF_DATAMODEL_LFPIHYPERTRITONFEMTOTABLES_H_

PWGLF/TableProducer/Nuspex/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ o2physics_add_dpl_workflow(he3hadronfemto
4949
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
5050
COMPONENT_NAME Analysis)
5151

52+
o2physics_add_dpl_workflow(pi-hypertriton-femto
53+
SOURCES piHypertritonFemto.cxx
54+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils
55+
COMPONENT_NAME Analysis)
56+
5257
o2physics_add_dpl_workflow(nuclei-spectra
5358
SOURCES nucleiSpectra.cxx
5459
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsBase O2Physics::EventFilteringUtils

0 commit comments

Comments
 (0)