Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -671,14 +671,16 @@ struct LongRangeDihadronCor {
if (cfgRemapFT0CDeadChannels) {
if (id == kFT0CRemapChannelInnerRing) {
int dead_id = id + kFT0CInnerMirror;
registry.fill(HIST("FT0Amp"), dead_id, ampl);
ampl = ampl / cstFT0RelGain[iCh];
registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl);
float Mirroredampl = ampl;
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name should follow camelCase convention. Use 'mirroredAmpl' instead of 'Mirroredampl' to be consistent with standard C++ naming conventions.

Copilot uses AI. Check for mistakes.
float MirroredAmplCorrected = Mirroredampl / cstFT0RelGain[iCh];
Comment on lines +674 to +675
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gain correction array cstFT0RelGain is being indexed by iCh (the array index) instead of by the channel ID. Since cstFT0RelGain has 208 elements indexed by channel ID (0-207), this should use cstFT0RelGain[dead_id] to apply the correct gain correction for the mirrored dead channel. The current implementation applies the wrong channel's gain correction to the mirrored amplitude.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name should follow camelCase convention. Use 'mirroredAmplCorrected' instead of 'MirroredAmplCorrected' to be consistent with standard C++ naming conventions.

Copilot uses AI. Check for mistakes.
registry.fill(HIST("FT0Amp"), dead_id, Mirroredampl);
registry.fill(HIST("FT0AmpCorrect"), dead_id, MirroredAmplCorrected);
} else if (id >= kFT0CRemapChannelStart && id <= kFT0CRemapChannelEnd) {
int dead_id = id + kFT0COuterMirror;
registry.fill(HIST("FT0Amp"), dead_id, ampl);
ampl = ampl / cstFT0RelGain[iCh];
registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl);
float Mirroredampl = ampl;
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name should follow camelCase convention. Use 'mirroredAmpl' instead of 'Mirroredampl' to be consistent with standard C++ naming conventions.

Copilot uses AI. Check for mistakes.
float MirroredAmplCorrected = Mirroredampl / cstFT0RelGain[iCh];
Comment on lines +680 to +681
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gain correction array cstFT0RelGain is being indexed by iCh (the array index) instead of by the channel ID. Since cstFT0RelGain has 208 elements indexed by channel ID (0-207), this should use cstFT0RelGain[dead_id] to apply the correct gain correction for the mirrored dead channel. The current implementation applies the wrong channel's gain correction to the mirrored amplitude.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name should follow camelCase convention. Use 'mirroredAmplCorrected' instead of 'MirroredAmplCorrected' to be consistent with standard C++ naming conventions.

Copilot uses AI. Check for mistakes.
registry.fill(HIST("FT0Amp"), dead_id, Mirroredampl);
registry.fill(HIST("FT0AmpCorrect"), dead_id, MirroredAmplCorrected);
}
}
if ((cfgRejectFT0CInside && (id >= kFT0CInnerRingMin && id <= kFT0CInnerRingMax)) || (cfgRejectFT0COutside && (id >= kFT0COuterRingMin && id <= kFT0COuterRingMax)))
Expand All @@ -692,9 +694,10 @@ struct LongRangeDihadronCor {
if (cfgRemapFT0ADeadChannels) {
if (id >= kFT0ARemapChannelStart && id <= kFT0ARemapChannelEnd) {
int dead_id = id - kFT0AOuterMirror;
registry.fill(HIST("FT0Amp"), dead_id, ampl);
ampl = ampl / cstFT0RelGain[iCh];
registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl);
float Mirroredampl = ampl;
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name should follow camelCase convention. Use 'mirroredAmpl' instead of 'Mirroredampl' to be consistent with standard C++ naming conventions.

Copilot uses AI. Check for mistakes.
float MirroredAmplCorrected = Mirroredampl / cstFT0RelGain[iCh];
Comment on lines +697 to +698
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gain correction array cstFT0RelGain is being indexed by iCh (the array index) instead of by the channel ID. Since cstFT0RelGain has 208 elements indexed by channel ID (0-207), this should use cstFT0RelGain[dead_id] to apply the correct gain correction for the mirrored dead channel. The current implementation applies the wrong channel's gain correction to the mirrored amplitude.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name should follow camelCase convention. Use 'mirroredAmplCorrected' instead of 'MirroredAmplCorrected' to be consistent with standard C++ naming conventions.

Copilot uses AI. Check for mistakes.
registry.fill(HIST("FT0Amp"), dead_id, Mirroredampl);
registry.fill(HIST("FT0AmpCorrect"), dead_id, MirroredAmplCorrected);
}
}
if ((cfgRejectFT0AInside && (id >= kFT0AInnerRingMin && id <= kFT0AInnerRingMax)) || (cfgRejectFT0AOutside && (id >= kFT0AOuterRingMin && id <= kFT0AOuterRingMax)))
Expand Down Expand Up @@ -751,6 +754,13 @@ struct LongRangeDihadronCor {
int chanelid = 0;
float ampl = 0.;
getChannel(ft0, iCh, chanelid, ampl, corType);
if (corType == kFT0C) {
if ((cfgRejectFT0CInside && (chanelid >= kFT0CInnerRingMin && chanelid <= kFT0CInnerRingMax)) || (cfgRejectFT0COutside && (chanelid >= kFT0COuterRingMin && chanelid <= kFT0COuterRingMax)))
continue;
} else if (corType == kFT0A) {
if ((cfgRejectFT0AInside && (chanelid >= kFT0AInnerRingMin && chanelid <= kFT0AInnerRingMax)) || (cfgRejectFT0AOutside && (chanelid >= kFT0AOuterRingMin && chanelid <= kFT0AOuterRingMax)))
continue;
}
auto phi = getPhiFT0(chanelid, corType);
auto eta = getEtaFT0(chanelid, corType);
if (cfgDrawEtaPhiDis && system == SameEvent) {
Expand Down
Loading