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, bool ootpu_lut) 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...
 
std::vector< unsigned short > getLinearizationLUT (HcalZDCDetId id, bool ootpu_lut) const override
 
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
 
int getLUTId (const HcalZDCDetId &detid) const
 
float getLUTPedestal (HcalDetId id) const override
 
bool getMSB (const HcalDetId &id, int adc) const
 
std::vector< unsigned short > group0FGbits (const QIE11DataFrame &df) 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 set1TSContainHB (bool contain1TSHB)
 
void set1TSContainHE (bool contain1TSHE)
 
void setAllLinear (bool linear, double lsb8, double lsb11, double lsb11overlap)
 
void setApplyFixPCC (double applyFixPCC)
 
void setContainPhaseHB (double containPhaseNSHB)
 
void setContainPhaseHE (double containPhaseNSHE)
 
void setFGHFthresholds (const std::vector< uint32_t > &fgthresholds)
 
void setLUTGenerationMode (bool gen)
 
void setMaskBit (int bit)
 
void setOverrideDBweightsAndFilterHB (bool overrideDBweightsAndFilterHB)
 
void setOverrideDBweightsAndFilterHE (bool overrideDBweightsAndFilterHE)
 
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 QIE10_ZDC_LUT_BITMASK = 0x3FF
 
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_
 
bool applyFixPCC_
 
int bitToMask_
 
bool contain1TSHB_
 
bool contain1TSHE_
 
double containPhaseNSHB_ = 6.0
 
double containPhaseNSHE_ = 6.0
 
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_
 
bool overrideDBweightsAndFilterHB_ = false
 
bool overrideDBweightsAndFilterHE_ = false
 
std::vector< float > ped_
 
std::unique_ptr< HcalPulseContainmentManagerpulseCorr_
 
int sizeHB_
 
int sizeHE_
 
int sizeHF_
 
int sizeZDC_
 
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 98 of file HcaluLUTTPGCoder.h.

◆ LutElement

typedef unsigned short HcaluLUTTPGCoder::LutElement
private

Definition at line 97 of file HcaluLUTTPGCoder.h.

Constructor & Destructor Documentation

◆ HcaluLUTTPGCoder() [1/2]

HcaluLUTTPGCoder::HcaluLUTTPGCoder ( )

Definition at line 41 of file HcaluLUTTPGCoder.cc.

42  : topo_{},
43  delay_{},
46  bitToMask_{},
47  firstHBEta_{},
48  lastHBEta_{},
49  nHBEta_{},
50  maxDepthHB_{},
51  sizeHB_{},
52  firstHEEta_{},
53  lastHEEta_{},
54  nHEEta_{},
55  maxDepthHE_{},
56  sizeHE_{},
57  firstHFEta_{},
58  lastHFEta_{},
59  nHFEta_{},
60  maxDepthHF_{},
61  sizeHF_{},
62  sizeZDC_{},
66  allLinear_{},
67  contain1TSHB_{},
68  contain1TSHE_{},
69  applyFixPCC_{},
std::vector< uint32_t > FG_HF_thresholds_
double cosh_ieta_28_HE_high_depths_
double linearLSB_QIE11Overlap_
const HcalTopology * topo_
double cosh_ieta_28_HE_low_depths_
const HcalTimeSlew * delay_

◆ HcaluLUTTPGCoder() [2/2]

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

Definition at line 74 of file HcaluLUTTPGCoder.cc.

References phase2TrackerDigitizer_cfi::delay, and init().

74 { init(top, delay); }
void init(const HcalTopology *top, const HcalTimeSlew *delay)

◆ ~HcaluLUTTPGCoder()

HcaluLUTTPGCoder::~HcaluLUTTPGCoder ( )
override

Definition at line 119 of file HcaluLUTTPGCoder.cc.

119 {}

Member Function Documentation

◆ adc2Linear() [1/5]

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

Implements HcalTPGCoder.

Definition at line 682 of file HcaluLUTTPGCoder.cc.

References gpuClustering::adc, isotrackApplyRegressor::df, getLUTId(), mps_fire::i, unpacker2007h4_cff::ics, inputLUT_, and QIE8_LUT_BITMASK.

Referenced by HcalTriggerPrimitiveAlgo::addSignal(), and HcalTriggerPrimitiveAlgo::addUpgradeTDCFG().

682  {
683  int lutId = getLUTId(df.id());
684  const Lut& lut = inputLUT_.at(lutId);
685  for (int i = 0; i < df.size(); i++) {
686  ics[i] = (lut.at(df[i].adc()) & QIE8_LUT_BITMASK);
687  }
688 }
static const int QIE8_LUT_BITMASK
std::vector< Lut > inputLUT_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
Definition: Lut.h:31
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ adc2Linear() [2/5]

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

Implements HcalTPGCoder.

Definition at line 690 of file HcaluLUTTPGCoder.cc.

References gpuClustering::adc, isotrackApplyRegressor::df, getLUTId(), mps_fire::i, unpacker2007h4_cff::ics, inputLUT_, and QIE8_LUT_BITMASK.

690  {
691  int lutId = getLUTId(df.id());
692  const Lut& lut = inputLUT_.at(lutId);
693  for (int i = 0; i < df.size(); i++) {
694  ics[i] = (lut.at(df[i].adc()) & QIE8_LUT_BITMASK);
695  }
696 }
static const int QIE8_LUT_BITMASK
std::vector< Lut > inputLUT_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
Definition: Lut.h:31
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ adc2Linear() [3/5]

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

Implements HcalTPGCoder.

Definition at line 698 of file HcaluLUTTPGCoder.cc.

References gpuClustering::adc, hcalRecHitTable_cff::detId, isotrackApplyRegressor::df, getLUTId(), DetId::Hcal, mps_fire::i, unpacker2007h4_cff::ics, inputLUT_, QIE10_LUT_BITMASK, QIE10_ZDC_LUT_BITMASK, and sizeZDC_.

698  {
699  DetId detId = DetId(df.detid());
700  if (detId.det() == DetId::Hcal) {
701  int lutId = getLUTId(HcalDetId(df.id()));
702  const Lut& lut = inputLUT_.at(lutId);
703  for (int i = 0; i < df.samples(); i++) {
704  ics[i] = (lut.at(df[i].adc()) & QIE10_LUT_BITMASK);
705  }
706  } else {
707  int lutId = getLUTId(HcalZDCDetId(df.id()));
708  if (ootpu_lut)
709  lutId = lutId + sizeZDC_;
710  const Lut& lut = inputLUT_.at(lutId);
711  for (int i = 0; i < df.samples(); i++) {
712  ics[i] = (lut.at(df[i].adc()) & QIE10_ZDC_LUT_BITMASK);
713  }
714  }
715 }
static const int QIE10_ZDC_LUT_BITMASK
std::vector< Lut > inputLUT_
static const int QIE10_LUT_BITMASK
Definition: DetId.h:17
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
Definition: Lut.h:31
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ adc2Linear() [4/5]

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

Implements HcalTPGCoder.

Definition at line 717 of file HcaluLUTTPGCoder.cc.

References gpuClustering::adc, isotrackApplyRegressor::df, getLUTId(), mps_fire::i, unpacker2007h4_cff::ics, inputLUT_, and QIE11_LUT_BITMASK.

717  {
718  int lutId = getLUTId(HcalDetId(df.id()));
719  const Lut& lut = inputLUT_.at(lutId);
720  for (int i = 0; i < df.samples(); i++) {
721  ics[i] = (lut.at(df[i].adc()) & QIE11_LUT_BITMASK);
722  }
723 }
static const int QIE11_LUT_BITMASK
std::vector< Lut > inputLUT_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
Definition: Lut.h:31
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ adc2Linear() [5/5]

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

