Skip to content

Commit cd60106

Browse files
authored
[PWGCF] FemtoUniverse: Add tables for full TOF and TPC nSigma, fix linter and code check issues (#17102)
1 parent 825c13f commit cd60106

3 files changed

Lines changed: 329 additions & 217 deletions

File tree

PWGCF/FemtoUniverse/DataModel/FemtoDerived.h

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <Framework/AnalysisDataModel.h>
2525
#include <Framework/Expressions.h>
2626

27+
#include <array>
2728
#include <cmath>
2829
#include <cstdint>
2930
#include <string_view>
@@ -75,8 +76,8 @@ enum ParticleType {
7576
kNParticleTypes //! Number of particle types
7677
};
7778

78-
static constexpr std::string_view ParticleTypeName[kNParticleTypes] = {"Tracks", "MCTruthTracks", "V0", "V0Child", "Cascade", "CascadeV0Child", "CascadeBachelor", "Phi", "PhiChild", "D0", "D0Child"}; //! Naming of the different particle types
79-
static constexpr std::string_view TempFitVarName[kNParticleTypes] = {"/hDCAxy", "/hPDGvspT", "/hCPA", "/hDCAxy", "/hCPA", "/hDCAxy", "/hInvMass", "/hDCAxy", "/hInvMass", "/hDCAxy"};
79+
static constexpr std::array<std::string_view, kNParticleTypes> ParticleTypeName = {"Tracks", "MCTruthTracks", "V0", "V0Child", "Cascade", "CascadeV0Child", "CascadeBachelor", "Phi", "PhiChild", "D0", "D0Child"}; //! Naming of the different particle types
80+
static constexpr std::array<std::string_view, kNParticleTypes> TempFitVarName = {"/hDCAxy", "/hPDGvspT", "/hCPA", "/hDCAxy", "/hCPA", "/hDCAxy", "/hInvMass", "/hDCAxy", "/hInvMass", "/hDCAxy"};
8081

8182
using CutContainerType = uint32_t; //! Definition of the data type for the bit-wise container for the different selection criteria
8283

@@ -88,7 +89,7 @@ enum TrackType {
8889
kNTrackTypes //! Number of child types
8990
};
9091

91-
static constexpr std::string_view TrackTypeName[kNTrackTypes] = {"Trk", "Pos", "Neg", "Bach"}; //! Naming of the different particle types
92+
static constexpr std::array<std::string_view, kNTrackTypes> TrackTypeName = {"Trk", "Pos", "Neg", "Bach"}; //! Naming of the different particle types
9293

9394
DECLARE_SOA_INDEX_COLUMN(FdCollision, fdCollision);
9495
DECLARE_SOA_COLUMN(Pt, pt, float); //! p_T (GeV/c)
@@ -123,13 +124,25 @@ DECLARE_SOA_DYNAMIC_COLUMN(P, p, //! Compute the overall momentum in GeV/c
123124
return pt * std::cosh(eta);
124125
});
125126

126-
DECLARE_SOA_COLUMN(ITSNSigmaEl, itsNSigmaEl, float); //! Nsigma separation with the Its detector for electron
127-
DECLARE_SOA_COLUMN(ITSNSigmaPi, itsNSigmaPi, float); //! Nsigma separation with the Its detector for pion
128-
DECLARE_SOA_COLUMN(ITSNSigmaKa, itsNSigmaKa, float); //! Nsigma separation with the Its detector for kaon
129-
DECLARE_SOA_COLUMN(ITSNSigmaPr, itsNSigmaPr, float); //! Nsigma separation with the Its detector for proton
130-
DECLARE_SOA_COLUMN(ITSNSigmaDe, itsNSigmaDe, float); //! Nsigma separation with the Its detector for deuteron
131-
DECLARE_SOA_COLUMN(ITSNSigmaTr, itsNSigmaTr, float); //! Nsigma separation with the Its detector for triton
132-
DECLARE_SOA_COLUMN(ITSNSigmaHe, itsNSigmaHe, float); //! Nsigma separation with the Its detector for helium3
127+
DECLARE_SOA_COLUMN(TofFullNSigmaEl, tofFullNSigmaEl, float); //! Nsigma separation with the TOF detector for electron
128+
DECLARE_SOA_COLUMN(TofFullNSigmaPi, tofFullNSigmaPi, float); //! Nsigma separation with the TOF detector for pion
129+
DECLARE_SOA_COLUMN(TofFullNSigmaKa, tofFullNSigmaKa, float); //! Nsigma separation with the TOF detector for kaon
130+
DECLARE_SOA_COLUMN(TofFullNSigmaPr, tofFullNSigmaPr, float); //! Nsigma separation with the TOF detector for proton
131+
DECLARE_SOA_COLUMN(TofFullNSigmaDe, tofFullNSigmaDe, float); //! Nsigma separation with the TOF detector for deuteron
132+
133+
DECLARE_SOA_COLUMN(TpcFullNSigmaEl, tpcFullNSigmaEl, float); //! Nsigma separation with the TPC detector for electron
134+
DECLARE_SOA_COLUMN(TpcFullNSigmaPi, tpcFullNSigmaPi, float); //! Nsigma separation with the TPC detector for pion
135+
DECLARE_SOA_COLUMN(TpcFullNSigmaKa, tpcFullNSigmaKa, float); //! Nsigma separation with the TPC detector for kaon
136+
DECLARE_SOA_COLUMN(TpcFullNSigmaPr, tpcFullNSigmaPr, float); //! Nsigma separation with the TPC detector for proton
137+
DECLARE_SOA_COLUMN(TpcFullNSigmaDe, tpcFullNSigmaDe, float); //! Nsigma separation with the TPC detector for deuteron
138+
139+
DECLARE_SOA_COLUMN(ItsNSigmaEl, itsNSigmaEl, float); //! Nsigma separation with the Its detector for electron
140+
DECLARE_SOA_COLUMN(ItsNSigmaPi, itsNSigmaPi, float); //! Nsigma separation with the Its detector for pion
141+
DECLARE_SOA_COLUMN(ItsNSigmaKa, itsNSigmaKa, float); //! Nsigma separation with the Its detector for kaon
142+
DECLARE_SOA_COLUMN(ItsNSigmaPr, itsNSigmaPr, float); //! Nsigma separation with the Its detector for proton
143+
DECLARE_SOA_COLUMN(ItsNSigmaDe, itsNSigmaDe, float); //! Nsigma separation with the Its detector for deuteron
144+
DECLARE_SOA_COLUMN(ItsNSigmaTr, itsNSigmaTr, float); //! Nsigma separation with the Its detector for triton
145+
DECLARE_SOA_COLUMN(ItsNSigmaHe, itsNSigmaHe, float); //! Nsigma separation with the Its detector for helium3
133146

