Skip to content

Commit

Permalink
const under if
Browse files Browse the repository at this point in the history
  • Loading branch information
Salavat committed Oct 30, 2023
1 parent baaf52d commit 3c5e0f0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions CalibCalorimetry/HcalAlgos/src/HcalDbHardcode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,28 +180,28 @@ HcalGainWidth HcalDbHardcode::makeGainWidth(HcalGenericDetId fId) const { // Ge

HcalPFCut HcalDbHardcode::makePFCut(HcalGenericDetId fId, double intLumi, bool noHE) const { // GeV

// from SLHCUpgradeSimulations/Configuration/python/aging.py
double lumis[] = {300, 1000, 3000, 4500}; // integrated lumi points
// row by row initialization
float cuts[4][4] = {{0.4, 0.5, 0.6, 0.6}, {0.8, 1.2, 1.2, 1.2}, {1.0, 2.0, 2.0, 2.0}, {1.25, 2.5, 2.5, 2.5}};

float seeds[4][4] = {{0.5, 0.625, 0.75, 0.75}, {1.0, 1.5, 1.5, 1.5}, {1.25, 2.5, 2.5, 2.5}, {1.5, 3.0, 3.0, 3.0}};

double eps = 1.e-6;

// assign default dummy parameters
float value0 = getParameters(fId).noiseThreshold();
float value1 = getParameters(fId).seedThreshold();

// lumi-dependent stuff for Phase2

if (noHE && fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel) { // HB Phase2

// from SLHCUpgradeSimulations/Configuration/python/aging.py
const double lumis[] = {300, 1000, 3000, 4500}; // integrated lumi points
// row by row initialization
const float cuts[4][4] = {{0.4, 0.5, 0.6, 0.6}, {0.8, 1.2, 1.2, 1.2}, {1.0, 2.0, 2.0, 2.0}, {1.25, 2.5, 2.5, 2.5}};
const float seeds[4][4] = {
{0.5, 0.625, 0.75, 0.75}, {1.0, 1.5, 1.5, 1.5}, {1.25, 2.5, 2.5, 2.5}, {1.5, 3.0, 3.0, 3.0}};
const double eps = 1.e-6;

HcalDetId hid(fId);
int depth = hid.depth();
int depth_m1 = hid.depth() - 1;
for (int i = 0; i < 4; i++) {
if (fabs(intLumi - lumis[i]) < eps) {
value0 = cuts[i][depth - 1];
value1 = seeds[i][depth - 1];
value0 = cuts[i][depth_m1];
value1 = seeds[i][depth_m1];
}
}
}
Expand Down

0 comments on commit 3c5e0f0

Please sign in to comment.