-
Notifications
You must be signed in to change notification settings - Fork 624
[PWGCF] Fix FT0 gain correction indexing in longRangeDihadronCor #14489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PWGCF] Fix FT0 gain correction indexing in longRangeDihadronCor #14489
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]; |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; | ||
| registry.fill(HIST("FT0Amp"), dead_id, ampl); | ||
| ampl = ampl / cstFT0RelGain[iCh]; |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]; |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]; |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]; |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]; |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |