[PWGHF] Add a method for electron source selection#12541
[PWGHF] Add a method for electron source selection#12541jpxrk merged 5 commits intoAliceO2Group:masterfrom
Conversation
|
O2 linter results: ❌ 0 errors, |
| enum PdgCode { | ||
| kEta = 221, | ||
| kOmega = 223, | ||
| kPhi = 333, |
There was a problem hiding this comment.
kPhi is already defined in the common header.
There was a problem hiding this comment.
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.
Use TH1D for histograms that can have bin counts larger than the float precision.
There was a problem hiding this comment.
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.
A map would be more efficient.
There was a problem hiding this comment.
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.
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