Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion PWGDQ/Core/MCProng.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "PWGDQ/Core/MCProng.h"

#include <cmath>
#include <iostream>

Check warning on line 15 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.

ClassImp(MCProng);

Expand All @@ -22,7 +22,8 @@
{"kProducedInTransport", MCProng::kProducedInTransport},
{"kProducedByGenerator", MCProng::kProducedByGenerator},
{"kFromBackgroundEvent", MCProng::kFromBackgroundEvent},
{"kHEPMCFinalState", MCProng::kHEPMCFinalState}};
{"kHEPMCFinalState", MCProng::kHEPMCFinalState},
{"kIsPowhegDYMuon", MCProng::kIsPowhegDYMuon}};

//________________________________________________________________________________________________________________
MCProng::MCProng() : fNGenerations(0),
Expand Down Expand Up @@ -403,18 +404,18 @@
}
break;
case 900: // electron from LF mesons + Quarkonias for LMEE
decision = absPDG == 111 || // pion

Check warning on line 407 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
absPDG == 221 || // eta

Check warning on line 408 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
absPDG == 331 || // eta'

Check warning on line 409 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
absPDG == 113 || // rho

Check warning on line 410 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
absPDG == 223 || // omega

Check warning on line 411 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
absPDG == 333 || // phi

Check warning on line 412 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
absPDG == 443 || // jpsi

Check warning on line 413 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
absPDG == 100443 // psi 2S

Check warning on line 414 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
;
break;
case 901: // electron from LF mesons for LMEE
decision = absPDG == 111 || // pion

Check warning on line 418 in PWGDQ/Core/MCProng.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid using hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
absPDG == 221 || // eta
absPDG == 331 || // eta'
absPDG == 113 || // rho
Expand Down
1 change: 1 addition & 0 deletions PWGDQ/Core/MCProng.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class MCProng
kProducedByGenerator, // Produced by generator (if not, then produced by GEANT)
kFromBackgroundEvent, // Produced in the underlying event
kHEPMCFinalState, // HEPMC code 11
kIsPowhegDYMuon, // POWHEG muons based on Pythia Status Code (=23) -> Drell-Yan signal
kNSources
};

Expand Down
6 changes: 6 additions & 0 deletions PWGDQ/Core/MCSignal.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ bool MCSignal::CheckProng(int i, bool checkSources, const T& track)
sourcesDecision |= (static_cast<uint64_t>(1) << MCProng::kHEPMCFinalState);
}
}
// Check kIsPowhegDYMuon
if (fProngs[i].fSourceBits[j] & (static_cast<uint64_t>(1) << MCProng::kIsPowhegDYMuon)) {
if ((fProngs[i].fExcludeSource[j] & (static_cast<uint64_t>(1) << MCProng::kIsPowhegDYMuon)) != (currentMCParticle.getGenStatusCode() == 23)) {
sourcesDecision |= (static_cast<uint64_t>(1) << MCProng::kIsPowhegDYMuon);
}
}
} // end if(hasSources)
// no source bit is fulfilled
if (hasSources && !sourcesDecision) {
Expand Down
12 changes: 12 additions & 0 deletions PWGDQ/Core/MCSignalLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,12 @@ MCSignal* o2::aod::dqmcsignals::GetMCSignal(const char* name)
signal = new MCSignal(name, "electron from a photon conversion", {prong}, {-1});
return signal;
}
if (!nameStr.compare("PowhegDYMuon1")) {
MCProng prong(1, {13}, {true}, {false}, {0}, {0}, {false}); // selecting muons
prong.SetSourceBit(0, MCProng::kIsPowhegDYMuon); // set source to be Muon from POWHEG
signal = new MCSignal(name, "POWHEG Muon singles", {prong}, {-1}); // define a signal with 1-prong
return signal;
}

// 2-prong signals
if (!nameStr.compare("dielectron")) {
Expand Down Expand Up @@ -381,6 +387,12 @@ MCSignal* o2::aod::dqmcsignals::GetMCSignal(const char* name)
signal = new MCSignal(name, "dielectron from a photon conversion from a pi0", {prong, prong}, {1, 1});
return signal;
}
if (!nameStr.compare("PowhegDYMuon2")) {
MCProng prong(1, {13}, {true}, {false}, {0}, {0}, {false}); // selecting muons
prong.SetSourceBit(0, MCProng::kIsPowhegDYMuon); // set source to be Muon from POWHEG
signal = new MCSignal(name, "POWHEG Muon pair", {prong, prong}, {-1, -1}); // define a signal with 2-prong
return signal;
}

// LMEE single signals
// electron signals with mother X: e from mother X
Expand Down
Loading