[PWGCF] Update FT0 gain correction indexing in longRangeDihadronCor#14482
[PWGCF] Update FT0 gain correction indexing in longRangeDihadronCor#14482MartijnLaarhoven 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
- Adds continuation over rejected channels, instead of still trying to correlate them
- 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 updates the FT0 gain correction logic in the long-range dihadron correlation analysis. It aims to fix gain correction indexing to use channel ID instead of array index, address amplitude corrections for remapped dead channels, and add early continuation for rejected channels.
Changes:
- Introduces separate variables for mirrored amplitudes and their corrected values
- Adds early rejection (continue) for channels that should be excluded from correlation analysis
- Refactors the mirrored channel amplitude filling logic
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| float Mirroredampl = ampl; | ||
| float MirroredAmplCorrected = Mirroredampl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
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.
| float Mirroredampl = ampl; | ||
| float MirroredAmplCorrected = Mirroredampl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
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.
| float Mirroredampl = ampl; | ||
| float MirroredAmplCorrected = Mirroredampl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
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.
| registry.fill(HIST("FT0Amp"), dead_id, ampl); | ||
| ampl = ampl / cstFT0RelGain[iCh]; | ||
| registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl); | ||
| float Mirroredampl = ampl; |
There was a problem hiding this comment.
Variable name should follow camelCase convention. Use 'mirroredAmpl' instead of 'Mirroredampl' to be consistent with standard C++ naming conventions.
| ampl = ampl / cstFT0RelGain[iCh]; | ||
| registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl); | ||
| float Mirroredampl = ampl; | ||
| float MirroredAmplCorrected = Mirroredampl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
Variable name should follow camelCase convention. Use 'mirroredAmplCorrected' instead of 'MirroredAmplCorrected' to be consistent with standard C++ naming conventions.
| registry.fill(HIST("FT0Amp"), dead_id, ampl); | ||
| ampl = ampl / cstFT0RelGain[iCh]; | ||
| registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl); | ||
| float Mirroredampl = ampl; |
There was a problem hiding this comment.
Variable name should follow camelCase convention. Use 'mirroredAmpl' instead of 'Mirroredampl' to be consistent with standard C++ naming conventions.
| ampl = ampl / cstFT0RelGain[iCh]; | ||
| registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl); | ||
| float Mirroredampl = ampl; | ||
| float MirroredAmplCorrected = Mirroredampl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
Variable name should follow camelCase convention. Use 'mirroredAmplCorrected' instead of 'MirroredAmplCorrected' to be consistent with standard C++ naming conventions.
| registry.fill(HIST("FT0Amp"), dead_id, ampl); | ||
| ampl = ampl / cstFT0RelGain[iCh]; | ||
| registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl); | ||
| float Mirroredampl = ampl; |
There was a problem hiding this comment.
Variable name should follow camelCase convention. Use 'mirroredAmpl' instead of 'Mirroredampl' to be consistent with standard C++ naming conventions.
| ampl = ampl / cstFT0RelGain[iCh]; | ||
| registry.fill(HIST("FT0AmpCorrect"), dead_id, ampl); | ||
| float Mirroredampl = ampl; | ||
| float MirroredAmplCorrected = Mirroredampl / cstFT0RelGain[iCh]; |
There was a problem hiding this comment.
Variable name should follow camelCase convention. Use 'mirroredAmplCorrected' instead of 'MirroredAmplCorrected' to be consistent with standard C++ naming conventions.
|
Please, fix |