Skip to content

Commit adbcb04

Browse files
prottayCMTProttay Das
andauthored
[PWGLF] tree for xistarkaon correlation (#17800)
Co-authored-by: Prottay Das <prottay@alipap1.cern.ch>
1 parent 46f01bc commit adbcb04

3 files changed

Lines changed: 1587 additions & 0 deletions

File tree

Lines changed: 379 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,379 @@
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 LFReducedXi1530KaonTables.h
13+
/// \brief Reduced data model for Xi(1530)^0--K femtoscopy.
14+
///
15+
/// The Xi(1530) candidate stores two independent uint64_t selection words:
16+
/// * TrackSelectionBits: daughter PID / track-quality / prompt-pion DCAz;
17+
/// * TopologySelectionBits: Lambda/V0 and Xi/cascade topology, mass and
18+
/// lifetime working points.
19+
///
20+
/// This split keeps the table compact while retaining both:
21+
/// * the Xi(1530) analysis-note working points/systematic variations; and
22+
/// * the pp Xi-candidate selections used in Run 3 strangeness production.
23+
///
24+
///
25+
/// External-kaon DCA choices remain in a compact uint8_t bitmap; raw TPC/TOF
26+
/// n-sigma values are retained for downstream PID studies.
27+
28+
#ifndef PWGLF_DATAMODEL_LFREDUCEDXI1530KAONTABLES_H_
29+
#define PWGLF_DATAMODEL_LFREDUCEDXI1530KAONTABLES_H_
30+
31+
#include <Framework/ASoA.h>
32+
#include <Framework/AnalysisDataModel.h>
33+
34+
#include <cmath>
35+
#include <cstdint>
36+
37+
namespace o2::aod
38+
{
39+
40+
namespace redxistark
41+
{
42+
// +1: Xi- pi+ US; -1: anti-Xi+ pi- US; +2/-2: corresponding LS controls.
43+
enum XiStarChannel : int8_t {
44+
kXiStarUS = +1,
45+
kAntiXiStarUS = -1,
46+
kXiStarLS = +2,
47+
kAntiXiStarLS = -2
48+
};
49+
50+
// -----------------------------------------------------------------------------
51+
// TRACK/PID SELECTION WORD
52+
// -----------------------------------------------------------------------------
53+
// Bit positions only; numerical thresholds live in producer Configurables.
54+
enum XiStarTrackSelBit : uint8_t {
55+
// Prompt Xi* pion, recipe A:
56+
// no TOF -> TPC only; TOF -> circular sqrt(TPC^2+TOF^2).
57+
kPiFirstPID3Sigma = 0,
58+
kPiFirstPID4Sigma,
59+
kPiFirstPID5Sigma,
60+
kPiFirstPID6Sigma,
61+
62+
// Prompt Xi* pion, recipe B:
63+
// TPC-only below configurable pT threshold, circular above it.
64+
kPiFirstPtThresholdPID3Sigma,
65+
kPiFirstPtThresholdPID4Sigma,
66+
kPiFirstPtThresholdPID5Sigma,
67+
kPiFirstPtThresholdPID6Sigma,
68+
69+
// Prompt Xi* pion, pure TPC-only PID. These bits allow the analysis
70+
// to reproduce a TPC-only "all pion tracks" PID strategy downstream,
71+
// independent of whether the prompt pion also has TOF information.
72+
kPiFirstTPC3Sigma,
73+
kPiFirstTPC4Sigma,
74+
kPiFirstTPC5Sigma,
75+
kPiFirstTPC6Sigma,
76+
77+
// Xi bachelor pion, availability-based hybrid PID.
78+
kXiBachelorPiHybridPID3Sigma,
79+
kXiBachelorPiHybridPID4Sigma,
80+
kXiBachelorPiHybridPID5Sigma,
81+
kXiBachelorPiHybridPID6Sigma,
82+
83+
// Xi bachelor pion, TPC-only PID. The 4.8-sigma point reproduces the
84+
// dedicated pp-Xi table.
85+
kXiBachelorPiTPC3Sigma,
86+
kXiBachelorPiTPC4Sigma,
87+
kXiBachelorPiTPC4p8Sigma,
88+
kXiBachelorPiTPC5Sigma,
89+
kXiBachelorPiTPC6Sigma,
90+
91+
// Lambda daughter pion: TPC only.
92+
kLambdaPiTPC3Sigma,
93+
kLambdaPiTPC4Sigma,
94+
kLambdaPiTPC4p8Sigma,
95+
kLambdaPiTPC5Sigma,
96+
kLambdaPiTPC6Sigma,
97+
98+
// Lambda daughter proton: TPC only.
99+
kLambdaPrTPC3Sigma,
100+
kLambdaPrTPC4Sigma,
101+
kLambdaPrTPC5Sigma,
102+
kLambdaPrTPC6Sigma,
103+
104+
// Prompt-pion quality.
105+
kPiFirstTPCRows70,
106+
kPiFirstTPCRows80,
107+
kPiFirstTPCRows90,
108+
kPiFirstDCAz1cm,
109+
kPiFirstDCAzDefault,
110+
kPiFirstDCAz0p1cm,
111+
112+
// Cascade-daughter quality.
113+
kAllCascDaughtersTPCRows50,
114+
kV0DaughtersTPCRows70,
115+
kV0DaughtersTPCRowsVar1,
116+
kV0DaughtersTPCRowsVar2,
117+
118+
kNXiStarTrackSelBits
119+
};
120+
static_assert(kNXiStarTrackSelBits <= 64, "Xi(1530) track-selection bitmap exceeds uint64_t capacity");
121+
122+
constexpr uint64_t xiStarTrackSelMask(XiStarTrackSelBit bit)
123+
{
124+
return uint64_t{1} << static_cast<uint8_t>(bit);
125+
}
126+
127+
// -----------------------------------------------------------------------------
128+
// TOPOLOGY SELECTION WORD
129+
// -----------------------------------------------------------------------------
130+
enum XiStarTopoSelBit : uint8_t {
131+
// V0 daughter DCA to PV.
132+
kV0PionDcaPV005 = 0, // > 0.05 cm
133+
kV0PionDcaPV006, // > 0.06 cm
134+
kV0PionDcaPV010, // > 0.10 cm
135+
kV0PionDcaPV020, // > 0.20 cm (dedicated Lambda)
136+
137+
kV0ProtonDcaPV005, // > 0.05 cm
138+
kV0ProtonDcaPV006, // > 0.06 cm
139+
kV0ProtonDcaPV007, // > 0.07 cm (dedicated Lambda)
140+
kV0ProtonDcaPV010, // > 0.10 cm
141+
142+
// Keep the Xi(1530)-analysis convention requested by the analysis:
143+
// MINIMUM Lambda/V0 DCA to PV.
144+
kV0DcaPV000, // > 0.00 cm
145+
kV0DcaPV003, // > 0.03 cm
146+
kV0DcaPV010, // > 0.10 cm
147+
148+
// DCA between V0 daughters / native fitter metric.
149+
kV0DcaDaughters1p0, // < 1.0
150+
kV0DcaDaughters0p5, // < 0.5
151+
kV0DcaDaughters0p1, // < 0.1
152+
153+
// V0 pointing angle.
154+
kV0CosPA097,
155+
kV0CosPA098,
156+
kV0CosPA09876, // pp-Xi selection
157+
kV0CosPA099,
158+
kV0CosPA0995, // dedicated Lambda selection
159+
160+
// Minimum V0 radius.
161+
kV0Radius0p9,
162+
kV0Radius1p01,
163+
kV0Radius1p2, // pp-Xi selection
164+
kV0Radius2p5,
165+
kV0Radius3p0, // dedicated Lambda selection
166+
167+
// Lambda mass window.
168+
kLambdaMass10MeV,
169+
kLambdaMass8MeV,
170+
kLambdaMass6MeV,
171+
kLambdaMass11p6MeV, // pp-Xi selection
172+
173+
// Lambda proper lifetime. Var1/Var2 are reserved for future systematic
174+
// values; their defaults can equal the nominal until values are supplied.
175+
kV0LifetimeDefault,
176+
kV0LifetimeVar1,
177+
kV0LifetimeVar2,
178+
179+
// Xi bachelor DCA to PV.
180+
kCascBachelorDcaPV005,
181+
kCascBachelorDcaPV006,
182+
kCascBachelorDcaPV010,
183+
184+
// DCA between bachelor and V0 / native cascade fitter metric.
185+
kCascDcaDaughters1p0,
186+
kCascDcaDaughters0p25,
187+
kCascDcaDaughters0p20,
188+
189+
// Cascade pointing angle.
190+
kCascCosPA097,
191+
kCascCosPA098,
192+
kCascCosPA09947, // pp-Xi selection
193+
kCascCosPA0995,
194+
195+
// Minimum cascade radius.
196+
kCascRadius0p9,
197+
kCascRadius1p0, // pp-Xi selection
198+
kCascRadius1p01,
199+
kCascRadius1p3,
200+
201+
// Xi mass window used by the Xi(1530) analysis.
202+
kXiMass10MeV,
203+
kXiMass8MeV,
204+
kXiMass6MeV,
205+
206+
// Xi proper-lifetime working points (mL/p in cm).
207+
// Numerical thresholds are Configurable in the producer.
208+
kXiLifetimeDefault, // default: 22.6 cm (~4.6*c*tau_Xi)
209+
kXiLifetimeVar1, // default variation: 15 cm
210+
kXiLifetimeVar2, // default variation: 12 cm
211+
212+
// Additional pp-Xi cuts.
213+
kBachBaryonDCAxy0020, // > 0.020 cm
214+
kXiRapidity05, // |y_Xi| < 0.5
215+
216+
kNXiStarTopoSelBits
217+
};
218+
static_assert(kNXiStarTopoSelBits <= 64, "Xi(1530) topology-selection bitmap exceeds uint64_t capacity");
219+
220+
constexpr uint64_t xiStarTopoSelMask(XiStarTopoSelBit bit)
221+
{
222+
return uint64_t{1} << static_cast<uint8_t>(bit);
223+
}
224+
225+
} // namespace redxistark
226+
227+
// -----------------------------------------------------------------------------
228+
// Event table
229+
// -----------------------------------------------------------------------------
230+
namespace redxistarkevent
231+
{
232+
DECLARE_SOA_COLUMN(FT0MPercentile, fT0MPercentile, float); //! FT0M multiplicity percentile (%)
233+
DECLARE_SOA_COLUMN(Bz, bz, float); //! nominal L3 magnetic field along z (T)
234+
} // namespace redxistarkevent
235+
236+
DECLARE_SOA_TABLE(RedXiStarKEvents, "AOD", "REDXSTKEVENT",
237+
o2::soa::Index<>,
238+
collision::PosZ,
239+
collision::NumContrib,
240+
redxistarkevent::FT0MPercentile,
241+
redxistarkevent::Bz);
242+
using RedXiStarKEvent = RedXiStarKEvents::iterator;
243+
244+
// -----------------------------------------------------------------------------
245+
// Xi(1530) candidate table
246+
// -----------------------------------------------------------------------------
247+
namespace redxistarcandidate
248+
{
249+
DECLARE_SOA_INDEX_COLUMN(RedXiStarKEvent, redXiStarKEvent);
250+
251+
DECLARE_SOA_COLUMN(Channel, channel, int8_t);
252+
DECLARE_SOA_COLUMN(Px, px, float);
253+
DECLARE_SOA_COLUMN(Py, py, float);
254+
DECLARE_SOA_COLUMN(Pz, pz, float);
255+
DECLARE_SOA_COLUMN(Mass, mass, float); //! reconstructed M(Xi pi)
256+
257+
DECLARE_SOA_COLUMN(TrackSelectionBits, trackSelectionBits, uint64_t);
258+
DECLARE_SOA_COLUMN(TopologySelectionBits, topologySelectionBits, uint64_t);
259+
260+
// Prompt-pion kinematics are stored for downstream CPR QA. The three
261+
// displaced Xi daughters remain ID-only.
262+
DECLARE_SOA_COLUMN(XiStarPionPt, xiStarPionPt, float);
263+
DECLARE_SOA_COLUMN(XiStarPionEta, xiStarPionEta, float);
264+
DECLARE_SOA_COLUMN(XiStarPionPhi, xiStarPionPhi, float);
265+
DECLARE_SOA_COLUMN(XiStarPionIndex, xiStarPionIndex, int64_t);
266+
DECLARE_SOA_COLUMN(XiBachelorIndex, xiBachelorIndex, int64_t);
267+
DECLARE_SOA_COLUMN(V0PositiveIndex, v0PositiveIndex, int64_t);
268+
DECLARE_SOA_COLUMN(V0NegativeIndex, v0NegativeIndex, int64_t);
269+
270+
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float px, float py) -> float {
271+
return std::sqrt(px * px + py * py);
272+
});
273+
DECLARE_SOA_DYNAMIC_COLUMN(P, p, [](float px, float py, float pz) -> float {
274+
return std::sqrt(px * px + py * py + pz * pz);
275+
});
276+
DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, [](float px, float py, float pz) -> float {
277+
const float pt = std::sqrt(px * px + py * py);
278+
return pt > 0.f ? std::asinh(pz / pt) : 0.f;
279+
});
280+
DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, [](float px, float py) -> float {
281+
return std::atan2(py, px);
282+
});
283+
} // namespace redxistarcandidate
284+
285+
DECLARE_SOA_TABLE(XiStarCandidates, "AOD", "REDXSTARCAND",
286+
o2::soa::Index<>,
287+
redxistarcandidate::RedXiStarKEventId,
288+
redxistarcandidate::Channel,
289+
redxistarcandidate::Px,
290+
redxistarcandidate::Py,
291+
redxistarcandidate::Pz,
292+
redxistarcandidate::Mass,
293+
redxistarcandidate::TrackSelectionBits,
294+
redxistarcandidate::TopologySelectionBits,
295+
redxistarcandidate::XiStarPionPt,
296+
redxistarcandidate::XiStarPionEta,
297+
redxistarcandidate::XiStarPionPhi,
298+
redxistarcandidate::XiStarPionIndex,
299+
redxistarcandidate::XiBachelorIndex,
300+
redxistarcandidate::V0PositiveIndex,
301+
redxistarcandidate::V0NegativeIndex,
302+
redxistarcandidate::Pt<redxistarcandidate::Px, redxistarcandidate::Py>,
303+
redxistarcandidate::P<redxistarcandidate::Px, redxistarcandidate::Py, redxistarcandidate::Pz>,
304+
redxistarcandidate::Eta<redxistarcandidate::Px, redxistarcandidate::Py, redxistarcandidate::Pz>,
305+
redxistarcandidate::Phi<redxistarcandidate::Px, redxistarcandidate::Py>);
306+
using XiStarCandidate = XiStarCandidates::iterator;
307+
308+
// -----------------------------------------------------------------------------
309+
// External primary-kaon table
310+
// -----------------------------------------------------------------------------
311+
namespace redxistarkaon
312+
{
313+
DECLARE_SOA_INDEX_COLUMN(RedXiStarKEvent, redXiStarKEvent);
314+
315+
enum KaonSelBit : uint8_t {
316+
kKaonDCAxyDefault = 0,
317+
kKaonDCAxyVar1,
318+
kKaonDCAxyVar2,
319+
kKaonDCAzDefault,
320+
kKaonDCAzVar1,
321+
kKaonDCAzVar2,
322+
kNKaonSelBits
323+
};
324+
static_assert(kNKaonSelBits <= 8, "Kaon selection bitmap exceeds uint8_t capacity");
325+
326+
constexpr uint8_t kaonSelMask(KaonSelBit bit)
327+
{
328+
return uint8_t{1} << static_cast<uint8_t>(bit);
329+
}
330+
331+
DECLARE_SOA_COLUMN(Charge, charge, int8_t);
332+
DECLARE_SOA_COLUMN(Px, px, float);
333+
DECLARE_SOA_COLUMN(Py, py, float);
334+
DECLARE_SOA_COLUMN(Pz, pz, float);
335+
DECLARE_SOA_COLUMN(TrackIndex, trackIndex, int64_t);
336+
DECLARE_SOA_COLUMN(SelectionBits, selectionBits, uint8_t);
337+
338+
DECLARE_SOA_COLUMN(TPCNClsCrossedRows, tPCNClsCrossedRows, uint8_t);
339+
DECLARE_SOA_COLUMN(TPCNSigmaKa, tPCNSigmaKa, float);
340+
DECLARE_SOA_COLUMN(TOFNSigmaKa, tOFNSigmaKa, float);
341+
DECLARE_SOA_COLUMN(HasTOF, hasTOF, bool);
342+
343+
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float px, float py) -> float {
344+
return std::sqrt(px * px + py * py);
345+
});
346+
DECLARE_SOA_DYNAMIC_COLUMN(P, p, [](float px, float py, float pz) -> float {
347+
return std::sqrt(px * px + py * py + pz * pz);
348+
});
349+
DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, [](float px, float py, float pz) -> float {
350+
const float pt = std::sqrt(px * px + py * py);
351+
return pt > 0.f ? std::asinh(pz / pt) : 0.f;
352+
});
353+
DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, [](float px, float py) -> float {
354+
return std::atan2(py, px);
355+
});
356+
} // namespace redxistarkaon
357+
358+
DECLARE_SOA_TABLE(KaonCandidates, "AOD", "REDXSTARKAON",
359+
o2::soa::Index<>,
360+
redxistarkaon::RedXiStarKEventId,
361+
redxistarkaon::Charge,
362+
redxistarkaon::Px,
363+
redxistarkaon::Py,
364+
redxistarkaon::Pz,
365+
redxistarkaon::TrackIndex,
366+
redxistarkaon::SelectionBits,
367+
redxistarkaon::TPCNClsCrossedRows,
368+
redxistarkaon::TPCNSigmaKa,
369+
redxistarkaon::TOFNSigmaKa,
370+
redxistarkaon::HasTOF,
371+
redxistarkaon::Pt<redxistarkaon::Px, redxistarkaon::Py>,
372+
redxistarkaon::P<redxistarkaon::Px, redxistarkaon::Py, redxistarkaon::Pz>,
373+
redxistarkaon::Eta<redxistarkaon::Px, redxistarkaon::Py, redxistarkaon::Pz>,
374+
redxistarkaon::Phi<redxistarkaon::Px, redxistarkaon::Py>);
375+
using KaonCandidate = KaonCandidates::iterator;
376+
377+
} // namespace o2::aod
378+
379+
#endif // PWGLF_DATAMODEL_LFREDUCEDXI1530KAONTABLES_H_

PWGLF/TableProducer/Resonances/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,8 @@ o2physics_add_dpl_workflow(resonance-tree-creator
6464
SOURCES resonanceTreeCreator.cxx
6565
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
6666
COMPONENT_NAME Analysis)
67+
68+
o2physics_add_dpl_workflow(xi1530kaonreducedtable
69+
SOURCES xi1530kaonreducedtable.cxx
70+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
71+
COMPONENT_NAME Analysis)

0 commit comments

Comments
 (0)