CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Types | Private Attributes | Static Private Attributes
HcaluLUTTPGCoder Class Reference

#include <HcaluLUTTPGCoder.h>

Inheritance diagram for HcaluLUTTPGCoder:
HcalTPGCoder

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< LutElementLut
 
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 HcalTimeSlewdelay_
 
std::vector< uint32_t > FG_HF_thresholds_
 
int firstHBEta_
 
int firstHEEta_
 
int firstHFEta_
 
std::vector< float > gain_
 
std::vector< LutinputLUT_
 
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< HcalPulseContainmentManagerpulseCorr_
 
int sizeHB_
 
int sizeHE_
 
int sizeHF_
 
const HcalTopologytopo_
 

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
 

Detailed Description

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)] ...
Author
M. Weinberger – TAMU
Tulika Bose and Greg Landsberg – Brown

Definition at line 32 of file HcaluLUTTPGCoder.h.

Member Typedef Documentation

◆ Lut

typedef std::vector<LutElement> HcaluLUTTPGCoder::Lut
private

Definition at line 83 of file HcaluLUTTPGCoder.h.

◆ LutElement

typedef unsigned short HcaluLUTTPGCoder::LutElement
private

Definition at line 82 of file HcaluLUTTPGCoder.h.

Constructor & Destructor Documentation

◆ HcaluLUTTPGCoder() [1/2]

HcaluLUTTPGCoder::HcaluLUTTPGCoder ( )

Definition at line 40 of file HcaluLUTTPGCoder.cc.

41  : topo_{},
42  delay_{},
45  bitToMask_{},
46  firstHBEta_{},
47  lastHBEta_{},
48  nHBEta_{},
49  maxDepthHB_{},
50  sizeHB_{},
51  firstHEEta_{},
52  lastHEEta_{},
53  nHEEta_{},
54  maxDepthHE_{},
55  sizeHE_{},
56  firstHFEta_{},
57  lastHFEta_{},
58  nHFEta_{},
59  maxDepthHF_{},
60  sizeHF_{},
64  allLinear_{},

◆ HcaluLUTTPGCoder() [2/2]

HcaluLUTTPGCoder::HcaluLUTTPGCoder ( const HcalTopology topo,
const HcalTimeSlew delay 
)

Definition at line 69 of file HcaluLUTTPGCoder.cc.

69 { init(top, delay); }

References phase2TrackerDigitizer_cfi::delay, and init().

◆ ~HcaluLUTTPGCoder()

HcaluLUTTPGCoder::~HcaluLUTTPGCoder ( )
override

Definition at line 110 of file HcaluLUTTPGCoder.cc.

110 {}

Member Function Documentation

◆ adc2Linear() [1/5]

void HcaluLUTTPGCoder::adc2Linear ( const HBHEDataFrame df,
IntegerCaloSamples ics 
) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 480 of file HcaluLUTTPGCoder.cc.

480  {
481  int lutId = getLUTId(df.id());
482  const Lut& lut = inputLUT_.at(lutId);
483  for (int i = 0; i < df.size(); i++) {
484  ics[i] = (lut.at(df[i].adc()) & QIE8_LUT_BITMASK);
485  }
486 }

References ecalMGPA::adc(), getLUTId(), mps_fire::i, Ecal07UnpackerData_cfi::ics, HBHEDataFrame::id(), inputLUT_, QIE8_LUT_BITMASK, and HBHEDataFrame::size().

Referenced by HcalTriggerPrimitiveAlgo::addSignal().

◆ adc2Linear() [2/5]

void HcaluLUTTPGCoder::adc2Linear ( const HFDataFrame df,
IntegerCaloSamples ics 
) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 488 of file HcaluLUTTPGCoder.cc.

488  {
489  int lutId = getLUTId(df.id());
490  const Lut& lut = inputLUT_.at(lutId);
491  for (int i = 0; i < df.size(); i++) {
492  ics[i] = (lut.at(df[i].adc()) & QIE8_LUT_BITMASK);
493  }
494 }

References ecalMGPA::adc(), getLUTId(), mps_fire::i, Ecal07UnpackerData_cfi::ics, HFDataFrame::id(), inputLUT_, QIE8_LUT_BITMASK, and HFDataFrame::size().

◆ adc2Linear() [3/5]

void HcaluLUTTPGCoder::adc2Linear ( const QIE10DataFrame df,
IntegerCaloSamples ics 
) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 496 of file HcaluLUTTPGCoder.cc.

496  {
497  int lutId = getLUTId(HcalDetId(df.id()));
498  const Lut& lut = inputLUT_.at(lutId);
499  for (int i = 0; i < df.samples(); i++) {
500  ics[i] = (lut.at(df[i].adc()) & QIE10_LUT_BITMASK);
501  }
502 }

References ecalMGPA::adc(), getLUTId(), mps_fire::i, Ecal07UnpackerData_cfi::ics, QIE10DataFrame::id(), inputLUT_, QIE10_LUT_BITMASK, and QIE10DataFrame::samples().

◆ adc2Linear() [4/5]

void HcaluLUTTPGCoder::adc2Linear ( const QIE11DataFrame df,
IntegerCaloSamples ics 
) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 504 of file HcaluLUTTPGCoder.cc.

504  {
505  int lutId = getLUTId(HcalDetId(df.id()));
506  const Lut& lut = inputLUT_.at(lutId);
507  for (int i = 0; i < df.samples(); i++) {
508  ics[i] = (lut.at(df[i].adc()) & QIE11_LUT_BITMASK);
509  }
510 }

References ecalMGPA::adc(), getLUTId(), mps_fire::i, Ecal07UnpackerData_cfi::ics, QIE11DataFrame::id(), inputLUT_, QIE11_LUT_BITMASK, and QIE11DataFrame::samples().

◆ adc2Linear() [5/5]

unsigned short HcaluLUTTPGCoder::adc2Linear ( HcalQIESample  sample,
HcalDetId  id 
) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 512 of file HcaluLUTTPGCoder.cc.

512  {
513  int lutId = getLUTId(id);
514  return ((inputLUT_.at(lutId)).at(sample.adc()) & QIE8_LUT_BITMASK);
515 }

References getLUTId(), inputLUT_, QIE8_LUT_BITMASK, and simplePhotonAnalyzer_cfi::sample.

◆ compress()

void HcaluLUTTPGCoder::compress ( const IntegerCaloSamples ics,
const std::vector< bool > &  featureBits,
HcalTriggerPrimitiveDigi tp 
) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 104 of file HcaluLUTTPGCoder.cc.

106  {
107  throw cms::Exception("PROBLEM: This method should never be invoked!");
108 }

References Exception.

◆ cosh_ieta()

double HcaluLUTTPGCoder::cosh_ieta ( int  ieta,
int  depth,
HcalSubdetector  subdet 
)

Definition at line 283 of file HcaluLUTTPGCoder.cc.

