Skip to content

Commit 25264ba

Browse files
committed
Linter fixes
1 parent d71cac3 commit 25264ba

1 file changed

Lines changed: 56 additions & 54 deletions

File tree

Common/Tools/EventSelectionModule.h

Lines changed: 56 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// or submit itself to any jurisdiction.
1111

1212
/// \file EventSelectionModule.h
13-
/// \brief
13+
/// \brief Event selection modeule
1414
/// \author ALICE
1515

1616
#ifndef COMMON_TOOLS_EVENTSELECTIONMODULE_H_
@@ -59,8 +59,8 @@
5959
#include <utility>
6060
#include <vector>
6161

62-
#define bitcheck(var, nbit) ((var) & (static_cast<uint32_t>(1) << (nbit)))
63-
#define bitcheck64(var, nbit) ((var) & (static_cast<uint64_t>(1) << (nbit)))
62+
#define BITCHECK(var, nbit) ((var) & (static_cast<uint32_t>(1) << (nbit)))
63+
#define BITCHECK64(var, nbit) ((var) & (static_cast<uint64_t>(1) << (nbit)))
6464

6565
//__________________________________________
6666
// MultModule
@@ -77,7 +77,7 @@ static const int32_t nBCsPerOrbit = o2::constants::lhc::LHCMaxBunches;
7777
// for providing temporary buffer
7878
// FIXME ideally cursors could be readable
7979
// to avoid duplicate memory allocation but ok
80-
struct bcselEntry {
80+
struct bcselEntry { // o2-linter: disable=name/struct (temporary fix)
8181
uint32_t alias{0};
8282
uint64_t selection{0};
8383
uint32_t rct{0};
@@ -88,22 +88,22 @@ struct bcselEntry {
8888
};
8989

9090
// bc selection configurables
91-
struct bcselConfigurables : o2::framework::ConfigurableGroup {
91+
struct bcselConfigurables : o2::framework::ConfigurableGroup { // o2-linter: disable=name/struct (temporary fix)
9292
std::string prefix = "bcselOpts";
9393
o2::framework::Configurable<int> amIneeded{"amIneeded", -1, "run BC selection or not. -1: automatic; 0: no; 1: yes"}; // o2-linter: disable=name/configurable (temporary fix)
9494
o2::framework::Configurable<int> confITSROFrameStartBorderMargin{"ITSROFrameStartBorderMargin", -1, "Number of bcs at the start of ITS RO Frame border. Take from CCDB if -1"}; // o2-linter: disable=name/configurable (temporary fix)
9595
o2::framework::Configurable<int> confITSROFrameEndBorderMargin{"ITSROFrameEndBorderMargin", -1, "Number of bcs at the end of ITS RO Frame border. Take from CCDB if -1"}; // o2-linter: disable=name/configurable (temporary fix)
9696
o2::framework::Configurable<int> confTimeFrameStartBorderMargin{"TimeFrameStartBorderMargin", -1, "Number of bcs to cut at the start of the Time Frame. Take from CCDB if -1"}; // o2-linter: disable=name/configurable (temporary fix)
9797
o2::framework::Configurable<int> confTimeFrameEndBorderMargin{"TimeFrameEndBorderMargin", -1, "Number of bcs to cut at the end of the Time Frame. Take from CCDB if -1"}; // o2-linter: disable=name/configurable (temporary fix)
9898
o2::framework::Configurable<bool> confCheckRunDurationLimits{"checkRunDurationLimits", false, "Check if the BCs are within the run duration limits"}; // o2-linter: disable=name/configurable (temporary fix)
99-
o2::framework::Configurable<std::vector<int>> confMaxInactiveChipsPerLayer{"maxInactiveChipsPerLayer", {8, 8, 8, 111, 111, 195, 195}, "Maximum allowed number of inactive ITS chips per layer"};
99+
o2::framework::Configurable<std::vector<int>> confMaxInactiveChipsPerLayer{"maxInactiveChipsPerLayer", {8, 8, 8, 111, 111, 195, 195}, "Maximum allowed number of inactive ITS chips per layer"}; // o2-linter: disable=name/configurable (temporary fix)
100100
o2::framework::Configurable<int> confNumberOfOrbitsPerTF{"NumberOfOrbitsPerTF", -1, "Number of orbits per Time Frame. Take from CCDB if -1"}; // o2-linter: disable=name/configurable (temporary fix)
101101
};
102102

103103
// event selection configurables
104-
struct evselConfigurables : o2::framework::ConfigurableGroup {
104+
struct evselConfigurables : o2::framework::ConfigurableGroup { // o2-linter: disable=name/struct (temporary fix)
105105
std::string prefix = "evselOpts";
106-
bool isMC_metadata = false;
106+
bool isMC_metadata = false; // o2-linter: disable=name/function-variable (temporary fix)
107107
o2::framework::Configurable<int> amIneeded{"amIneeded", -1, "run event selection or not. -1: automatic; 0: no; 1: yes"}; // o2-linter: disable=name/configurable (temporary fix)
108108
o2::framework::Configurable<int> muonSelection{"muonSelection", 0, "0 - barrel, 1 - muon selection with pileup cuts, 2 - muon selection without pileup cuts"};
109109
o2::framework::Configurable<float> maxDiffZvtxFT0vsPV{"maxDiffZvtxFT0vsPV", 1., "maximum difference (in cm) between z-vertex from FT0 and PV"};
@@ -129,7 +129,7 @@ struct evselConfigurables : o2::framework::ConfigurableGroup {
129129
};
130130

131131
// luminosity configurables
132-
struct lumiConfigurables : o2::framework::ConfigurableGroup {
132+
struct lumiConfigurables : o2::framework::ConfigurableGroup { // o2-linter: disable=name/struct (temporary fix)
133133
std::string prefix = "lumiOpts";
134134
o2::framework::Configurable<int> amIneeded{"amIneeded", -1, "run BC selection or not. -1: automatic; 0: no; 1: yes"}; // o2-linter: disable=name/configurable (temporary fix)
135135
};
@@ -693,14 +693,14 @@ class EventSelectionModule
693693
float calcWeightForOccupancy(float dt)
694694
{
695695
float wOccup = 0;
696-
if (dt >= -40 && dt < -5) // collisions in the past // o2-linter: disable=magic-number
697-
wOccup = 1. / 1225 * (dt + 40) * (dt + 40); // o2-linter: disable=magic-number
698-
else if (dt >= -5 && dt < 15) // collisions near a given one // o2-linter: disable=magic-number
696+
if (dt >= -40 && dt < -5) // o2-linter: disable=magic-number (collisions in the past)
697+
wOccup = 1. / 1225 * (dt + 40) * (dt + 40); // o2-linter: disable=magic-number (parabolic weight for past collisions)
698+
else if (dt >= -5 && dt < 15) // o2-linter: disable=magic-number (collisions near a given one)
699699
wOccup = 1;
700-
else if (dt >= 15 && dt < 40) // collisions from the future // o2-linter: disable=magic-number
701-
wOccup = -0.4 / 25 * dt + 1.24; // o2-linter: disable=magic-number
702-
else if (dt >= 40 && dt < 100) // collisions from the distant future // o2-linter: disable=magic-number
703-
wOccup = -0.4 / 60 * dt + 0.6 + 0.8 / 3; // o2-linter: disable=magic-number
700+
else if (dt >= 15 && dt < 40) // o2-linter: disable=magic-number (collisions from the future)
701+
wOccup = -0.4 / 25 * dt + 1.24; // o2-linter: disable=magic-number (linear weight for future collisions)
702+
else if (dt >= 40 && dt < 100) // o2-linter: disable=magic-number (collisions from the distant future)
703+
wOccup = -0.4 / 60 * dt + 0.6 + 0.8 / 3; // o2-linter: disable=magic-number (linear weight for distant future collisions)
704704
return wOccup;
705705
}
706706

@@ -780,7 +780,7 @@ class EventSelectionModule
780780
LOGP(debug, "ITS ROF Offset={} ITS ROF Length={}", rofOffset, rofLength);
781781

782782
// special treatment of light ion runs
783-
if (lastRun >= 564356 && lastRun <= 564472) {
783+
if (lastRun >= 564356 && lastRun <= 564472) { // o2-linter: disable=magic-number (light ion run range)
784784
for (uint32_t i = 0; i < sizeof(runListLightIons) / sizeof(*runListLightIons); i++) {
785785
if (runListLightIons[i] == lastRun) {
786786
runLightIons = lastRun;
@@ -790,9 +790,9 @@ class EventSelectionModule
790790
diffVzParMean = *parMeans;
791791
diffVzParSigma = *parSigmas;
792792
LOGP(info, ">>> special treatment for diffVz for light ion run {}", runLightIons);
793-
for (int j = 0; j < 5; j++)
793+
for (int j = 0; j < 5; j++) // o2-linter: disable=magic-number (5 parameters)
794794
LOGP(info, " mean par {} = {}", j, diffVzParMean[j]);
795-
for (int j = 0; j < 5; j++)
795+
for (int j = 0; j < 5; j++) // o2-linter: disable=magic-number (5 parameters)
796796
LOGP(info, " sigma par {} = {}", j, diffVzParSigma[j]);
797797
break;
798798
}
@@ -863,18 +863,18 @@ class EventSelectionModule
863863
}
864864

865865
// TODO introduce array of sel[0]... sel[8] or similar?
866-
bool sel8 = bitcheck64(selection, aod::evsel::kIsBBT0A) && bitcheck64(selection, aod::evsel::kIsBBT0C); // TODO apply other cuts for sel8
867-
bool sel1 = bitcheck64(selection, aod::evsel::kIsINT1);
868-
sel1 = sel1 && bitcheck64(selection, aod::evsel::kNoBGV0A);
869-
sel1 = sel1 && bitcheck64(selection, aod::evsel::kNoBGV0C);
870-
sel1 = sel1 && bitcheck64(selection, aod::evsel::kNoTPCLaserWarmUp);
871-
sel1 = sel1 && bitcheck64(selection, aod::evsel::kNoTPCHVdip);
866+
bool sel8 = BITCHECK64(selection, aod::evsel::kIsBBT0A) && BITCHECK64(selection, aod::evsel::kIsBBT0C); // TODO apply other cuts for sel8
867+
bool sel1 = BITCHECK64(selection, aod::evsel::kIsINT1);
868+
sel1 = sel1 && BITCHECK64(selection, aod::evsel::kNoBGV0A);
869+
sel1 = sel1 && BITCHECK64(selection, aod::evsel::kNoBGV0C);
870+
sel1 = sel1 && BITCHECK64(selection, aod::evsel::kNoTPCLaserWarmUp);
871+
sel1 = sel1 && BITCHECK64(selection, aod::evsel::kNoTPCHVdip);
872872

873873
// INT1 (SPDFO>0 | V0A | V0C) minimum bias trigger logic used in pp2010 and pp2011
874874
bool isINT1period = bc.runNumber() <= 136377 || (bc.runNumber() >= 144871 && bc.runNumber() <= 159582); // o2-linter: disable=magic-number (magic run numbers)
875875

876876
// fill counters
877-
if (evselOpts.isMC == 1 || (!isINT1period && bitcheck(alias, kINT7)) || (isINT1period && bitcheck(alias, kINT1))) {
877+
if (evselOpts.isMC == 1 || (!isINT1period && BITCHECK(alias, kINT7)) || (isINT1period && BITCHECK(alias, kINT1))) {
878878
histos.template get<TH1>(HIST("eventselection/hColCounterAll"))->Fill(Form("%d", bc.runNumber()), 1);
879879
if ((!isINT1period && sel7) || (isINT1period && sel1)) {
880880
histos.template get<TH1>(HIST("eventselection/hColCounterAcc"))->Fill(Form("%d", bc.runNumber()), 1);
@@ -913,7 +913,7 @@ class EventSelectionModule
913913
}
914914

915915
auto selection = bcselbuffer[bc.globalIndex()].selection;
916-
if (bitcheck64(selection, aod::evsel::kIsTriggerTVX)) {
916+
if (BITCHECK64(selection, aod::evsel::kIsTriggerTVX)) {
917917
mapGlobalBcWithTVX[globalBC] = bc.globalIndex();
918918
mapGlobalBcVtxZ[globalBC] = bc.has_ft0() ? bc.ft0().posZ() : 0;
919919
}
@@ -1022,7 +1022,7 @@ class EventSelectionModule
10221022
int32_t localBC = globalBC % nBCsPerOrbit;
10231023
int32_t bcFromPattern = bcsPattern.at(i);
10241024
int64_t bcDiff = bcFromPattern - localBC;
1025-
if (std::abs(bcDiff) <= 20) {
1025+
if (std::abs(bcDiff) <= 20) { // o2-linter: disable=magic-number (max BC difference to match pattern)
10261026
foundGlobalBC = (globalBC / nBCsPerOrbit) * nBCsPerOrbit + bcFromPattern;
10271027
break; // the bc in pattern is found
10281028
}
@@ -1059,7 +1059,7 @@ class EventSelectionModule
10591059
for (uint32_t j = 0; j < bcsPattern.size(); j++) {
10601060
int32_t bcFromPatternBest = bcsPattern.at(j);
10611061
int64_t bcDiff = bcFromPatternBest - (bestGlobalBC % nBCsPerOrbit);
1062-
if (std::abs(bcDiff) <= 20) {
1062+
if (std::abs(bcDiff) <= 20) { // o2-linter: disable=magic-number (max BC difference to match pattern)
10631063
foundGlobalBC = (bestGlobalBC / nBCsPerOrbit) * nBCsPerOrbit + bcFromPatternBest;
10641064
break; // the bc in pattern is found
10651065
}
@@ -1163,12 +1163,12 @@ class EventSelectionModule
11631163
auto bcselEntry = bcselbuffer[foundBC];
11641164
// check if we are close to ITS ROF borders => N ITS tracks is not reliable, and FT0C ampl can be used for occupancy estimation
11651165
// denominator for vAmpFT0CperColl is the approximate conversion factor b/n FT0C ampl and number of PV tracks after cuts
1166-
vProxyForCollNtracks[colIndex] = bitcheck64(bcselEntry.selection, aod::evsel::kNoITSROFrameBorder) ? vTracksITS567perColl[colIndex] : vAmpFT0CperColl[colIndex] / 10.;
1166+
vProxyForCollNtracks[colIndex] = BITCHECK64(bcselEntry.selection, aod::evsel::kNoITSROFrameBorder) ? vTracksITS567perColl[colIndex] : vAmpFT0CperColl[colIndex] / 10.;
11671167

1168-
if (!bitcheck64(bcselEntry.selection, aod::evsel::kNoTimeFrameBorder)) {
1168+
if (!BITCHECK64(bcselEntry.selection, aod::evsel::kNoTimeFrameBorder)) {
11691169
vIsCollRejectedByTFborderCut[colIndex] = true;
11701170
}
1171-
if (nBCsPerTF - bcInTF < 4000 * 2) {
1171+
if (nBCsPerTF - bcInTF < 4000 * 2) { // o2-linter: disable=magic-number (BCs within last drift time window)
11721172
vCanHaveAssocCollsWithinLastDriftTime[colIndex] = true;
11731173
}
11741174
}
@@ -1367,7 +1367,7 @@ class EventSelectionModule
13671367
nITS567tracksForVetoStrict += vProxyForCollNtracks[thisColIndex];
13681368

13691369
// veto on high-mult collisions nearby, where artificial structures in the dt-occupancy plots are observed
1370-
if (dt > -4.0 && dt < 2.0 && vAmpFT0CperColl[thisColIndex] > evselOpts.confFT0CamplCutVetoOnCollInTimeRange) { // dt in us // o2-linter: disable=magic-number
1370+
if (dt > -4.0 && dt < 2.0 && vAmpFT0CperColl[thisColIndex] > evselOpts.confFT0CamplCutVetoOnCollInTimeRange) { // o2-linter: disable=magic-number (dt in us, time window for high-mult veto)
13711371
nCollsWithFT0CAboveVetoStandard++;
13721372
}
13731373

@@ -1414,7 +1414,7 @@ class EventSelectionModule
14141414
if (evselOpts.confUseWeightsForOccupancyVariable) {
14151415
wOccup = calcWeightForOccupancy(dt / 1e3); // ns -> us
14161416
}
1417-
if (multT0C > 50.) // multiplicity in TVX is non-negligible, take it into occupancy calc
1417+
if (multT0C > 50.) // o2-linter: disable=magic-number (multiplicity threshold for occupancy calc)
14181418
{
14191419
nITS567tracksInFullTimeWindow += wOccup * multT0C / 10.;
14201420
sumAmpFT0CInFullTimeWindow += wOccup * multT0C;
@@ -1458,13 +1458,13 @@ class EventSelectionModule
14581458
} else { // special treatment of light ion runs
14591459
float multT0A = bc.ft0().sumAmpA();
14601460
float multT0C = bc.ft0().sumAmpC();
1461-
float T0M = multT0A + multT0C;
1461+
float multT0M = multT0A + multT0C;
14621462
// calc mean at this T0 ampl.
1463-
float x = (T0M < 50 ? 50 : T0M);
1464-
double diffMean = diffVzParMean[0] + diffVzParMean[1] * pow(x, diffVzParMean[2]) + diffVzParMean[3] * pow(x, diffVzParMean[4]);
1463+
float x = (multT0M < 50 ? 50 : multT0M); // o2-linter: disable=magic-number (min T0M for mean parametrization)
1464+
double diffMean = diffVzParMean[0] + diffVzParMean[1] * std::pow(x, diffVzParMean[2]) + diffVzParMean[3] * std::pow(x, diffVzParMean[4]);
14651465
// calc sigma at this T0 ampl.
1466-
x = (T0M < 20 ? 20 : (T0M > 1.2e4 ? 1.2e4 : T0M));
1467-
double diffSigma = diffVzParSigma[0] + diffVzParSigma[1] * pow(x, diffVzParSigma[2]) + diffVzParSigma[3] * pow(x, diffVzParSigma[4]);
1466+
x = (multT0M < 20 ? 20 : (multT0M > 1.2e4 ? 1.2e4 : multT0M)); // o2-linter: disable=magic-number (min/max T0M for sigma parametrization)
1467+
double diffSigma = diffVzParSigma[0] + diffVzParSigma[1] * std::pow(x, diffVzParSigma[2]) + diffVzParSigma[3] * std::pow(x, diffVzParSigma[4]);
14681468
float nSigma = evselOpts.confLightIonsNsigmaOnVzDiff;
14691469
float margin = evselOpts.confLightIonsMarginVzDiff;
14701470
isGoodZvtxFT0vsPV = (diffVz > diffMean - nSigma * diffSigma - margin && diffVz < diffMean + nSigma * diffSigma + margin);
@@ -1505,14 +1505,14 @@ class EventSelectionModule
15051505
// TODO apply other cuts for sel8?
15061506
// TODO introduce array of sel[0]... sel[8] or similar?
15071507
bool sel8 = false;
1508-
if (lastRun < 568873) // pre-2026 data & MC: require all three bits: TVX, TF and ROF border cuts
1509-
sel8 = bitcheck64(bcselEntry.selection, aod::evsel::kIsTriggerTVX) && bitcheck64(bcselEntry.selection, aod::evsel::kNoTimeFrameBorder) && bitcheck64(bcselEntry.selection, aod::evsel::kNoITSROFrameBorder);
1508+
if (lastRun < 568873) // o2-linter: disable=magic-number (pre-2026 data & MC: require all three bits: TVX, TF and ROF border cuts)
1509+
sel8 = BITCHECK64(bcselEntry.selection, aod::evsel::kIsTriggerTVX) && BITCHECK64(bcselEntry.selection, aod::evsel::kNoTimeFrameBorder) && BITCHECK64(bcselEntry.selection, aod::evsel::kNoITSROFrameBorder);
15101510
else // for pp 2026: sel8 without kNoITSROFrameBorder bit, because the cross-ROF reconstruction for ITS will be On (the switch by a runNumber is a temporary solution)
1511-
sel8 = bitcheck64(bcselEntry.selection, aod::evsel::kIsTriggerTVX) && bitcheck64(bcselEntry.selection, aod::evsel::kNoTimeFrameBorder);
1511+
sel8 = BITCHECK64(bcselEntry.selection, aod::evsel::kIsTriggerTVX) && BITCHECK64(bcselEntry.selection, aod::evsel::kNoTimeFrameBorder);
15121512

15131513
// fill counters
15141514
histos.template get<TH1>(HIST("eventselection/hColCounterAll"))->Fill(Form("%d", bc.runNumber()), 1);
1515-
if (bitcheck64(bcselEntry.selection, aod::evsel::kIsTriggerTVX)) {
1515+
if (BITCHECK64(bcselEntry.selection, aod::evsel::kIsTriggerTVX)) {
15161516
histos.template get<TH1>(HIST("eventselection/hColCounterTVX"))->Fill(Form("%d", bc.runNumber()), 1);
15171517
}
15181518
if (sel8) {
@@ -1658,11 +1658,11 @@ class LumiModule
16581658
csZEM = -1;
16591659
csZNC = -1;
16601660
// Temporary workaround to get visible cross section. TODO: store run-by-run visible cross sections in CCDB
1661-
if (beamZ1 == 8 && beamZ2 == 1) {
1661+
if (beamZ1 == 8 && beamZ2 == 1) { // o2-linter: disable=magic-number (O beam on p, Z=8 and Z=1)
16621662
csTVX = 0.3874e6; // eff(TVX) = 0.807 (based on LHC25e6f); sigma(INEL)=0.48b; arxiv:2507.05853
1663-
} else if (beamZ1 == 8 && beamZ2 == 8) {
1663+
} else if (beamZ1 == 8 && beamZ2 == 8) { // o2-linter: disable=magic-number (O-O collisions, Z=8)
16641664
csTVX = 1.2050e6; // eff(TVX) = 0.886 (based on LHC25e6b); sigma(INEL)=1.36b; arxiv:2507.05853
1665-
} else if (beamZ1 == 10 && beamZ2 == 10) {
1665+
} else if (beamZ1 == 10 && beamZ2 == 10) { // o2-linter: disable=magic-number (Ne-Ne collisions, Z=10)
16661666
csTVX = 1.5411e6; // eff(TVX) = 0.896 (based on LHC25e6g); sigma(INEL)=1.72b; arxiv:2507.05853
16671667
} else if (beamZ1 == 1 && beamZ2 == 1) {
16681668
if (std::fabs(sqrts - 900.) < 100.) { // o2-linter: disable=magic-number (TODO store and extract cross sections from ccdb)
@@ -1757,15 +1757,17 @@ class LumiModule
17571757
double perBcRateTCE = static_cast<double>(mCounterTCE[i + 1] - mCounterTCE[i]) / nOrbits / nCollidingBCs;
17581758
double perBcRateZNC = static_cast<double>(mCounterZNC[i + 1] - mCounterZNC[i]) / nOrbits / nCollidingBCs;
17591759
double perBcRateZEM = static_cast<double>(mCounterZEM[i + 1] - mCounterZEM[i]) / nOrbits / nCollidingBCs;
1760-
double muTVX = (perBcRateTVX < 1 && perBcRateTVX > 1e-10) ? -std::log(1 - perBcRateTVX) : 0;
1761-
double muTCE = (perBcRateTCE < 1 && perBcRateTCE > 1e-10) ? -std::log(1 - perBcRateTCE) : 0;
1762-
double muZNC = (perBcRateZNC < 1 && perBcRateZNC > 1e-10) ? -std::log(1 - perBcRateZNC) : 0;
1763-
double muZEM = (perBcRateZEM < 1 && perBcRateZEM > 1e-10) ? -std::log(1 - perBcRateZEM) : 0;
1760+
constexpr float rateMin = 1.e-10;
1761+
double muTVX = (perBcRateTVX < 1 && perBcRateTVX > rateMin) ? -std::log(1 - perBcRateTVX) : 0;
1762+
double muTCE = (perBcRateTCE < 1 && perBcRateTCE > rateMin) ? -std::log(1 - perBcRateTCE) : 0;
1763+
double muZNC = (perBcRateZNC < 1 && perBcRateZNC > rateMin) ? -std::log(1 - perBcRateZNC) : 0;
1764+
double muZEM = (perBcRateZEM < 1 && perBcRateZEM > rateMin) ? -std::log(1 - perBcRateZEM) : 0;
17641765
LOGP(debug, "orbit={} muTVX={} muTCE={} muZNC={} muZEM={}", mOrbits[i], muTVX, muTCE, muZNC, muZEM);
1765-
mPileupCorrectionTVX.push_back(muTVX > 1e-10 ? muTVX / (1 - std::exp(-muTVX)) : 1);
1766-
mPileupCorrectionTCE.push_back(muTCE > 1e-10 ? muTCE / (1 - std::exp(-muTCE)) : 1);
1767-
mPileupCorrectionZNC.push_back(muZNC > 1e-10 ? muZNC / (1 - std::exp(-muZNC)) : 1);
1768-
mPileupCorrectionZEM.push_back(muZEM > 1e-10 ? muZEM / (1 - std::exp(-muZEM)) : 1);
1766+
constexpr float muMin = 1.e-10;
1767+
mPileupCorrectionTVX.push_back(muTVX > muMin ? muTVX / (1 - std::exp(-muTVX)) : 1);
1768+
mPileupCorrectionTCE.push_back(muTCE > muMin ? muTCE / (1 - std::exp(-muTCE)) : 1);
1769+
mPileupCorrectionZNC.push_back(muZNC > muMin ? muZNC / (1 - std::exp(-muZNC)) : 1);
1770+
mPileupCorrectionZEM.push_back(muZEM > muMin ? muZEM / (1 - std::exp(-muZEM)) : 1);
17691771
}
17701772
// filling last orbit range using previous orbit range
17711773
mPileupCorrectionTVX.push_back(mPileupCorrectionTVX.back());

0 commit comments

Comments
 (0)