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
6 changes: 3 additions & 3 deletions PWGEM/Dilepton/Utils/ElectronModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@

if (fConfigDFeT.useML) {
static constexpr int nClassesMl = 4;
const std::vector<int> cutDirMl = {o2::cuts_ml::CutNot, o2::cuts_ml::CutSmaller};
const std::vector<int> cutDirMl = {o2::cuts_ml::CutNot, o2::cuts_ml::CutNot, o2::cuts_ml::CutNot, o2::cuts_ml::CutNot};
const std::vector<std::string> labelsClasses = {"prompt", "prompthc", "nonprompthc", "hb"};
const uint32_t nBinsMl = fConfigDFeT.binsMl.value.size() - 1;
const std::vector<std::string> labelsBins(nBinsMl, "bin");
Expand All @@ -453,7 +453,7 @@

if (fConfigDFeV0.useML) {
static constexpr int nClassesMl = 4;
const std::vector<int> cutDirMl = {o2::cuts_ml::CutNot, o2::cuts_ml::CutSmaller};
const std::vector<int> cutDirMl = {o2::cuts_ml::CutNot, o2::cuts_ml::CutNot, o2::cuts_ml::CutNot, o2::cuts_ml::CutNot};
const std::vector<std::string> labelsClasses = {"prompt", "prompthc", "nonprompthc", "hb"};
const uint32_t nBinsMl = fConfigDFeV0.binsMl.value.size() - 1;
const std::vector<std::string> labelsBins(nBinsMl, "bin");
Expand All @@ -479,7 +479,7 @@

if (fConfigDFeC.useML) {
static constexpr int nClassesMl = 4;
const std::vector<int> cutDirMl = {o2::cuts_ml::CutNot, o2::cuts_ml::CutSmaller};
const std::vector<int> cutDirMl = {o2::cuts_ml::CutNot, o2::cuts_ml::CutNot, o2::cuts_ml::CutNot, o2::cuts_ml::CutNot};
const std::vector<std::string> labelsClasses = {"prompt", "prompthc", "nonprompthc", "hb"};
const uint32_t nBinsMl = fConfigDFeC.binsMl.value.size() - 1;
const std::vector<std::string> labelsBins(nBinsMl, "bin");
Expand Down Expand Up @@ -713,7 +713,7 @@
candidate.tpcNSigmaEl = track.tpcNSigmaEl();
candidate.tofNSigmaEl = fMapTOFNsigmaElReassociated[std::make_pair(collision.globalIndex(), track.globalIndex())];
int total_cluster_size_ob = 0, nl_ob = 0;
for (unsigned int layer = 3; layer < 7; layer++) {

Check failure on line 716 in PWGEM/Dilepton/Utils/ElectronModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = track.itsClsSizeInLayer(layer);
if (cluster_size_per_layer > 0) {
nl_ob++;
Expand All @@ -728,7 +728,7 @@
int pbin = lower_bound(fElectronCut.binsMl.value.begin(), fElectronCut.binsMl.value.end(), binningFeature) - fElectronCut.binsMl.value.begin() - 1;
if (pbin < 0) {
pbin = 0;
} else if (static_cast<int>(fElectronCut.binsMl.value.size()) - 2 < pbin) {

Check failure on line 731 in PWGEM/Dilepton/Utils/ElectronModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pbin = static_cast<int>(fElectronCut.binsMl.value.size()) - 2;
}

Expand All @@ -748,7 +748,7 @@
}
if (fElectronCut.storeOnlyTrueElectronMC) {
const auto& mcParticle = track.template mcParticle_as<aod::McParticles>();
if (std::abs(mcParticle.pdgCode()) != 11) {

Check failure on line 751 in PWGEM/Dilepton/Utils/ElectronModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

Check failure on line 751 in PWGEM/Dilepton/Utils/ElectronModule.h

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 false;
}
}
Expand Down Expand Up @@ -819,7 +819,7 @@
}

int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 822 in PWGEM/Dilepton/Utils/ElectronModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = track.itsClsSizeInLayer(layer);
if (cluster_size_per_layer > 0) {
nl++;
Expand Down Expand Up @@ -897,7 +897,7 @@
}

int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 900 in PWGEM/Dilepton/Utils/ElectronModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = track.itsClsSizeInLayer(layer);
if (cluster_size_per_layer > 0) {
nl++;
Expand All @@ -923,7 +923,7 @@
int pbin = lower_bound(eCut.binsMl.value.begin(), eCut.binsMl.value.end(), binningFeature) - eCut.binsMl.value.begin() - 1;
if (pbin < 0) {
pbin = 0;
} else if (static_cast<int>(eCut.binsMl.value.size()) - 2 < pbin) {

Check failure on line 926 in PWGEM/Dilepton/Utils/ElectronModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pbin = static_cast<int>(eCut.binsMl.value.size()) - 2;
}
return fMapProbaEl[std::make_pair(collision.globalIndex(), track.globalIndex())] > eCut.cutsMl.value[pbin];
Expand Down Expand Up @@ -1093,7 +1093,7 @@
trackParCov.getSigma1Pt2());

int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 1096 in PWGEM/Dilepton/Utils/ElectronModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = track.itsClsSizeInLayer(layer);
if (cluster_size_per_layer > 0) {
nl++;
Expand All @@ -1102,7 +1102,7 @@
}

int total_cluster_size_ib = 0, nl_ib = 0;
for (unsigned int layer = 0; layer < 3; layer++) {

Check failure on line 1105 in PWGEM/Dilepton/Utils/ElectronModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = track.itsClsSizeInLayer(layer);
if (cluster_size_per_layer > 0) {
nl_ib++;
Expand All @@ -1111,7 +1111,7 @@
}

int total_cluster_size_ob = 0, nl_ob = 0;
for (unsigned int layer = 3; layer < 7; layer++) {

Check failure on line 1114 in PWGEM/Dilepton/Utils/ElectronModule.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = track.itsClsSizeInLayer(layer);
if (cluster_size_per_layer > 0) {
nl_ob++;
Expand Down
Loading