283  {
284  // ieta = 28 and 29 are both associated with trigger tower 28
285  // so special handling is required. HF ieta=29 channels included in TT30
286  // are already handled correctly in cosh_ieta_
287  if (abs(ieta) >= 28 && subdet == HcalEndcap && allLinear_) {
288  if (abs(ieta) == 29)
289  return cosh_ieta_29_HE_;
290  if (abs(ieta) == 28) {
291  if (depth <= 3)
293  else
295  }
296  }
297 
298  return cosh_ieta_[ieta];
299 }

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().

◆ getLinearizationLUT()

std::vector< unsigned short > HcaluLUTTPGCoder::getLinearizationLUT ( HcalDetId  id) const
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.

527  {
528  int lutId = getLUTId(id);
529  return inputLUT_.at(lutId);
530 }

References getLUTId(), and inputLUT_.

◆ getLUTGain()

float HcaluLUTTPGCoder::getLUTGain ( HcalDetId  id) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 522 of file HcaluLUTTPGCoder.cc.

522  {
523  int lutId = getLUTId(id);
524  return gain_.at(lutId);
525 }

References gain_, and getLUTId().

◆ getLUTId() [1/3]

int HcaluLUTTPGCoder::getLUTId ( const HcalDetId detid) const

Definition at line 143 of file HcaluLUTTPGCoder.cc.

143  {
144  return getLUTId(detid.subdet(), detid.ieta(), detid.iphi(), detid.depth());
145 }