Implements HcalTPGCoder.

Definition at line 725 of file HcaluLUTTPGCoder.cc.

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

725  {
726  int lutId = getLUTId(id);
727  return ((inputLUT_.at(lutId)).at(sample.adc()) & QIE8_LUT_BITMASK);
728 }
static const int QIE8_LUT_BITMASK
std::vector< Lut > inputLUT_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const

◆ compress()

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

Implements HcalTPGCoder.

Definition at line 113 of file HcaluLUTTPGCoder.cc.

References Exception.

115  {
116  throw cms::Exception("PROBLEM: This method should never be invoked!");
117 }

◆ cosh_ieta()

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

Definition at line 313 of file HcaluLUTTPGCoder.cc.

References funct::abs(), allLinear_, cosh_ieta_, cosh_ieta_28_HE_high_depths_, cosh_ieta_28_HE_low_depths_, cosh_ieta_29_HE_, hcalRecHitTable_cff::depth, HcalEndcap, and hcalRecHitTable_cff::ieta.

Referenced by update().

313  {
314  // ieta = 28 and 29 are both associated with trigger tower 28
315  // so special handling is required. HF ieta=29 channels included in TT30
316  // are already handled correctly in cosh_ieta_
317  if (abs(ieta) >= 28 && subdet == HcalEndcap && allLinear_) {
318  if (abs(ieta) == 29)
319  return cosh_ieta_29_HE_;
320  if (abs(ieta) == 28) {
321  if (depth <= 3)
323  else
325  }
326  }
327 
328  return cosh_ieta_[ieta];
329 }
double cosh_ieta_28_HE_high_depths_
double cosh_ieta_28_HE_low_depths_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< double > cosh_ieta_

◆ getLinearizationLUT() [1/2]

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 752 of file HcaluLUTTPGCoder.cc.

References getLUTId(), and inputLUT_.

752  {
753  int lutId = getLUTId(id);
754  return inputLUT_.at(lutId);
755 }
std::vector< Lut > inputLUT_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const

◆ getLinearizationLUT() [2/2]

std::vector< unsigned short > HcaluLUTTPGCoder::getLinearizationLUT ( HcalZDCDetId  id,
bool  ootpu_lut 
) const
overridevirtual

Reimplemented from HcalTPGCoder.

Definition at line 757 of file HcaluLUTTPGCoder.cc.

References getLUTId(), inputLUT_, and sizeZDC_.

757  {
758  int lutId = getLUTId(id);
759  if (ootpu_lut)
760  return inputLUT_.at(lutId + sizeZDC_);
761  else
762  return inputLUT_.at(lutId);
763 }
std::vector< Lut > inputLUT_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const

◆ getLUTGain()

float HcaluLUTTPGCoder::getLUTGain ( HcalDetId  id) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 747 of file HcaluLUTTPGCoder.cc.

References gain_, and getLUTId().

747  {
748  int lutId = getLUTId(id);
749  return gain_.at(lutId);
750 }
std::vector< float > gain_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const

◆ getLUTId() [1/4]

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

Definition at line 121 of file HcaluLUTTPGCoder.cc.

References hcalRecHitTable_cff::depth, firstHBEta_, firstHEEta_, firstHFEta_, HcalBarrel, HcalEndcap, HcalForward, HcalOther, hcalRecHitTable_cff::ieta, hcalRecHitTable_cff::iphi, lastHBEta_, lastHEEta_, lastHFEta_, maxDepthHB_, maxDepthHE_, maxDepthHF_, nFi_, nHBEta_, nHEEta_, nHFEta_, sizeHB_, sizeHE_, and sizeHF_.

Referenced by adc2Linear(), getLinearizationLUT(), getLUTGain(), getLUTId(), getLUTPedestal(), getMSB(), group0FGbits(), lookupMSB(), update(), and updateXML().

121  {
122  int retval(0);
123  if (id == HcalBarrel) {
124  retval = (depth - 1) + maxDepthHB_ * (iphi - 1);
125  if (ieta > 0)
126  retval += maxDepthHB_ * nFi_ * (ieta - firstHBEta_);
127  else
128  retval += maxDepthHB_ * nFi_ * (ieta + lastHBEta_ + nHBEta_);
129  } else if (id == HcalEndcap) {
130  retval = sizeHB_;
131  retval += (depth - 1) + maxDepthHE_ * (iphi - 1);
132  if (ieta > 0)
133  retval += maxDepthHE_ * nFi_ * (ieta - firstHEEta_);
134  else
135  retval += maxDepthHE_ * nFi_ * (ieta + lastHEEta_ + nHEEta_);
136  } else if (id == HcalForward) {
137  retval = sizeHB_ + sizeHE_;
138  retval += (depth - 1) + maxDepthHF_ * (iphi - 1);
139  if (ieta > 0)
140  retval += maxDepthHF_ * nFi_ * (ieta - firstHFEta_);
141  else
142  retval += maxDepthHF_ * nFi_ * (ieta + lastHFEta_ + nHFEta_);
143  } else if (id == HcalOther) {
144  retval = sizeHB_ + sizeHE_ + sizeHF_;
145  retval += depth;
146  if (iphi != 1)
147  retval += 5;
148  if (ieta <= 0)
149  retval += 9;
150  }
151  return retval;
152 }
static const int nFi_

◆ getLUTId() [2/4]

int HcaluLUTTPGCoder::getLUTId ( uint32_t  rawid) const

Definition at line 154 of file HcaluLUTTPGCoder.cc.

References ALCARECOPPSCalTrackBasedSel_cff::detid, and getLUTId().

154  {
155  HcalDetId detid(rawid);
156  return getLUTId(detid.subdet(), detid.ieta(), detid.iphi(), detid.depth());
157 }
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const

◆ getLUTId() [3/4]

int HcaluLUTTPGCoder::getLUTId ( const HcalDetId detid) const

Definition at line 159 of file HcaluLUTTPGCoder.cc.

References ALCARECOPPSCalTrackBasedSel_cff::detid, and getLUTId().

159  {
160  return getLUTId(detid.subdet(), detid.ieta(), detid.iphi(), detid.depth());
161 }
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const

◆ getLUTId() [4/4]

int HcaluLUTTPGCoder::getLUTId ( const HcalZDCDetId detid) const

Definition at line 163 of file HcaluLUTTPGCoder.cc.

References ALCARECOPPSCalTrackBasedSel_cff::detid, HcalZDCDetId::EM, getLUTId(), HcalZDCDetId::HAD, HcalOther, and HcalZDCDetId::LUM.

163  {
164  if (detid.section() == HcalZDCDetId::EM) {
165  return getLUTId(HcalOther, detid.zside(), 1, detid.channel());
166  } else if (detid.section() == HcalZDCDetId::HAD) {
167  return getLUTId(HcalOther, detid.zside(), 2, detid.channel());
168  } else if (detid.section() == HcalZDCDetId::LUM) {
169  return getLUTId(HcalOther, detid.zside(), 3, detid.channel());
170  } else {
171  return getLUTId(HcalOther, detid.zside(), 4, detid.channel());
172  }
173 }
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const

◆ getLUTPedestal()

float HcaluLUTTPGCoder::getLUTPedestal ( HcalDetId  id) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 742 of file HcaluLUTTPGCoder.cc.

References getLUTId(), and ped_.

742  {
743  int lutId = getLUTId(id);
744  return ped_.at(lutId);
745 }
std::vector< float > ped_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const

◆ getMSB()

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

Definition at line 771 of file HcaluLUTTPGCoder.cc.

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

Referenced by lookupMSB().

