-
Notifications
You must be signed in to change notification settings - Fork 613
[PWGHF] Add a method for electron source selection #12541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
O2 linter results: ❌ 0 errors, |
alibuild
left a comment
There was a problem hiding this 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.
| enum PdgCode { | ||
| kEta = 221, | ||
| kOmega = 223, | ||
| kPhi = 333, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| 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}}); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| 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; | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Select electron source in MC