References HcalDetId::depth(), getLUTId(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().

◆ getLUTId() [2/3]

int HcaluLUTTPGCoder::getLUTId ( HcalSubdetector  id,
int  ieta,
int  iphi,
int  depth 
) const

Definition at line 112 of file HcaluLUTTPGCoder.cc.

112  {
113  int retval(0);
114  if (id == HcalBarrel) {
115  retval = (depth - 1) + maxDepthHB_ * (iphi - 1);
116  if (ieta > 0)
117  retval += maxDepthHB_ * nFi_ * (ieta - firstHBEta_);
118  else
119  retval += maxDepthHB_ * nFi_ * (ieta + lastHBEta_ + nHBEta_);
120  } else if (id == HcalEndcap) {
121  retval = sizeHB_;
122  retval += (depth - 1) + maxDepthHE_ * (iphi - 1);
123  if (ieta > 0)
124  retval += maxDepthHE_ * nFi_ * (ieta - firstHEEta_);
125  else
126  retval += maxDepthHE_ * nFi_ * (ieta + lastHEEta_ + nHEEta_);
127  } else if (id == HcalForward) {
128  retval = sizeHB_ + sizeHE_;
129  retval += (depth - 1) + maxDepthHF_ * (iphi - 1);
130  if (ieta > 0)
131  retval += maxDepthHF_ * nFi_ * (ieta - firstHFEta_);
132  else
133  retval += maxDepthHF_ * nFi_ * (ieta + lastHFEta_ + nHFEta_);
134  }
135  return retval;
136 }

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().

◆ getLUTId() [3/3]

int HcaluLUTTPGCoder::getLUTId ( uint32_t  rawid) const

Definition at line 138 of file HcaluLUTTPGCoder.cc.

138  {
139  HcalDetId detid(rawid);
140  return getLUTId(detid.subdet(), detid.ieta(), detid.iphi(), detid.depth());
141 }

References HcalDetId::depth(), getLUTId(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().

◆ getLUTPedestal()

float HcaluLUTTPGCoder::getLUTPedestal ( HcalDetId  id) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 517 of file HcaluLUTTPGCoder.cc.

517  {
518  int lutId = getLUTId(id);
519  return ped_.at(lutId);
520 }

References getLUTId(), and ped_.

◆ getMSB()

bool HcaluLUTTPGCoder::getMSB ( const HcalDetId id,
int  adc 
) const

Definition at line 538 of file HcaluLUTTPGCoder.cc.

538  {
539  int lutId = getLUTId(id);
540  const Lut& lut = inputLUT_.at(lutId);
541  return (lut.at(adc) & QIE8_LUT_MSB);
542 }

References ecalMGPA::adc(), getLUTId(), inputLUT_, and QIE8_LUT_MSB.

Referenced by lookupMSB().

◆ init()

void HcaluLUTTPGCoder::init ( const HcalTopology top,
const HcalTimeSlew delay 
)

Definition at line 71 of file HcaluLUTTPGCoder.cc.

71  {
72  topo_ = top;
73  delay_ = delay;
74  LUTGenerationMode_ = true;
75  FG_HF_thresholds_ = {0, 0};
76  bitToMask_ = 0;
77  allLinear_ = false;
78  linearLSB_QIE8_ = 1.;
79  linearLSB_QIE11_ = 1.;
81  pulseCorr_ = std::make_unique<HcalPulseContainmentManager>(MaximumFractionalError);
84  nHBEta_ = (lastHBEta_ - firstHBEta_ + 1);
86  sizeHB_ = 2 * nHBEta_ * nFi_ * maxDepthHB_;
89  nHEEta_ = (lastHEEta_ - firstHEEta_ + 1);
91  sizeHE_ = 2 * nHEEta_ * nFi_ * maxDepthHE_;
94  nHFEta_ = (lastHFEta_ - firstHFEta_ + 1);
96  sizeHF_ = 2 * nHFEta_ * nFi_ * maxDepthHF_;
97  size_t nluts = (size_t)(sizeHB_ + sizeHE_ + sizeHF_ + 1);
98  inputLUT_ = std::vector<HcaluLUTTPGCoder::Lut>(nluts);
99  gain_ = std::vector<float>(nluts, 0.);
100  ped_ = std::vector<float>(nluts, 0.);
102 }

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().

◆ lookupMSB() [1/3]

void HcaluLUTTPGCoder::lookupMSB ( const HBHEDataFrame df,
std::vector< bool > &  msb 
) const

Definition at line 532 of file HcaluLUTTPGCoder.cc.

532  {
533  msb.resize(df.size());
534  for (int i = 0; i < df.size(); ++i)
535  msb[i] = getMSB(df.id(), df.sample(i).adc());
536 }

References HcalQIESample::adc(), getMSB(), mps_fire::i, HBHEDataFrame::id(), HBHEDataFrame::sample(), and HBHEDataFrame::size().

Referenced by HcalTriggerPrimitiveAlgo::addSignal().

◆ lookupMSB() [2/3]

void HcaluLUTTPGCoder::lookupMSB ( const QIE10DataFrame df,
std::vector< std::bitset< 2 >> &  msb 
) const

Definition at line 544 of file HcaluLUTTPGCoder.cc.

544  {
545  msb.resize(df.samples());
546  int lutId = getLUTId(HcalDetId(df.id()));
547  const Lut& lut = inputLUT_.at(lutId);
548  for (int i = 0; i < df.samples(); ++i) {
549  msb[i][0] = lut.at(df[i].adc()) & QIE10_LUT_MSB0;
550  msb[i][1] = lut.at(df[i].adc()) & QIE10_LUT_MSB1;
551  }
552 }

References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE10DataFrame::id(), inputLUT_, QIE10_LUT_MSB0, QIE10_LUT_MSB1, and QIE10DataFrame::samples().

◆ lookupMSB() [3/3]

void HcaluLUTTPGCoder::lookupMSB ( const QIE11DataFrame df,
std::vector< std::bitset< 2 >> &  msb 
) const

Definition at line 554 of file HcaluLUTTPGCoder.cc.

554  {
555  int lutId = getLUTId(HcalDetId(df.id()));
556  const Lut& lut = inputLUT_.at(lutId);
557  for (int i = 0; i < df.samples(); ++i) {
558  msb[i][0] = lut.at(df[i].adc()) & QIE11_LUT_MSB0;
559  msb[i][1] = lut.at(df[i].adc()) & QIE11_LUT_MSB1;
560  }
561 }

References ecalMGPA::adc(), getLUTId(), mps_fire::i, QIE11DataFrame::id(), inputLUT_, QIE11_LUT_MSB0, QIE11_LUT_MSB1, and QIE11DataFrame::samples().

◆ make_cosh_ieta_map()

void HcaluLUTTPGCoder::make_cosh_ieta_map ( void  )

Definition at line 301 of file HcaluLUTTPGCoder.cc.

301  {
302  cosh_ieta_ = std::vector<double>(lastHFEta_ + 1, -1.0);
303 
304  HcalTrigTowerGeometry triggeo(topo_);
305 
306  for (int i = 1; i <= firstHFEta_; ++i) {
307  double eta_low = 0., eta_high = 0.;
308  triggeo.towerEtaBounds(i, 0, eta_low, eta_high);
309  cosh_ieta_[i] = cosh((eta_low + eta_high) / 2.);
310  }
311  for (int i = firstHFEta_; i <= lastHFEta_; ++i) {
312  std::pair<double, double> etas = topo_->etaRange(HcalForward, i);
313  double eta1 = etas.first;
314  double eta2 = etas.second;
315  cosh_ieta_[i] = cosh((eta1 + eta2) / 2.);
316  }
317 
318  // trigger tower 28 in HE has a more complicated geometry
319  std::pair<double, double> eta28 = topo_->etaRange(HcalEndcap, 28);
320  std::pair<double, double> eta29 = topo_->etaRange(HcalEndcap, 29);
321  cosh_ieta_29_HE_ = cosh((eta29.first + eta29.second) / 2.);
322  cosh_ieta_28_HE_low_depths_ = cosh((eta28.first + eta28.second) / 2.);
323  // for higher depths in ieta = 28, the trigger tower extends past
324  // the ieta = 29 channels
325  cosh_ieta_28_HE_high_depths_ = cosh((eta28.first + eta29.second) / 2.);
326 }

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().

Referenced by init(), and update().

◆ setAllLinear()

void HcaluLUTTPGCoder::setAllLinear ( bool  linear,
double  lsb8,
double  lsb11,
double  lsb11overlap 
)
inline

Definition at line 62 of file HcaluLUTTPGCoder.h.

62  {
64  linearLSB_QIE8_ = lsb8;
65  linearLSB_QIE11_ = lsb11;
66  linearLSB_QIE11Overlap_ = lsb11overlap;
67  };

References allLinear_, linear(), linearLSB_QIE11_, linearLSB_QIE11Overlap_, and linearLSB_QIE8_.

Referenced by HcalTPGCoderULUT::buildCoder().

◆ setFGHFthresholds()

void HcaluLUTTPGCoder::setFGHFthresholds ( const std::vector< uint32_t > &  fgthresholds)
inline

Definition at line 60 of file HcaluLUTTPGCoder.h.

60 { FG_HF_thresholds_ = fgthresholds; };

References FG_HF_thresholds_.

Referenced by HcalTPGCoderULUT::buildCoder().

◆ setLUTGenerationMode()

void HcaluLUTTPGCoder::setLUTGenerationMode ( bool  gen)
inline

Definition at line 59 of file HcaluLUTTPGCoder.h.

59 { LUTGenerationMode_ = gen; };

References relval_steps::gen(), and LUTGenerationMode_.

Referenced by HcalTPGCoderULUT::buildCoder().

◆ setMaskBit()

void HcaluLUTTPGCoder::setMaskBit ( int  bit)
inline

Definition at line 61 of file HcaluLUTTPGCoder.h.

61 { bitToMask_ = bit; };

References bitToMask_.

Referenced by HcalTPGCoderULUT::buildCoder().

◆ update() [1/2]

void HcaluLUTTPGCoder::update ( const char *  filename,
bool  appendMSB = false 
)

Definition at line 147 of file HcaluLUTTPGCoder.cc.

147  {
148  std::ifstream file(filename, std::ios::in);
149  assert(file.is_open());
150 
151  std::vector<HcalSubdetector> subdet;
153 
154  // Drop first (comment) line
155  std::getline(file, buffer);
156  std::getline(file, buffer);
157 
158  unsigned int index = buffer.find("H", 0);
159  while (index < buffer.length()) {
160  std::string subdetStr = buffer.substr(index, 2);
161  if (subdetStr == "HB")
162  subdet.push_back(HcalBarrel);
163  else if (subdetStr == "HE")
164  subdet.push_back(HcalEndcap);
165  else if (subdetStr == "HF")
166  subdet.push_back(HcalForward);
167  //TODO Check subdet
168  //else exception
169  index += 2;
170  index = buffer.find("H", index);
171  }
172 
173  // Get upper/lower ranges for ieta/iphi/depth
174  size_t nCol = subdet.size();
175  assert(nCol > 0);
176 
177  std::vector<int> ietaU;
178  std::vector<int> ietaL;
179  std::vector<int> iphiU;
180  std::vector<int> iphiL;
181  std::vector<int> depU;
182  std::vector<int> depL;
183  std::vector<Lut> lutFromFile(nCol);
184  LutElement lutValue;
185 
186  for (size_t i = 0; i < nCol; ++i) {
187  int ieta;
188  file >> ieta;
189  ietaL.push_back(ieta);
190  }
191 
192  for (size_t i = 0; i < nCol; ++i) {
193  int ieta;
194  file >> ieta;
195  ietaU.push_back(ieta);
196  }
197 
198  for (size_t i = 0; i < nCol; ++i) {
199  int iphi;
200  file >> iphi;
201  iphiL.push_back(iphi);
202  }
203 
204  for (size_t i = 0; i < nCol; ++i) {
205  int iphi;
206  file >> iphi;
207  iphiU.push_back(iphi);
208  }
209 
210  for (size_t i = 0; i < nCol; ++i) {
211  int dep;
212  file >> dep;
213  depL.push_back(dep);
214  }
215 
216  for (size_t i = 0; i < nCol; ++i) {
217  int dep;
218  file >> dep;
219  depU.push_back(dep);
220  }
221 
222  // Read Lut Entry
223  for (size_t i = 0; file >> lutValue; i = (i + 1) % nCol) {
224  lutFromFile[i].push_back(lutValue);
225  }
226 
227  // Check lut size
228  for (size_t i = 0; i < nCol; ++i)
229  assert(lutFromFile[i].size() == INPUT_LUT_SIZE);
230 
231  for (size_t i = 0; i < nCol; ++i) {
232  for (int ieta = ietaL[i]; ieta <= ietaU[i]; ++ieta) {
233  for (int iphi = iphiL[i]; iphi <= iphiU[i]; ++iphi) {
234  for (int depth = depL[i]; depth <= depU[i]; ++depth) {
235  HcalDetId id(subdet[i], ieta, iphi, depth);
236  if (!topo_->valid(id))
237  continue;
238 
239  int lutId = getLUTId(id);
240  for (size_t adc = 0; adc < INPUT_LUT_SIZE; ++adc) {
241  if (appendMSB) {
242  // Append FG bit LUT to MSB
243  // MSB = Most Significant Bit = bit 10
244  // Overwrite bit 10
245  LutElement msb = (lutFromFile[i][adc] != 0 ? QIE8_LUT_MSB : 0);
246  inputLUT_[lutId][adc] = (msb | (inputLUT_[lutId][adc] & QIE8_LUT_BITMASK));
247  } else
248  inputLUT_[lutId][adc] = lutFromFile[i][adc];
249  } // for adc
250  } // for depth
251  } // for iphi
252  } // for ieta
253  } // for nCol
254 }

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().

◆ update() [2/2]

void HcaluLUTTPGCoder::update ( const HcalDbService conditions)

Definition at line 328 of file HcaluLUTTPGCoder.cc.

328  {
329  const HcalLutMetadata* metadata = conditions.getHcalLutMetadata();
330  assert(metadata != nullptr);
331  float nominalgain_ = metadata->getNominalGain();
332 
333  pulseCorr_->beginRun(&conditions, delay_);
334 
336 
337  for (const auto& id : metadata->getAllChannels()) {
338  if (not(id.det() == DetId::Hcal and topo_->valid(id)))
339  continue;
340 
341  HcalDetId cell(id);
342  HcalSubdetector subdet = cell.subdet();
343 
344  if (subdet != HcalBarrel and subdet != HcalEndcap and subdet != HcalForward)
345  continue;
346 
347  const HcalQIECoder* channelCoder = conditions.getHcalCoder(cell);
348  const HcalQIEShape* shape = conditions.getHcalShape(cell);
349  HcalCoderDb coder(*channelCoder, *shape);
350  const HcalLutMetadatum* meta = metadata->getValues(cell);
351 
352  unsigned int mipMax = 0;
353  unsigned int mipMin = 0;
354 
355  bool is2018OrLater = topo_->triggerMode() >= HcalTopologyMode::TriggerMode_2018 or
357  if (is2018OrLater or topo_->dddConstants()->isPlan1(cell)) {
358  const HcalTPChannelParameter* channelParameters = conditions.getHcalTPChannelParameter(cell);
359  mipMax = channelParameters->getFGBitInfo() >> 16;
360  mipMin = channelParameters->getFGBitInfo() & 0xFFFF;
361  }
362 
363  int lutId = getLUTId(cell);
364  Lut& lut = inputLUT_[lutId];
365  float ped = 0;
366  float gain = 0;
367  uint32_t status = 0;
368 
369  if (LUTGenerationMode_) {
370  const HcalCalibrations& calibrations = conditions.getHcalCalibrations(cell);
371  for (auto capId : {0, 1, 2, 3}) {
372  ped += calibrations.effpedestal(capId);
373  gain += calibrations.LUTrespcorrgain(capId);
374  }
375  ped /= 4.0;
376  gain /= 4.0;
377 
378  //Get Channel Quality
379  const HcalChannelStatus* channelStatus = conditions.getHcalChannelStatus(cell);
380  status = channelStatus->getValue();
381 
382  } else {
383  const HcalL1TriggerObject* myL1TObj = conditions.getHcalL1TriggerObject(cell);
384  ped = myL1TObj->getPedestal();
385  gain = myL1TObj->getRespGain();
386  status = myL1TObj->getFlag();
387  } // LUTGenerationMode_
388 
389  ped_[lutId] = ped;
390  gain_[lutId] = gain;
391  bool isMasked = ((status & bitToMask_) > 0);
392  float rcalib = meta->getRCalib();
393 
394  auto adc2fC = [channelCoder, shape](unsigned int adc) {
395  float fC = 0;
396  for (auto capId : {0, 1, 2, 3})
397  fC += channelCoder->charge(*shape, adc, capId);
398  return fC / 4;
399  };
400 
401  int qieType = conditions.getHcalQIEType(cell)->getValue();
402 
403  const size_t SIZE = qieType == QIE8 ? INPUT_LUT_SIZE : UPGRADE_LUT_SIZE;
404  const int MASK = qieType == QIE8 ? QIE8_LUT_BITMASK : qieType == QIE10 ? QIE10_LUT_BITMASK : QIE11_LUT_BITMASK;
405  double linearLSB = linearLSB_QIE8_;
406  if (qieType == QIE11 and cell.ietaAbs() == topo_->lastHBRing())
407  linearLSB = linearLSB_QIE11Overlap_;
408  else if (qieType == QIE11)
409  linearLSB = linearLSB_QIE11_;
410 
411  lut.resize(SIZE, 0);
412 
413  // Input LUT for HB/HE/HF
414  if (subdet == HcalBarrel || subdet == HcalEndcap) {
415  int granularity = meta->getLutGranularity();
416 
417  double correctionPhaseNS = conditions.getHcalRecoParam(cell)->correctionPhaseNS();
418  for (unsigned int adc = 0; adc < SIZE; ++adc) {
419  if (isMasked)
420  lut[adc] = 0;
421  else {
422  double nonlinearityCorrection = 1.0;
423  double containmentCorrection2TSCorrected = 1.0;
424  // SiPM nonlinearity was not corrected in 2017
425  // and containment corrections were not
426  // ET-dependent prior to 2018
427  if (is2018OrLater) {
428  double containmentCorrection1TS = pulseCorr_->correction(cell, 1, correctionPhaseNS, adc2fC(adc));
429  // Use the 1-TS containment correction to estimate the charge of the pulse
430  // from the individual samples
431  double correctedCharge = containmentCorrection1TS * adc2fC(adc);
432  containmentCorrection2TSCorrected = pulseCorr_->correction(cell, 2, correctionPhaseNS, correctedCharge);
433  if (qieType == QIE11) {
434  const HcalSiPMParameter& siPMParameter(*conditions.getHcalSiPMParameter(cell));
436  conditions.getHcalSiPMCharacteristics()->getNonLinearities(siPMParameter.getType()));
437  const double fcByPE = siPMParameter.getFCByPE();
438  const double effectivePixelsFired = correctedCharge / fcByPE;
439  nonlinearityCorrection = corr.getRecoCorrectionFactor(effectivePixelsFired);
440  }
441  }
442  if (allLinear_)
443  lut[adc] = (LutElement)std::min(std::max(0,
444  int((adc2fC(adc) - ped) * gain * rcalib * nonlinearityCorrection *
445  containmentCorrection2TSCorrected / linearLSB /
446  cosh_ieta(cell.ietaAbs(), cell.depth(), HcalEndcap))),
447  MASK);
448  else
449  lut[adc] =
451  int((adc2fC(adc) - ped) * gain * rcalib * nonlinearityCorrection *
452  containmentCorrection2TSCorrected / nominalgain_ / granularity)),
453  MASK);
454 
455  if (qieType == QIE11) {
456  if (adc >= mipMin and adc < mipMax)
457  lut[adc] |= QIE11_LUT_MSB0;
458  else if (adc >= mipMax)
459  lut[adc] |= QIE11_LUT_MSB1;
460  }
461  }
462  }
463  } else if (subdet == HcalForward) {
464  for (unsigned int adc = 0; adc < SIZE; ++adc) {
465  if (isMasked)
466  lut[adc] = 0;
467  else {
468  lut[adc] =
469  std::min(std::max(0, int((adc2fC(adc) - ped) * gain * rcalib / lsb_ / cosh_ieta_[cell.ietaAbs()])), MASK);
470  if (adc > FG_HF_thresholds_[0])
471  lut[adc] |= QIE10_LUT_MSB0;
472  if (adc > FG_HF_thresholds_[1])
473  lut[adc] |= QIE10_LUT_MSB1;
474  }
475  }
476  }
477  }
478 }

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().

