Skip to content

[PWGLF] Added a new workflow for the Xi(1530)0 analysis QA#8408

Merged
BongHwi merged 6 commits intoAliceO2Group:masterfrom
mjkim525:master
Nov 13, 2024
Merged

[PWGLF] Added a new workflow for the Xi(1530)0 analysis QA#8408
BongHwi merged 6 commits intoAliceO2Group:masterfrom
mjkim525:master

Conversation

@mjkim525
Copy link
Contributor

@mjkim525 mjkim525 commented Nov 12, 2024

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.

[PWGLF] Please consider the following formatting changes to AliceO2Group#8408
Copy link
Collaborator

@smaff92 smaff92 left a comment

Choose a reason for hiding this comment

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

Will approve for now, but please for next time, remove all of the huge commented sections and save them in a separate backup.

@BongHwi BongHwi enabled auto-merge (squash) November 13, 2024 04:32
Comment on lines +781 to +783
lDecayDaughter1.SetPtEtaPhiM(trk1.pt(), trk1.eta(), trk1.phi(), massPi);
lDecayDaughter2.SetPtEtaPhiM(trk2.pt(), trk2.eta(), trk2.phi(), trk2.mXi());
lResonance = lDecayDaughter1 + lDecayDaughter2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

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)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (abs(lResonance.Rapidity()) >= 0.5)
if (std::abs(lResonance.Rapidity()) >= 0.5)

This is a bug. abs will truncate to int.

Comment on lines +801 to +806
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);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Store the results in variables instead of calling the same calculations repeatedly.

Comment on lines +828 to +834
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;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider using named PDG codes.

Comment on lines +898 to +902
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;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comments.
Use std::abs everywhere and you're safe.

@BongHwi BongHwi merged commit 6c74821 into AliceO2Group:master Nov 13, 2024
@BongHwi
Copy link
Collaborator

BongHwi commented Nov 13, 2024

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

christianreckziegel pushed a commit to christianreckziegel/O2Physics that referenced this pull request Nov 19, 2024
feisenhu pushed a commit to feisenhu/O2Physics that referenced this pull request Jan 8, 2025
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.

5 participants