Skip to content

Conversation

@MartijnLaarhoven
Copy link
Contributor

Adding the option to reject half of the FT0 detectors to eta dependent correlations

Adding the option to reject half of the FT0 detectors to eta dependent correlations
Copilot AI review requested due to automatic review settings February 11, 2026 17:42
@github-actions github-actions bot added the pwgcf label Feb 11, 2026
@github-actions github-actions bot changed the title Adding the option to reject half the FT0 [PWGCF] Adding the option to reject half the FT0 Feb 11, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds configurable options to exclude specific FT0 (A/C) inner/outer ring channel ranges when building eta-dependent TPC–FT0 correlations, enabling studies that “reject half” of the FT0 acceptance.

Changes:

  • Introduced new configurables to reject FT0A/FT0C inner or outer ring channels.
  • Added FT0 channel-range constants for ring selection.
  • Applied channel rejection during the FT0-channel loop when filling correlations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 630 to +637
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;
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Channel rejection is applied after getChannel(), but getChannel() already fills FT0Amp/FT0AmpCorrect QA histograms with the (non-rejected) amplitude. This makes the QA plots inconsistent with the actual correlations when any cfgRejectFT0* option is enabled. Consider applying the rejection before calling getChannel(), or move the rejection logic into getChannel() (e.g., set ampl=0 / skip fills for rejected channel IDs) so QA and correlation filling are consistent.

Copilot uses AI. Check for mistakes.
Comment on lines 628 to +632
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))) {
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Local variable name chanelid appears to be a typo and reduces readability, especially now that it’s used in the new rejection logic. Consider renaming it to channelId (and updating uses in this loop) to avoid confusion.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant