[PWGLF] use reconstructed eventType in cascade analysis#16208
Merged
Conversation
Use reconstructed event type for MC. Add QA hists, and label event-type axes
|
O2 linter results: ❌ 0 errors, |
vkucera
reviewed
May 11, 2026
Comment on lines
+200
to
+206
| static void setEventTypeAxisLabels(TAxisType* axis) | ||
| { | ||
| const char* labels[] = {"INEL", "INEL>0", "INEL>1"}; | ||
| for (int i = 0; i < static_cast<int>(sizeof(labels) / sizeof(labels[0])); ++i) { | ||
| axis->SetBinLabel(i + 1, labels[i]); | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
- Why don't you use
std::array? - You have no guarantee that these labels match how you fill the histograms. Why don't you use
enum?
Contributor
Author
There was a problem hiding this comment.
Hey,
There is already an EvFlags enum, but it is a bit mask:
EvINEL = 0x1
EvINELgt0 = 0x2
EvINELgt1 = 0x4So I cannot use those values directly as histogram-bin indices.
Do you suggest adding a separate ordered enum for the histogram axis like this:
enum EventType {
kINEL = 0,
kINELgt0,
kINELgt1,
kNEventTypes
};
static constexpr std::array<const char*, kNEventTypes> EventTypeLabels = {
"INEL",
"INEL>0",
"INEL>1"
};I haven't done this because of the possible future confusion between these two enums.
vkucera
reviewed
May 12, 2026
Comment on lines
+80
to
+85
| enum EventTypeBin { | ||
| kINEL = 0, | ||
| kINELgt0, | ||
| kINELgt1, | ||
| kNEventTypeBins | ||
| }; |
Collaborator
There was a problem hiding this comment.
Thanks, that looks way safer.
Please remove the k prefixes. They server no purpose, conflict with the naming conventions and appear only in ROOT code.
romainschotter
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The reconstructed event type is used for MC.
Several QA hists, and eventType labels are added.