From 21db65c2e43b405e3a19f60230f7b7c72165c001 Mon Sep 17 00:00:00 2001 From: Chris West Date: Tue, 13 Feb 2018 21:20:14 -0600 Subject: [PATCH] Do not truncate QIE11 linearization LUTs at 10 bits --- .../HcalTPGAlgos/interface/HcaluLUTTPGCoder.h | 8 +++++--- CalibCalorimetry/HcalTPGAlgos/src/HcaluLUTTPGCoder.cc | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CalibCalorimetry/HcalTPGAlgos/interface/HcaluLUTTPGCoder.h b/CalibCalorimetry/HcalTPGAlgos/interface/HcaluLUTTPGCoder.h index 2698c374188d5..4829941ad0f1f 100644 --- a/CalibCalorimetry/HcalTPGAlgos/interface/HcaluLUTTPGCoder.h +++ b/CalibCalorimetry/HcalTPGAlgos/interface/HcaluLUTTPGCoder.h @@ -61,7 +61,9 @@ class HcaluLUTTPGCoder : public HcalTPGCoder { static const int QIE8_LUT_BITMASK = 0x3FF; static const int QIE10_LUT_BITMASK = 0x7FF; - static const int QIE11_LUT_BITMASK = 0x3FF; + static const int QIE11_LUT_BITMASK = 0x7FF; + // only the lowest 10 bits were used in 2017 + static const int QIE11_LUT_BITMASK_2017 = 0x3FF; private: // typedef @@ -74,8 +76,8 @@ class HcaluLUTTPGCoder : public HcalTPGCoder { static const int nFi_ = 72; static const int QIE8_LUT_MSB = 0x400; - static const int QIE11_LUT_MSB0 = 0x400; - static const int QIE11_LUT_MSB1 = 0x800; + static const int QIE11_LUT_MSB0 = 0x800; + static const int QIE11_LUT_MSB1 = 0x1000; static const int QIE10_LUT_MSB = 0x1000; // member variables diff --git a/CalibCalorimetry/HcalTPGAlgos/src/HcaluLUTTPGCoder.cc b/CalibCalorimetry/HcalTPGAlgos/src/HcaluLUTTPGCoder.cc index 01cabc1cfec0a..c3e82ce65d753 100644 --- a/CalibCalorimetry/HcalTPGAlgos/src/HcaluLUTTPGCoder.cc +++ b/CalibCalorimetry/HcalTPGAlgos/src/HcaluLUTTPGCoder.cc @@ -34,6 +34,7 @@ const float HcaluLUTTPGCoder::lsb_=1./16; const int HcaluLUTTPGCoder::QIE8_LUT_BITMASK; const int HcaluLUTTPGCoder::QIE10_LUT_BITMASK; const int HcaluLUTTPGCoder::QIE11_LUT_BITMASK; +const int HcaluLUTTPGCoder::QIE11_LUT_BITMASK_2017; HcaluLUTTPGCoder::HcaluLUTTPGCoder(const HcalTopology* top) : topo_(top), LUTGenerationMode_(true), bitToMask_(0), allLinear_(false), linearLSB_QIE8_(1.), linearLSB_QIE11_(1.) { @@ -311,7 +312,8 @@ void HcaluLUTTPGCoder::update(const HcalDbService& conditions) { const size_t SIZE = qieType==QIE8 ? INPUT_LUT_SIZE : UPGRADE_LUT_SIZE; const int MASK = qieType==QIE8 ? QIE8_LUT_BITMASK : - qieType==QIE10 ? QIE10_LUT_BITMASK : QIE11_LUT_BITMASK; + qieType==QIE10 ? QIE10_LUT_BITMASK : + is2018OrLater ? QIE11_LUT_BITMASK : QIE11_LUT_BITMASK_2017; double linearLSB = linearLSB_QIE8_; if (qieType == QIE11 and cell.ietaAbs() == topo_->lastHBRing()) linearLSB = linearLSB_QIE11Overlap_;