#include <HcaluLUTTPGCoder.h>
Public Member Functions | |
virtual void | adc2Linear (const HBHEDataFrame &df, IntegerCaloSamples &ics) const override |
virtual void | adc2Linear (const HFDataFrame &df, IntegerCaloSamples &ics) const override |
virtual void | adc2Linear (const QIE10DataFrame &df, IntegerCaloSamples &ics) const override |
virtual void | adc2Linear (const QIE11DataFrame &df, IntegerCaloSamples &ics) const override |
virtual unsigned short | adc2Linear (HcalQIESample sample, HcalDetId id) const override |
virtual void | compress (const IntegerCaloSamples &ics, const std::vector< bool > &featureBits, HcalTriggerPrimitiveDigi &tp) const override |
std::vector< unsigned short > | getLinearizationLUTWithMSB (const HcalDetId &id) const |
virtual 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 |
virtual 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 QIE11DataFrame &df, std::vector< std::bitset< 2 >> &msb) const |
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) |
virtual | ~HcaluLUTTPGCoder () |
Public Member Functions inherited from HcalTPGCoder | |
unsigned short | adc2Linear (unsigned char adc, HcalDetId id) const |
virtual std::vector< unsigned short > | getLinearizationLUT (HcalDetId id) const |
Get the full linearization LUT (128 elements). Default implementation just uses adc2Linear to get all values. More... | |
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_ |
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_ |
std::vector< Lut > | upgradeQIE10LUT_ |
std::vector< Lut > | upgradeQIE11LUT_ |
Static Private Attributes | |
static const size_t | INPUT_LUT_SIZE = 128 |
static const int | nFi_ = 72 |
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 66 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 65 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, INPUT_LUT_SIZE, inputLUT_, lastHBEta_, HcalTopology::lastHBRing(), lastHEEta_, HcalTopology::lastHERing(), lastHFEta_, HcalTopology::lastHFRing(), HcalTopology::maxDepth(), maxDepthHB_, maxDepthHE_, maxDepthHF_, nFi_, nHBEta_, nHEEta_, nHFEta_, ped_, sizeHB_, sizeHE_, sizeHF_, topo_, UPGRADE_LUT_SIZE, upgradeQIE10LUT_, and upgradeQIE11LUT_.
|
virtual |
Definition at line 64 of file HcaluLUTTPGCoder.cc.
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 360 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 368 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 376 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE10DataFrame::id(), lumiPlot::lut, QIE10_LUT_BITMASK, QIE10DataFrame::samples(), and upgradeQIE10LUT_.
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 384 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE11DataFrame::id(), lumiPlot::lut, QIE11_LUT_BITMASK, QIE11DataFrame::samples(), and upgradeQIE11LUT_.
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 392 of file HcaluLUTTPGCoder.cc.
References HcalQIESample::adc(), getLUTId(), inputLUT_, and QIE8_LUT_BITMASK.
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 60 of file HcaluLUTTPGCoder.cc.
References Exception.
std::vector< unsigned short > HcaluLUTTPGCoder::getLinearizationLUTWithMSB | ( | const HcalDetId & | id | ) | const |
Definition at line 407 of file HcaluLUTTPGCoder.cc.
References getLUTId(), and inputLUT_.
Referenced by setMaskBit().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 402 of file HcaluLUTTPGCoder.cc.
References gain_, and getLUTId().
int HcaluLUTTPGCoder::getLUTId | ( | HcalSubdetector | id, |
int | ieta, | ||
int | iphi, | ||
int | depth | ||
) | const |
Definition at line 67 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(), getLinearizationLUTWithMSB(), getLUTGain(), getLUTId(), getLUTPedestal(), getMSB(), lookupMSB(), setMaskBit(), update(), and updateXML().
int HcaluLUTTPGCoder::getLUTId | ( | uint32_t | rawid | ) | const |
Definition at line 87 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 92 of file HcaluLUTTPGCoder.cc.
References HcalDetId::depth(), getLUTId(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().
|
overridevirtual |
Implements HcalTPGCoder.
Definition at line 397 of file HcaluLUTTPGCoder.cc.
References getLUTId(), and ped_.
bool HcaluLUTTPGCoder::getMSB | ( | const HcalDetId & | id, |
int | adc | ||
) | const |
Definition at line 418 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 412 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 QIE11DataFrame & | df, |
std::vector< std::bitset< 2 >> & | msb | ||
) | const |
Definition at line 425 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE11DataFrame::id(), lumiPlot::lut, QIE11_LUT_MSB0, QIE11_LUT_MSB1, QIE11DataFrame::samples(), and upgradeQIE11LUT_.
|
inline |
Definition at line 49 of file HcaluLUTTPGCoder.h.
References relval_steps::gen(), and LUTGenerationMode_.
Referenced by HcalTPGCoderULUT::buildCoder().
|
inline |
Definition at line 50 of file HcaluLUTTPGCoder.h.
References ecalMGPA::adc(), bitToMask_, particleFlowClusterECALTimeSelected_cfi::depth, getLinearizationLUTWithMSB(), getLUTId(), getMSB(), and lookupMSB().
Referenced by HcalTPGCoderULUT::buildCoder().
void HcaluLUTTPGCoder::update | ( | const HcalDbService & | conditions | ) |
Definition at line 226 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), HcalCoderDb::adc2fC(), hcaldqm::constants::adc2fC, bitToMask_, AlignmentProducer_cff::calibrations, data, HcalTopology::dddConstants(), HcalTopology::etaRange(), EnergyCorrector::etas, firstHFEta_, muonCSCDigis_cfi::gain, gain_, HcalCondObjectContainer< Item >::getAllChannels(), HcalTPChannelParameter::getFGBitInfo(), HcalL1TriggerObject::getFlag(), HcalDbService::getHcalCalibrations(), HcalDbService::getHcalChannelStatus(), HcalDbService::getHcalCoder(), HcalDbService::getHcalL1TriggerObject(), HcalDbService::getHcalLutMetadata(), HcalDbService::getHcalShape(), HcalDbService::getHcalTPChannelParameter(), HcalLutMetadatum::getLutGranularity(), getLUTId(), HcalLutMetadata::getNominalGain(), HcalL1TriggerObject::getPedestal(), HcalLutMetadatum::getRCalib(), HcalL1TriggerObject::getRespGain(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, mps_fire::i, HcalDetId::ietaAbs(), INPUT_LUT_SIZE, inputLUT_, HcalDDDRecConstants::isPlan1(), lastHFEta_, lsb_, LUTGenerationMode_, HcalCalibrations::LUTrespcorrgain(), hpstanc_transforms::max, min(), or, ped_, HcalCalibrations::pedestal(), QIE10_LUT_BITMASK, QIE11_LUT_BITMASK, QIE11_LUT_MSB0, QIE11_LUT_MSB1, QIE8_LUT_BITMASK, hcalTTPDigis_cfi::samples, HFDataFrame::setSample(), HBHEDataFrame::setSample(), QIE11DataFrame::setSample(), QIE10DataFrame::setSample(), HBHEDataFrame::setSize(), HFDataFrame::setSize(), mps_update::status, HcalDetId::subdet(), topo_, HcalTopology::triggerMode(), HcalTopologyMode::TriggerMode_2018, HcalTopologyMode::TriggerMode_2018legacy, UPGRADE_LUT_SIZE, upgradeQIE10LUT_, upgradeQIE11LUT_, 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 96 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), edmScanValgrind::buffer, particleFlowClusterECALTimeSelected_cfi::depth, FrontierConditions_GlobalTag_cff::file, getLUTId(), HcalBarrel, HcalEndcap, HcalForward, mps_fire::i, hcalTTPDigis_cfi::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 202 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 80 of file HcaluLUTTPGCoder.h.
Referenced by setMaskBit(), and update().
|
private |
Definition at line 81 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 82 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 83 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), HcaluLUTTPGCoder(), and update().
|
private |
Definition at line 87 of file HcaluLUTTPGCoder.h.
Referenced by getLUTGain(), HcaluLUTTPGCoder(), and update().
|
staticprivate |
Definition at line 69 of file HcaluLUTTPGCoder.h.
Referenced by HcaluLUTTPGCoder(), update(), and updateXML().
|
private |
Definition at line 84 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), getLinearizationLUTWithMSB(), getMSB(), HcaluLUTTPGCoder(), update(), and updateXML().
|
private |
Definition at line 81 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 82 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 83 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 79 of file HcaluLUTTPGCoder.h.
Referenced by setLUTGenerationMode(), and update().
|
private |
Definition at line 81 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 82 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 83 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
staticprivate |
Definition at line 71 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 81 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 82 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 83 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 88 of file HcaluLUTTPGCoder.h.
Referenced by getLUTPedestal(), HcaluLUTTPGCoder(), and update().
|
static |
Definition at line 60 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), and update().
|
static |
Definition at line 61 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), and update().
|
staticprivate |
Definition at line 74 of file HcaluLUTTPGCoder.h.
Referenced by lookupMSB(), and update().
|
staticprivate |
Definition at line 75 of file HcaluLUTTPGCoder.h.
Referenced by lookupMSB(), and update().
|
static |
Definition at line 59 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), and update().
|
staticprivate |
Definition at line 73 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 81 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 82 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 83 of file HcaluLUTTPGCoder.h.
Referenced by HcaluLUTTPGCoder().
|
private |
Definition at line 78 of file HcaluLUTTPGCoder.h.
Referenced by HcaluLUTTPGCoder(), update(), and updateXML().
|
staticprivate |
Definition at line 70 of file HcaluLUTTPGCoder.h.
Referenced by HcaluLUTTPGCoder(), and update().
|
private |
Definition at line 85 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), HcaluLUTTPGCoder(), and update().
|
private |
Definition at line 86 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), HcaluLUTTPGCoder(), lookupMSB(), and update().