#include <HcaluLUTTPGCoder.h>
Public Member Functions | |
virtual void | adc2Linear (const HBHEDataFrame &df, IntegerCaloSamples &ics) const |
virtual void | adc2Linear (const HFDataFrame &df, IntegerCaloSamples &ics) const |
virtual unsigned short | adc2Linear (HcalQIESample sample, HcalDetId id) const |
virtual void | compress (const IntegerCaloSamples &ics, const std::vector< bool > &featureBits, HcalTriggerPrimitiveDigi &tp) const |
std::vector< unsigned short > | getLinearizationLUTWithMSB (const HcalDetId &id) const |
virtual float | getLUTGain (HcalDetId id) const |
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 |
bool | getMSB (const HcalDetId &id, int adc) const |
HcaluLUTTPGCoder (const HcalTopology *topo) | |
void | lookupMSB (const HBHEDataFrame &df, std::vector< bool > &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... | |
Static Public Attributes | |
static const float | lsb_ =1./16 |
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_ |
Static Private Attributes | |
static const size_t | INPUT_LUT_SIZE = 128 |
static const int | nFi_ = 72 |
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 29 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 57 of file HcaluLUTTPGCoder.h.
|
private |
Definition at line 56 of file HcaluLUTTPGCoder.h.
HcaluLUTTPGCoder::HcaluLUTTPGCoder | ( | const HcalTopology * | topo | ) |
Definition at line 29 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_, and topo_.
|
virtual |
Definition at line 55 of file HcaluLUTTPGCoder.cc.
|
virtual |
Implements HcalTPGCoder.
Definition at line 314 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), i, HBHEDataFrame::id(), inputLUT_, lumiPlot::lut, and HBHEDataFrame::size().
Referenced by HcalTriggerPrimitiveAlgo::addSignal().
|
virtual |
Implements HcalTPGCoder.
Definition at line 322 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), getLUTId(), i, HFDataFrame::id(), inputLUT_, lumiPlot::lut, and HFDataFrame::size().
|
virtual |
Implements HcalTPGCoder.
Definition at line 330 of file HcaluLUTTPGCoder.cc.
References HcalQIESample::adc(), getLUTId(), and inputLUT_.
|
virtual |
Implements HcalTPGCoder.
Definition at line 51 of file HcaluLUTTPGCoder.cc.
References Exception.
std::vector< unsigned short > HcaluLUTTPGCoder::getLinearizationLUTWithMSB | ( | const HcalDetId & | id | ) | const |
Definition at line 345 of file HcaluLUTTPGCoder.cc.
References getLUTId(), and inputLUT_.
|
virtual |
Implements HcalTPGCoder.
Definition at line 340 of file HcaluLUTTPGCoder.cc.
References gain_, and getLUTId().
int HcaluLUTTPGCoder::getLUTId | ( | HcalSubdetector | id, |
int | ieta, | ||
int | iphi, | ||
int | depth | ||
) | const |
Definition at line 58 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(), update(), and updateXML().
int HcaluLUTTPGCoder::getLUTId | ( | uint32_t | rawid | ) | const |
Definition at line 78 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 83 of file HcaluLUTTPGCoder.cc.
References HcalDetId::depth(), getLUTId(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().
|
virtual |
Implements HcalTPGCoder.
Definition at line 335 of file HcaluLUTTPGCoder.cc.
References getLUTId(), and ped_.
bool HcaluLUTTPGCoder::getMSB | ( | const HcalDetId & | id, |
int | adc | ||
) | const |
Definition at line 356 of file HcaluLUTTPGCoder.cc.
References getLUTId(), inputLUT_, and lumiPlot::lut.
Referenced by lookupMSB().
void HcaluLUTTPGCoder::lookupMSB | ( | const HBHEDataFrame & | df, |
std::vector< bool > & | msb | ||
) | const |
Definition at line 350 of file HcaluLUTTPGCoder.cc.
References HcalQIESample::adc(), getMSB(), i, HBHEDataFrame::id(), HBHEDataFrame::sample(), and HBHEDataFrame::size().
Referenced by HcalTriggerPrimitiveAlgo::addSignal().
|
inline |
Definition at line 45 of file HcaluLUTTPGCoder.h.
References relval_steps::gen(), and LUTGenerationMode_.
Referenced by HcalTPGCoderULUT::buildCoder().
|
inline |
Definition at line 46 of file HcaluLUTTPGCoder.h.
References bitToMask_.
Referenced by HcalTPGCoderULUT::buildCoder().
void HcaluLUTTPGCoder::update | ( | const HcalDbService & | conditions | ) |
Definition at line 217 of file HcaluLUTTPGCoder.cc.
References funct::abs(), ecalMGPA::adc(), HcalCoderDb::adc2fC(), adc2fC, assert(), bitToMask_, HLT_FULL_cff::depth, HcalTopology::etaRange(), EnergyCorrector::etas, firstHFEta_, gain_, HcalL1TriggerObject::getFlag(), HcalDbService::getHcalCalibrations(), HcalDbService::getHcalChannelStatus(), HcalDbService::getHcalCoder(), HcalDbService::getHcalL1TriggerObject(), HcalDbService::getHcalLutMetadata(), HcalDbService::getHcalShape(), HcalLutMetadatum::getLutGranularity(), getLUTId(), HcalLutMetadata::getNominalGain(), HcalL1TriggerObject::getPedestal(), HcalLutMetadatum::getRCalib(), HcalL1TriggerObject::getRespGain(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), HcalBarrel, HcalEndcap, HcalForward, i, inputLUT_, HcalDetId::kHcalDepthMask2, HcalDetId::kHcalEtaMask2, HcalDetId::kHcalPhiMask2, lastHFEta_, lsb_, LUTGenerationMode_, HcalCalibrations::LUTrespcorrgain(), bookConverter::max, min(), ped_, HcalCalibrations::pedestal(), HBHEDataFrame::setSample(), HFDataFrame::setSample(), HFDataFrame::setSize(), HBHEDataFrame::setSize(), mps_update::status, subdets, topo_, 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 87 of file HcaluLUTTPGCoder.cc.
References ecalMGPA::adc(), assert(), HLT_FULL_cff::depth, mergeVDriftHistosByStation::file, getLUTId(), HcalBarrel, HcalEndcap, HcalForward, i, recoMuon::in, cmsHarvester::index, INPUT_LUT_SIZE, inputLUT_, 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 193 of file HcaluLUTTPGCoder.cc.
References LutXml::create_lut_map(), HLT_FULL_cff::depth, Exception, XMLProcessor::getInstance(), LutXml::getLutFast(), getLUTId(), HcalBarrel, HcalEndcap, HcalForward, i, inputLUT_, HcalDetId::kHcalDepthMask2, HcalDetId::kHcalEtaMask2, HcalDetId::kHcalPhiMask2, lumiPlot::lut, XMLProcessor::terminate(), topo_, and HcalTopology::valid().
Referenced by HcalTPGCoderULUT::buildCoder().
|
private |
Definition at line 66 of file HcaluLUTTPGCoder.h.
Referenced by setMaskBit(), and update().
|
private |
Definition at line 67 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 68 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 69 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), HcaluLUTTPGCoder(), and update().
|
private |
Definition at line 71 of file HcaluLUTTPGCoder.h.
Referenced by getLUTGain(), HcaluLUTTPGCoder(), and update().
|
staticprivate |
Definition at line 60 of file HcaluLUTTPGCoder.h.
Referenced by HcaluLUTTPGCoder(), and update().
|
private |
Definition at line 70 of file HcaluLUTTPGCoder.h.
Referenced by adc2Linear(), getLinearizationLUTWithMSB(), getMSB(), HcaluLUTTPGCoder(), update(), and updateXML().
|
private |
Definition at line 67 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 68 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 69 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), HcaluLUTTPGCoder(), and update().
|
static |
Definition at line 31 of file HcaluLUTTPGCoder.h.
Referenced by CaloTPGTranscoderULUT::setup(), and update().
|
private |
Definition at line 65 of file HcaluLUTTPGCoder.h.
Referenced by setLUTGenerationMode(), and update().
|
private |
Definition at line 67 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 68 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 69 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
staticprivate |
Definition at line 61 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 67 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 68 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 69 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 72 of file HcaluLUTTPGCoder.h.
Referenced by getLUTPedestal(), HcaluLUTTPGCoder(), and update().
|
private |
Definition at line 67 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 68 of file HcaluLUTTPGCoder.h.
Referenced by getLUTId(), and HcaluLUTTPGCoder().
|
private |
Definition at line 69 of file HcaluLUTTPGCoder.h.
Referenced by HcaluLUTTPGCoder().
|
private |
Definition at line 64 of file HcaluLUTTPGCoder.h.
Referenced by HcaluLUTTPGCoder(), update(), and updateXML().