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
8 changes: 4 additions & 4 deletions Common/Tools/Multiplicity/MultModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,9 @@
if (internalOpts.mEnabledTables[kPVMults]) {
if (std::abs(track.eta()) < 1.0) {
mults.multNContribsEta1++; // pvmults
if (std::abs(track.eta()) < 0.8) {

Check failure on line 581 in Common/Tools/Multiplicity/MultModule.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.
mults.multNContribs++; // pvmults
if (std::abs(track.eta()) < 0.5) {

Check failure on line 583 in Common/Tools/Multiplicity/MultModule.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.
mults.multNContribsEtaHalf++; // pvmults
}
}
Expand Down Expand Up @@ -684,7 +684,7 @@
auto amplitude = fv0.amplitude()[ii];
auto channel = fv0.channel()[ii];
mults.multFV0A += amplitude;
if (channel > 7) {

Check failure on line 687 in Common/Tools/Multiplicity/MultModule.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.
mults.multFV0AOuter += amplitude;
}
}
Expand Down Expand Up @@ -761,7 +761,7 @@
//_______________________________________________________________________
// vertex-Z equalized signals
if (internalOpts.mEnabledTables[kFV0MultZeqs]) {
if (std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {

Check failure on line 764 in Common/Tools/Multiplicity/MultModule.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.
mults.multFV0AZeq = hVtxZFV0A->Interpolate(0.0) * mults.multFV0A / hVtxZFV0A->Interpolate(collision.posZ());
} else {
mults.multFV0AZeq = 0.0f;
Expand All @@ -769,7 +769,7 @@
cursors.tableFV0Zeqs(mults.multFV0AZeq);
}
if (internalOpts.mEnabledTables[kFT0MultZeqs]) {
if (std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {

Check failure on line 772 in Common/Tools/Multiplicity/MultModule.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.
mults.multFT0AZeq = hVtxZFT0A->Interpolate(0.0) * mults.multFT0A / hVtxZFT0A->Interpolate(collision.posZ());
mults.multFT0CZeq = hVtxZFT0C->Interpolate(0.0) * mults.multFT0C / hVtxZFT0C->Interpolate(collision.posZ());
} else {
Expand All @@ -779,7 +779,7 @@
cursors.tableFT0Zeqs(mults.multFT0AZeq, mults.multFT0CZeq);
}
if (internalOpts.mEnabledTables[kFDDMultZeqs]) {
if (std::fabs(collision.posZ()) < 15.0f && lCalibLoaded) {

Check failure on line 782 in Common/Tools/Multiplicity/MultModule.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.
mults.multFDDAZeq = hVtxZFDDA->Interpolate(0.0) * mults.multFDDA / hVtxZFDDA->Interpolate(collision.posZ());
mults.multFDDCZeq = hVtxZFDDC->Interpolate(0.0) * mults.multFDDC / hVtxZFDDC->Interpolate(collision.posZ());
} else {
Expand All @@ -806,9 +806,9 @@
if (track.isPVContributor()) {
if (std::abs(track.eta()) < 1.0) {
mults.multNContribsEta1++; // pvmults
if (std::abs(track.eta()) < 0.8) {

Check failure on line 809 in Common/Tools/Multiplicity/MultModule.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.
mults.multNContribs++; // pvmults
if (std::abs(track.eta()) < 0.5) {

Check failure on line 811 in Common/Tools/Multiplicity/MultModule.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.
mults.multNContribsEtaHalf++; // pvmults
}
}
Expand Down Expand Up @@ -843,10 +843,10 @@
}
mults.multNbrContribsEta10GlobalTrackWoDCA++;

if (std::abs(track.eta()) < 0.8) {

Check failure on line 846 in Common/Tools/Multiplicity/MultModule.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.
mults.multNbrContribsEta08GlobalTrackWoDCA++;
}
if (std::abs(track.eta()) < 0.5) {

Check failure on line 849 in Common/Tools/Multiplicity/MultModule.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.
mults.multNbrContribsEta05GlobalTrackWoDCA++;
}
}
Expand Down Expand Up @@ -1262,8 +1262,8 @@
auto populateTable = [&](auto& table, struct CalibrationInfo& estimator, float multiplicity, bool isInelGt0) {
const bool assignOutOfRange = internalOpts.embedINELgtZEROselection && !isInelGt0;
auto scaleMC = [](float x, const float pars[6]) {
float core = ((pars[0] + pars[1] * std::pow(x, pars[2])) - pars[3]) / pars[4];
if(core<0.0f){
float core = ((pars[0] + pars[1] * std::pow(x, pars[2])) - pars[3]) / pars[4];
if (core < 0.0f) {
return 0.0f; // this should be marked as low multiplicity and not mapped, core^pars[5] would be NaN
}
return std::pow(((pars[0] + pars[1] * std::pow(x, pars[2])) - pars[3]) / pars[4], 1.0f / pars[5]);
Expand Down Expand Up @@ -1351,8 +1351,8 @@
ConfigureCentralityRun2(ccdb, metadataInfo, firstbc);

auto scaleMC = [](float x, const float pars[6]) {
float core = ((pars[0] + pars[1] * std::pow(x, pars[2])) - pars[3]) / pars[4];
if(core<0.0f){
float core = ((pars[0] + pars[1] * std::pow(x, pars[2])) - pars[3]) / pars[4];
if (core < 0.0f) {
return 0.0f; // this should be marked as low multiplicity and not mapped, core^pars[5] would be NaN
}
return std::pow(((pars[0] + pars[1] * std::pow(x, pars[2])) - pars[3]) / pars[4], 1.0f / pars[5]);
Expand Down
Loading