◆ updateXML()

void HcaluLUTTPGCoder::updateXML ( const char *  filename)

Definition at line 256 of file HcaluLUTTPGCoder.cc.

256  {
257  LutXml* _xml = new LutXml(filename);
258  _xml->create_lut_map();
261  for (unsigned int iphi = 0; iphi <= HcalDetId::kHcalPhiMask2; ++iphi) {
262  for (unsigned int depth = 1; depth < HcalDetId::kHcalDepthMask2; ++depth) {
263  for (int isub = 0; isub < 3; ++isub) {
264  HcalDetId detid(subdet[isub], ieta, iphi, depth);
265  if (!topo_->valid(detid))
266  continue;
267  int id = getLUTId(subdet[isub], ieta, iphi, depth);
268  std::vector<unsigned int>* lut = _xml->getLutFast(detid);
269  if (lut == nullptr)
270  throw cms::Exception("PROBLEM: No inputLUT_ in xml file for ") << detid << std::endl;
271  if (lut->size() != INPUT_LUT_SIZE)
272  throw cms::Exception("PROBLEM: Wrong inputLUT_ size in xml file for ") << detid << std::endl;
273  for (unsigned int i = 0; i < INPUT_LUT_SIZE; ++i)
274  inputLUT_[id][i] = (LutElement)lut->at(i);
275  }
276  }
277  }
278  }
279  delete _xml;
281 }

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().

