#include <HcaluLUTTPGCoder.h>
Public Member Functions | |
void | adc2Linear (const HBHEDataFrame &df, IntegerCaloSamples &ics) const override |
void | adc2Linear (const HFDataFrame &df, IntegerCaloSamples &ics) const override |
void | adc2Linear (const QIE10DataFrame &df, IntegerCaloSamples &ics) const override |
void | adc2Linear (const QIE11DataFrame &df, IntegerCaloSamples &ics) const override |
unsigned short | adc2Linear (HcalQIESample sample, HcalDetId id) const override |
void | compress (const IntegerCaloSamples &ics, const std::vector< bool > &featureBits, HcalTriggerPrimitiveDigi &tp) const override |
double | cosh_ieta (int ieta, int depth, HcalSubdetector subdet) |
std::vector< unsigned short > | getLinearizationLUT (HcalDetId id) const override |
Get the full linearization LUT (128 elements). Default implementation just uses adc2Linear to get all values. More... | |
float | getLUTGain (HcalDetId id) const override |
int | getLUTId (const HcalDetId &detid) const |
int | getLUTId (HcalSubdetector id, int ieta, int iphi, int depth) const |
int | getLUTId (uint32_t rawid) const |
float | getLUTPedestal (HcalDetId id) const override |
bool | getMSB (const HcalDetId &id, int adc) const |
HcaluLUTTPGCoder () | |
HcaluLUTTPGCoder (const HcalTopology *topo, const HcalTimeSlew *delay) | |
void | init (const HcalTopology *top, const HcalTimeSlew *delay) |
void | lookupMSB (const HBHEDataFrame &df, std::vector< bool > &msb) const |
void | lookupMSB (const QIE10DataFrame &df, std::vector< std::bitset< 2 >> &msb) const |
void | lookupMSB (const QIE11DataFrame &df, std::vector< std::bitset< 2 >> &msb) const |
void | make_cosh_ieta_map (void) |
void | setAllLinear (bool linear, double lsb8, double lsb11, double lsb11overlap) |
void | setFGHFthresholds (const std::vector< uint32_t > &fgthresholds) |
void | setLUTGenerationMode (bool gen) |
void | setMaskBit (int bit) |
void | update (const char *filename, bool appendMSB=false) |
void | update (const HcalDbService &conditions) |
void | updateXML (const char *filename) |
~HcaluLUTTPGCoder () override | |
Public Member Functions inherited from HcalTPGCoder | |
unsigned short | adc2Linear (unsigned char adc, HcalDetId id) const |
virtual | ~HcalTPGCoder ()=default |
Static Public Attributes | |
static const float | lsb_ = 1. / 16 |
static const int | QIE10_LUT_BITMASK = 0x7FF |
static const int | QIE11_LUT_BITMASK = 0x3FF |
static const int | QIE8_LUT_BITMASK = 0x3FF |
Private Types | |
typedef std::vector< LutElement > | Lut |
typedef unsigned short | LutElement |
Private Attributes | |
bool | allLinear_ |
int | bitToMask_ |
std::vector< double > | cosh_ieta_ |
double | cosh_ieta_28_HE_high_depths_ |
double | cosh_ieta_28_HE_low_depths_ |
double | cosh_ieta_29_HE_ |
const HcalTimeSlew * | delay_ |
std::vector< uint32_t > | FG_HF_thresholds_ |
int | firstHBEta_ |
int | firstHEEta_ |
int | firstHFEta_ |
std::vector< float > | gain_ |
std::vector< Lut > | inputLUT_ |
int | lastHBEta_ |
int | lastHEEta_ |
int | lastHFEta_ |
double | linearLSB_QIE11_ |
double | linearLSB_QIE11Overlap_ |
double | linearLSB_QIE8_ |
bool | LUTGenerationMode_ |
int | maxDepthHB_ |
int | maxDepthHE_ |
int | maxDepthHF_ |
int | nHBEta_ |
int | nHEEta_ |
int | nHFEta_ |
std::vector< float > | ped_ |
std::unique_ptr< HcalPulseContainmentManager > | pulseCorr_ |
int | sizeHB_ |
int | sizeHE_ |
int | sizeHF_ |
const HcalTopology * | topo_ |
Static Private Attributes | |
static const size_t | INPUT_LUT_SIZE = 128 |
static const int | nFi_ = 72 |
static const int | QIE10_LUT_MSB0 = 0x1000 |
static const int | QIE10_LUT_MSB1 = 0x2000 |
static const int | QIE11_LUT_MSB0 = 0x400 |
static const int | QIE11_LUT_MSB1 = 0x800 |
static const int | QIE8_LUT_MSB = 0x400 |
static const size_t | UPGRADE_LUT_SIZE = 256 |
The nominal coder uses a user-supplied table to linearize the ADC values.
[number of ieta slices] [low tower 1] [low tower 2] ... [high tower 1] [ high tower 2] ... [LUT 1(0)] [LUT 2(0)] ... [LUT 1(1)] [LUT 2(1)] ... . . . [LUT 1(127)] [LUT 2(127)] ...
Definition at line 32 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 83 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 82 of file HcaluLUTTPGCoder.h.
HcaluLUTTPGCoder::HcaluLUTTPGCoder | ( | ) |
Definition at line 40 of file HcaluLUTTPGCoder.cc.
HcaluLUTTPGCoder::HcaluLUTTPGCoder | ( | const HcalTopology * | topo, |
const HcalTimeSlew * | delay | ||
) |
Definition at line 69 of file HcaluLUTTPGCoder.cc.
References phase2TrackerDigitizer_cfi::delay, and init().
|
override |
Definition at line 110 of file HcaluLUTTPGCoder.cc.
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 480 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, Ecal07UnpackerData_cfi::ics, HBHEDataFrame::id(), inputLUT_, QIE8_LUT_BITMASK, and HBHEDataFrame::size().
Referenced by HcalTriggerPrimitiveAlgo::addSignal().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 488 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, Ecal07UnpackerData_cfi::ics, HFDataFrame::id(), inputLUT_, QIE8_LUT_BITMASK, and HFDataFrame::size().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 496 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, Ecal07UnpackerData_cfi::ics, QIE10DataFrame::id(), inputLUT_, QIE10_LUT_BITMASK, and QIE10DataFrame::samples().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 504 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, Ecal07UnpackerData_cfi::ics, QIE11DataFrame::id(), inputLUT_, QIE11_LUT_BITMASK, and QIE11DataFrame::samples().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 512 of file HcaluLUTTPGCoder.cc.
References getLUTId(), inputLUT_, QIE8_LUT_BITMASK, and simplePhotonAnalyzer_cfi::sample.
|
overridevirtual |
double HcaluLUTTPGCoder::cosh_ieta | ( | int | ieta, |
int | depth, | ||
HcalSubdetector | subdet | ||
) |
Definition at line 283 of file HcaluLUTTPGCoder.cc.
References funct::abs(), allLinear_, cosh_ieta_, cosh_ieta_28_HE_high_depths_, cosh_ieta_28_HE_low_depths_, cosh_ieta_29_HE_, LEDCalibrationChannels::depth, HcalEndcap, and LEDCalibrationChannels::ieta.
Referenced by update().
|
overridevirtual |
Get the full linearization LUT (128 elements). Default implementation just uses adc2Linear to get all values.
Reimplemented from HcalTPGCoder.
Definition at line 527 of file HcaluLUTTPGCoder.cc.
References getLUTId(), and inputLUT_.
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 522 of file HcaluLUTTPGCoder.cc.
References gain_, and getLUTId().
int HcaluLUTTPGCoder::getLUTId | ( | const HcalDetId & | detid | ) | const |
Definition at line 143 of file HcaluLUTTPGCoder.cc.
References HcalDetId::depth(), getLUTId(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().
int HcaluLUTTPGCoder::getLUTId | ( | HcalSubdetector | id, |
int | ieta, | ||
int | iphi, | ||
int | depth | ||
) | const |
Definition at line 112 of file HcaluLUTTPGCoder.cc.
References LEDCalibrationChannels::depth, firstHBEta_, firstHEEta_, firstHFEta_, HcalBarrel, HcalEndcap, HcalForward, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, lastHBEta_, lastHEEta_, lastHFEta_, maxDepthHB_, maxDepthHE_, maxDepthHF_, nFi_, nHBEta_, nHEEta_, nHFEta_, sizeHB_, and sizeHE_.
Referenced by adc2Linear(), getLinearizationLUT(), getLUTGain(), getLUTId(), getLUTPedestal(), getMSB(), lookupMSB(), update(), and updateXML().
int HcaluLUTTPGCoder::getLUTId | ( | uint32_t | rawid | ) | const |
Definition at line 138 of file HcaluLUTTPGCoder.cc.
References HcalDetId::depth(), getLUTId(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 517 of file HcaluLUTTPGCoder.cc.
References getLUTId(), and ped_.
bool HcaluLUTTPGCoder::getMSB | ( | const HcalDetId & | id, |
int | adc | ||
) | const |
Definition at line 538 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), inputLUT_, and QIE8_LUT_MSB.
Referenced by lookupMSB().
void HcaluLUTTPGCoder::init | ( | const HcalTopology * | top, |
const HcalTimeSlew * | delay | ||
) |
Definition at line 71 of file HcaluLUTTPGCoder.cc.
References allLinear_, bitToMask_, phase2TrackerDigitizer_cfi::delay, delay_, FG_HF_thresholds_, firstHBEta_, HcalTopology::firstHBRing(), firstHEEta_, HcalTopology::firstHERing(), firstHFEta_, HcalTopology::firstHFRing(), gain_, HcalBarrel, HcalEndcap, HcalForward, inputLUT_, lastHBEta_, HcalTopology::lastHBRing(), lastHEEta_, HcalTopology::lastHERing(), lastHFEta_, HcalTopology::lastHFRing(), linearLSB_QIE11_, linearLSB_QIE11Overlap_, linearLSB_QIE8_, LUTGenerationMode_, make_cosh_ieta_map(), HcalTopology::maxDepth(), maxDepthHB_, maxDepthHE_, maxDepthHF_, MaximumFractionalError, nFi_, nHBEta_, nHEEta_, nHFEta_, ped_, pulseCorr_, sizeHB_, sizeHE_, sizeHF_, and topo_.
Referenced by HcalTPGCoderULUT::buildCoder(), and HcaluLUTTPGCoder().
void HcaluLUTTPGCoder::lookupMSB | ( | const HBHEDataFrame & | df, |
std::vector< bool > & | msb | ||
) | const |
Definition at line 532 of file HcaluLUTTPGCoder.cc.
References HcalQIESample::adc(), getMSB(), mps_fire::i, HBHEDataFrame::id(), HBHEDataFrame::sample(), and HBHEDataFrame::size().
Referenced by HcalTriggerPrimitiveAlgo::addSignal().
void HcaluLUTTPGCoder::lookupMSB | ( | const QIE10DataFrame & | df, |
std::vector< std::bitset< 2 >> & | msb | ||
) | const |
Definition at line 544 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE10DataFrame::id(), inputLUT_, QIE10_LUT_MSB0, QIE10_LUT_MSB1, and QIE10DataFrame::samples().
void HcaluLUTTPGCoder::lookupMSB | ( | const QIE11DataFrame & | df, |
std::vector< std::bitset< 2 >> & | msb | ||
) | const |
Definition at line 554 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE11DataFrame::id(), inputLUT_, QIE11_LUT_MSB0, QIE11_LUT_MSB1, and QIE11DataFrame::samples().
void HcaluLUTTPGCoder::make_cosh_ieta_map | ( | void | ) |
Definition at line 301 of file HcaluLUTTPGCoder.cc.
References cosh_ieta_, cosh_ieta_28_HE_high_depths_, cosh_ieta_28_HE_low_depths_, cosh_ieta_29_HE_, HLT_2018_cff::eta1, HLT_2018_cff::eta2, HcalTopology::etaRange(), EnergyCorrector::etas, firstHFEta_, HcalEndcap, HcalForward, mps_fire::i, lastHFEta_, topo_, and HcalTrigTowerGeometry::towerEtaBounds().
|
inline |
Definition at line 62 of file HcaluLUTTPGCoder.h.
References allLinear_, linear(), linearLSB_QIE11_, linearLSB_QIE11Overlap_, and linearLSB_QIE8_.
Referenced by HcalTPGCoderULUT::buildCoder().
|
inline |
Definition at line 60 of file HcaluLUTTPGCoder.h.
References FG_HF_thresholds_.
Referenced by HcalTPGCoderULUT::buildCoder().
|
inline |
Definition at line 59 of file HcaluLUTTPGCoder.h.
References relval_steps::gen(), and LUTGenerationMode_.
Referenced by HcalTPGCoderULUT::buildCoder().
|
inline |
Definition at line 61 of file HcaluLUTTPGCoder.h.
References bitToMask_.
Referenced by HcalTPGCoderULUT::buildCoder().
void HcaluLUTTPGCoder::update | ( | const char * | filename, |
bool | appendMSB = false |
||
) |
Definition at line 147 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), cms::cuda::assert(), edmScanValgrind::buffer, LEDCalibrationChannels::depth, FrontierConditions_GlobalTag_cff::file, corrVsCorr::filename, getLUTId(), HcalBarrel, HcalEndcap, HcalForward, mps_fire::i, triggerObjects_cff::id, LEDCalibrationChannels::ieta, recoMuon::in, INPUT_LUT_SIZE, inputLUT_, LEDCalibrationChannels::iphi, QIE8_LUT_BITMASK, QIE8_LUT_MSB, findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, topo_, and HcalTopology::valid().
Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().
void HcaluLUTTPGCoder::update | ( | const HcalDbService & | conditions | ) |
Definition at line 328 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), adc2fC, allLinear_, cms::cuda::assert(), bitToMask_, AlignmentProducer_cff::calibrations, HcalQIECoder::charge(), alignCSCRings::corr, HcalRecoParam::correctionPhaseNS(), castor_dqm_sourceclient-live_cfg::correctionPhaseNS, cosh_ieta(), cosh_ieta_, HcalTopology::dddConstants(), delay_, HcalDetId::depth(), FG_HF_thresholds_, PedestalClient_cfi::gain, gain_, HcalTPChannelParameter::getFGBitInfo(), HcalL1TriggerObject::getFlag(), HcalDbService::getHcalCalibrations(), HcalDbService::getHcalChannelStatus(), HcalDbService::getHcalCoder(), HcalDbService::getHcalL1TriggerObject(), HcalDbService::getHcalLutMetadata(), HcalDbService::getHcalQIEType(), HcalDbService::getHcalRecoParam(), HcalDbService::getHcalShape(), HcalDbService::getHcalSiPMCharacteristics(), HcalDbService::getHcalSiPMParameter(), HcalDbService::getHcalTPChannelParameter(), HcalLutMetadatum::getLutGranularity(), getLUTId(), HcalSiPMCharacteristics::getNonLinearities(), HcalL1TriggerObject::getPedestal(), HcalLutMetadatum::getRCalib(), HcalL1TriggerObject::getRespGain(), HcalQIEType::getValue(), HcalChannelStatus::getValue(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalDetId::ietaAbs(), INPUT_LUT_SIZE, inputLUT_, HcalDDDRecConstants::isPlan1(), HcalTopology::lastHBRing(), linearLSB_QIE11_, linearLSB_QIE11Overlap_, linearLSB_QIE8_, lsb_, LUTGenerationMode_, make_cosh_ieta_map(), SiStripPI::max, TrackingMonitor_cfi::metadata, min(), or, ped_, pulseCorr_, QIE10, QIE10_LUT_BITMASK, QIE10_LUT_MSB0, QIE10_LUT_MSB1, QIE11, QIE11_LUT_BITMASK, QIE11_LUT_MSB0, QIE11_LUT_MSB1, QIE8, QIE8_LUT_BITMASK, SIZE, mps_update::status, HcalDetId::subdet(), topo_, HcalTopology::triggerMode(), HcalTopologyMode::TriggerMode_2018, HcalTopologyMode::TriggerMode_2018legacy, UPGRADE_LUT_SIZE, and HcalTopology::valid().
Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), HcalTPGCoderULUT::buildCoder(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().
void HcaluLUTTPGCoder::updateXML | ( | const char * | filename | ) |
Definition at line 256 of file HcaluLUTTPGCoder.cc.
References LutXml::create_lut_map(), LEDCalibrationChannels::depth, Exception, corrVsCorr::filename, XMLProcessor::getInstance(), LutXml::getLutFast(), getLUTId(), HcalBarrel, HcalEndcap, HcalForward, mps_fire::i, LEDCalibrationChannels::ieta, INPUT_LUT_SIZE, inputLUT_, createfilelist::int, LEDCalibrationChannels::iphi, HcalDetId::kHcalDepthMask2, HcalDetId::kHcalEtaMask2, HcalDetId::kHcalPhiMask2, XMLProcessor::terminate(), topo_, and HcalTopology::valid().
Referenced by HcalTPGCoderULUT::buildCoder().
|
private |
Definition at line 111 of file HcaluLUTTPGCoder.h.
Referenced by cosh_ieta(), init(), setAllLinear(), and update().
|
private |
Definition at line 101 of file HcaluLUTTPGCoder.h.
Referenced by init(), setMaskBit(), and update().
|
private |
Definition at line 108 of file HcaluLUTTPGCoder.h.
Referenced by cosh_ieta(), make_cosh_ieta_map(), and update().
|
private |
Definition at line 110 of file HcaluLUTTPGCoder.h.
Referenced by cosh_ieta(), and make_cosh_ieta_map().
|
private |
Definition at line 110 of file HcaluLUTTPGCoder.h.
Referenced by cosh_ieta(), and make_cosh_ieta_map().
|
private |
Definition at line 110 of file HcaluLUTTPGCoder.h.
Referenced by cosh_ieta(), and make_cosh_ieta_map().
|
private |
Definition at line 98 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 100 of file HcaluLUTTPGCoder.h.
Referenced by init(), setFGHFthresholds(), and update().
|
private |
Definition at line 102 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 103 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 104 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), init(), and make_cosh_ieta_map().
|
private |
Definition at line 106 of file HcaluLUTTPGCoder.h.
Referenced by getLUTGain(), init(), and update().
|
staticprivate |
Definition at line 86 of file HcaluLUTTPGCoder.h.
Referenced by update(), and updateXML().
|
private |
Definition at line 105 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), getLinearizationLUT(), getMSB(), init(), lookupMSB(), update(), and updateXML().
|
private |
Definition at line 102 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 103 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 104 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), init(), and make_cosh_ieta_map().
|
private |
Definition at line 112 of file HcaluLUTTPGCoder.h.
Referenced by init(), setAllLinear(), and update().
|
private |
Definition at line 112 of file HcaluLUTTPGCoder.h.
Referenced by init(), setAllLinear(), and update().
|
private |
Definition at line 112 of file HcaluLUTTPGCoder.h.
Referenced by init(), setAllLinear(), and update().
|
static |
Definition at line 34 of file HcaluLUTTPGCoder.h.
Referenced by CaloTPGTranscoderULUT::setup(), and update().
|
private |
Definition at line 99 of file HcaluLUTTPGCoder.h.
Referenced by init(), setLUTGenerationMode(), and update().
|
private |
Definition at line 102 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 103 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 104 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
staticprivate |
Definition at line 88 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 102 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 103 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 104 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 107 of file HcaluLUTTPGCoder.h.
Referenced by getLUTPedestal(), init(), and update().
|
private |
Definition at line 113 of file HcaluLUTTPGCoder.h.
|
static |
Definition at line 77 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), and update().
|
staticprivate |
Definition at line 93 of file HcaluLUTTPGCoder.h.
Referenced by lookupMSB(), and update().
|
staticprivate |
Definition at line 94 of file HcaluLUTTPGCoder.h.
Referenced by lookupMSB(), and update().
|
static |
Definition at line 78 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), and update().
|
staticprivate |
Definition at line 91 of file HcaluLUTTPGCoder.h.
Referenced by lookupMSB(), and update().
|
staticprivate |
Definition at line 92 of file HcaluLUTTPGCoder.h.
Referenced by lookupMSB(), and update().
|
static |
Definition at line 76 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), and update().
|
staticprivate |
Definition at line 90 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 102 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 103 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and init().
|
private |
Definition at line 104 of file HcaluLUTTPGCoder.h.
Referenced by init().
|
private |
Definition at line 97 of file HcaluLUTTPGCoder.h.
Referenced by init(), make_cosh_ieta_map(), update(), and updateXML().
|
staticprivate |
Definition at line 87 of file HcaluLUTTPGCoder.h.
Referenced by update().