Skip to content
Merged
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
9 changes: 4 additions & 5 deletions PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
float cut_pt[Nstages] = {0., 0., ptMin};
float cut_eta[Nstages] = {9999., 99999., etaMax};
for (int i = 0; i < Nstages; i++) {
if (pt[i] > cut_pt[i] && fabs(eta[i]) < cut_eta[i]) {

Check failure on line 84 in PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
if (pdg == 4)

Check failure on line 85 in PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
hRapQuark[i]->Fill(p.cQuarkRap());
else if (pdg == 5)

Check failure on line 87 in PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
hRapQuark[i]->Fill(p.bQuarkRap());
else
hRapQuark[i]->Fill(999.);
Expand All @@ -101,7 +101,7 @@
float cut_pt[Nstages] = {0., 0., ptMin};
float cut_eta[Nstages] = {9999., 99999., etaMax};
for (int i = 0; i < Nstages; i++) {
if (pt[i] > cut_pt[i] && fabs(eta[i]) < cut_eta[i]) {

Check failure on line 104 in PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
hEta[i]->Fill(eta[i], weight[i]);
hPt[i]->Fill(pt[i], weight[i]);
hPtEta[i]->Fill(pt[i], eta[i], weight[i]);
Expand Down Expand Up @@ -138,7 +138,7 @@
}

for (int i = 0; i < Nstages; i++) {
if (pt1[i] > cut_pt[i] && pt2[i] > cut_pt[i] && fabs(eta1[i]) < cut_eta[i] && fabs(eta2[i]) < cut_eta[i]) {

Check failure on line 141 in PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
hMee[i]->Fill(mass[i], weight[i]);
hMeePtee[i]->Fill(mass[i], pt[i], weight[i]);
}
Expand Down Expand Up @@ -183,41 +183,40 @@
{
for (auto const& p : mcParticles) {
// Look at quarks which fragment
if (abs(p.pdgCode()) == 5 || abs(p.pdgCode()) == 4) {

Check failure on line 186 in PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
bool foundhadrons = kFALSE;
if (p.has_daughters()) {
const auto& daughtersSlice = p.daughters_as<aod::McParticles>();
for (auto& d : daughtersSlice) {
int pdgfragment = d.pdgCode();
if (static_cast<int>(abs(pdgfragment) / 100.) == abs(p.pdgCode()) || static_cast<int>(abs(pdgfragment) / 1000.) == abs(p.pdgCode())) {

Check failure on line 192 in PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
foundhadrons = kTRUE;
}
}
}
if (foundhadrons) {
if (abs(p.pdgCode()) == 4)

Check failure on line 198 in PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
hRapQuark[1]->Fill(p.y());
else if (abs(p.pdgCode()) == 5)

Check failure on line 200 in PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
hRapQuark[0]->Fill(p.y());
}
}

// Look at electrons
if (abs(p.pdgCode()) != 11 || o2::mcgenstatus::getHepMCStatusCode(p.statusCode()) != 1 || !p.has_mothers()) {

Check failure on line 206 in PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
hfTable(EFromHFType::kNoE, -1, -1, -1, -1, -1, -1, -999., -999.);
continue;
}

int mother_pdg = mcParticles.iteratorAt(p.mothersIds()[0]).pdgCode();
bool direct_charm_mother = abs(mother_pdg) < 1e+9 && (std::to_string(mother_pdg)[std::to_string(mother_pdg).length() - 3] == '4' || std::to_string(mother_pdg)[std::to_string(mother_pdg).length() - 4] == '4');
if (abs(mother_pdg) == 443) {
direct_charm_mother = false; // we don't want JPsi here
}
// Mother is an open-charm hadon (meson or baryon) expected to decay semi-leptonicly
bool direct_charm_mother = ((std::abs(mother_pdg) >= 400) && (std::abs(mother_pdg) <= 439)) || ((std::abs(mother_pdg) >= 4000) && (std::abs(mother_pdg) <= 4399));
int cHadronId = -1;
if (direct_charm_mother) {
cHadronId = p.mothersIds()[0];
}
bool direct_beauty_mother = abs(mother_pdg) < 1e+9 && (std::to_string(mother_pdg)[std::to_string(mother_pdg).length() - 3] == '5' || std::to_string(mother_pdg)[std::to_string(mother_pdg).length() - 4] == '5');
// Mother is an open-beuaty hadron (meson or baryon) expected to decay semi-leptonicly
bool direct_beauty_mother = ((std::abs(mother_pdg) >= 500) && (std::abs(mother_pdg) <= 549)) || ((std::abs(mother_pdg) >= 5000) && (std::abs(mother_pdg) <= 5499));
int bHadronId = IsFromBeauty(p, mcParticles);

int bQuarkId = -1;
Expand Down
Loading