Skip to content

Commit 3081997

Browse files
committed
rebase
1 parent 177676e commit 3081997

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

PWGLF/TableProducer/Nuspex/trHeAnalysis.cxx

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class Particle
136136
int charge;
137137
float resolution;
138138
std::vector<float> betheParams;
139-
static constexpr int kNumBetheParams = 5;
139+
static constexpr int nNumBetheParams = 5;
140140

141141
Particle(const std::string name_, int pdgCode_, float mass_, int charge_,
142142
LabeledArray<float> bethe)
@@ -150,7 +150,7 @@ class Particle
150150
bethe.get(name, "resolution"); // Access the "resolution" parameter
151151

152152
betheParams.clear();
153-
for (int i = 0; i < kNumBetheParams; ++i) {
153+
for (int i = 0; i < nNumBetheParams; ++i) {
154154
betheParams.push_back(bethe.get(name, i));
155155
}
156156
}
@@ -366,10 +366,11 @@ struct TrHeAnalysis {
366366
histos.fill(HIST("histogram/pT"), track.pt());
367367
histos.fill(HIST("histogram/p"), track.p());
368368
histos.fill(HIST("histogram/TPCsignVsTPCmomentum"),
369-
getRigidity(track),
369+
getRigidity(track) * track.sign(),
370370
track.tpcSignal());
371371
histos.fill(HIST("histogram/TOFbetaVsP"),
372-
getRigidity(track), track.beta());
372+
getRigidity(track) * track.sign(),
373+
track.beta());
373374
if (enableTr && trRapCut) {
374375
if (std::abs(getTPCnSigma(track, particles.at(0))) <
375376
nsigmaTPCvar.nsigmaTPCTr) {
@@ -391,10 +392,11 @@ struct TrHeAnalysis {
391392
continue;
392393
}
393394
histos.fill(HIST("histogram/H3/H3-TPCsignVsTPCmomentum"),
394-
getRigidity(track),
395+
getRigidity(track) * track.sign(),
395396
track.tpcSignal());
396397
histos.fill(HIST("histogram/H3/H3-TOFbetaVsP"),
397-
getRigidity(track), track.beta());
398+
getRigidity(track) * track.sign(),
399+
track.beta());
398400
float tPt = track.pt();
399401
float tEta = track.eta();
400402
float tPhi = track.phi();
@@ -437,10 +439,11 @@ struct TrHeAnalysis {
437439
continue;
438440
}
439441
histos.fill(HIST("histogram/He/He-TPCsignVsTPCmomentum"),
440-
getRigidity(track),
442+
getRigidity(track) * track.sign(),
441443
track.tpcSignal());
442444
histos.fill(HIST("histogram/He/He-TOFbetaVsP"),
443-
getRigidity(track), track.beta());
445+
getRigidity(track) * track.sign(),
446+
track.beta());
444447
float tPt = track.pt();
445448
float tEta = track.eta();
446449
float tPhi = track.phi();
@@ -520,10 +523,10 @@ struct TrHeAnalysis {
520523
histos.fill(HIST("histogram/pT"), track.pt());
521524
histos.fill(HIST("histogram/p"), track.p());
522525
histos.fill(HIST("histogram/TPCsignVsTPCmomentum"),
523-
getRigidity(track) / (1.f * track.sign()),
526+
getRigidity(track) * (1.f * track.sign()),
524527
track.tpcSignal());
525528
histos.fill(HIST("histogram/TOFbetaVsP"),
526-
track.p() / (1.f * track.sign()), track.beta());
529+
track.p() * (1.f * track.sign()), track.beta());
527530
if (enableTr && trRapCut) {
528531
if (std::abs(track.tpcNSigmaTr()) < nsigmaTPCvar.nsigmaTPCTr) {
529532
if (track.itsChi2NCl() > cfgCutMaxChi2ItsH3) {
@@ -544,10 +547,10 @@ struct TrHeAnalysis {
544547
continue;
545548
}
546549
histos.fill(HIST("histogram/H3/H3-TPCsignVsTPCmomentum"),
547-
getRigidity(track) / (1.f * track.sign()),
550+
getRigidity(track) * (1.f * track.sign()),
548551
track.tpcSignal());
549552
histos.fill(HIST("histogram/H3/H3-TOFbetaVsP"),
550-
track.p() / (1.f * track.sign()), track.beta());
553+
track.p() * (1.f * track.sign()), track.beta());
551554
float tPt = track.pt();
552555
float tEta = track.eta();
553556
float tPhi = track.phi();
@@ -589,10 +592,11 @@ struct TrHeAnalysis {
589592
continue;
590593
}
591594
histos.fill(HIST("histogram/He/He-TPCsignVsTPCmomentum"),
592-
getRigidity(track),
595+
getRigidity(track) * track.sign(),
593596
track.tpcSignal());
594597
histos.fill(HIST("histogram/He/He-TOFbetaVsP"),
595-
getRigidity(track), track.beta());
598+
getRigidity(track) * track.sign(),
599+
track.beta());
596600
float tPt = track.pt();
597601
float tEta = track.eta();
598602
float tPhi = track.phi();
@@ -643,12 +647,12 @@ struct TrHeAnalysis {
643647
template <class T>
644648
float getMeanItsClsSize(T const& track)
645649
{
646-
constexpr int kNumLayers = 8;
647-
constexpr int kBitsPerLayer = 4;
648-
constexpr int kBitMask = (1 << kBitsPerLayer) - 1;
650+
constexpr int nNumLayers = 8;
651+
constexpr int nBitsPerLayer = 4;
652+
constexpr int nBitMask = (1 << nBitsPerLayer) - 1;
649653
int sum = 0, n = 0;
650-
for (int i = 0; i < kNumLayers; i++) {
651-
int clsSize = (track.itsClusterSizes() >> (kBitsPerLayer * i)) & kBitMask;
654+
for (int i = 0; i < nNumLayers; i++) {
655+
int clsSize = (track.itsClusterSizes() >> (nBitsPerLayer * i)) & nBitMask;
652656
sum += clsSize;
653657
if (clsSize)
654658
n++;

0 commit comments

Comments
 (0)