771  {
772  int lutId = getLUTId(id);
773  const Lut& lut = inputLUT_.at(lutId);
774  return (lut.at(adc) & QIE8_LUT_MSB);
775 }
std::vector< Lut > inputLUT_
static const int QIE8_LUT_MSB
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
Definition: Lut.h:31
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ group0FGbits()

std::vector< unsigned short > HcaluLUTTPGCoder::group0FGbits ( const QIE11DataFrame df) const

Definition at line 730 of file HcaluLUTTPGCoder.cc.

References isotrackApplyRegressor::df, getLUTId(), mps_fire::i, and inputLUT_.

Referenced by HcalTriggerPrimitiveAlgo::addUpgradeTDCFG().

730  {
731  int lutId = getLUTId(HcalDetId(df.id()));
732  const Lut& lut = inputLUT_.at(lutId);
733  std::vector<unsigned short> group0LLPbits;
734  group0LLPbits.reserve(df.samples());
735  for (int i = 0; i < df.samples(); i++) {
736  group0LLPbits.push_back((lut.at(df[i].adc()) >> 12) &
737  0xF); // four bits (12-15) of LUT used to set 6 finegrain bits from uHTR
738  }
739  return group0LLPbits;
740 }
std::vector< Lut > inputLUT_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
Definition: Lut.h:31

◆ init()

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

Definition at line 76 of file HcaluLUTTPGCoder.cc.

References allLinear_, applyFixPCC_, bitToMask_, contain1TSHB_, contain1TSHE_, 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_, sizeZDC_, and topo_.

Referenced by HcalTPGCoderULUT::buildCoder(), and HcaluLUTTPGCoder().

76  {
77  topo_ = top;
78  delay_ = delay;
79  LUTGenerationMode_ = true;
80  FG_HF_thresholds_ = {0, 0};
81  bitToMask_ = 0;
82  allLinear_ = false;
83  contain1TSHB_ = false;
84  contain1TSHE_ = false;
85  applyFixPCC_ = false;
86  linearLSB_QIE8_ = 1.;
87  linearLSB_QIE11_ = 1.;
89  pulseCorr_ = std::make_unique<HcalPulseContainmentManager>(MaximumFractionalError, false);
92  nHBEta_ = (lastHBEta_ - firstHBEta_ + 1);
94  sizeHB_ = 2 * nHBEta_ * nFi_ * maxDepthHB_;
97  nHEEta_ = (lastHEEta_ - firstHEEta_ + 1);
99  sizeHE_ = 2 * nHEEta_ * nFi_ * maxDepthHE_;
102  nHFEta_ = (lastHFEta_ - firstHFEta_ + 1);
104  sizeHF_ = 2 * nHFEta_ * nFi_ * maxDepthHF_;
105  sizeZDC_ = 2 * 9;
106  size_t nluts = (size_t)(sizeHB_ + sizeHE_ + sizeHF_ + sizeZDC_ * 2 + 1);
107  inputLUT_ = std::vector<HcaluLUTTPGCoder::Lut>(nluts);
108  gain_ = std::vector<float>(nluts, 0.);
109  ped_ = std::vector<float>(nluts, 0.);
111 }
std::vector< uint32_t > FG_HF_thresholds_
static const int nFi_
double linearLSB_QIE11Overlap_
const HcalTopology * topo_
int firstHBRing() const
Definition: HcalTopology.h:88
std::vector< Lut > inputLUT_
int lastHBRing() const
Definition: HcalTopology.h:89
const HcalTimeSlew * delay_
int maxDepth(void) const
std::vector< float > ped_
constexpr double MaximumFractionalError
std::vector< float > gain_
int lastHERing() const
Definition: HcalTopology.h:91
int lastHFRing() const
Definition: HcalTopology.h:94
void make_cosh_ieta_map(void)
std::unique_ptr< HcalPulseContainmentManager > pulseCorr_
int firstHFRing() const
Definition: HcalTopology.h:93
int firstHERing() const
Definition: HcalTopology.h:90

◆ lookupMSB() [1/3]

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

Definition at line 765 of file HcaluLUTTPGCoder.cc.

References isotrackApplyRegressor::df, getMSB(), and mps_fire::i.

Referenced by HcalTriggerPrimitiveAlgo::addSignal().

765  {
766  msb.resize(df.size());
767  for (int i = 0; i < df.size(); ++i)
768  msb[i] = getMSB(df.id(), df.sample(i).adc());
769 }
bool getMSB(const HcalDetId &id, int adc) const

◆ lookupMSB() [2/3]

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

Definition at line 777 of file HcaluLUTTPGCoder.cc.

References gpuClustering::adc, isotrackApplyRegressor::df, getLUTId(), mps_fire::i, inputLUT_, QIE10_LUT_MSB0, and QIE10_LUT_MSB1.

777  {
778  msb.resize(df.samples());
779  int lutId = getLUTId(HcalDetId(df.id()));
780  const Lut& lut = inputLUT_.at(lutId);
781  for (int i = 0; i < df.samples(); ++i) {
782  msb[i][0] = lut.at(df[i].adc()) & QIE10_LUT_MSB0;
783  msb[i][1] = lut.at(df[i].adc()) & QIE10_LUT_MSB1;
784  }
785 }
static const int QIE10_LUT_MSB0
std::vector< Lut > inputLUT_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
static const int QIE10_LUT_MSB1
Definition: Lut.h:31
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ lookupMSB() [3/3]

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

Definition at line 787 of file HcaluLUTTPGCoder.cc.

References gpuClustering::adc, isotrackApplyRegressor::df, getLUTId(), mps_fire::i, inputLUT_, QIE11_LUT_MSB0, and QIE11_LUT_MSB1.

787  {
788  int lutId = getLUTId(HcalDetId(df.id()));
789  const Lut& lut = inputLUT_.at(lutId);
790  for (int i = 0; i < df.samples(); ++i) {
791  msb[i][0] = lut.at(df[i].adc()) & QIE11_LUT_MSB0;
792  msb[i][1] = lut.at(df[i].adc()) & QIE11_LUT_MSB1;
793  }
794 }
static const int QIE11_LUT_MSB1
static const int QIE11_LUT_MSB0
std::vector< Lut > inputLUT_
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
Definition: Lut.h:31
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ make_cosh_ieta_map()

void HcaluLUTTPGCoder::make_cosh_ieta_map ( void  )

Definition at line 331 of file HcaluLUTTPGCoder.cc.

References cosh_ieta_, cosh_ieta_28_HE_high_depths_, cosh_ieta_28_HE_low_depths_, cosh_ieta_29_HE_, HLT_2024v14_cff::eta1, HLT_2024v14_cff::eta2, HcalTopology::etaRange(), EnergyCorrector::etas, firstHFEta_, HcalEndcap, HcalForward, mps_fire::i, lastHFEta_, topo_, and HcalTrigTowerGeometry::towerEtaBounds().

Referenced by init(), and update().

