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
13 changes: 10 additions & 3 deletions PWGEM/Dilepton/Tasks/taggingHFE.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#include <array>
#include <cmath>
#include <cstdint>
#include <iostream>

Check failure on line 58 in PWGEM/Dilepton/Tasks/taggingHFE.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.

Check failure on line 58 in PWGEM/Dilepton/Tasks/taggingHFE.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <string>
#include <string_view>
Expand Down Expand Up @@ -149,7 +149,8 @@
Configurable<float> cfg_max_TPCNsigmaKa{"cfg_max_TPCNsigmaKa", +2, "max n sigma ka in TPC"};
Configurable<float> cfg_min_TOFNsigmaKa{"cfg_min_TOFNsigmaKa", -2, "min n sigma ka in TOF"};
Configurable<float> cfg_max_TOFNsigmaKa{"cfg_max_TOFNsigmaKa", +2, "max n sigma ka in TOF"};
Configurable<bool> requireTOF{"requireTOF", false, "require TOF hit"};
Configurable<bool> requireTOF{"requireTOF", true, "require TOF hit"};
Configurable<float> cfg_min_pin_TOFreq{"cfg_min_pin_TOFreq", 0.4, "min pin for TOFreq"};
} kaonCut;

struct : ConfigurableGroup {
Expand Down Expand Up @@ -450,9 +451,15 @@
bool is_ka_included_TPC = kaonCut.cfg_min_TPCNsigmaKa < track.tpcNSigmaKa() && track.tpcNSigmaKa() < kaonCut.cfg_max_TPCNsigmaKa;
bool is_ka_included_TOF = track.hasTOF() ? (kaonCut.cfg_min_TOFNsigmaKa < track.tofNSigmaKa() && track.tofNSigmaKa() < kaonCut.cfg_max_TOFNsigmaKa) : true;
if (kaonCut.requireTOF) {
is_ka_included_TOF = kaonCut.cfg_min_TOFNsigmaKa < track.tofNSigmaKa() && track.tofNSigmaKa() < kaonCut.cfg_max_TOFNsigmaKa;
if (track.tpcInnerParam() < kaonCut.cfg_min_pin_TOFreq) {
return is_ka_included_TPC;
} else {
is_ka_included_TOF = kaonCut.cfg_min_TOFNsigmaKa < track.tofNSigmaKa() && track.tofNSigmaKa() < kaonCut.cfg_max_TOFNsigmaKa;
return is_ka_included_TPC && is_ka_included_TOF;
}
} else {
return is_ka_included_TPC && is_ka_included_TOF; // TOFif
}
return is_ka_included_TPC && is_ka_included_TOF;
}

template <typename TTrack>
Expand Down Expand Up @@ -767,7 +774,7 @@

