Skip to content

Commit 5a86153

Browse files
author
Salavat
committed
set Phase2 hardcoded PFcuts
squash 3 commits
1 parent e4bfeac commit 5a86153

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

CalibCalorimetry/HcalAlgos/interface/HcalDbHardcode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class HcalDbHardcode {
101101
HcalPedestalWidth makePedestalWidth(HcalGenericDetId fId, bool eff, const HcalTopology* topo, double intlumi);
102102
HcalGain makeGain(HcalGenericDetId fId, bool fSmear = false) const;
103103
HcalGainWidth makeGainWidth(HcalGenericDetId fId) const;
104-
HcalPFCut makePFCut(HcalGenericDetId fId) const;
104+
HcalPFCut makePFCut(HcalGenericDetId fId, double intlumi, bool noHE) const;
105105
HcalZSThreshold makeZSThreshold(HcalGenericDetId fId) const;
106106
HcalQIECoder makeQIECoder(HcalGenericDetId fId) const;
107107
HcalCalibrationQIECoder makeCalibrationQIECoder(HcalGenericDetId fId) const;

CalibCalorimetry/HcalAlgos/src/HcalDbHardcode.cc

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,34 @@ HcalGainWidth HcalDbHardcode::makeGainWidth(HcalGenericDetId fId) const { // Ge
178178
return result;
179179
}
180180

181-
HcalPFCut HcalDbHardcode::makePFCut(HcalGenericDetId fId) const { // GeV
181+
HcalPFCut HcalDbHardcode::makePFCut(HcalGenericDetId fId, double intLumi, bool noHE) const { // GeV
182+
183+
// assign default dummy parameters
182184
float value0 = getParameters(fId).noiseThreshold();
183185
float value1 = getParameters(fId).seedThreshold();
186+
187+
// lumi-dependent stuff for Phase2
188+
189+
if (noHE && fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel) { // HB Phase2
190+
191+
// from SLHCUpgradeSimulations/Configuration/python/aging.py
192+
const double lumis[] = {300, 1000, 3000, 4500}; // integrated lumi points
193+
// row by row initialization
194+
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}};
195+
const float seeds[4][4] = {
196+
{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}};
197+
const double eps = 1.e-6;
198+
199+
HcalDetId hid(fId);
200+
int depth_m1 = hid.depth() - 1;
201+
for (int i = 0; i < 4; i++) {
202+
if (std::abs(intLumi - lumis[i]) < eps) {
203+
value0 = cuts[i][depth_m1];
204+
value1 = seeds[i][depth_m1];
205+
}
206+
}
207+
}
208+
184209
HcalPFCut result(fId.rawId(), value0, value1);
185210
return result;
186211
}

CalibCalorimetry/HcalPlugins/src/HcalHardcodeCalibrations.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ std::unique_ptr<HcalPFCuts> HcalHardcodeCalibrations::producePFCuts(const HcalPF
438438
for (auto cell : cells) {
439439
// Use only standard Hcal channels for now, no TrigPrims
440440
if (!cell.isHcalTrigTowerDetId()) {
441-
HcalPFCut item = dbHardcode.makePFCut(cell);
441+
HcalPFCut item = dbHardcode.makePFCut(cell, iLumi, dbHardcode.killHE());
442442
result->addValues(item);
443443
}
444444
}

0 commit comments

Comments
 (0)