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
5 changes: 5 additions & 0 deletions PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@
}

// In case override, don't proceed, please - no CCDB access required
if (d_bz_input > -990) {

Check failure on line 225 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

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.
d_bz = d_bz_input;
o2::parameters::GRPMagField grpmag;
if (std::fabs(d_bz) > 1e-5) {

Check failure on line 228 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

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.
grpmag.setL3Current(30000.f / (d_bz / 5.0f));
}
o2::base::Propagator::initFieldFromGRP(&grpmag);
Expand Down Expand Up @@ -273,7 +273,7 @@
}
if (storeOnlyTrueElectronMC) {
const auto& mcParticle = track.template mcParticle_as<aod::McParticles>();
if (std::abs(mcParticle.pdgCode()) != 11) {

Check failure on line 276 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

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 276 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.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 false;
}
}
Expand Down Expand Up @@ -361,7 +361,7 @@
}

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

Check failure on line 364 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

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 @@ -413,7 +413,7 @@
int pbin = lower_bound(binsMl.value.begin(), binsMl.value.end(), binningFeature) - binsMl.value.begin() - 1;
if (pbin < 0) {
pbin = 0;
} else if (static_cast<int>(binsMl.value.size()) - 2 < pbin) {

Check failure on line 416 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

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>(binsMl.value.size()) - 2;
}
// LOGF(info, "track.tpcInnerParam() = %f (GeV/c), pbin = %d", track.tpcInnerParam(), pbin);
Expand Down Expand Up @@ -531,7 +531,7 @@
if (fillQAHistogram) {
// uint32_t itsClusterSizes = track.itsClusterSizes();
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 534 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

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 @@ -540,7 +540,7 @@
}

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

Check failure on line 543 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

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 @@ -549,7 +549,7 @@
}

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

Check failure on line 552 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

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 Expand Up @@ -678,6 +678,7 @@
continue;
}
mapProbEl[std::make_pair(collision.globalIndex(), track.globalIndex())] = probaEl;
multiMapTracksPerCollision.insert(std::make_pair(collision.globalIndex(), track.globalIndex()));
}
} // end of collision loop

Expand Down Expand Up @@ -727,6 +728,7 @@
continue;
}
mapProbEl[std::make_pair(collision.globalIndex(), track.globalIndex())] = probaEl;
multiMapTracksPerCollision.insert(std::make_pair(collision.globalIndex(), track.globalIndex()));
}

} // end of collision loop
Expand Down Expand Up @@ -778,6 +780,7 @@
continue;
}
mapProbEl[std::make_pair(collision.globalIndex(), track.globalIndex())] = probaEl;
multiMapTracksPerCollision.insert(std::make_pair(collision.globalIndex(), track.globalIndex()));
}
} // end of collision loop

Expand Down Expand Up @@ -831,6 +834,7 @@
continue;
}
mapProbEl[std::make_pair(collision.globalIndex(), track.globalIndex())] = probaEl;
multiMapTracksPerCollision.insert(std::make_pair(collision.globalIndex(), track.globalIndex()));
}
} // end of collision loop

Expand Down Expand Up @@ -881,6 +885,7 @@
continue;
}
mapProbEl[std::make_pair(collision.globalIndex(), track.globalIndex())] = probaEl;
multiMapTracksPerCollision.insert(std::make_pair(collision.globalIndex(), track.globalIndex()));
}
} // end of collision loop

Expand Down Expand Up @@ -997,7 +1002,7 @@
}

// In case override, don't proceed, please - no CCDB access required
if (d_bz_input > -990) {

Check failure on line 1005 in PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

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.
d_bz = d_bz_input;
o2::parameters::GRPMagField grpmag;
if (std::fabs(d_bz) > 1e-5) {
Expand Down
Loading