331  {
332  cosh_ieta_ = std::vector<double>(lastHFEta_ + 1, -1.0);
333 
334  HcalTrigTowerGeometry triggeo(topo_);
335 
336  for (int i = 1; i <= firstHFEta_; ++i) {
337  double eta_low = 0., eta_high = 0.;
338  triggeo.towerEtaBounds(i, 0, eta_low, eta_high);
339  cosh_ieta_[i] = cosh((eta_low + eta_high) / 2.);
340  }
341  for (int i = firstHFEta_; i <= lastHFEta_; ++i) {
342  std::pair<double, double> etas = topo_->etaRange(HcalForward, i);
343  double eta1 = etas.first;
344  double eta2 = etas.second;
345  cosh_ieta_[i] = cosh((eta1 + eta2) / 2.);
346  }
347 
348  // trigger tower 28 in HE has a more complicated geometry
349  std::pair<double, double> eta28 = topo_->etaRange(HcalEndcap, 28);
350  std::pair<double, double> eta29 = topo_->etaRange(HcalEndcap, 29);
351  cosh_ieta_29_HE_ = cosh((eta29.first + eta29.second) / 2.);
352  cosh_ieta_28_HE_low_depths_ = cosh((eta28.first + eta28.second) / 2.);
353  // for higher depths in ieta = 28, the trigger tower extends past
354  // the ieta = 29 channels
355  cosh_ieta_28_HE_high_depths_ = cosh((eta28.first + eta29.second) / 2.);
356 }
double cosh_ieta_28_HE_high_depths_
const HcalTopology * topo_
double cosh_ieta_28_HE_low_depths_
std::pair< double, double > etaRange(HcalSubdetector subdet, int ieta) const
std::vector< double > cosh_ieta_

◆ set1TSContainHB()

void HcaluLUTTPGCoder::set1TSContainHB ( bool  contain1TSHB)
inline

◆ set1TSContainHE()

void HcaluLUTTPGCoder::set1TSContainHE ( bool  contain1TSHE)
inline

◆ setAllLinear()

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

Definition at line 64 of file HcaluLUTTPGCoder.h.

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

Referenced by HcalTPGCoderULUT::buildCoder().

64  {
66  linearLSB_QIE8_ = lsb8;
67  linearLSB_QIE11_ = lsb11;
68  linearLSB_QIE11Overlap_ = lsb11overlap;
69  };
double linearLSB_QIE11Overlap_
float linear(float x)

◆ setApplyFixPCC()

void HcaluLUTTPGCoder::setApplyFixPCC ( double  applyFixPCC)
inline

◆ setContainPhaseHB()

void HcaluLUTTPGCoder::setContainPhaseHB ( double  containPhaseNSHB)
inline

◆ setContainPhaseHE()

void HcaluLUTTPGCoder::setContainPhaseHE ( double  containPhaseNSHE)
inline

◆ setFGHFthresholds()

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

Definition at line 62 of file HcaluLUTTPGCoder.h.

References FG_HF_thresholds_.

Referenced by HcalTPGCoderULUT::buildCoder().

62 { FG_HF_thresholds_ = fgthresholds; };
std::vector< uint32_t > FG_HF_thresholds_

◆ setLUTGenerationMode()

void HcaluLUTTPGCoder::setLUTGenerationMode ( bool  gen)
inline

Definition at line 61 of file HcaluLUTTPGCoder.h.

References relval_steps::gen(), and LUTGenerationMode_.

Referenced by HcalTPGCoderULUT::buildCoder().

61 { LUTGenerationMode_ = gen; };
def gen(fragment, howMuch)
Tau Embedding 2016 HIPM ###.

◆ setMaskBit()

void HcaluLUTTPGCoder::setMaskBit ( int  bit)
inline

◆ setOverrideDBweightsAndFilterHB()

void HcaluLUTTPGCoder::setOverrideDBweightsAndFilterHB ( bool  overrideDBweightsAndFilterHB)
inline

◆ setOverrideDBweightsAndFilterHE()

void HcaluLUTTPGCoder::setOverrideDBweightsAndFilterHE ( bool  overrideDBweightsAndFilterHE)
inline

◆ update() [1/2]

void HcaluLUTTPGCoder::update ( const HcalDbService conditions)

Definition at line 358 of file HcaluLUTTPGCoder.cc.

References funct::abs(), gpuClustering::adc, adc2fC, HcalElectronicsMap::allElectronicsIdTrigger(), allLinear_, applyFixPCC_, cms::cuda::assert(), bitToMask_, AlignmentProducer_cff::calibrations, DetId::Calo, HcalZDCDetId::channel(), HcalQIECoder::charge(), PixelBaryCentreAnalyzer_cfg::conditions, contain1TSHB_, contain1TSHE_, containPhaseNSHB_, containPhaseNSHE_, alignCSCRings::corr, ecalCosmicsHists_cfg::correctionPhaseNS, cosh_ieta(), cosh_ieta_, HcalTopology::dddConstants(), delay_, HcalDetId::depth(), HcalZDCDetId::EM, FG_HF_thresholds_, Hcal_Conditions_forGlobalTag_cff::gain, gain_, HcalL1TriggerObject::getFlag(), HcalLutMetadatum::getLutGranularity(), getLUTId(), HcalL1TriggerObject::getPedestal(), HcalLutMetadatum::getRCalib(), HcalL1TriggerObject::getRespGain(), HcalChannelStatus::getValue(), HcalPedestal::getWidth(), HcalZDCDetId::HAD, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOther, HcalDetId::ieta(), HcalDetId::ietaAbs(), INPUT_LUT_SIZE, inputLUT_, HcalDDDRecConstants::isPlan1(), HcalTopology::lastHBRing(), HcalTopology::lastHERing(), linearLSB_QIE11_, linearLSB_QIE11Overlap_, linearLSB_QIE8_, HcalElectronicsMap::lookupTrigger(), lsb_, LUTGenerationMode_, make_cosh_ieta_map(), WZElectronSkims53X_cff::max, MaximumFractionalError, OccupancyTask_cfi::metadata, SiStripPI::min, or, overrideDBweightsAndFilterHB_, overrideDBweightsAndFilterHE_, QIE10Task_cfi::ped, ped_, pulseCorr_, QIE10, QIE10_LUT_BITMASK, QIE10_LUT_MSB0, QIE10_LUT_MSB1, QIE10_ZDC_LUT_BITMASK, QIE11, QIE11_LUT_BITMASK, QIE8, QIE8_LUT_BITMASK, Hcal_Conditions_forGlobalTag_cff::qieType, nano_mu_digi_cff::rawId, HcalZDCDetId::section(), l1trig_cff::shape, SIZE, sizeZDC_, mps_update::status, HcalDetId::subdet(), HcalZDCDetId::SubdetectorId, topo_, HcalTopology::triggerMode(), HcalTopologyMode::TriggerMode_2018, HcalTopologyMode::TriggerMode_2018legacy, HcalTopologyMode::TriggerMode_2021, UPGRADE_LUT_SIZE, HcalTopology::valid(), and HcalZDCDetId::zside().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), HcalTPGCoderULUT::buildCoder(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

358  {
359  const HcalLutMetadata* metadata = conditions.getHcalLutMetadata();
360  assert(metadata != nullptr);
361  float nominalgain_ = metadata->getNominalGain();
362 
363  pulseCorr_ = std::make_unique<HcalPulseContainmentManager>(MaximumFractionalError, applyFixPCC_);
364  pulseCorr_->beginRun(&conditions, delay_);
365 
367 
368  // Here we will determine if we are using new version of TPs (1TS)
369  // i.e. are we using a new pulse filter scheme.
370  const HcalElectronicsMap* emap = conditions.getHcalMapping();
371 
372  int lastHBRing = topo_->lastHBRing();
373  int lastHERing = topo_->lastHERing();
374 
375  // First, determine if we should configure for the filter scheme
376  // Check the tp version to make this determination
377  bool foundHB = false;
378  bool foundHE = false;
379  bool newHBtp = false;
380  bool newHEtp = false;
381  std::vector<HcalElectronicsId> vIds = emap->allElectronicsIdTrigger();
382  for (std::vector<HcalElectronicsId>::const_iterator eId = vIds.begin(); eId != vIds.end(); eId++) {
383  // The first HB or HE id is enough to tell whether to use new scheme in HB or HE
384  if (foundHB and foundHE)
385  break;
386 
387  HcalTrigTowerDetId hcalTTDetId(emap->lookupTrigger(*eId));
388  if (hcalTTDetId.null())
389  continue;
390 
391  int aieta = abs(hcalTTDetId.ieta());
392  // The absence of TT channels in the HcalTPChannelParameters
393  // is intepreted as to not use the new filter
394  int weight = -1.0;
395  auto tpParam = conditions.getHcalTPChannelParameter(hcalTTDetId, false);
396  if (tpParam)
397  weight = tpParam->getauxi1();
398 
399  if (aieta <= lastHBRing) {
400  foundHB = true;
401  if (weight != -1.0)
402  newHBtp = true;
403  } else if (aieta > lastHBRing and aieta < lastHERing) {
404  foundHE = true;
405  if (weight != -1.0)
406  newHEtp = true;
407  }
408  }
409 
410  for (const auto& id : metadata->getAllChannels()) {
411  if (id.det() == DetId::Hcal and topo_->valid(id)) {
412  HcalDetId cell(id);
413  HcalSubdetector subdet = cell.subdet();
414 
415  if (subdet != HcalBarrel and subdet != HcalEndcap and subdet != HcalForward and subdet != HcalOther)
416  continue;
417 
418  const HcalQIECoder* channelCoder = conditions.getHcalCoder(cell);
419  const HcalQIEShape* shape = conditions.getHcalShape(cell);
420  HcalCoderDb coder(*channelCoder, *shape);
421  const HcalLutMetadatum* meta = metadata->getValues(cell);
422 
423  // defaults for energy requirement for bits 12-15 are high / low to avoid FG bit 0-4 being set when not intended
424  unsigned int bit12_energy = 0;
425  unsigned int bit13_energy = 0;
426  unsigned int bit14_energy = 999;
427  unsigned int bit15_energy = 999;
428 
429  bool is2018OrLater = topo_->triggerMode() >= HcalTopologyMode::TriggerMode_2018 or
431  if (is2018OrLater or topo_->dddConstants()->isPlan1(cell)) {
432  bit12_energy = 16; // depths 1,2 max energy
433  bit13_energy = 80; // depths 3+ min energy
434  bit14_energy = 64; // prompt min energy
435  bit15_energy = 64; // delayed min energy
436  }
437 
438  int lutId = getLUTId(cell);
439  Lut& lut = inputLUT_[lutId];
440  float ped = 0;
441  float gain = 0;
442  uint32_t status = 0;
443 
444  if (LUTGenerationMode_) {
445  const HcalCalibrations& calibrations = conditions.getHcalCalibrations(cell);
446  for (auto capId : {0, 1, 2, 3}) {
447  ped += calibrations.effpedestal(capId);
448  gain += calibrations.LUTrespcorrgain(capId);
449  }
450  ped /= 4.0;
451  gain /= 4.0;
452 
453  //Get Channel Quality
454  const HcalChannelStatus* channelStatus = conditions.getHcalChannelStatus(cell);
455  status = channelStatus->getValue();
456 
457  } else {
458  const HcalL1TriggerObject* myL1TObj = conditions.getHcalL1TriggerObject(cell);
459  ped = myL1TObj->getPedestal();
460  gain = myL1TObj->getRespGain();
461  status = myL1TObj->getFlag();
462  } // LUTGenerationMode_
463 
464  ped_[lutId] = ped;
465  gain_[lutId] = gain;
466  bool isMasked = ((status & bitToMask_) > 0);
467  float rcalib = meta->getRCalib();
468 
469  auto adc2fC = [channelCoder, shape](unsigned int adc) {
470  float fC = 0;
471  for (auto capId : {0, 1, 2, 3})
472  fC += channelCoder->charge(*shape, adc, capId);
473  return fC / 4;
474  };
475 
476  int qieType = conditions.getHcalQIEType(cell)->getValue();
477 
478  const size_t SIZE = qieType == QIE8 ? INPUT_LUT_SIZE : UPGRADE_LUT_SIZE;
480  double linearLSB = linearLSB_QIE8_;
481  if (qieType == QIE11 and cell.ietaAbs() == topo_->lastHBRing())
482  linearLSB = linearLSB_QIE11Overlap_;
483  else if (qieType == QIE11)
484  linearLSB = linearLSB_QIE11_;
485 
486  lut.resize(SIZE, 0);
487 
488  // Input LUT for HB/HE/HF
489  if (subdet == HcalBarrel || subdet == HcalEndcap) {
490  int granularity = meta->getLutGranularity();
491 
492  double correctionPhaseNS = conditions.getHcalRecoParam(cell)->correctionPhaseNS();
493 
494  if (qieType == QIE11) {
495  if (overrideDBweightsAndFilterHB_ and cell.ietaAbs() <= lastHBRing)
497  else if (overrideDBweightsAndFilterHE_ and cell.ietaAbs() > lastHBRing)
499  }
500  for (unsigned int adc = 0; adc < SIZE; ++adc) {
501  if (isMasked)
502  lut[adc] = 0;
503  else {
504  double nonlinearityCorrection = 1.0;
505  double containmentCorrection = 1.0;
506  // SiPM nonlinearity was not corrected in 2017
507  // and containment corrections were not
508  // ET-dependent prior to 2018
509  if (is2018OrLater) {
510  double containmentCorrection1TS = pulseCorr_->correction(cell, 1, correctionPhaseNS, adc2fC(adc));
511  // Use the 1-TS containment correction to estimate the charge of the pulse
512  // from the individual samples
513  double correctedCharge = containmentCorrection1TS * adc2fC(adc);
514  double containmentCorrection2TSCorrected =
515  pulseCorr_->correction(cell, 2, correctionPhaseNS, correctedCharge);
516  if (qieType == QIE11) {
517  // When contain1TS_ is set, it should still only apply for QIE11-related things
518  if ((((contain1TSHB_ and overrideDBweightsAndFilterHB_) or newHBtp) and cell.ietaAbs() <= lastHBRing) or
519  (((contain1TSHE_ and overrideDBweightsAndFilterHE_) or newHEtp) and cell.ietaAbs() > lastHBRing)) {
520  containmentCorrection = containmentCorrection1TS;
521  } else {
522  containmentCorrection = containmentCorrection2TSCorrected;
523  }
524 
525  const HcalSiPMParameter& siPMParameter(*conditions.getHcalSiPMParameter(cell));
527  conditions.getHcalSiPMCharacteristics()->getNonLinearities(siPMParameter.getType()));
528  const double fcByPE = siPMParameter.getFCByPE();
529  const double effectivePixelsFired = correctedCharge / fcByPE;
530  nonlinearityCorrection = corr.getRecoCorrectionFactor(effectivePixelsFired);
531  } else {
532  containmentCorrection = containmentCorrection2TSCorrected;
533  }
534  }
535  if (allLinear_)
536  lut[adc] = (LutElement)std::min(
537  std::max(0,
538  int((adc2fC(adc) - ped) * gain * rcalib * nonlinearityCorrection * containmentCorrection /
539  linearLSB / cosh_ieta(cell.ietaAbs(), cell.depth(), HcalEndcap))),
540  MASK);
541  else
542  lut[adc] =
544  int((adc2fC(adc) - ped) * gain * rcalib * nonlinearityCorrection *
545  containmentCorrection / nominalgain_ / granularity)),
546  MASK);
547 
548  unsigned int linearizedADC =
549  lut[adc]; // used for bits 12, 13, 14, 15 for Group 0 LUT for LLP time and depth bits that rely on linearized energies
550 
551  if (qieType == QIE11) {
552  if (subdet == HcalBarrel) { // edit since bits 12-15 not supported in HE yet
553  if ((linearizedADC < bit12_energy and cell.depth() <= 2) or (cell.depth() >= 3))
554  lut[adc] |= 1 << 12;
555  if (linearizedADC >= bit13_energy and cell.depth() >= 3)
556  lut[adc] |= 1 << 13;
557  if (linearizedADC >= bit14_energy)
558  lut[adc] |= 1 << 14;
559  if (linearizedADC >= bit15_energy)
560  lut[adc] |= 1 << 15;
561  }
562  }
563 
564  //Zeroing the 4th depth in the trigger towers where |ieta| = 16 to match the behavior in the uHTR firmware in Run3, where the 4th depth is not included in the sum over depths when constructing the TP energy for this tower.
565  if (abs(cell.ieta()) == 16 && cell.depth() == 4 &&
567  lut[adc] = 0;
568  }
569  }
570  }
571  } else if (subdet == HcalForward) {
572  for (unsigned int adc = 0; adc < SIZE; ++adc) {
573  if (isMasked)
574  lut[adc] = 0;
575  else {
576  lut[adc] = std::min(
577  std::max(0, int((adc2fC(adc) - ped) * gain * rcalib / lsb_ / cosh_ieta_[cell.ietaAbs()])), MASK);
578  if (adc > FG_HF_thresholds_[0])
579  lut[adc] |= QIE10_LUT_MSB0;
580  if (adc > FG_HF_thresholds_[1])
581  lut[adc] |= QIE10_LUT_MSB1;
582  }
583  }
584  }
585  } else if (id.det() == DetId::Calo && id.subdetId() == HcalZDCDetId::SubdetectorId) {
586  HcalZDCDetId cell(id.rawId());
587 
588  if (cell.section() != HcalZDCDetId::EM && cell.section() != HcalZDCDetId::HAD)
589  continue;
590 
591  const HcalQIECoder* channelCoder = conditions.getHcalCoder(cell);
592  const HcalQIEShape* shape = conditions.getHcalShape(cell);
593  const HcalPedestal* effPedestals = conditions.getEffectivePedestal(cell);
594  HcalCoderDb coder(*channelCoder, *shape);
595  const HcalLutMetadatum* meta = metadata->getValues(cell);
596 
597  auto tpParam = conditions.getHcalTPChannelParameter(cell, false);
598  const int weight = tpParam->getauxi1();
599  int factorGeVPerCount = tpParam->getauxi2();
600  if (factorGeVPerCount == 0) {
601  edm::LogWarning("HcaluLUTTPGCoder")
602  << "WARNING: ZDC trigger spacing factor, taken from auxi2 field of HCALTPChannelParameters for the cell "
603  "with (zside, section, channel) = ("
604  << cell.zside() << " , " << cell.section() << " , " << cell.channel()
605  << ") is set to the "
606  "default value of 0, which is an incompatible value for a spacing factor. Setting the value to 50 and "
607  "continuing.";
608  factorGeVPerCount = 50;
609  }
610 
611  const int lutId = getLUTId(cell);
612  const int lutId_ootpu = lutId + sizeZDC_;
613  Lut& lut = inputLUT_[lutId];
614  Lut& lut_ootpu = inputLUT_[lutId_ootpu];
615  float ped = 0;
616  float gain = 0;
617  float pedWidth = 0;
618  uint32_t status = 0;
619 
620  if (LUTGenerationMode_) {
621  const HcalCalibrations& calibrations = conditions.getHcalCalibrations(cell);
622  for (auto capId : {0, 1, 2, 3}) {
623  ped += calibrations.effpedestal(capId);
624  gain += calibrations.LUTrespcorrgain(capId);
625  pedWidth += effPedestals->getWidth(capId);
626  }
627  ped /= 4.0;
628  gain /= 4.0;
629  pedWidth /= 4.0;
630 
631  const HcalChannelStatus* channelStatus = conditions.getHcalChannelStatus(cell);
632  status = channelStatus->getValue();
633 
634  } else {
635  const HcalL1TriggerObject* myL1TObj = conditions.getHcalL1TriggerObject(cell);
636  ped = myL1TObj->getPedestal();
637  gain = myL1TObj->getRespGain();
638  status = myL1TObj->getFlag();
639  } // LUTGenerationMode_
640 
641  ped_[lutId] = ped;
642  gain_[lutId] = gain;
643  bool isMasked = ((status & bitToMask_) > 0);
644  float rcalib = meta->getRCalib();
645 
646  auto adc2fC = [channelCoder, shape](unsigned int adc) {
647  float fC = 0;
648  for (auto capId : {0, 1, 2, 3})
649  fC += channelCoder->charge(*shape, adc, capId);
650  return fC / 4;
651  };
652 
653  int qieType = conditions.getHcalQIEType(cell)->getValue();
654 
655  const size_t SIZE = qieType == QIE8 ? INPUT_LUT_SIZE : UPGRADE_LUT_SIZE;
656  const int MASK = QIE10_ZDC_LUT_BITMASK;
657 
658  lut.resize(SIZE, 0);
659  lut_ootpu.resize(SIZE, 0);
660 
661  for (unsigned int adc = 0; adc < SIZE; ++adc) {
662  if (isMasked) {
663  lut[adc] = 0;
664  lut_ootpu[adc] = 0;
665  } else {
666  if ((adc2fC(adc) - ped) < pedWidth) {
667  lut[adc] = 0;
668  lut_ootpu[adc] = 0;
669  } else {
670  auto lut_term = (adc2fC(adc) - ped) * gain * rcalib / factorGeVPerCount;
671  lut[adc] = std::clamp(int(lut_term), 0, MASK);
672  lut_ootpu[adc] = std::clamp(int(lut_term * weight / 256), 0, MASK);
673  }
674  }
675  }
676  } else {
677  continue;
678  }
679  }
680 }
std::vector< uint32_t > FG_HF_thresholds_
float getRCalib() const
std::vector< HcalElectronicsId > allElectronicsIdTrigger() const
uint32_t getFlag() const
double linearLSB_QIE11Overlap_
static const int QIE11_LUT_BITMASK
uint8_t getLutGranularity() const
Definition: HcalQIENum.h:4
bool valid(const DetId &id) const override
const HcalTopology * topo_
static const float lsb_
Definition: weight.py:1
static const int QIE10_ZDC_LUT_BITMASK
bool overrideDBweightsAndFilterHB_
static const int QIE8_LUT_BITMASK
assert(be >=bs)
unsigned short LutElement
static const int QIE10_LUT_MSB0
static const size_t UPGRADE_LUT_SIZE
std::vector< Lut > inputLUT_
dictionary corr
HcalTopologyMode::TriggerMode triggerMode() const
Definition: HcalTopology.h:31
int lastHBRing() const
Definition: HcalTopology.h:89
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
const HcalTimeSlew * delay_
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const float adc2fC[128]
bool overrideDBweightsAndFilterHE_
uint32_t getValue() const
static const int QIE10_LUT_BITMASK
std::vector< double > cosh_ieta_
std::vector< float > ped_
double cosh_ieta(int ieta, int depth, HcalSubdetector subdet)
constexpr double MaximumFractionalError
float getWidth(int fCapId) const
get width for capId = 0..3
Definition: HcalPedestal.h:25
std::vector< float > gain_
static const size_t INPUT_LUT_SIZE
int lastHERing() const
Definition: HcalTopology.h:91
const HcalDDDRecConstants * dddConstants() const
Definition: HcalTopology.h:161
static constexpr int32_t SubdetectorId
Definition: HcalZDCDetId.h:35
const DetId lookupTrigger(HcalElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
Log< level::Warning, false > LogWarning
void make_cosh_ieta_map(void)
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
std::unique_ptr< HcalPulseContainmentManager > pulseCorr_
bool isPlan1(const HcalDetId &id) const
static const int QIE10_LUT_MSB1
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition: HcalQIECoder.cc:20
Definition: Lut.h:31
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ update() [2/2]

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

Definition at line 175 of file HcaluLUTTPGCoder.cc.

References gpuClustering::adc, cms::cuda::assert(), edmScanValgrind::buffer, hcalRecHitTable_cff::depth, geometryDiff::file, corrVsCorr::filename, getLUTId(), HcalBarrel, HcalEndcap, HcalForward, mps_fire::i, EcalPhiSymFlatTableProducers_cfi::id, hcalRecHitTable_cff::ieta, recoMuon::in, INPUT_LUT_SIZE, inputLUT_, hcalRecHitTable_cff::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().

175  {
176  std::ifstream file(filename, std::ios::in);
177  assert(file.is_open());
178 
179  std::vector<HcalSubdetector> subdet;
181 
182  // Drop first (comment) line
183  std::getline(file, buffer);
184  std::getline(file, buffer);
185 
186  unsigned int index = buffer.find('H', 0);
187  while (index < buffer.length()) {
188  std::string subdetStr = buffer.substr(index, 2);
189  if (subdetStr == "HB")
190  subdet.push_back(HcalBarrel);
191  else if (subdetStr == "HE")
192  subdet.push_back(HcalEndcap);
193  else if (subdetStr == "HF")
194  subdet.push_back(HcalForward);
195  //TODO Check subdet
196  //else exception
197  index += 2;
198  index = buffer.find('H', index);
199  }
200 
201  // Get upper/lower ranges for ieta/iphi/depth
202  size_t nCol = subdet.size();
203  assert(nCol > 0);
204 
205  std::vector<int> ietaU;
206  std::vector<int> ietaL;
207  std::vector<int> iphiU;
208  std::vector<int> iphiL;
209  std::vector<int> depU;
210  std::vector<int> depL;
211  std::vector<Lut> lutFromFile(nCol);
212  LutElement lutValue;
213 
214  for (size_t i = 0; i < nCol; ++i) {
215  int ieta;
216  file >> ieta;
217  ietaL.push_back(ieta);
218  }
219 
220  for (size_t i = 0; i < nCol; ++i) {
221  int ieta;
222  file >> ieta;
223  ietaU.push_back(ieta);
224  }
225 
226  for (size_t i = 0; i < nCol; ++i) {
227  int iphi;
228  file >> iphi;
229  iphiL.push_back(iphi);
230  }
231 
232  for (size_t i = 0; i < nCol; ++i) {
233  int iphi;
234  file >> iphi;
235  iphiU.push_back(iphi);
236  }
237 
238  for (size_t i = 0; i < nCol; ++i) {
239  int dep;
240  file >> dep;
241  depL.push_back(dep);
242  }
243 
244  for (size_t i = 0; i < nCol; ++i) {
245  int dep;
246  file >> dep;
247  depU.push_back(dep);
248  }
249 
250  // Read Lut Entry
251  for (size_t i = 0; file >> lutValue; i = (i + 1) % nCol) {
252  lutFromFile[i].push_back(lutValue);
253  }
254 
255  // Check lut size
256  for (size_t i = 0; i < nCol; ++i)
257  assert(lutFromFile[i].size() == INPUT_LUT_SIZE);
258 
259  for (size_t i = 0; i < nCol; ++i) {
260  for (int ieta = ietaL[i]; ieta <= ietaU[i]; ++ieta) {
261  for (int iphi = iphiL[i]; iphi <= iphiU[i]; ++iphi) {
262  for (int depth = depL[i]; depth <= depU[i]; ++depth) {
263  HcalDetId id(subdet[i], ieta, iphi, depth);
264  if (!topo_->valid(id))
265  continue;
266 
267  int lutId = getLUTId(id);
268  for (size_t adc = 0; adc < INPUT_LUT_SIZE; ++adc) {
269  if (appendMSB) {
270  // Append FG bit LUT to MSB
271  // MSB = Most Significant Bit = bit 10
272  // Overwrite bit 10
273  LutElement msb = (lutFromFile[i][adc] != 0 ? QIE8_LUT_MSB : 0);
274  inputLUT_[lutId][adc] = (msb | (inputLUT_[lutId][adc] & QIE8_LUT_BITMASK));
275  } else
276  inputLUT_[lutId][adc] = lutFromFile[i][adc];
277  } // for adc
278  } // for depth
279  } // for iphi
280  } // for ieta
281  } // for nCol
282 }
size
Write out results.
bool valid(const DetId &id) const override
const HcalTopology * topo_
static const int QIE8_LUT_BITMASK
assert(be >=bs)
unsigned short LutElement
std::vector< Lut > inputLUT_
static const int QIE8_LUT_MSB
static const size_t INPUT_LUT_SIZE
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
uint16_t *__restrict__ uint16_t const *__restrict__ adc

◆ updateXML()

void HcaluLUTTPGCoder::updateXML ( const char *  filename)

Definition at line 284 of file HcaluLUTTPGCoder.cc.

References LutXml::create_lut_map(), hcalRecHitTable_cff::depth, ALCARECOPPSCalTrackBasedSel_cff::detid, Exception, corrVsCorr::filename, XMLProcessor::getInstance(), LutXml::getLutFast(), getLUTId(), HcalBarrel, HcalEndcap, HcalForward, mps_fire::i, EcalPhiSymFlatTableProducers_cfi::id, hcalRecHitTable_cff::ieta, inputLUT_, createfilelist::int, hcalRecHitTable_cff::iphi, HcalDetId::kHcalDepthMask2, HcalDetId::kHcalEtaMask2, HcalDetId::kHcalPhiMask2, XMLProcessor::terminate(), topo_, UPGRADE_LUT_SIZE, and HcalTopology::valid().

Referenced by HcalTPGCoderULUT::buildCoder().

284  {
285  LutXml* _xml = new LutXml(filename);
286  _xml->create_lut_map();
289  for (unsigned int iphi = 0; iphi <= HcalDetId::kHcalPhiMask2; ++iphi) {
290  for (unsigned int depth = 1; depth < HcalDetId::kHcalDepthMask2; ++depth) {
291  for (int isub = 0; isub < 3; ++isub) {
292  HcalDetId detid(subdet[isub], ieta, iphi, depth);
293  if (!topo_->valid(detid))
294  continue;
295  int id = getLUTId(subdet[isub], ieta, iphi, depth);
296  std::vector<unsigned int>* lut = _xml->getLutFast(detid);
297  if (lut == nullptr)
298  throw cms::Exception("PROBLEM: No inputLUT_ in xml file for ") << detid << std::endl;
299  if (lut->size() != UPGRADE_LUT_SIZE)
300  throw cms::Exception("PROBLEM: Wrong inputLUT_ size in xml file for ") << detid << std::endl;
301  Lut& lutRaw = inputLUT_[id];
302  lutRaw.resize(UPGRADE_LUT_SIZE, 0);
303  for (unsigned int i = 0; i < UPGRADE_LUT_SIZE; ++i)
304  inputLUT_[id][i] = (LutElement)lut->at(i);
305  }
306  }
307  }
308  }
309  delete _xml;
311 }
static constexpr uint32_t kHcalPhiMask2
Definition: HcalDetId.h:15
Definition: LutXml.h:27
bool valid(const DetId &id) const override
int create_lut_map(void)
Definition: LutXml.cc:352
const HcalTopology * topo_
unsigned short LutElement
static const size_t UPGRADE_LUT_SIZE
std::vector< Lut > inputLUT_
int terminate(void)
HcalSubdetector
Definition: HcalAssistant.h:31
static constexpr uint32_t kHcalEtaMask2
Definition: HcalDetId.h:19
std::vector< unsigned int > * getLutFast(uint32_t det_id)
Definition: LutXml.cc:74
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
static XMLProcessor * getInstance()
Definition: XMLProcessor.h:134
Definition: Lut.h:31
static constexpr uint32_t kHcalDepthMask2
Definition: HcalDetId.h:25

Member Data Documentation

◆ allLinear_

bool HcaluLUTTPGCoder::allLinear_
private

Definition at line 127 of file HcaluLUTTPGCoder.h.

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

◆ applyFixPCC_

bool HcaluLUTTPGCoder::applyFixPCC_
private

Definition at line 131 of file HcaluLUTTPGCoder.h.

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

◆ bitToMask_

int HcaluLUTTPGCoder::bitToMask_
private

Definition at line 116 of file HcaluLUTTPGCoder.h.

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

◆ contain1TSHB_

bool HcaluLUTTPGCoder::contain1TSHB_
private

Definition at line 128 of file HcaluLUTTPGCoder.h.

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

◆ contain1TSHE_

bool HcaluLUTTPGCoder::contain1TSHE_
private

Definition at line 128 of file HcaluLUTTPGCoder.h.

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

◆ containPhaseNSHB_

double HcaluLUTTPGCoder::containPhaseNSHB_ = 6.0
private

Definition at line 129 of file HcaluLUTTPGCoder.h.

Referenced by setContainPhaseHB(), and update().

◆ containPhaseNSHE_

double HcaluLUTTPGCoder::containPhaseNSHE_ = 6.0
private

Definition at line 130 of file HcaluLUTTPGCoder.h.

Referenced by setContainPhaseHE(), and update().

◆ cosh_ieta_

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

Definition at line 124 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 126 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 126 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 126 of file HcaluLUTTPGCoder.h.

Referenced by cosh_ieta(), and make_cosh_ieta_map().

◆ delay_

const HcalTimeSlew* HcaluLUTTPGCoder::delay_
private

Definition at line 113 of file HcaluLUTTPGCoder.h.

Referenced by init(), and update().

◆ FG_HF_thresholds_

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

Definition at line 115 of file HcaluLUTTPGCoder.h.

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

◆ firstHBEta_

int HcaluLUTTPGCoder::firstHBEta_
private

Definition at line 117 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ firstHEEta_

int HcaluLUTTPGCoder::firstHEEta_
private

Definition at line 118 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ firstHFEta_

int HcaluLUTTPGCoder::firstHFEta_
private

Definition at line 119 of file HcaluLUTTPGCoder.h.

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

◆ gain_

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

Definition at line 122 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 101 of file HcaluLUTTPGCoder.h.

Referenced by update().

◆ inputLUT_

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

◆ lastHBEta_

int HcaluLUTTPGCoder::lastHBEta_
private

Definition at line 117 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ lastHEEta_

int HcaluLUTTPGCoder::lastHEEta_
private

Definition at line 118 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ lastHFEta_

