Skip to content

Conversation

@jpxrk
Copy link
Collaborator

@jpxrk jpxrk commented Aug 12, 2025

Select electron source in MC

@github-actions
Copy link

github-actions bot commented Aug 12, 2025

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

@github-actions github-actions bot changed the title Add a method for electron source selection [PWGHF] Add a method for electron source selection Aug 12, 2025
@jpxrk jpxrk enabled auto-merge (squash) August 12, 2025 03:39
Copy link
Collaborator

@alibuild alibuild left a comment

Choose a reason for hiding this comment

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

Auto-approving on behalf of @jpxrk.

@jpxrk jpxrk merged commit b43e45c into AliceO2Group:master Aug 12, 2025
13 checks passed
enum PdgCode {
kEta = 221,
kOmega = 223,
kPhi = 333,
Copy link
Collaborator

Choose a reason for hiding this comment

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

kPhi is already defined in the common header.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed the kPhi and use the one from the common header.

Comment on lines +149 to +152
histos.add("hPdgC", "", kTH1F, {{10001, -0.5, 10000.5}});
histos.add("hPdgB", "", kTH1F, {{10001, -0.5, 10000.5}});
histos.add("hPdgDa", "", kTH1F, {{10001, -0.5, 10000.5}});
histos.add("hPdgCo", "", kTH1F, {{10001, -0.5, 10000.5}});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use TH1D for histograms that can have bin counts larger than the float precision.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've changed float type histograms to double type.

Comment on lines +322 to +340
if (motherPdg == kPi0) {
return Pi0;
} else if (motherPdg == kEta) {
return Eta;
} else if (motherPdg == kOmega) {
return Omega;
} else if (motherPdg == kPhi) {
return Phi;
} else if (motherPdg == kEtaPrime) {
return EtaPrime;
} else if (motherPdg == kRho770_0) {
return Rho0;
} else if (motherPdg == kKPlus) {
return Ke3;
} else if (motherPdg == kK0Long) {
return K0l;
} else {
return Else;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

A map would be more efficient.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not familiar with map method. I will change it later. Thank you for your comments and new PR will be prepared.

Copy link
Collaborator

@vkucera vkucera Aug 12, 2025

Choose a reason for hiding this comment

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

It's not a method. It's a data structure in a form of (key: value) pairs that allows you to access a value using a label (key), just like with a Python dictionary.

ThePhDane pushed a commit to ThePhDane/O2Physics that referenced this pull request Nov 3, 2025
jloemker pushed a commit to jloemker/O2Physics that referenced this pull request Nov 11, 2025
alibuild pushed a commit to alibuild/O2Physics that referenced this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

3 participants