-
Notifications
You must be signed in to change notification settings - Fork 643
Expand file tree
/
Copy pathtpcSkimsTableCreator.h
More file actions
166 lines (146 loc) · 6.26 KB
/
tpcSkimsTableCreator.h
File metadata and controls
166 lines (146 loc) · 6.26 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
161
162
163
164
165
166
// 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 tpcSkimsTableCreator.h
/// \author Annalena Kalteyer <[email protected]>
/// \author Christian Sonnabend <[email protected]>
/// \author Jeremy Wilkinson <[email protected]>
/// \author Ana Marin <[email protected]>
/// \author Oleksii Lubynets <[email protected]>
/// \brief Creates clean samples of particles for PID fits
#ifndef DPG_TASKS_TPC_TPCSKIMSTABLECREATOR_H_
#define DPG_TASKS_TPC_TPCSKIMSTABLECREATOR_H_
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/OccupancyTables.h"
#include <Framework/AnalysisDataModel.h>
#include <ReconstructionDataFormats/PID.h>
#include <cstdint>
namespace o2::aod
{
namespace tpcskims
{
DECLARE_SOA_COLUMN(InvDeDxExpTPC, invDeDxExpTPC, float);
DECLARE_SOA_COLUMN(Mass, mass, float);
DECLARE_SOA_COLUMN(BetaGamma, betaGamma, float);
DECLARE_SOA_COLUMN(NormMultTPC, normMultTPC, float);
DECLARE_SOA_COLUMN(NormNClustersTPC, normNClustersTPC, float);
DECLARE_SOA_COLUMN(NormNClustersTPCPID, normNClustersTPCPID, float);
DECLARE_SOA_COLUMN(PidIndex, pidIndex, uint8_t);
DECLARE_SOA_COLUMN(NSigTPC, nSigTPC, float);
DECLARE_SOA_COLUMN(NSigTOF, nSigTOF, float);
DECLARE_SOA_COLUMN(NSigITS, nSigITS, float);
DECLARE_SOA_COLUMN(AlphaV0, alphaV0, float);
DECLARE_SOA_COLUMN(QtV0, qtV0, float);
DECLARE_SOA_COLUMN(CosPAV0, cosPAV0, float);
DECLARE_SOA_COLUMN(PtV0, ptV0, float);
DECLARE_SOA_COLUMN(RadiusV0, radiusV0, float);
DECLARE_SOA_COLUMN(GammaPsiPair, gammaPsiPair, float);
DECLARE_SOA_COLUMN(RunNumber, runNumber, int);
DECLARE_SOA_COLUMN(TrackOcc, trackOcc, float);
DECLARE_SOA_COLUMN(Ft0Occ, ft0Occ, float);
DECLARE_SOA_COLUMN(OccMedianTime, occMedianTime, float);
DECLARE_SOA_COLUMN(HadronicRate, hadronicRate, float);
DECLARE_SOA_COLUMN(BcGlobalIndex, bcGlobalIndex, int);
DECLARE_SOA_COLUMN(BcTimeFrameId, bcTimeFrameId, int);
DECLARE_SOA_COLUMN(BcBcInTimeFrame, bcBcInTimeFrame, int);
} // namespace tpcskims
#define TPCSKIMS_COLUMNS_BASE \
o2::aod::track::TPCSignal, \
tpcskims::InvDeDxExpTPC, \
o2::aod::track::TPCInnerParam, \
o2::aod::track::Tgl, \
o2::aod::track::Signed1Pt, \
o2::aod::track::Eta, \
o2::aod::track::Phi, \
o2::aod::track::Y, \
tpcskims::Mass, \
tpcskims::BetaGamma, \
tpcskims::NormMultTPC, \
tpcskims::NormNClustersTPC, \
tpcskims::NormNClustersTPCPID, \
tpcskims::PidIndex, \
tpcskims::NSigTPC, \
tpcskims::NSigTOF, \
tpcskims::NSigITS, \
tpcskims::RunNumber, \
tpcskims::TrackOcc, \
tpcskims::Ft0Occ, \
tpcskims::OccMedianTime, \
tpcskims::HadronicRate, \
o2::aod::trackqa::TPCdEdxNorm
#define TPCSKIMS_COLUMNS_V0 \
TPCSKIMS_COLUMNS_BASE, \
tpcskims::AlphaV0, \
tpcskims::QtV0, \
tpcskims::CosPAV0, \
tpcskims::PtV0, \
tpcskims::RadiusV0, \
tpcskims::GammaPsiPair
#define TPCSKIMS_COLUMNS_TOF \
TPCSKIMS_COLUMNS_BASE
#define TPCSKIMS_COLUMNS_TRACK_QA \
tpcskims::BcGlobalIndex, \
tpcskims::BcTimeFrameId, \
tpcskims::BcBcInTimeFrame, \
o2::aod::trackqa::TPCClusterByteMask, \
o2::aod::trackqa::TPCdEdxMax0R, \
o2::aod::trackqa::TPCdEdxMax1R, \
o2::aod::trackqa::TPCdEdxMax2R, \
o2::aod::trackqa::TPCdEdxMax3R, \
o2::aod::trackqa::TPCdEdxTot0R, \
o2::aod::trackqa::TPCdEdxTot1R, \
o2::aod::trackqa::TPCdEdxTot2R, \
o2::aod::trackqa::TPCdEdxTot3R, \
o2::aod::trackmeanocc::TmoPrimUnfm80, \
o2::aod::trackmeanocc::TmoFV0AUnfm80, \
o2::aod::trackmeanocc::TmoFT0AUnfm80, \
o2::aod::trackmeanocc::TmoFT0CUnfm80, \
o2::aod::trackmeanocc::TmoRobustT0V0PrimUnfm80, \
o2::aod::trackmeanocc::TwmoPrimUnfm80, \
o2::aod::trackmeanocc::TwmoFV0AUnfm80, \
o2::aod::trackmeanocc::TwmoFT0AUnfm80, \
o2::aod::trackmeanocc::TwmoFT0CUnfm80, \
o2::aod::trackmeanocc::TwmoRobustT0V0PrimUnfm80
DECLARE_SOA_TABLE(SkimmedTPCV0Tree, "AOD", "TPCSKIMV0TREE",
TPCSKIMS_COLUMNS_V0);
DECLARE_SOA_TABLE(SkimmedTPCV0TreeWithTrkQA, "AOD", "TPCSKIMV0WQA",
TPCSKIMS_COLUMNS_V0,
TPCSKIMS_COLUMNS_TRACK_QA);
DECLARE_SOA_TABLE(SkimmedTPCTOFTree, "AOD", "TPCTOFSKIMTREE",
TPCSKIMS_COLUMNS_TOF);
DECLARE_SOA_TABLE(SkimmedTPCTOFTreeWithTrkQA, "AOD", "TPCTOFSKIMWQA",
TPCSKIMS_COLUMNS_TOF,
TPCSKIMS_COLUMNS_TRACK_QA);
#undef TPCSKIMS_COLUMNS_TRACK_QA
#undef TPCSKIMS_COLUMNS_TOF
#undef TPCSKIMS_COLUMNS_V0
#undef TPCSKIMS_COLUMNS_BASE
} // namespace o2::aod
namespace o2::dpg_tpcskimstablecreator
{
enum {
ModeStandard = 0,
ModeWithdEdxTrkQA,
ModeWithTrkQA
};
constexpr o2::track::PID::ID PidElectron{o2::track::PID::Electron};
constexpr o2::track::PID::ID PidPion{o2::track::PID::Pion};
constexpr o2::track::PID::ID PidKaon{o2::track::PID::Kaon};
constexpr o2::track::PID::ID PidProton{o2::track::PID::Proton};
constexpr o2::track::PID::ID PidDeuteron{o2::track::PID::Deuteron};
constexpr o2::track::PID::ID PidTriton{o2::track::PID::Triton};
constexpr int UndefValueInt{-999};
constexpr float UndefValueFloat{-999.f};
constexpr double UndefValueDouble{-999.};
// an arbitrary big value to convert multiplicity into a value between 0 and 1
constexpr double MultiplicityNorm{11000.};
constexpr float OneToKilo{1e-3f};
} // namespace o2::dpg_tpcskimstablecreator
#endif // DPG_TASKS_TPC_TPCSKIMSTABLECREATOR_H_