if constexpr (isMC) {
const auto& mctrack = track.template mcParticle_as<aod::McParticles>();
if (std::abs(mctrack.pdgCode()) != 11) {

Check failure on line 777 in PWGEM/Dilepton/Tasks/taggingHFE.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.

Check failure on line 777 in PWGEM/Dilepton/Tasks/taggingHFE.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.
return;
}
if (!(mctrack.isPhysicalPrimary() || mctrack.producedByGenerator())) {
Expand All @@ -776,26 +783,26 @@
const auto& mcmother = mctrack.template mothers_first_as<aod::McParticles>(); // mother particle of electron
int pdg_mother = std::abs(mcmother.pdgCode());

if (pdg_mother == 111 || pdg_mother == 221 || pdg_mother == 331 || pdg_mother == 113 || pdg_mother == 223 || pdg_mother == 333) { // LF

Check failure on line 786 in PWGEM/Dilepton/Tasks/taggingHFE.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.

Check failure on line 786 in PWGEM/Dilepton/Tasks/taggingHFE.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.
if (IsFromCharm(mcmother, mcParticles) < 0 && IsFromBeauty(mcmother, mcParticles) < 0) {
fRegistry.fill(HIST("MC/eFromPromptLF/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
} else {
fRegistry.fill(HIST("MC/eFromNonPromptLF/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
}
} else if (pdg_mother == 443) { // Jpsi

Check failure on line 792 in PWGEM/Dilepton/Tasks/taggingHFE.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.

Check failure on line 792 in PWGEM/Dilepton/Tasks/taggingHFE.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.
if (IsFromBeauty(mcmother, mcParticles) < 0) {
fRegistry.fill(HIST("MC/eFromPromptJpsi/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
} else {
fRegistry.fill(HIST("MC/eFromNonPromptJpsi/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
}
} else if (pdg_mother == 411) { // D+/-

Check failure on line 798 in PWGEM/Dilepton/Tasks/taggingHFE.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.

Check failure on line 798 in PWGEM/Dilepton/Tasks/taggingHFE.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.
fRegistry.fill(HIST("MC/eFromDpm/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// if (IsFromBeauty(mcmother, mcParticles) < 0) {
// fRegistry.fill(HIST("MC/eFromPromptDpm/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// } else {
// fRegistry.fill(HIST("MC/eFromNonPromptDpm/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// }
} else if (pdg_mother == 421) { // D0

Check failure on line 805 in PWGEM/Dilepton/Tasks/taggingHFE.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.

Check failure on line 805 in PWGEM/Dilepton/Tasks/taggingHFE.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.
fRegistry.fill(HIST("MC/eFromD0/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// if (IsFromBeauty(mcmother, mcParticles) < 0) {
// fRegistry.fill(HIST("MC/eFromPromptD0/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
Expand All @@ -811,21 +818,21 @@
// // fRegistry.fill(HIST("MC/eFromNonPromptDs/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// // }
// }
else if (pdg_mother == 4122) { // Lc+/-

Check failure on line 821 in PWGEM/Dilepton/Tasks/taggingHFE.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.

Check failure on line 821 in PWGEM/Dilepton/Tasks/taggingHFE.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.
fRegistry.fill(HIST("MC/eFromLcpm/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// if (IsFromBeauty(mcmother, mcParticles) < 0) {
// fRegistry.fill(HIST("MC/eFromPromptLcpm/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// } else {
// fRegistry.fill(HIST("MC/eFromNonPromptLcpm/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// }
} else if (pdg_mother == 4132) { // Xic0

Check failure on line 828 in PWGEM/Dilepton/Tasks/taggingHFE.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.

Check failure on line 828 in PWGEM/Dilepton/Tasks/taggingHFE.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.
fRegistry.fill(HIST("MC/eFromXic0/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// if (IsFromBeauty(mcmother, mcParticles) < 0) {
// fRegistry.fill(HIST("MC/eFromPromptXic0/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// } else {
// fRegistry.fill(HIST("MC/eFromNonPromptXic0/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// }
} else if (pdg_mother == 4332) { // Omegac0

Check failure on line 835 in PWGEM/Dilepton/Tasks/taggingHFE.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.

Check failure on line 835 in PWGEM/Dilepton/Tasks/taggingHFE.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.
fRegistry.fill(HIST("MC/eFromOmegac0/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
// if (IsFromBeauty(mcmother, mcParticles) < 0) {
// fRegistry.fill(HIST("MC/eFromPromptOmegac0/hs"), trackParCov.getPt(), trackParCov.getEta(), trackParCov.getPhi(), dca3DinSigma);
Expand Down Expand Up @@ -1651,7 +1658,7 @@
if (std::abs(daughter.pdgCode()) == cfgPdgLepton) {
ptLepton = daughter.pt();
etaLepton = daughter.eta();
} else if (std::abs(daughter.pdgCode()) == 321) {

Check failure on line 1661 in PWGEM/Dilepton/Tasks/taggingHFE.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.

Check failure on line 1661 in PWGEM/Dilepton/Tasks/taggingHFE.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.
ptHadron = daughter.pt();
etaHadron = daughter.eta();
}
Expand Down
Loading