134147
// debug variables
135148
DECLARE_SOA_COLUMN(Sign, sign, int8_t); //! Sign of the track charge
@@ -174,7 +187,7 @@ using FDParticle = FDParticles::iterator;
174187
/// FemtoUniverseCascadeTrack
175188
namespace femtouniversecascparticle
176189
{
177-
DECLARE_SOA_INDEX_COLUMN(FDParticle, fdParticle);
190+
DECLARE_SOA_INDEX_COLUMN(FDParticle, fdParticle); // o2-linter: disable=name/o2-column
178191
DECLARE_SOA_COLUMN(DcaV0daughters, dcaV0daughters, float); //! DCA between V0 daughters
179192
DECLARE_SOA_COLUMN(Cpav0, cpav0, float); //! V0 cos of pointing angle
180193
DECLARE_SOA_COLUMN(V0radius, v0radius, float); //! V0 transverse radius
@@ -230,12 +243,25 @@ DECLARE_SOA_TABLE(FDExtParticles, "AOD", "FDEXTPARTICLE",
230243
pidtof_tiny::TOFNSigmaDe<pidtof_tiny::TOFNSigmaStoreDe>);
231244
using FDFullParticle = FDExtParticles::iterator;
232245

246+
DECLARE_SOA_TABLE(FDSigmaParticles, "AOD", "FDSIGMAPARTICLE",
247+
femtouniverseparticle::TofFullNSigmaEl,
248+
femtouniverseparticle::TofFullNSigmaPi,
249+
femtouniverseparticle::TofFullNSigmaKa,
250+
femtouniverseparticle::TofFullNSigmaPr,
251+
femtouniverseparticle::TofFullNSigmaDe,
252+
femtouniverseparticle::TpcFullNSigmaEl,
253+
femtouniverseparticle::TpcFullNSigmaPi,
254+
femtouniverseparticle::TpcFullNSigmaKa,
255+
femtouniverseparticle::TpcFullNSigmaPr,
256+
femtouniverseparticle::TpcFullNSigmaDe);
257+
using FDSigmaParticle = FDSigmaParticles::iterator;
258+
233259
DECLARE_SOA_TABLE(FDItsParticles, "AOD", "FDITSPARTICLE",
234-
femtouniverseparticle::ITSNSigmaEl,
235-
femtouniverseparticle::ITSNSigmaPi,
236-
femtouniverseparticle::ITSNSigmaKa,
237-
femtouniverseparticle::ITSNSigmaPr,
238-
femtouniverseparticle::ITSNSigmaDe);
260+
femtouniverseparticle::ItsNSigmaEl,
261+
femtouniverseparticle::ItsNSigmaPi,
262+
femtouniverseparticle::ItsNSigmaKa,
263+
femtouniverseparticle::ItsNSigmaPr,
264+
femtouniverseparticle::ItsNSigmaDe);
239265
using FDItsParticle = FDItsParticles::iterator;
240266

241267
DECLARE_SOA_TABLE(FDCascParticles, "AOD", "FDCASCPARTICLE",
@@ -279,7 +305,7 @@ enum ParticleOriginMCTruth {
279305
};
280306

281307
//! Naming of the different OriginMCTruth types
282-
static constexpr std::string_view ParticleOriginMCTruthName[kNOriginMCTruthTypes] = {
308+
static constexpr std::array<std::string_view, kNOriginMCTruthTypes> ParticleOriginMCTruthName = {
283309
"_Primary",
284310
"_Daughter",
285311
"_Material",
@@ -297,7 +323,7 @@ enum MCType {
297323
kNMCTypes
298324
};
299325

300-
static constexpr std::string_view MCTypeName[kNMCTypes] = {"", "_MC"};
326+
static constexpr std::array<std::string_view, kNMCTypes> MCTypeName = {"", "_MC"};
301327

302328
DECLARE_SOA_COLUMN(PartOriginMCTruth, partOriginMCTruth, uint8_t); //! Origin of the particle, according to femtouniverseparticle::ParticleOriginMCTruth
303329
DECLARE_SOA_COLUMN(PdgMCTruth, pdgMCTruth, int); //! Particle PDG

0 commit comments

Comments
 (0)