Skip to content

[PWGLF] use reconstructed eventType in cascade analysis#16208

Draft
nepeivodaRS wants to merge 2 commits into
AliceO2Group:masterfrom
nepeivodaRS:11may
Draft

[PWGLF] use reconstructed eventType in cascade analysis#16208
nepeivodaRS wants to merge 2 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.

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.

2 participants