Member Data Documentation

◆ allLinear_

bool HcaluLUTTPGCoder::allLinear_
private

Definition at line 111 of file HcaluLUTTPGCoder.h.

Referenced by cosh_ieta(), init(), setAllLinear(), and update().

◆ bitToMask_

int HcaluLUTTPGCoder::bitToMask_
private

Definition at line 101 of file HcaluLUTTPGCoder.h.

Referenced by init(), setMaskBit(), and update().

◆ cosh_ieta_

std::vector<double> HcaluLUTTPGCoder::cosh_ieta_
private

Definition at line 108 of file HcaluLUTTPGCoder.h.

Referenced by cosh_ieta(), make_cosh_ieta_map(), and update().

◆ cosh_ieta_28_HE_high_depths_

double HcaluLUTTPGCoder::cosh_ieta_28_HE_high_depths_
private

Definition at line 110 of file HcaluLUTTPGCoder.h.

Referenced by cosh_ieta(), and make_cosh_ieta_map().

◆ cosh_ieta_28_HE_low_depths_

double HcaluLUTTPGCoder::cosh_ieta_28_HE_low_depths_
private

Definition at line 110 of file HcaluLUTTPGCoder.h.

Referenced by cosh_ieta(), and make_cosh_ieta_map().

◆ cosh_ieta_29_HE_

double HcaluLUTTPGCoder::cosh_ieta_29_HE_
private

Definition at line 110 of file HcaluLUTTPGCoder.h.

Referenced by cosh_ieta(), and make_cosh_ieta_map().

◆ delay_

const HcalTimeSlew* HcaluLUTTPGCoder::delay_
private

Definition at line 98 of file HcaluLUTTPGCoder.h.

Referenced by init(), and update().

◆ FG_HF_thresholds_

std::vector<uint32_t> HcaluLUTTPGCoder::FG_HF_thresholds_
private

Definition at line 100 of file HcaluLUTTPGCoder.h.

Referenced by init(), setFGHFthresholds(), and update().

◆ firstHBEta_

int HcaluLUTTPGCoder::firstHBEta_
private

Definition at line 102 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ firstHEEta_

int HcaluLUTTPGCoder::firstHEEta_
private

Definition at line 103 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ firstHFEta_

int HcaluLUTTPGCoder::firstHFEta_
private

Definition at line 104 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), init(), and make_cosh_ieta_map().

◆ gain_

std::vector<float> HcaluLUTTPGCoder::gain_
private

Definition at line 106 of file HcaluLUTTPGCoder.h.

Referenced by getLUTGain(), init(), and update().

◆ INPUT_LUT_SIZE

const size_t HcaluLUTTPGCoder::INPUT_LUT_SIZE = 128
staticprivate

Definition at line 86 of file HcaluLUTTPGCoder.h.

Referenced by update(), and updateXML().

◆ inputLUT_

std::vector<Lut> HcaluLUTTPGCoder::inputLUT_
private

◆ lastHBEta_

int HcaluLUTTPGCoder::lastHBEta_
private

Definition at line 102 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ lastHEEta_

int HcaluLUTTPGCoder::lastHEEta_
private

Definition at line 103 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ lastHFEta_

int HcaluLUTTPGCoder::lastHFEta_
private

Definition at line 104 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), init(), and make_cosh_ieta_map().

◆ linearLSB_QIE11_

double HcaluLUTTPGCoder::linearLSB_QIE11_
private

Definition at line 112 of file HcaluLUTTPGCoder.h.

Referenced by init(), setAllLinear(), and update().

◆ linearLSB_QIE11Overlap_

double HcaluLUTTPGCoder::linearLSB_QIE11Overlap_
private

Definition at line 112 of file HcaluLUTTPGCoder.h.

Referenced by init(), setAllLinear(), and update().

◆ linearLSB_QIE8_

double HcaluLUTTPGCoder::linearLSB_QIE8_
private

