Skip to content

[PWGLF] use reconstructed eventType in cascade analysis#16208

Merged
romainschotter merged 3 commits into
AliceO2Group:masterfrom
nepeivodaRS:11may
May 12, 2026
Merged

[PWGLF] use reconstructed eventType in cascade analysis#16208
romainschotter merged 3 commits into
AliceO2Group:masterfrom
nepeivodaRS:11may

Conversation

@nepeivodaRS
Copy link
Copy Markdown
Contributor

The reconstructed event type is used for MC.
Several QA hists, and eventType labels are added.

Use reconstructed event type for MC. Add QA hists, and label event-type axes
@github-actions github-actions Bot added the pwglf label May 11, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

O2 linter results: ❌ 0 errors, ⚠️ 9 warnings, 🔕 0 disabled

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]);
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • 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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hey,
There is already an EvFlags enum, but it is a bit mask:

EvINEL    = 0x1
EvINELgt0 = 0x2
EvINELgt1 = 0x4

So 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.

@nepeivodaRS nepeivodaRS marked this pull request as ready for review May 12, 2026 14:03
Comment on lines +80 to +85
enum EventTypeBin {
kINEL = 0,
kINELgt0,
kINELgt1,
kNEventTypeBins
};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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 romainschotter enabled auto-merge (squash) May 12, 2026 14:18
@romainschotter romainschotter merged commit 5b94a34 into AliceO2Group:master May 12, 2026
15 of 16 checks passed
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.

3 participants