From d94498636c9135aab95acd38604081d581aa31de Mon Sep 17 00:00:00 2001 From: joachimckh Date: Thu, 9 Oct 2025 20:25:21 +0200 Subject: [PATCH 1/2] fix deta bug --- .../Tasks/longRangeDihadronCor.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx b/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx index 7d7000a5862..4d99e344eca 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx @@ -164,7 +164,7 @@ struct LongRangeDihadronCor { // FT0 geometry o2::ft0::Geometry ft0Det; - const uint64_t ft0IndexA = 96; + static constexpr uint64_t ft0IndexA = 96; std::vector* offsetFT0; std::vector cstFT0RelGain{}; @@ -283,8 +283,6 @@ struct LongRangeDihadronCor { registry.add("Trig_hist_TPC_FT0C", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}}); registry.add("FT0Amp", "", {HistType::kTH2F, {axisChID, axisFit}}); registry.add("FT0AmpCorrect", "", {HistType::kTH2F, {axisChID, axisFit}}); - registry.add("FT0Cmp", "", {HistType::kTH2F, {axisChID, axisFit}}); - registry.add("FT0CmpCorrect", "", {HistType::kTH2F, {axisChID, axisFit}}); } if (doprocessSameTpcFt0a) { registry.add("deltaEta_deltaPhi_same_TPC_FT0A", "", {HistType::kTH2D, {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); // check to see the delta eta and delta phi distribution @@ -519,21 +517,19 @@ struct LongRangeDihadronCor { template void getChannel(TFT0s const& ft0, std::size_t const& iCh, int& id, float& ampl, int fitType) { - int rID{0}; if (fitType == kFT0C) { id = ft0.channelC()[iCh]; - rID = id + 96; + id = id + ft0IndexA ; ampl = ft0.amplitudeC()[iCh]; - registry.fill(HIST("FT0Cmp"), rID, ampl); + registry.fill(HIST("FT0Amp"), id, ampl); ampl = ampl / cstFT0RelGain[iCh]; - registry.fill(HIST("FT0CmpCorrect"), rID, ampl); + registry.fill(HIST("FT0AmpCorrect"), id, ampl); } else if (fitType == kFT0A) { id = ft0.channelA()[iCh]; - rID = id; ampl = ft0.amplitudeA()[iCh]; - registry.fill(HIST("FT0Amp"), rID, ampl); + registry.fill(HIST("FT0Amp"), id, ampl); ampl = ampl / cstFT0RelGain[iCh]; - registry.fill(HIST("FT0AmpCorrect"), rID, ampl); + registry.fill(HIST("FT0AmpCorrect"), id, ampl); } else { LOGF(fatal, "Cor Index %d out of range", fitType); } From 69b61208587b974f730c48145cb5f867a16f64e4 Mon Sep 17 00:00:00 2001 From: joachimckh Date: Thu, 9 Oct 2025 20:28:47 +0200 Subject: [PATCH 2/2] fix format --- .../TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx b/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx index 4d99e344eca..5cd920840fb 100644 --- a/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx +++ b/PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx @@ -164,7 +164,7 @@ struct LongRangeDihadronCor { // FT0 geometry o2::ft0::Geometry ft0Det; - static constexpr uint64_t ft0IndexA = 96; + static constexpr uint64_t Ft0IndexA = 96; std::vector* offsetFT0; std::vector cstFT0RelGain{}; @@ -367,7 +367,7 @@ struct LongRangeDihadronCor { auto x = chPos.X() + (*offsetFT0)[i].getX(); auto y = chPos.Y() + (*offsetFT0)[i].getY(); auto z = chPos.Z() + (*offsetFT0)[i].getZ(); - if (chno >= ft0IndexA) { + if (chno >= Ft0IndexA) { z = -z; } auto r = std::sqrt(x * x + y * y); @@ -519,7 +519,7 @@ struct LongRangeDihadronCor { { if (fitType == kFT0C) { id = ft0.channelC()[iCh]; - id = id + ft0IndexA ; + id = id + Ft0IndexA; ampl = ft0.amplitudeC()[iCh]; registry.fill(HIST("FT0Amp"), id, ampl); ampl = ampl / cstFT0RelGain[iCh];