[PWGCF] Fix FT0 gain correction indexing in longRangeDihadronCor#14489
[PWGCF] Fix FT0 gain correction indexing in longRangeDihadronCor#14489MartijnLaarhoven wants to merge 1 commit intoAliceO2Group:masterfrom
Conversation
MartijnLaarhoven
commented
Jan 14, 2026
- Use channel ID instead of array index for gain correction
- Fixes mismatched amplitude corrections for remapped dead channels
- Use channel ID instead of array index for gain correction - Fixes mismatched amplitude corrections for remapped dead channels
|
O2 linter results: ❌ 0 errors, |
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix FT0 gain correction indexing by using channel IDs instead of array indices, which should correct mismatched amplitude corrections for remapped dead channels. However, the PR contains critical unresolved merge conflicts that prevent it from compiling.
Changes:
- Adds duplicate code blocks with merge conflict markers visible in the diff
- Introduces temporary variables for mirrored amplitudes in the conflicting sections
- Adds channel rejection checks in
fillCorrelationsTPCFT0function
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <<<<<<< Updated upstream | ||
| registry.fill(HIST("FT0Amp"), dead_id, ampl); | ||
| ampl = ampl / cstFT0RelGain[iCh]; | ||
| registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl); | ||
| ======= | ||
| float mirroredAmpl = ampl; | ||
| float mirroredAmplCorrected = mirroredAmpl / cstFT0RelGain[iCh]; | ||
| registry.fill(HIST("FT0Amp"), dead_id, mirroredAmpl); | ||
| registry.fill(HIST("FT0AmpCorrect"), dead_id, mirroredAmplCorrected); | ||
| >>>>>>> Stashed changes |
There was a problem hiding this comment.
Unresolved merge conflict in FT0A dead channel remapping code. The file contains Git conflict markers and duplicate code blocks that will prevent compilation. Resolve the merge conflict by choosing the appropriate version or merging the changes properly.
| int dead_id = id + kFT0CInnerMirror; | ||
| <<<<<<< Updated upstream | ||
| registry.fill(HIST("FT0Amp"), dead_id, ampl); | ||
| ampl = ampl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
The gain correction still uses array index iCh instead of channel ID. According to the PR description, this should use the channel ID (id or dead_id) to fix mismatched amplitude corrections for remapped channels. The cstFT0RelGain array has 208 elements indexed by channel ID (0-207), not by array position. This should be cstFT0RelGain[dead_id] to correctly apply the gain correction for the remapped channel.
| @@ -679,6 +680,18 @@ struct LongRangeDihadronCor { | |||
| registry.fill(HIST("FT0Amp"), dead_id, ampl); | |||
| ampl = ampl / cstFT0RelGain[iCh]; | |||
There was a problem hiding this comment.
The gain correction still uses array index iCh instead of channel ID. According to the PR description, this should use the channel ID (id or dead_id) to fix mismatched amplitude corrections for remapped channels. The cstFT0RelGain array has 208 elements indexed by channel ID (0-207), not by array position. This should be cstFT0RelGain[dead_id] to correctly apply the gain correction for the remapped channel.
| registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl); | ||
| ======= | ||
| float mirroredAmpl = ampl; | ||
| float mirroredAmplCorrected = mirroredAmpl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
The gain correction still uses array index iCh instead of channel ID. According to the PR description, this should use the channel ID (id or dead_id) to fix mismatched amplitude corrections for remapped channels. The cstFT0RelGain array has 208 elements indexed by channel ID (0-207), not by array position. This should be cstFT0RelGain[dead_id] to correctly apply the gain correction for the remapped channel.
| } else if (id >= kFT0CRemapChannelStart && id <= kFT0CRemapChannelEnd) { | ||
| int dead_id = id + kFT0COuterMirror; | ||
| float mirroredAmpl = ampl; | ||
| float mirroredAmplCorrected = mirroredAmpl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
The gain correction still uses array index iCh instead of channel ID. According to the PR description, this should use the channel ID (id or dead_id) to fix mismatched amplitude corrections for remapped channels. The cstFT0RelGain array has 208 elements indexed by channel ID (0-207), not by array position. This should be cstFT0RelGain[dead_id] to correctly apply the gain correction for the remapped channel.
| int dead_id = id - kFT0AOuterMirror; | ||
| <<<<<<< Updated upstream | ||
| registry.fill(HIST("FT0Amp"), dead_id, ampl); | ||
| ampl = ampl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
The gain correction still uses array index iCh instead of channel ID. According to the PR description, this should use the channel ID (id or dead_id) to fix mismatched amplitude corrections for remapped channels. The cstFT0RelGain array has 208 elements indexed by channel ID (0-207), not by array position. This should be cstFT0RelGain[dead_id] to correctly apply the gain correction for the remapped channel.
| registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl); | ||
| ======= | ||
| float mirroredAmpl = ampl; | ||
| float mirroredAmplCorrected = mirroredAmpl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
The gain correction still uses array index iCh instead of channel ID. According to the PR description, this should use the channel ID (id or dead_id) to fix mismatched amplitude corrections for remapped channels. The cstFT0RelGain array has 208 elements indexed by channel ID (0-207), not by array position. This should be cstFT0RelGain[dead_id] to correctly apply the gain correction for the remapped channel.
|
Error while checking build/O2Physics/o2 for bd2491f at 2026-01-14 23:26: Full log here. |