Skip to content

Commit 30dd963

Browse files
Merge pull request #3 from MartijnLaarhoven/MartijnLaarhoven-patch-2
Adding the option to remap dead channels
2 parents 3a07128 + 95170ad commit 30dd963

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ struct LongRangeDihadronCor {
111111
O2_DEFINE_CONFIGURABLE(cfgRejectFT0AOutside, bool, false, "Rejection of outer ring channels of the FT0A detector")
112112
O2_DEFINE_CONFIGURABLE(cfgRejectFT0CInside, bool, false, "Rejection of inner ring channels of the FT0C detector")
113113
O2_DEFINE_CONFIGURABLE(cfgRejectFT0COutside, bool, false, "Rejection of outer ring channels of the FT0C detector")
114+
O2_DEFINE_CONFIGURABLE(cfgRemapFT0ADeadChannels, bool, false, "If true, remap FT0A channels 60-63 to amplitudes from 92-95 respectively")
115+
O2_DEFINE_CONFIGURABLE(cfgRemapFT0CDeadChannels, bool, false, "If true, remap FT0C channels 177->145, 176->144, 178->146, 179->147, 139->115")
114116
struct : ConfigurableGroup {
115117
O2_DEFINE_CONFIGURABLE(cfgMultCentHighCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 10.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut");
116118
O2_DEFINE_CONFIGURABLE(cfgMultCentLowCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut");
@@ -250,6 +252,12 @@ struct LongRangeDihadronCor {
250252
kFT0COuterRingMin = 144,
251253
kFT0COuterRingMax = 207
252254
};
255+
enum MirroringConstant {
256+
kFT0AOuterMirror = 32,
257+
kFT0AInnerMirror = 16,
258+
kFT0COuterMirror = 32,
259+
kFT0CInnerMirror = 24
260+
};
253261
std::array<float, 6> tofNsigmaCut;
254262
std::array<float, 6> itsNsigmaCut;
255263
std::array<float, 6> tpcNsigmaCut;
@@ -653,6 +661,19 @@ struct LongRangeDihadronCor {
653661
id = ft0.channelC()[iCh];
654662
id = id + Ft0IndexA;
655663
ampl = ft0.amplitudeC()[iCh];
664+
if (cfgRemapFT0CDeadChannels) {
665+
if (id == 115) {
666+
int dead_id = id + kFT0CInnerMirror;
667+
registry.fill(HIST("FT0Amp"), dead_id, ampl);
668+
ampl = ampl / cstFT0RelGain[iCh];
669+
registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl);
670+
} else if (id >= 144 && id <= 147) {
671+
int dead_id = id + kFT0COuterMirror;
672+
registry.fill(HIST("FT0Amp"), dead_id, ampl);
673+
ampl = ampl / cstFT0RelGain[iCh];
674+
registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl);
675+
}
676+
}
656677
if ((cfgRejectFT0CInside && (id >= kFT0CInnerRingMin && id <= kFT0CInnerRingMax)) || (cfgRejectFT0COutside && (id >= kFT0COuterRingMin && id <= kFT0COuterRingMax)))
657678
ampl = 0.;
658679
registry.fill(HIST("FT0Amp"), id, ampl);
@@ -661,6 +682,14 @@ struct LongRangeDihadronCor {
661682
} else if (fitType == kFT0A) {
662683
id = ft0.channelA()[iCh];
663684
ampl = ft0.amplitudeA()[iCh];
685+
if (cfgRemapFT0ADeadChannels) {
686+
if (id >= 92 && id <= 95) {
687+
int dead_id = id - kFT0AOuterMirror;
688+
registry.fill(HIST("FT0Amp"), dead_id, ampl);
689+
ampl = ampl / cstFT0RelGain[iCh];
690+
registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl);
691+
}
692+
}
664693
if ((cfgRejectFT0AInside && (id >= kFT0AInnerRingMin && id <= kFT0AInnerRingMax)) || (cfgRejectFT0AOutside && (id >= kFT0AOuterRingMin && id <= kFT0AOuterRingMax)))
665694
ampl = 0.;
666695
registry.fill(HIST("FT0Amp"), id, ampl);

0 commit comments

Comments
 (0)