#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 |
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 (HcalSubdetector id, int ieta, int iphi, int depth) const |
int | getLUTId (uint32_t rawid) const |
int | getLUTId (const HcalDetId &detid) const |
float | getLUTPedestal (HcalDetId id) const override |
bool | getMSB (const HcalDetId &id, int adc) const |
HcaluLUTTPGCoder (const HcalTopology *topo) | |
void | lookupMSB (const HBHEDataFrame &df, std::vector< bool > &msb) const |
void | lookupMSB (const QIE10DataFrame &df, std::vector< bool > &msb) const |
void | lookupMSB (const QIE11DataFrame &df, std::vector< std::bitset< 2 >> &msb) const |
void | setFGHFthreshold (unsigned int fgthreshold) |
void | setLUTGenerationMode (bool gen) |
void | setMaskBit (int bit) |
void | update (const HcalDbService &conditions) |
void | update (const char *filename, bool appendMSB=false) |
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 | |
int | bitToMask_ |
unsigned int | FG_HF_threshold_ |
int | firstHBEta_ |
int | firstHEEta_ |
int | firstHFEta_ |
std::vector< float > | gain_ |
std::vector< Lut > | inputLUT_ |
int | lastHBEta_ |
int | lastHEEta_ |
int | lastHFEta_ |
bool | LUTGenerationMode_ |
int | maxDepthHB_ |
int | maxDepthHE_ |
int | maxDepthHF_ |
int | nHBEta_ |
int | nHEEta_ |
int | nHFEta_ |
std::vector< float > | ped_ |
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_MSB = 0x1000 |
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 31 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 68 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 67 of file HcaluLUTTPGCoder.h.
HcaluLUTTPGCoder::HcaluLUTTPGCoder | ( | const HcalTopology * | topo | ) |
Definition at line 36 of file HcaluLUTTPGCoder.cc.
References firstHBEta_, HcalTopology::firstHBRing(), firstHEEta_, HcalTopology::firstHERing(), firstHFEta_, HcalTopology::firstHFRing(), gain_, HcalBarrel, HcalEndcap, HcalForward, inputLUT_, lastHBEta_, HcalTopology::lastHBRing(), lastHEEta_, HcalTopology::lastHERing(), lastHFEta_, HcalTopology::lastHFRing(), HcalTopology::maxDepth(), maxDepthHB_, maxDepthHE_, maxDepthHF_, nFi_, nHBEta_, nHEEta_, nHFEta_, ped_, sizeHB_, sizeHE_, sizeHF_, and topo_.
|
override |
Definition at line 62 of file HcaluLUTTPGCoder.cc.
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 337 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, HBHEDataFrame::id(), inputLUT_, lumiPlot::lut, QIE8_LUT_BITMASK, and HBHEDataFrame::size().
Referenced by HcalTriggerPrimitiveAlgo::addSignal().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 345 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, HFDataFrame::id(), inputLUT_, lumiPlot::lut, QIE8_LUT_BITMASK, and HFDataFrame::size().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 353 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE10DataFrame::id(), inputLUT_, lumiPlot::lut, QIE10_LUT_BITMASK, and QIE10DataFrame::samples().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 361 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE11DataFrame::id(), inputLUT_, lumiPlot::lut, QIE11_LUT_BITMASK, and QIE11DataFrame::samples().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 369 of file HcaluLUTTPGCoder.cc.
References HcalQIESample::adc(), getLUTId(), inputLUT_, and QIE8_LUT_BITMASK.
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 58 of file HcaluLUTTPGCoder.cc.
References Exception.
|
overridevirtual |
Get the full linearization LUT (128 elements). Default implementation just uses adc2Linear to get all values.
Reimplemented from HcalTPGCoder.
Definition at line 384 of file HcaluLUTTPGCoder.cc.
References getLUTId(), and inputLUT_.
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 379 of file HcaluLUTTPGCoder.cc.
References gain_, and getLUTId().
int HcaluLUTTPGCoder::getLUTId | ( | HcalSubdetector | id, |
int | ieta, | ||
int | iphi, | ||
int | depth | ||
) | const |
Definition at line 65 of file HcaluLUTTPGCoder.cc.
References firstHBEta_, firstHEEta_, firstHFEta_, HcalBarrel, HcalEndcap, HcalForward, lastHBEta_, lastHEEta_, lastHFEta_, maxDepthHB_, maxDepthHE_, maxDepthHF_, nFi_, nHBEta_, nHEEta_, nHFEta_, sizeHB_, and sizeHE_.
Referenced by adc2Linear(), getLinearizationLUT(), getLUTGain(), getLUTId(), getLUTPedestal(), getMSB(), lookupMSB(), setMaskBit(), update(), and updateXML().
int HcaluLUTTPGCoder::getLUTId | ( | uint32_t | rawid | ) | const |
Definition at line 85 of file HcaluLUTTPGCoder.cc.
References HcalDetId::depth(), getLUTId(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().
int HcaluLUTTPGCoder::getLUTId | ( | const HcalDetId & | detid | ) | const |
Definition at line 90 of file HcaluLUTTPGCoder.cc.
References HcalDetId::depth(), getLUTId(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 374 of file HcaluLUTTPGCoder.cc.
References getLUTId(), and ped_.
bool HcaluLUTTPGCoder::getMSB | ( | const HcalDetId & | id, |
int | adc | ||
) | const |
Definition at line 395 of file HcaluLUTTPGCoder.cc.
References getLUTId(), inputLUT_, lumiPlot::lut, and QIE8_LUT_MSB.
Referenced by lookupMSB(), and setMaskBit().
void HcaluLUTTPGCoder::lookupMSB | ( | const HBHEDataFrame & | df, |
std::vector< bool > & | msb | ||
) | const |
Definition at line 389 of file HcaluLUTTPGCoder.cc.
References HcalQIESample::adc(), getMSB(), mps_fire::i, HBHEDataFrame::id(), HBHEDataFrame::sample(), and HBHEDataFrame::size().
Referenced by HcalTriggerPrimitiveAlgo::addSignal(), and setMaskBit().
void HcaluLUTTPGCoder::lookupMSB | ( | const QIE10DataFrame & | df, |
std::vector< bool > & | msb | ||
) | const |
Definition at line 401 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE10DataFrame::id(), inputLUT_, lumiPlot::lut, QIE10_LUT_MSB, and QIE10DataFrame::samples().
void HcaluLUTTPGCoder::lookupMSB | ( | const QIE11DataFrame & | df, |
std::vector< std::bitset< 2 >> & | msb | ||
) | const |
Definition at line 411 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE11DataFrame::id(), inputLUT_, lumiPlot::lut, QIE11_LUT_MSB0, QIE11_LUT_MSB1, and QIE11DataFrame::samples().
|
inline |
Definition at line 51 of file HcaluLUTTPGCoder.h.
References FG_HF_threshold_.
Referenced by HcalTPGCoderULUT::buildCoder().
|
inline |
Definition at line 50 of file HcaluLUTTPGCoder.h.
References relval_steps::gen(), and LUTGenerationMode_.
Referenced by HcalTPGCoderULUT::buildCoder().
|
inline |
Definition at line 52 of file HcaluLUTTPGCoder.h.
References ecalMGPA::adc(), bitToMask_, particleFlowClusterECALTimeSelected_cfi::depth, getLUTId(), getMSB(), and lookupMSB().
Referenced by HcalTPGCoderULUT::buildCoder().
void HcaluLUTTPGCoder::update | ( | const HcalDbService & | conditions | ) |
Definition at line 224 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), hcaldqm::constants::adc2fC, bitToMask_, AlignmentProducer_cff::calibrations, HcalQIECoder::charge(), HcalTopology::dddConstants(), HcalTopology::etaRange(), EnergyCorrector::etas, FG_HF_threshold_, firstHFEta_, muonCSCDigis_cfi::gain, gain_, HcalCondObjectContainer< Item >::getAllChannels(), HcalTPChannelParameter::getFGBitInfo(), HcalL1TriggerObject::getFlag(), HcalDbService::getHcalCalibrations(), HcalDbService::getHcalChannelStatus(), HcalDbService::getHcalCoder(), HcalDbService::getHcalL1TriggerObject(), HcalDbService::getHcalLutMetadata(), HcalDbService::getHcalQIEType(), HcalDbService::getHcalShape(), HcalDbService::getHcalTPChannelParameter(), HcalLutMetadatum::getLutGranularity(), getLUTId(), HcalLutMetadata::getNominalGain(), HcalL1TriggerObject::getPedestal(), HcalLutMetadatum::getRCalib(), HcalL1TriggerObject::getRespGain(), HcalQIEType::getValue(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, mps_fire::i, HcalDetId::ietaAbs(), INPUT_LUT_SIZE, inputLUT_, HcalDDDRecConstants::isPlan1(), lastHFEta_, lsb_, lumiPlot::lut, LUTGenerationMode_, HcalCalibrations::LUTrespcorrgain(), SiStripPI::max, min(), or, ped_, HcalCalibrations::pedestal(), QIE10_LUT_BITMASK, QIE10_LUT_MSB, QIE11_LUT_BITMASK, QIE11_LUT_MSB0, QIE11_LUT_MSB1, 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__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), HcalTPGCoderULUT::buildCoder(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), HcalTPGCoderULUT::dbRecordCallback(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().
void HcaluLUTTPGCoder::update | ( | const char * | filename, |
bool | appendMSB = false |
||
) |
Definition at line 94 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), edmScanValgrind::buffer, particleFlowClusterECALTimeSelected_cfi::depth, FrontierConditions_GlobalTag_cff::file, getLUTId(), HcalBarrel, HcalEndcap, HcalForward, mps_fire::i, triggerObjects_cff::id, recoMuon::in, diffTreeTool::index, INPUT_LUT_SIZE, inputLUT_, 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__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().
void HcaluLUTTPGCoder::updateXML | ( | const char * | filename | ) |
Definition at line 200 of file HcaluLUTTPGCoder.cc.
References LutXml::create_lut_map(), particleFlowClusterECALTimeSelected_cfi::depth, Exception, XMLProcessor::getInstance(), LutXml::getLutFast(), getLUTId(), HcalBarrel, HcalEndcap, HcalForward, mps_fire::i, INPUT_LUT_SIZE, inputLUT_, HcalDetId::kHcalDepthMask2, HcalDetId::kHcalEtaMask2, HcalDetId::kHcalPhiMask2, lumiPlot::lut, XMLProcessor::terminate(), topo_, and HcalTopology::valid().
Referenced by HcalTPGCoderULUT::buildCoder().
|
private |
Definition at line 84 of file HcaluLUTTPGCoder.h.
Referenced by setMaskBit(), and update().
|
private |
Definition at line 83 of file HcaluLUTTPGCoder.h.
Referenced by setFGHFthreshold(), and update().
|
private |
Definition at line 85 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 86 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 87 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), HcaluLUTTPGCoder(), and update().
|
private |
Definition at line 89 of file HcaluLUTTPGCoder.h.
Referenced by getLUTGain(), HcaluLUTTPGCoder(), and update().
|
staticprivate |
Definition at line 71 of file HcaluLUTTPGCoder.h.
Referenced by update(), and updateXML().
|
private |
Definition at line 88 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), getLinearizationLUT(), getMSB(), HcaluLUTTPGCoder(), lookupMSB(), update(), and updateXML().
|
private |
Definition at line 85 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 86 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 87 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), HcaluLUTTPGCoder(), and update().
|
static |
Definition at line 33 of file HcaluLUTTPGCoder.h.
Referenced by CaloTPGTranscoderULUT::setup(), and update().
|
private |
Definition at line 82 of file HcaluLUTTPGCoder.h.
Referenced by setLUTGenerationMode(), and update().
|
private |
Definition at line 85 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 86 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 87 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
staticprivate |
Definition at line 73 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 85 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 86 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 87 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 90 of file HcaluLUTTPGCoder.h.
Referenced by getLUTPedestal(), HcaluLUTTPGCoder(), and update().
|
static |
Definition at line 62 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), and update().
|
staticprivate |
Definition at line 78 of file HcaluLUTTPGCoder.h.
Referenced by lookupMSB(), and update().
|
static |
Definition at line 63 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), and update().
|
staticprivate |
Definition at line 76 of file HcaluLUTTPGCoder.h.
Referenced by lookupMSB(), and update().
|
staticprivate |
Definition at line 77 of file HcaluLUTTPGCoder.h.
Referenced by lookupMSB(), and update().
|
static |
Definition at line 61 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), and update().
|
staticprivate |
Definition at line 75 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 85 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 86 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 87 of file HcaluLUTTPGCoder.h.
Referenced by HcaluLUTTPGCoder().
|
private |
Definition at line 81 of file HcaluLUTTPGCoder.h.
Referenced by HcaluLUTTPGCoder(), update(), and updateXML().
|
staticprivate |
Definition at line 72 of file HcaluLUTTPGCoder.h.
Referenced by update().