Skip to content

Commit 9fa4753

Browse files
committed
PWGEM/Dilepton: fix in c2l selection
1 parent f692e9a commit 9fa4753

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

PWGEM/Dilepton/Utils/MCUtilities.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ bool isCharmMeson(T const& track)
9696
return false;
9797
}
9898

99+
// reject mesons consiting of b and c quarks.
100+
std::string pdgStr = std::to_string(std::abs(track.pdgCode()));
101+
int n = pdgStr.length();
102+
int pdg2 = std::stoi(pdgStr.substr(n - 3, 2));
103+
if (pdg2 == 54) {
104+
return false;
105+
}
106+
99107
if (400 < std::abs(track.pdgCode()) && std::abs(track.pdgCode()) < 500) {
100108
return true;
101109
} else {
@@ -106,6 +114,15 @@ bool isCharmMeson(T const& track)
106114
template <typename T>
107115
bool isCharmBaryon(T const& track)
108116
{
117+
118+
// reject baryons consiting of b and c quarks.
119+
std::string pdgStr = std::to_string(std::abs(track.pdgCode()));
120+
int n = pdgStr.length();
121+
int pdg3 = std::stoi(pdgStr.substr(n - 4, 3));
122+
if (pdg3 == 514 || pdg3 == 524 || pdg3 == 534 || pdg3 == 541 || pdg3 == 542 || pdg3 == 543 || pdg3 == 544 || pdg3 == 554) {
123+
return false;
124+
}
125+
109126
if (4000 < std::abs(track.pdgCode()) && std::abs(track.pdgCode()) < 5000) {
110127
return true;
111128
} else {

0 commit comments

Comments
 (0)