Definition at line 112 of file HcaluLUTTPGCoder.h.

Referenced by init(), setAllLinear(), and update().

◆ lsb_

const float HcaluLUTTPGCoder::lsb_ = 1. / 16
static

Definition at line 34 of file HcaluLUTTPGCoder.h.

Referenced by CaloTPGTranscoderULUT::setup(), and update().

◆ LUTGenerationMode_

bool HcaluLUTTPGCoder::LUTGenerationMode_
private

Definition at line 99 of file HcaluLUTTPGCoder.h.

Referenced by init(), setLUTGenerationMode(), and update().

◆ maxDepthHB_

int HcaluLUTTPGCoder::maxDepthHB_
private

Definition at line 102 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ maxDepthHE_

int HcaluLUTTPGCoder::maxDepthHE_
private

Definition at line 103 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ maxDepthHF_

int HcaluLUTTPGCoder::maxDepthHF_
private

Definition at line 104 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nFi_

const int HcaluLUTTPGCoder::nFi_ = 72
staticprivate

Definition at line 88 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nHBEta_

int HcaluLUTTPGCoder::nHBEta_
private

Definition at line 102 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nHEEta_

int HcaluLUTTPGCoder::nHEEta_
private

Definition at line 103 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nHFEta_

int HcaluLUTTPGCoder::nHFEta_
private

Definition at line 104 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ ped_

std::vector<float> HcaluLUTTPGCoder::ped_
private

Definition at line 107 of file HcaluLUTTPGCoder.h.

Referenced by getLUTPedestal(), init(), and update().

◆ pulseCorr_

std::unique_ptr<HcalPulseContainmentManager> HcaluLUTTPGCoder::pulseCorr_
private

Definition at line 113 of file HcaluLUTTPGCoder.h.

Referenced by init(), and update().

◆ QIE10_LUT_BITMASK

const int HcaluLUTTPGCoder::QIE10_LUT_BITMASK = 0x7FF
static

Definition at line 77 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), and update().

◆ QIE10_LUT_MSB0

const int HcaluLUTTPGCoder::QIE10_LUT_MSB0 = 0x1000
staticprivate

Definition at line 93 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB(), and update().

◆ QIE10_LUT_MSB1

const int HcaluLUTTPGCoder::QIE10_LUT_MSB1 = 0x2000
staticprivate

Definition at line 94 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB(), and update().

◆ QIE11_LUT_BITMASK

const int HcaluLUTTPGCoder::QIE11_LUT_BITMASK = 0x3FF
static

Definition at line 78 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), and update().

◆ QIE11_LUT_MSB0

const int HcaluLUTTPGCoder::QIE11_LUT_MSB0 = 0x400
staticprivate

Definition at line 91 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB(), and update().

◆ QIE11_LUT_MSB1

const int HcaluLUTTPGCoder::QIE11_LUT_MSB1 = 0x800
staticprivate

Definition at line 92 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB(), and update().

◆ QIE8_LUT_BITMASK

const int HcaluLUTTPGCoder::QIE8_LUT_BITMASK = 0x3FF
static

Definition at line 76 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), and update().

◆ QIE8_LUT_MSB

const int HcaluLUTTPGCoder::QIE8_LUT_MSB = 0x400
staticprivate

Definition at line 90 of file HcaluLUTTPGCoder.h.

Referenced by getMSB(), and update().

◆ sizeHB_

int HcaluLUTTPGCoder::sizeHB_
private

Definition at line 102 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ sizeHE_

int HcaluLUTTPGCoder::sizeHE_
private

Definition at line 103 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ sizeHF_

int HcaluLUTTPGCoder::sizeHF_
private

Definition at line 104 of file HcaluLUTTPGCoder.h.

Referenced by init().

◆ topo_

const HcalTopology* HcaluLUTTPGCoder::topo_
private

Definition at line 97 of file HcaluLUTTPGCoder.h.

Referenced by init(), make_cosh_ieta_map(), update(), and updateXML().

◆ UPGRADE_LUT_SIZE

const size_t HcaluLUTTPGCoder::UPGRADE_LUT_SIZE = 256
staticprivate

Definition at line 87 of file HcaluLUTTPGCoder.h.

Referenced by update().

HcaluLUTTPGCoder::bitToMask_
int bitToMask_
Definition: HcaluLUTTPGCoder.h:101
HcalDDDRecConstants::isPlan1
bool isPlan1(const HcalDetId &id) const
Definition: HcalDDDRecConstants.h:110
HcalLutMetadatum
Definition: HcalLutMetadatum.h:12
HcaluLUTTPGCoder::cosh_ieta_29_HE_
double cosh_ieta_29_HE_
Definition: HcaluLUTTPGCoder.h:110
HcaluLUTTPGCoder::sizeHF_
int sizeHF_
Definition: HcaluLUTTPGCoder.h:104
ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:11
HcalRecoParam::correctionPhaseNS
constexpr float correctionPhaseNS() const
Definition: HcalRecoParam.h:30
mps_fire.i
i
Definition: mps_fire.py:355
XMLProcessor::getInstance
static XMLProcessor * getInstance()
Definition: XMLProcessor.h:134
HcaluLUTTPGCoder::nHEEta_
int nHEEta_
Definition: HcaluLUTTPGCoder.h:103
HcaluLUTTPGCoder::ped_
std::vector< float > ped_
Definition: HcaluLUTTPGCoder.h:107
QIE8
Definition: HcalQIENum.h:4
castor_dqm_sourceclient-live_cfg.correctionPhaseNS
correctionPhaseNS
Definition: castor_dqm_sourceclient-live_cfg.py:54
HBHEDataFrame::sample
constexpr HcalQIESample const & sample(int i) const
access a sample
Definition: HBHEDataFrame.h:40
HcalDbService::getHcalSiPMCharacteristics
const HcalSiPMCharacteristics * getHcalSiPMCharacteristics() const
Definition: HcalDbService.cc:389
HFDataFrame::id
constexpr HcalDetId const & id() const
Definition: HFDataFrame.h:23
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
HcaluLUTTPGCoder::linearLSB_QIE11_
double linearLSB_QIE11_
Definition: HcaluLUTTPGCoder.h:112
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
QIE10DataFrame::samples
constexpr int samples() const
total number of samples in the digi
Definition: QIE10DataFrame.h:86
HcaluLUTTPGCoder::QIE8_LUT_BITMASK
static const int QIE8_LUT_BITMASK
Definition: HcaluLUTTPGCoder.h:76
LutXml::create_lut_map
int create_lut_map(void)
Definition: LutXml.cc:336
mps_update.status
status
Definition: mps_update.py:69
HcalQIECoder::charge
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition: HcalQIECoder.cc:20
Lut
Definition: Lut.h:31
min
T min(T a, T b)
Definition: MathUtil.h:58
HcaluLUTTPGCoder::allLinear_
bool allLinear_
Definition: HcaluLUTTPGCoder.h:111
HcaluLUTTPGCoder::cosh_ieta
double cosh_ieta(int ieta, int depth, HcalSubdetector subdet)
Definition: HcaluLUTTPGCoder.cc:283
XMLProcessor::terminate
int terminate(void)
Definition: XMLProcessor.cc:313
HcalQIESample::adc
constexpr int adc() const
get the ADC sample
Definition: HcalQIESample.h:43
HcaluLUTTPGCoder::QIE10_LUT_BITMASK
static const int QIE10_LUT_BITMASK
Definition: HcaluLUTTPGCoder.h:77
HcaluLUTTPGCoder::nHFEta_
int nHFEta_
Definition: HcaluLUTTPGCoder.h:104
HcaluLUTTPGCoder::QIE11_LUT_MSB1
static const int QIE11_LUT_MSB1
Definition: HcaluLUTTPGCoder.h:92
HcaluLUTTPGCoder::sizeHE_
int sizeHE_
Definition: HcaluLUTTPGCoder.h:103
HLT_2018_cff.eta1
eta1
Definition: HLT_2018_cff.py:8220
DetId::Hcal
Definition: DetId.h:28
HcalQIEType::getValue
int getValue() const
Definition: HcalQIEType.h:19
HcalSiPMCharacteristics::getNonLinearities
std::vector< float > getNonLinearities(int type) const
get nonlinearity constants
Definition: HcalSiPMCharacteristics.cc:77
cms::cuda::assert
assert(be >=bs)
HcaluLUTTPGCoder::INPUT_LUT_SIZE
static const size_t INPUT_LUT_SIZE
Definition: HcaluLUTTPGCoder.h:86
AlignmentProducer_cff.calibrations
calibrations
Definition: AlignmentProducer_cff.py:59
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
HcaluLUTTPGCoder::lastHBEta_
int lastHBEta_
Definition: HcaluLUTTPGCoder.h:102
MaximumFractionalError
constexpr double MaximumFractionalError
Definition: HcaluLUTTPGCoder.cc:38
HcaluLUTTPGCoder::sizeHB_
int sizeHB_
Definition: HcaluLUTTPGCoder.h:102
HcalBarrel
Definition: HcalAssistant.h:33
HcaluLUTTPGCoder::nFi_
static const int nFi_
Definition: HcaluLUTTPGCoder.h:88
HcalTopology::firstHERing
int firstHERing() const
Definition: HcalTopology.h:93
HcaluLUTTPGCoder::maxDepthHE_
int maxDepthHE_
Definition: HcaluLUTTPGCoder.h:103
adc2fC
static const float adc2fC[128]
Definition: CMTRawAnalyzer.h:410
HcalDbService::getHcalShape
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:326
HcaluLUTTPGCoder::LUTGenerationMode_
bool LUTGenerationMode_
Definition: HcaluLUTTPGCoder.h:99
HcalDbService::getHcalCalibrations
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:65
HcaluLUTTPGCoder::FG_HF_thresholds_
std::vector< uint32_t > FG_HF_thresholds_
Definition: HcaluLUTTPGCoder.h:100
HcaluLUTTPGCoder::UPGRADE_LUT_SIZE
static const size_t UPGRADE_LUT_SIZE
Definition: HcaluLUTTPGCoder.h:87
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
HcalTopology::maxDepth
int maxDepth(void) const
Definition: HcalTopology.cc:980
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HcaluLUTTPGCoder::cosh_ieta_28_HE_low_depths_
double cosh_ieta_28_HE_low_depths_
Definition: HcaluLUTTPGCoder.h:110
HcalDbService::getHcalCoder
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:319
HcalTopology::firstHFRing
int firstHFRing() const
Definition: HcalTopology.h:96
HcalL1TriggerObject::getRespGain
float getRespGain() const
Definition: HcalL1TriggerObject.h:23
HcaluLUTTPGCoder::lsb_
static const float lsb_
Definition: HcaluLUTTPGCoder.h:34
HcaluLUTTPGCoder::gain_
std::vector< float > gain_
Definition: HcaluLUTTPGCoder.h:106
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
EnergyCorrector.etas
etas
Definition: EnergyCorrector.py:45
HcalDetId::kHcalPhiMask2
static constexpr uint32_t kHcalPhiMask2
Definition: HcalDetId.h:15
HcalChannelStatus
Definition: HcalChannelStatus.h:13
HcaluLUTTPGCoder::lastHEEta_
int lastHEEta_
Definition: HcaluLUTTPGCoder.h:103
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
QIE11DataFrame::samples
constexpr int samples() const
total number of samples in the digi
Definition: QIE11DataFrame.h:77
HcaluLUTTPGCoder::lastHFEta_
int lastHFEta_
Definition: HcaluLUTTPGCoder.h:104
HcalCalibrations
Definition: HcalCalibrations.h:9
TrackingMonitor_cfi.metadata
metadata
Definition: TrackingMonitor_cfi.py:71
HcaluLUTTPGCoder::nHBEta_
int nHBEta_
Definition: HcaluLUTTPGCoder.h:102
HcalL1TriggerObject::getPedestal
float getPedestal() const
Definition: HcalL1TriggerObject.h:22
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HLT_2018_cff.eta2
eta2
Definition: HLT_2018_cff.py:8221
HcalDbService::getHcalRecoParam
const HcalRecoParam * getHcalRecoParam(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:405
HcalDbService::getHcalQIEType
const HcalQIEType * getHcalQIEType(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:263
HcalTPChannelParameter
Definition: HcalTPChannelParameter.h:7
HcalDetId::kHcalDepthMask2
static constexpr uint32_t kHcalDepthMask2
Definition: HcalDetId.h:25
HcaluLUTTPGCoder::cosh_ieta_28_HE_high_depths_
double cosh_ieta_28_HE_high_depths_
Definition: HcaluLUTTPGCoder.h:110
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalL1TriggerObject::getFlag
uint32_t getFlag() const
Definition: HcalL1TriggerObject.h:24
HcalL1TriggerObject
Definition: HcalL1TriggerObject.h:13
HcalChannelStatus::getValue
uint32_t getValue() const
Definition: HcalChannelStatus.h:60
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HFDataFrame::size
constexpr int size() const
total number of samples in the digi
Definition: HFDataFrame.h:27
HcaluLUTTPGCoder::firstHEEta_
int firstHEEta_
Definition: HcaluLUTTPGCoder.h:103
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
HcaluLUTTPGCoder::linearLSB_QIE11Overlap_
double linearLSB_QIE11Overlap_
Definition: HcaluLUTTPGCoder.h:112
HcaluLUTTPGCoder::linearLSB_QIE8_
double linearLSB_QIE8_
Definition: HcaluLUTTPGCoder.h:112
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HcalTopology::dddConstants
const HcalDDDRecConstants * dddConstants() const
Definition: HcalTopology.h:164
recoMuon::in
Definition: RecoMuonEnumerators.h:6
QIE11DataFrame::id
constexpr edm::DataFrame::id_type id() const
Definition: QIE11DataFrame.h:68
HcaluLUTTPGCoder::init
void init(const HcalTopology *top, const HcalTimeSlew *delay)
Definition: HcaluLUTTPGCoder.cc:71
HcaluLUTTPGCoder::LutElement
unsigned short LutElement
Definition: HcaluLUTTPGCoder.h:82
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
HcalTopology::triggerMode
HcalTopologyMode::TriggerMode triggerMode() const
Definition: HcalTopology.h:35
createfilelist.int
int
Definition: createfilelist.py:10
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
HcalTopology::firstHBRing
int firstHBRing() const
Definition: HcalTopology.h:91
HcalLutMetadatum::getRCalib
float getRCalib() const
Definition: HcalLutMetadatum.h:20
LutXml::getLutFast
std::vector< unsigned int > * getLutFast(uint32_t det_id)
Definition: LutXml.cc:71
HcalTopology::lastHERing
int lastHERing() const
Definition: HcalTopology.h:94
HcaluLUTTPGCoder::topo_
const HcalTopology * topo_
Definition: HcaluLUTTPGCoder.h:97
HcalTrigTowerGeometry
Definition: HcalTrigTowerGeometry.h:10
HcaluLUTTPGCoder::maxDepthHB_
int maxDepthHB_
Definition: HcaluLUTTPGCoder.h:102
HcalQIECoder
Definition: HcalQIECoder.h:20
SeedStopReason::SIZE
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
HcalTopology::valid
bool valid(const DetId &id) const override
Definition: HcalTopology.cc:225
HcalTopologyMode::TriggerMode_2018
Definition: HcalTopologyMode.h:34
HcaluLUTTPGCoder::firstHBEta_
int firstHBEta_
Definition: HcaluLUTTPGCoder.h:102
linear
float linear(float x)
Definition: OccupancyPlotMacros.cc:26
HBHEDataFrame::id
constexpr const HcalDetId & id() const
Definition: HBHEDataFrame.h:23
HcaluLUTTPGCoder::QIE11_LUT_BITMASK
static const int QIE11_LUT_BITMASK
Definition: HcaluLUTTPGCoder.h:78
HcaluLUTTPGCoder::getMSB
bool getMSB(const HcalDetId &id, int adc) const
Definition: HcaluLUTTPGCoder.cc:538
HcaluLUTTPGCoder::cosh_ieta_
std::vector< double > cosh_ieta_
Definition: HcaluLUTTPGCoder.h:108
HcalDbService::getHcalSiPMParameter
const HcalSiPMParameter * getHcalSiPMParameter(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:382
HBHEDataFrame::size
constexpr int size() const
total number of samples in the digi
Definition: HBHEDataFrame.h:27
HcalLutMetadata
Definition: HcalLutMetadata.h:15
HcalDbService::getHcalChannelStatus
const HcalChannelStatus * getHcalChannelStatus(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:351
HcalEndcap
Definition: HcalAssistant.h:34
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HcalTPChannelParameter::getFGBitInfo
uint32_t getFGBitInfo() const
get FG bit information
Definition: HcalTPChannelParameter.h:12
Exception
Definition: hltDiff.cc:246
HcalDbService::getHcalLutMetadata
const HcalLutMetadata * getHcalLutMetadata() const
Definition: HcalDbService.cc:380
HcaluLUTTPGCoder::QIE10_LUT_MSB1
static const int QIE10_LUT_MSB1
Definition: HcaluLUTTPGCoder.h:94
HcaluLUTTPGCoder::QIE10_LUT_MSB0
static const int QIE10_LUT_MSB0
Definition: HcaluLUTTPGCoder.h:93
HcalTopology::etaRange
std::pair< double, double > etaRange(HcalSubdetector subdet, int ieta) const
Definition: HcalTopology.cc:1124
HcaluLUTTPGCoder::make_cosh_ieta_map
void make_cosh_ieta_map(void)
Definition: HcaluLUTTPGCoder.cc:301
HcalTopology::lastHFRing
int lastHFRing() const
Definition: HcalTopology.h:97
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
HcaluLUTTPGCoder::inputLUT_
std::vector< Lut > inputLUT_
Definition: HcaluLUTTPGCoder.h:105
relval_steps.gen
def gen(fragment, howMuch)
Production test section ####.
Definition: relval_steps.py:500
Ecal07UnpackerData_cfi.ics
ics
Definition: Ecal07UnpackerData_cfi.py:55
HcalQIEShape
Definition: HcalQIEShape.h:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HcaluLUTTPGCoder::getLUTId
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
Definition: HcaluLUTTPGCoder.cc:112
HcalCoderDb
Definition: HcalCoderDb.h:15
HcalDetId::kHcalEtaMask2
static constexpr uint32_t kHcalEtaMask2
Definition: HcalDetId.h:19
HcaluLUTTPGCoder::QIE11_LUT_MSB0
static const int QIE11_LUT_MSB0
Definition: HcaluLUTTPGCoder.h:91
phase2TrackerDigitizer_cfi.delay
delay
Definition: phase2TrackerDigitizer_cfi.py:67
cms::Exception
Definition: Exception.h:70
HcaluLUTTPGCoder::firstHFEta_
int firstHFEta_
Definition: HcaluLUTTPGCoder.h:104
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcaluLUTTPGCoder::QIE8_LUT_MSB
static const int QIE8_LUT_MSB
Definition: HcaluLUTTPGCoder.h:90
HcalSiPMnonlinearity
Definition: HcalSiPMnonlinearity.h:7
HcalLutMetadatum::getLutGranularity
uint8_t getLutGranularity() const
Definition: HcalLutMetadatum.h:21
LutXml
Definition: LutXml.h:27
QIE10DataFrame::id
constexpr edm::DataFrame::id_type id() const
Definition: QIE10DataFrame.h:77
QIE11
Definition: HcalQIENum.h:4
HcalDbService::getHcalTPChannelParameter
const HcalTPChannelParameter * getHcalTPChannelParameter(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:391
HcaluLUTTPGCoder::delay_
const HcalTimeSlew * delay_
Definition: HcaluLUTTPGCoder.h:98
HcaluLUTTPGCoder::pulseCorr_
std::unique_ptr< HcalPulseContainmentManager > pulseCorr_
Definition: HcaluLUTTPGCoder.h:113
HcalDbService::getHcalL1TriggerObject
const HcalL1TriggerObject * getHcalL1TriggerObject(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:347
HcalTopologyMode::TriggerMode_2018legacy
Definition: HcalTopologyMode.h:31
HcalSiPMParameter
Definition: HcalSiPMParameter.h:7
QIE10
Definition: HcalQIENum.h:4
HcalTopology::lastHBRing
int lastHBRing() const
Definition: HcalTopology.h:92
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
HcaluLUTTPGCoder::maxDepthHF_
int maxDepthHF_
Definition: HcaluLUTTPGCoder.h:104