Skip to content

Commit 2520da8

Browse files
authored
[PWGLF] PID updated (#11403)
1 parent 6b619db commit 2520da8

File tree

3 files changed

+329
-199
lines changed

3 files changed

+329
-199
lines changed

PWGLF/DataModel/LFHypernucleiKfTables.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ DECLARE_SOA_COLUMN(Svx, svx, float); //!
4545
DECLARE_SOA_COLUMN(Svy, svy, float); //!
4646
DECLARE_SOA_COLUMN(Svz, svz, float); //!
4747
DECLARE_SOA_COLUMN(Occupancy, occupancy, int); //!
48+
DECLARE_SOA_COLUMN(RunNumber, runNumber, int); //!
4849
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, [](float px, float py) { return RecoDecay::pt(std::array{px, py}); });
4950
DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float E, float pz) { return 0.5 * std::log((E + pz) / (E - pz)); });
5051
DECLARE_SOA_DYNAMIC_COLUMN(Mass, mass, [](float E, float px, float py, float pz) { return std::sqrt(E * E - px * px - py * py - pz * pz); });
@@ -80,7 +81,8 @@ DECLARE_SOA_TABLE(HypKfColls, "AOD", "HYPKFCOLL",
8081
cent::CentFT0A,
8182
cent::CentFT0C,
8283
cent::CentFT0M,
83-
hykfmc::Occupancy);
84+
hykfmc::Occupancy,
85+
hykfmc::RunNumber);
8486
using HypKfColl = HypKfColls::iterator;
8587

8688
namespace hykftrk
@@ -102,22 +104,22 @@ DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float pt, float eta, float mass) { return st
102104
DECLARE_SOA_DYNAMIC_COLUMN(Lambda, lambda, [](float eta) { return 1. / std::cosh(eta); });
103105
DECLARE_SOA_DYNAMIC_COLUMN(ItsNcluster, itsNcluster, [](uint32_t itsClusterSizes) {
104106
uint8_t n = 0;
105-
for (uint8_t i = 0; i < 7; i++) {
107+
for (uint8_t i = 0; i < 0x08; i++) {
106108
if (itsClusterSizes >> (4 * i) & 15)
107109
n++;
108110
}
109111
return n;
110112
});
111113
DECLARE_SOA_DYNAMIC_COLUMN(ItsFirstLayer, itsFirstLayer, [](uint32_t itsClusterSizes) {
112-
for (int i = 0; i < 8; i++) {
114+
for (int i = 0; i < 0x08; i++) {
113115
if (itsClusterSizes >> (4 * i) & 15)
114116
return i;
115117
}
116118
return -999;
117119
});
118120
DECLARE_SOA_DYNAMIC_COLUMN(ItsMeanClsSize, itsMeanClsSize, [](uint32_t itsClusterSizes) {
119121
int sum = 0, n = 0;
120-
for (int i = 0; i < 8; i++) {
122+
for (int i = 0; i < 0x08; i++) {
121123
sum += (itsClusterSizes >> (4 * i) & 15);
122124
if (itsClusterSizes >> (4 * i) & 15)
123125
n++;
@@ -194,9 +196,9 @@ DECLARE_SOA_DYNAMIC_COLUMN(Eta, eta, [](float px, float py, float pz) { return R
194196
DECLARE_SOA_DYNAMIC_COLUMN(Phi, phi, [](float px, float py) { return RecoDecay::phi(std::array{px, py}); });
195197
DECLARE_SOA_DYNAMIC_COLUMN(P, p, [](float px, float py, float pz) { return RecoDecay::p(px, py, pz); }); //
196198
DECLARE_SOA_DYNAMIC_COLUMN(Y, y, [](float px, float py, float pz, float mass) { return RecoDecay::y(std::array{px, py, pz}, mass); });
197-
DECLARE_SOA_DYNAMIC_COLUMN(McTrue, mcTrue, [](int hypKfMcPartId) { return hypKfMcPartId > 0; });
199+
DECLARE_SOA_DYNAMIC_COLUMN(McTrue, mcTrue, [](int hypKfMcPartId) { return hypKfMcPartId >= 0; });
198200
DECLARE_SOA_DYNAMIC_COLUMN(IsMatter, isMatter, [](int8_t species) { return species > 0; });
199-
DECLARE_SOA_DYNAMIC_COLUMN(Cascade, cascade, [](int hypDaughter) { return hypDaughter > 0; });
201+
DECLARE_SOA_DYNAMIC_COLUMN(Cascade, cascade, [](int hypDaughter) { return hypDaughter >= 0; });
200202
} // namespace hykfhyp
201203

202204
DECLARE_SOA_TABLE(HypKfHypNucs, "AOD", "HYPKFHYPNUC",

0 commit comments

Comments
 (0)