Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCAL: setting hardcoded PFCuts conditions for Phase2 #43139

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CalibCalorimetry/HcalAlgos/interface/HcalDbHardcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class HcalDbHardcode {
HcalPedestalWidth makePedestalWidth(HcalGenericDetId fId, bool eff, const HcalTopology* topo, double intlumi);
HcalGain makeGain(HcalGenericDetId fId, bool fSmear = false) const;
HcalGainWidth makeGainWidth(HcalGenericDetId fId) const;
HcalPFCut makePFCut(HcalGenericDetId fId) const;
HcalPFCut makePFCut(HcalGenericDetId fId, double intlumi, bool noHE) const;
HcalZSThreshold makeZSThreshold(HcalGenericDetId fId) const;
HcalQIECoder makeQIECoder(HcalGenericDetId fId) const;
HcalCalibrationQIECoder makeCalibrationQIECoder(HcalGenericDetId fId) const;
Expand Down
27 changes: 26 additions & 1 deletion CalibCalorimetry/HcalAlgos/src/HcalDbHardcode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,34 @@ HcalGainWidth HcalDbHardcode::makeGainWidth(HcalGenericDetId fId) const { // Ge
return result;
}

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

// 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_m1 = hid.depth() - 1;
for (int i = 0; i < 4; i++) {
if (std::abs(intLumi - lumis[i]) < eps) {
value0 = cuts[i][depth_m1];
value1 = seeds[i][depth_m1];
}
}
}

HcalPFCut result(fId.rawId(), value0, value1);
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ std::unique_ptr<HcalPFCuts> HcalHardcodeCalibrations::producePFCuts(const HcalPF
for (auto cell : cells) {
// Use only standard Hcal channels for now, no TrigPrims
if (!cell.isHcalTrigTowerDetId()) {
HcalPFCut item = dbHardcode.makePFCut(cell);
HcalPFCut item = dbHardcode.makePFCut(cell, iLumi, dbHardcode.killHE());
result->addValues(item);
}
}
Expand Down