Skip to content

[PWGCF] Updating the channel mirroring logic and adding an option to fill histograms run by run#24

Merged
MartijnLaarhoven merged 1 commit intomasterfrom
MartijnLaarhoven-patch-20
Feb 12, 2026
Merged

[PWGCF] Updating the channel mirroring logic and adding an option to fill histograms run by run#24
MartijnLaarhoven merged 1 commit intomasterfrom
MartijnLaarhoven-patch-20

Conversation

@MartijnLaarhoven
Copy link
Owner

Updating the channel mirroring logic and adding an option to fill histograms run by run

Copilot AI review requested due to automatic review settings February 12, 2026 16:22
@github-actions github-actions bot added the pwgcf label Feb 12, 2026
@github-actions github-actions bot changed the title Updating the channel mirroring logic and adding an option to fill histograms run by run [PWGCF] Updating the channel mirroring logic and adding an option to fill histograms run by run Feb 12, 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

This PR adjusts FT0 channel gain-equalization indexing within the long-range dihadron correlation task, aligning the correction factor lookup with the FT0 channel ID used throughout the histogramming/mirroring logic.

Changes:

  • Update FT0 amplitude gain correction to index cstFT0RelGain by id (channel ID) instead of iCh (loop index), for both FT0A and FT0C.
Comments suppressed due to low confidence (2)

PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx:695

  • histAmpCorrectPerRun[lastRunNumber]->Fill(...) is executed whenever system == SameEvent, even when cfgRunbyRunAmplitudeFT0 is false (in that case lastRunNumber stays -1 and the map entry will be missing/null, leading to a crash via operator[] inserting a null shared_ptr). Guard this fill with cfgRunbyRunAmplitudeFT0 and use find() (no operator[]) to ensure the histogram exists before calling Fill().
      if (system == SameEvent) {
        registry.fill(HIST("FT0AmpCorrect"), id, ampl);
        histAmpCorrectPerRun[lastRunNumber]->Fill(id, ampl);
      }

PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx:707

  • Same issue as above: histAmpCorrectPerRun[lastRunNumber]->Fill(...) can dereference a null shared_ptr when run-by-run histograms are disabled or not created for the run (because operator[] inserts a default/null entry). Please guard with cfgRunbyRunAmplitudeFT0 and lookup with find() before filling.
      if (system == SameEvent) {
        registry.fill(HIST("FT0AmpCorrect"), id, ampl);
        histAmpCorrectPerRun[lastRunNumber]->Fill(id, ampl);
      }

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

@MartijnLaarhoven MartijnLaarhoven merged commit 9b6b789 into master Feb 12, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant