forked from AliceO2Group/O2Physics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLFKinkDecayTables.h
More file actions
160 lines (132 loc) · 10.2 KB
/
LFKinkDecayTables.h
File metadata and controls
160 lines (132 loc) · 10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
///
/// \file LFKinkDecayTables.h
/// \brief Slim tables for kinks
/// \author Francesco Mazzaschi <francesco.mazzaschi@cern.ch>
///
#include "Common/Core/RecoDecay.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#ifndef PWGLF_DATAMODEL_LFKINKDECAYTABLES_H_
#define PWGLF_DATAMODEL_LFKINKDECAYTABLES_H_
namespace o2::aod
{
namespace kinkcand
{
DECLARE_SOA_INDEX_COLUMN_FULL(TrackMoth, trackMoth, int, TracksIU, "_Moth"); //!
DECLARE_SOA_INDEX_COLUMN_FULL(TrackDaug, trackDaug, int, TracksIU, "_Daug"); //!
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_COLUMN(XDecVtx, xDecVtx, float); //! Decay vertex of the candidate (x direction)
DECLARE_SOA_COLUMN(YDecVtx, yDecVtx, float); //! Decay vertex of the candidate (y direction)
DECLARE_SOA_COLUMN(ZDecVtx, zDecVtx, float); //! Decay vertex of the candidate (z direction)
DECLARE_SOA_COLUMN(PxMoth, pxMoth, float); //! Px of the mother kink
DECLARE_SOA_COLUMN(PyMoth, pyMoth, float); //! Py of the mother kink
DECLARE_SOA_COLUMN(PzMoth, pzMoth, float); //! Pz of the mother kink
DECLARE_SOA_COLUMN(PxDaug, pxDaug, float); //! Px of the daughter kink
DECLARE_SOA_COLUMN(PyDaug, pyDaug, float); //! Py of the daughter kink
DECLARE_SOA_COLUMN(PzDaug, pzDaug, float); //! Pz of the daughter kink
DECLARE_SOA_COLUMN(MothSign, mothSign, int); //! Sign of the mother kink
DECLARE_SOA_COLUMN(DcaMothPv, dcaMothPv, float); //! DCA of the mother to the primary vertex
DECLARE_SOA_COLUMN(DcaDaugPv, dcaDaugPv, float); //! DCA of the daughter kink to the primary vertex
DECLARE_SOA_COLUMN(DcaKinkTopo, dcaKinkTopo, float); //! DCA of the kink topology
DECLARE_SOA_COLUMN(NSigmaTPCPi, nSigmaTPCPi, float); //! Number of sigmas for the pion candidate from Sigma kink in TPC
DECLARE_SOA_COLUMN(NSigmaTPCPr, nSigmaTPCPr, float); //! Number of sigmas for the proton candidate from Sigma kink in TPC
DECLARE_SOA_COLUMN(NSigmaTPCKa, nSigmaTPCKa, float); //! Number of sigmas for the kaon candidate from Sigma kink in TPC
DECLARE_SOA_COLUMN(NSigmaTOFPi, nSigmaTOFPi, float); //! Number of sigmas for the pion candidate from Sigma kink in TOF
DECLARE_SOA_COLUMN(NSigmaTOFPr, nSigmaTOFPr, float); //! Number of sigmas for the proton candidate from Sigma kink in TOF
DECLARE_SOA_COLUMN(NSigmaTOFKa, nSigmaTOFKa, float); //! Number of sigmas for the kaon candidate from Sigma kink in TOF
// MC Columns
DECLARE_SOA_COLUMN(MothPdgCode, mothPdgCode, int); //! PDG code of the Sigma daughter
DECLARE_SOA_COLUMN(DaugPdgCode, daugPdgCode, int); //! PDG code of the kink daughter
DECLARE_SOA_COLUMN(PtMC, ptMC, float); //! pT of the candidate in MC
DECLARE_SOA_COLUMN(MassMC, massMC, float); //! Invariant mass of the candidate in MC
DECLARE_SOA_COLUMN(DecayRadiusMC, decayRadiusMC, float); //! Decay radius of the candidate in MC
DECLARE_SOA_COLUMN(CollisionIdCheck, collisionIdCheck, bool); //! Check if mcDaughter collision ID matches the reconstructed collision ID
// DYNAMIC COLUMNS
DECLARE_SOA_DYNAMIC_COLUMN(PxDaugNeut, pxDaugNeut, //! Px of the daughter neutral particle
[](float pxmoth, float pxdau) -> float { return pxmoth - pxdau; });
DECLARE_SOA_DYNAMIC_COLUMN(PyDaugNeut, pyDaugNeut, //! Py of the daughter neutral particle
[](float pymoth, float pydau) -> float { return pymoth - pydau; });
DECLARE_SOA_DYNAMIC_COLUMN(PzDaugNeut, pzDaugNeut, //! Pz of the daughter neutral particle
[](float pzmoth, float pzdau) -> float { return pzmoth - pzdau; });
DECLARE_SOA_DYNAMIC_COLUMN(PtMoth, ptMoth, //! pT of the mother kink
[](float pxmoth, float pymoth) -> float { return std::hypot(pxmoth, pymoth); });
DECLARE_SOA_DYNAMIC_COLUMN(PtDaug, ptDaug, //!
[](float pxdaug, float pydaug) -> float { return std::hypot(pxdaug, pydaug); });
DECLARE_SOA_DYNAMIC_COLUMN(MSigmaMinus, mSigmaMinus, //! mass under sigma minus hypothesis
[](float pxmoth, float pymoth, float pzmoth, float pxch, float pych, float pzch) -> float {
float pxneut = pxmoth - pxch;
float pyneut = pymoth - pych;
float pzneut = pzmoth - pzch;
return RecoDecay::m(std::array{std::array{pxch, pych, pzch}, std::array{pxneut, pyneut, pzneut}}, std::array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassNeutron}); });
DECLARE_SOA_DYNAMIC_COLUMN(MSigmaPlus, mSigmaPlus, //! mass under sigma plus hypothesis
[](float pxmoth, float pymoth, float pzmoth, float pxch, float pych, float pzch) -> float {
float pxneut = pxmoth - pxch;
float pyneut = pymoth - pych;
float pzneut = pzmoth - pzch;
return RecoDecay::m(std::array{std::array{pxch, pych, pzch}, std::array{pxneut, pyneut, pzneut}}, std::array{o2::constants::physics::MassProton, o2::constants::physics::MassPionNeutral}); });
DECLARE_SOA_DYNAMIC_COLUMN(MXiMinus, mXiMinus, //! mass under Xi minus hypothesis
[](float pxmoth, float pymoth, float pzmoth, float pxch, float pych, float pzch) -> float {
float pxneut = pxmoth - pxch;
float pyneut = pymoth - pych;
float pzneut = pzmoth - pzch;
return RecoDecay::m(std::array{std::array{pxch, pych, pzch}, std::array{pxneut, pyneut, pzneut}}, std::array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassLambda}); });
} // namespace kinkcand
DECLARE_SOA_TABLE(KinkCands, "AOD", "KINKCANDS",
o2::soa::Index<>, kinkcand::CollisionId, kinkcand::TrackMothId, kinkcand::TrackDaugId,
kinkcand::XDecVtx, kinkcand::YDecVtx, kinkcand::ZDecVtx,
kinkcand::MothSign, kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth,
kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug,
kinkcand::DcaMothPv, kinkcand::DcaDaugPv, kinkcand::DcaKinkTopo,
// dynamic columns
kinkcand::PxDaugNeut<kinkcand::PxMoth, kinkcand::PxDaug>,
kinkcand::PyDaugNeut<kinkcand::PyMoth, kinkcand::PyDaug>,
kinkcand::PzDaugNeut<kinkcand::PzMoth, kinkcand::PzDaug>,
kinkcand::PtMoth<kinkcand::PxMoth, kinkcand::PyMoth>,
kinkcand::PtDaug<kinkcand::PxDaug, kinkcand::PyDaug>,
kinkcand::MSigmaMinus<kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug>,
kinkcand::MSigmaPlus<kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug>,
kinkcand::MXiMinus<kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug>);
DECLARE_SOA_TABLE(KinkCandsUnbound, "AOD", "UBKINKCANDS",
o2::soa::Index<>, kinkcand::XDecVtx, kinkcand::YDecVtx, kinkcand::ZDecVtx,
kinkcand::MothSign, kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth,
kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug,
kinkcand::DcaMothPv, kinkcand::DcaDaugPv, kinkcand::DcaKinkTopo,
// dynamic columns
kinkcand::PxDaugNeut<kinkcand::PxMoth, kinkcand::PxDaug>,
kinkcand::PyDaugNeut<kinkcand::PyMoth, kinkcand::PyDaug>,
kinkcand::PzDaugNeut<kinkcand::PzMoth, kinkcand::PzDaug>,
kinkcand::PtMoth<kinkcand::PxMoth, kinkcand::PyMoth>,
kinkcand::PtDaug<kinkcand::PxDaug, kinkcand::PyDaug>,
kinkcand::MSigmaMinus<kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug>,
kinkcand::MSigmaPlus<kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug>,
kinkcand::MXiMinus<kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth, kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug>);
DECLARE_SOA_TABLE(SlimKinkCands, "AOD", "SLIMKINKCANDS",
kinkcand::XDecVtx, kinkcand::YDecVtx, kinkcand::ZDecVtx,
kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth,
kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug,
kinkcand::DcaMothPv, kinkcand::DcaDaugPv, kinkcand::DcaKinkTopo,
kinkcand::MothSign,
kinkcand::NSigmaTPCPi, kinkcand::NSigmaTPCPr, kinkcand::NSigmaTPCKa,
kinkcand::NSigmaTOFPi, kinkcand::NSigmaTOFPr, kinkcand::NSigmaTOFKa);
DECLARE_SOA_TABLE(SlimKinkCandsMC, "AOD", "SLIMKINKCANDSMC",
kinkcand::XDecVtx, kinkcand::YDecVtx, kinkcand::ZDecVtx,
kinkcand::PxMoth, kinkcand::PyMoth, kinkcand::PzMoth,
kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug,
kinkcand::DcaMothPv, kinkcand::DcaDaugPv, kinkcand::DcaKinkTopo,
kinkcand::MothSign,
kinkcand::NSigmaTPCPi, kinkcand::NSigmaTPCPr, kinkcand::NSigmaTPCKa,
kinkcand::NSigmaTOFPi, kinkcand::NSigmaTOFPr, kinkcand::NSigmaTOFKa,
kinkcand::MothPdgCode, kinkcand::DaugPdgCode,
kinkcand::PtMC, kinkcand::MassMC, kinkcand::DecayRadiusMC, kinkcand::CollisionIdCheck);
} // namespace o2::aod
#endif // PWGLF_DATAMODEL_LFKINKDECAYTABLES_H_