[PWGLF] Added a new workflow for the Xi(1530)0 analysis QA#8408
[PWGLF] Added a new workflow for the Xi(1530)0 analysis QA#8408BongHwi merged 6 commits intoAliceO2Group:masterfrom
Conversation
[PWGLF] Please consider the following formatting changes to AliceO2Group#8408
[PWGLF] Please consider the following formatting changes to AliceO2Group#8408
smaff92
left a comment
There was a problem hiding this comment.
Will approve for now, but please for next time, remove all of the huge commented sections and save them in a separate backup.
| lDecayDaughter1.SetPtEtaPhiM(trk1.pt(), trk1.eta(), trk1.phi(), massPi); | ||
| lDecayDaughter2.SetPtEtaPhiM(trk2.pt(), trk2.eta(), trk2.phi(), trk2.mXi()); | ||
| lResonance = lDecayDaughter1 + lDecayDaughter2; |
There was a problem hiding this comment.
Consider using RecoDecay methods with C++ arrays instead of unnecessarily heavy TLorentzVector objects.
| lDecayDaughter2.SetPtEtaPhiM(trk2.pt(), trk2.eta(), trk2.phi(), trk2.mXi()); | ||
| lResonance = lDecayDaughter1 + lDecayDaughter2; | ||
|
|
||
| if (abs(lResonance.Rapidity()) >= 0.5) |
There was a problem hiding this comment.
| if (abs(lResonance.Rapidity()) >= 0.5) | |
| if (std::abs(lResonance.Rapidity()) >= 0.5) |
This is a bug. abs will truncate to int.
| histos.fill(HIST("Xi1530invmassDS"), lResonance.M()); | ||
| histos.fill(HIST("h3Xi1530invmassDS"), multiplicity, lResonance.Pt(), lResonance.M(), kData); | ||
| } else if (trk1.sign() < 0) { | ||
| if (invmass1D) | ||
| histos.fill(HIST("Xi1530invmassDSAnti"), lResonance.M()); | ||
| histos.fill(HIST("h3Xi1530invmassDSAnti"), multiplicity, lResonance.Pt(), lResonance.M(), kData); |
There was a problem hiding this comment.
Store the results in variables instead of calling the same calculations repeatedly.
| if constexpr (IsMC) { | ||
| if (abs(trk1.pdgCode()) != 211 || abs(trk2.pdgCode()) != 3312) | ||
| continue; | ||
| if (trk1.motherId() != trk2.motherId()) | ||
| continue; | ||
| if (abs(trk2.motherPDG()) != 3324) | ||
| continue; |
There was a problem hiding this comment.
Consider using named PDG codes.
| for (auto& part : resoParents) { // loop over all pre-filtered MC particles | ||
| if (abs(part.pdgCode()) != 3324 || abs(part.y()) >= 0.5) | ||
| continue; | ||
| bool pass1 = abs(part.daughterPDG1()) == 211 || abs(part.daughterPDG2()) == 211; | ||
| bool pass2 = abs(part.daughterPDG1()) == 3312 || abs(part.daughterPDG2()) == 3312; |
There was a problem hiding this comment.
Same comments.
Use std::abs everywhere and you're safe.
|
Oops.. the PR is merged already. but I'm sure that we should update the task very soon with the PID information, which was commented this time. At that time, we can include the suggestions from @vkucera |
…oup#8408) Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
…oup#8408) Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
Hello everyone.
My name is Min-jae Kim and i have newly joined PAG resonance.
I have added a new workflow to compare it with the existing code for the Xi(1530)0 analysis.