Skip to content

Commit 5690bee

Browse files
authored
[PWGCF] Added missing if statement for run-by-run
1 parent a764629 commit 5690bee

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@
5454
#include "TRandom3.h"
5555
#include <TPDGCode.h>
5656

57-
#include <map>
58-
#include <memory>
5957
#include <string>
60-
#include <utility>
6158
#include <vector>
6259

6360
using namespace o2;
@@ -691,8 +688,9 @@ struct LongRangeDihadronCor {
691688
ampl = ampl / cstFT0RelGain[id];
692689
if (system == SameEvent) {
693690
registry.fill(HIST("FT0AmpCorrect"), id, ampl);
694-
histAmpCorrectPerRun[lastRunNumber]->Fill(id, ampl);
695-
}
691+
if (cfgFwdConfig.cfgRunbyRunAmplitudeFT0)
692+
histAmpCorrectPerRun[lastRunNumber]->Fill(id, ampl);
693+
}
696694
} else if (fitType == kFT0A) {
697695
id = ft0.channelA()[iCh];
698696
ampl = ft0.amplitudeA()[iCh];
@@ -703,7 +701,8 @@ struct LongRangeDihadronCor {
703701
ampl = ampl / cstFT0RelGain[id];
704702
if (system == SameEvent) {
705703
registry.fill(HIST("FT0AmpCorrect"), id, ampl);
706-
histAmpCorrectPerRun[lastRunNumber]->Fill(id, ampl);
704+
if (cfgFwdConfig.cfgRunbyRunAmplitudeFT0)
705+
histAmpCorrectPerRun[lastRunNumber]->Fill(id, ampl);
707706
}
708707
} else {
709708
LOGF(fatal, "Cor Index %d out of range", fitType);
@@ -843,7 +842,7 @@ struct LongRangeDihadronCor {
843842
bool mirrorChannelA = false;
844843
if (cfgFwdConfig.cfgMirrorFT0ADeadChannels)
845844
mirrorChannelA = isMirrorId(chanelAid, kFT0A);
846-
845+
847846
if (system == SameEvent) {
848847
registry.fill(HIST("Trig_hist_FT0A_FT0C"), fSampleIndex, posZ, 0.5, eventWeight * amplA);
849848
}
@@ -860,7 +859,7 @@ struct LongRangeDihadronCor {
860859
bool mirrorChannelC = false;
861860
if (cfgFwdConfig.cfgMirrorFT0CDeadChannels)
862861
mirrorChannelC = isMirrorId(chanelCid, kFT0C);
863-
862+
864863
// fill the right sparse and histograms
865864
if (system == SameEvent) {
866865
registry.fill(HIST("deltaEta_deltaPhi_same_FT0A_FT0C"), deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
@@ -874,11 +873,11 @@ struct LongRangeDihadronCor {
874873
sameFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0.5, 0.5, RecoDecay::constrainAngle(phiA - phiC - 2 * PIHalf, -PIHalf), deltaEta, amplA * amplC * eventWeight * triggerWeight);
875874
} else if (system == MixedEvent) {
876875
registry.fill(HIST("deltaEta_deltaPhi_mixed_FT0A_FT0C"), deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
877-
mixedFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0.5, 0.5, deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
876+
mixedFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0.5, 0.5, deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
878877
if (mirrorChannelA) {
879878
mixedFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0.5, 0.5, RecoDecay::constrainAngle(phiA + 2 * PIHalf - phiC, -PIHalf), deltaEta, amplA * amplC * eventWeight * triggerWeight);
880879
if (mirrorChannelC)
881-
mixedFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0.5, 0.5, deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
880+
mixedFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0.5, 0.5, deltaPhi, deltaEta, amplA * amplC * eventWeight * triggerWeight);
882881
}
883882
if (mirrorChannelC)
884883
mixedFt0aFt0c->getPairHist()->Fill(step, fSampleIndex, posZ, 0.5, 0.5, RecoDecay::constrainAngle(phiA - phiC - 2 * PIHalf, -PIHalf), deltaEta, amplA * amplC * eventWeight * triggerWeight);
@@ -1252,7 +1251,7 @@ struct LongRangeDihadronCor {
12521251
return;
12531252
}
12541253

1255-
int currentRunNumber = bc.runNumber();
1254+
int currentRunNumber = bc.runNumber();
12561255
if (cfgFwdConfig.cfgRunbyRunAmplitudeFT0 && currentRunNumber != lastRunNumber) {
12571256
lastRunNumber = currentRunNumber;
12581257
if (std::find(runNumbers.begin(), runNumbers.end(), currentRunNumber) == runNumbers.end()) {

0 commit comments

Comments
 (0)