int HcaluLUTTPGCoder::lastHFEta_
private

Definition at line 119 of file HcaluLUTTPGCoder.h.

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

◆ linearLSB_QIE11_

double HcaluLUTTPGCoder::linearLSB_QIE11_
private

Definition at line 132 of file HcaluLUTTPGCoder.h.

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

◆ linearLSB_QIE11Overlap_

double HcaluLUTTPGCoder::linearLSB_QIE11Overlap_
private

Definition at line 132 of file HcaluLUTTPGCoder.h.

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

◆ linearLSB_QIE8_

double HcaluLUTTPGCoder::linearLSB_QIE8_
private

Definition at line 132 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 114 of file HcaluLUTTPGCoder.h.

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

◆ maxDepthHB_

int HcaluLUTTPGCoder::maxDepthHB_
private

Definition at line 117 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ maxDepthHE_

int HcaluLUTTPGCoder::maxDepthHE_
private

Definition at line 118 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ maxDepthHF_

int HcaluLUTTPGCoder::maxDepthHF_
private

Definition at line 119 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nFi_

const int HcaluLUTTPGCoder::nFi_ = 72
staticprivate

Definition at line 103 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nHBEta_

int HcaluLUTTPGCoder::nHBEta_
private

Definition at line 117 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nHEEta_

int HcaluLUTTPGCoder::nHEEta_
private

Definition at line 118 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nHFEta_

int HcaluLUTTPGCoder::nHFEta_
private

Definition at line 119 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ overrideDBweightsAndFilterHB_

bool HcaluLUTTPGCoder::overrideDBweightsAndFilterHB_ = false
private

Definition at line 134 of file HcaluLUTTPGCoder.h.

Referenced by setOverrideDBweightsAndFilterHB(), and update().

◆ overrideDBweightsAndFilterHE_

bool HcaluLUTTPGCoder::overrideDBweightsAndFilterHE_ = false
private

Definition at line 135 of file HcaluLUTTPGCoder.h.

Referenced by setOverrideDBweightsAndFilterHE(), and update().

◆ ped_

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

Definition at line 123 of file HcaluLUTTPGCoder.h.

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

◆ pulseCorr_

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

Definition at line 133 of file HcaluLUTTPGCoder.h.

Referenced by init(), and update().

◆ QIE10_LUT_BITMASK

const int HcaluLUTTPGCoder::QIE10_LUT_BITMASK = 0x7FF
static

Definition at line 91 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), and update().

◆ QIE10_LUT_MSB0

const int HcaluLUTTPGCoder::QIE10_LUT_MSB0 = 0x1000
staticprivate

Definition at line 108 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB(), and update().

◆ QIE10_LUT_MSB1

const int HcaluLUTTPGCoder::QIE10_LUT_MSB1 = 0x2000
staticprivate

Definition at line 109 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB(), and update().

◆ QIE10_ZDC_LUT_BITMASK

const int HcaluLUTTPGCoder::QIE10_ZDC_LUT_BITMASK = 0x3FF
static

Definition at line 93 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), and update().

◆ QIE11_LUT_BITMASK

const int HcaluLUTTPGCoder::QIE11_LUT_BITMASK = 0x3FF
static

Definition at line 92 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), and update().

◆ QIE11_LUT_MSB0

const int HcaluLUTTPGCoder::QIE11_LUT_MSB0 = 0x400
staticprivate

Definition at line 106 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB().

◆ QIE11_LUT_MSB1

const int HcaluLUTTPGCoder::QIE11_LUT_MSB1 = 0x800
staticprivate

Definition at line 107 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB().

◆ QIE8_LUT_BITMASK

const int HcaluLUTTPGCoder::QIE8_LUT_BITMASK = 0x3FF
static

Definition at line 90 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), and update().

◆ QIE8_LUT_MSB

const int HcaluLUTTPGCoder::QIE8_LUT_MSB = 0x400
staticprivate

Definition at line 105 of file HcaluLUTTPGCoder.h.

Referenced by getMSB(), and update().

◆ sizeHB_

int HcaluLUTTPGCoder::sizeHB_
private

Definition at line 117 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ sizeHE_

int HcaluLUTTPGCoder::sizeHE_
private

Definition at line 118 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ sizeHF_

int HcaluLUTTPGCoder::sizeHF_
private

Definition at line 119 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ sizeZDC_

int HcaluLUTTPGCoder::sizeZDC_
private

Definition at line 120 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), getLinearizationLUT(), init(), and update().

◆ topo_

const HcalTopology* HcaluLUTTPGCoder::topo_
private

Definition at line 112 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 102 of file HcaluLUTTPGCoder.h.

Referenced by update(), and updateXML().