Skip to content

Commit c1e8911

Browse files
authored
[PWGCF] fix deta bug (#13319)
1 parent 747d7db commit c1e8911

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ struct LongRangeDihadronCor {
164164

165165
// FT0 geometry
166166
o2::ft0::Geometry ft0Det;
167-
const uint64_t ft0IndexA = 96;
167+
static constexpr uint64_t Ft0IndexA = 96;
168168
std::vector<o2::detectors::AlignParam>* offsetFT0;
169169
std::vector<float> cstFT0RelGain{};
170170

@@ -283,8 +283,6 @@ struct LongRangeDihadronCor {
283283
registry.add("Trig_hist_TPC_FT0C", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}});
284284
registry.add("FT0Amp", "", {HistType::kTH2F, {axisChID, axisFit}});
285285
registry.add("FT0AmpCorrect", "", {HistType::kTH2F, {axisChID, axisFit}});
286-
registry.add("FT0Cmp", "", {HistType::kTH2F, {axisChID, axisFit}});
287-
registry.add("FT0CmpCorrect", "", {HistType::kTH2F, {axisChID, axisFit}});
288286
}
289287
if (doprocessSameTpcFt0a) {
290288
registry.add("deltaEta_deltaPhi_same_TPC_FT0A", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); // check to see the delta eta and delta phi distribution
@@ -369,7 +367,7 @@ struct LongRangeDihadronCor {
369367
auto x = chPos.X() + (*offsetFT0)[i].getX();
370368
auto y = chPos.Y() + (*offsetFT0)[i].getY();
371369
auto z = chPos.Z() + (*offsetFT0)[i].getZ();
372-
if (chno >= ft0IndexA) {
370+
if (chno >= Ft0IndexA) {
373371
z = -z;
374372
}
375373
auto r = std::sqrt(x * x + y * y);
@@ -519,21 +517,19 @@ struct LongRangeDihadronCor {
519517
template <typename TFT0s>
520518
void getChannel(TFT0s const& ft0, std::size_t const& iCh, int& id, float& ampl, int fitType)
521519
{
522-
int rID{0};
523520
if (fitType == kFT0C) {
524521
id = ft0.channelC()[iCh];
525-
rID = id + 96;
522+
id = id + Ft0IndexA;
526523
ampl = ft0.amplitudeC()[iCh];
527-
registry.fill(HIST("FT0Cmp"), rID, ampl);
524+
registry.fill(HIST("FT0Amp"), id, ampl);
528525
ampl = ampl / cstFT0RelGain[iCh];
529-
registry.fill(HIST("FT0CmpCorrect"), rID, ampl);
526+
registry.fill(HIST("FT0AmpCorrect"), id, ampl);
530527
} else if (fitType == kFT0A) {
531528
id = ft0.channelA()[iCh];
532-
rID = id;
533529
ampl = ft0.amplitudeA()[iCh];
534-
registry.fill(HIST("FT0Amp"), rID, ampl);
530+
registry.fill(HIST("FT0Amp"), id, ampl);
535531
ampl = ampl / cstFT0RelGain[iCh];
536-
registry.fill(HIST("FT0AmpCorrect"), rID, ampl);
532+
registry.fill(HIST("FT0AmpCorrect"), id, ampl);
537533
} else {
538534
LOGF(fatal, "Cor Index %d out of range", fitType);
539535
}

0 commit comments

Comments
 (0)