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
 
static const float zdc_lsb_ = 50.
 

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 99 of file HcaluLUTTPGCoder.h.

◆ LutElement

typedef unsigned short HcaluLUTTPGCoder::LutElement
private

Definition at line 98 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 671 of file HcaluLUTTPGCoder.cc.

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

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

671  {
672  int lutId = getLUTId(df.id());
673  const Lut& lut = inputLUT_.at(lutId);
674  for (int i = 0; i < df.size(); i++) {
675  ics[i] = (lut.at(df[i].adc()) & QIE8_LUT_BITMASK);
676  }
677 }
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 679 of file HcaluLUTTPGCoder.cc.

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

679  {
680  int lutId = getLUTId(df.id());
681  const Lut& lut = inputLUT_.at(lutId);
682  for (int i = 0; i < df.size(); i++) {
683  ics[i] = (lut.at(df[i].adc()) & QIE8_LUT_BITMASK);
684  }
685 }
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 687 of file HcaluLUTTPGCoder.cc.

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

687  {
688  DetId detId = DetId(df.detid());
689  if (detId.det() == DetId::Hcal) {
690  int lutId = getLUTId(HcalDetId(df.id()));
691  const Lut& lut = inputLUT_.at(lutId);
692  for (int i = 0; i < df.samples(); i++) {
693  ics[i] = (lut.at(df[i].adc()) & QIE10_LUT_BITMASK);
694  }
695  } else {
696  int lutId = getLUTId(HcalZDCDetId(df.id()));
697  if (ootpu_lut)
698  lutId = lutId + sizeZDC_;
699  const Lut& lut = inputLUT_.at(lutId);
700  for (int i = 0; i < df.samples(); i++) {
701  ics[i] = (lut.at(df[i].adc()) & QIE10_ZDC_LUT_BITMASK);
702  }
703  }
704 }
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 706 of file HcaluLUTTPGCoder.cc.

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

706  {
707  int lutId = getLUTId(HcalDetId(df.id()));
708  const Lut& lut = inputLUT_.at(lutId);
709  for (int i = 0; i < df.samples(); i++) {
710  ics[i] = (lut.at(df[i].adc()) & QIE11_LUT_BITMASK);
711  }
712 }
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 714 of file HcaluLUTTPGCoder.cc.

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

714  {
715  int lutId = getLUTId(id);
716  return ((inputLUT_.at(lutId)).at(sample.adc()) & QIE8_LUT_BITMASK);
717 }
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 741 of file HcaluLUTTPGCoder.cc.

References getLUTId(), and inputLUT_.

741  {
742  int lutId = getLUTId(id);
743  return inputLUT_.at(lutId);
744 }
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 746 of file HcaluLUTTPGCoder.cc.

References getLUTId(), inputLUT_, and sizeZDC_.

746  {
747  int lutId = getLUTId(id);
748  if (ootpu_lut)
749  return inputLUT_.at(lutId + sizeZDC_);
750  else
751  return inputLUT_.at(lutId);
752 }
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 736 of file HcaluLUTTPGCoder.cc.

References gain_, and getLUTId().

736  {
737  int lutId = getLUTId(id);
738  return gain_.at(lutId);
739 }
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 HcalDetId::depth(), getLUTId(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().

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 HcalDetId::depth(), getLUTId(), HcalDetId::ieta(), HcalDetId::iphi(), and HcalDetId::subdet().

159  {
160  return getLUTId(detid.subdet(), detid.ieta(), detid.iphi(), detid.depth());
161 }
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164

◆ getLUTId() [4/4]

int HcaluLUTTPGCoder::getLUTId ( const HcalZDCDetId detid) const

Definition at line 163 of file HcaluLUTTPGCoder.cc.

References HcalZDCDetId::channel(), HcalZDCDetId::EM, getLUTId(), HcalZDCDetId::HAD, HcalOther, HcalZDCDetId::LUM, HcalZDCDetId::section(), and HcalZDCDetId::zside().

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 }
constexpr Section section() const
get the section
Definition: HcalZDCDetId.h:92
constexpr int32_t channel() const
get the channel
Definition: HcalZDCDetId.h:112
constexpr int32_t zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:90
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const

◆ getLUTPedestal()

float HcaluLUTTPGCoder::getLUTPedestal ( HcalDetId  id) const
overridevirtual

Implements HcalTPGCoder.

Definition at line 731 of file HcaluLUTTPGCoder.cc.

References getLUTId(), and ped_.

731  {
732  int lutId = getLUTId(id);
733  return ped_.at(lutId);
734 }
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 760 of file HcaluLUTTPGCoder.cc.

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

Referenced by lookupMSB().

760  {
761  int lutId = getLUTId(id);
762  const Lut& lut = inputLUT_.at(lutId);
763  return (lut.at(adc) & QIE8_LUT_MSB);
764 }
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 719 of file HcaluLUTTPGCoder.cc.

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

Referenced by HcalTriggerPrimitiveAlgo::addUpgradeTDCFG().

719  {
720  int lutId = getLUTId(HcalDetId(df.id()));
721  const Lut& lut = inputLUT_.at(lutId);
722  std::vector<unsigned short> group0LLPbits;
723  group0LLPbits.reserve(df.samples());
724  for (int i = 0; i < df.samples(); i++) {
725  group0LLPbits.push_back((lut.at(df[i].adc()) >> 12) &
726  0xF); // four bits (12-15) of LUT used to set 6 finegrain bits from uHTR
727  }
728  return group0LLPbits;
729 }
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:91
std::vector< Lut > inputLUT_
int lastHBRing() const
Definition: HcalTopology.h:92
const HcalTimeSlew * delay_
int maxDepth(void) const
std::vector< float > ped_
constexpr double MaximumFractionalError
std::vector< float > gain_
int lastHERing() const
Definition: HcalTopology.h:94
int lastHFRing() const
Definition: HcalTopology.h:97
void make_cosh_ieta_map(void)
std::unique_ptr< HcalPulseContainmentManager > pulseCorr_
int firstHFRing() const
Definition: HcalTopology.h:96
int firstHERing() const
Definition: HcalTopology.h:93

◆ lookupMSB() [1/3]

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

Definition at line 754 of file HcaluLUTTPGCoder.cc.

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

Referenced by HcalTriggerPrimitiveAlgo::addSignal().

754  {
755  msb.resize(df.size());
756  for (int i = 0; i < df.size(); ++i)
757  msb[i] = getMSB(df.id(), df.sample(i).adc());
758 }
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 766 of file HcaluLUTTPGCoder.cc.

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

766  {
767  msb.resize(df.samples());
768  int lutId = getLUTId(HcalDetId(df.id()));
769  const Lut& lut = inputLUT_.at(lutId);
770  for (int i = 0; i < df.samples(); ++i) {
771  msb[i][0] = lut.at(df[i].adc()) & QIE10_LUT_MSB0;
772  msb[i][1] = lut.at(df[i].adc()) & QIE10_LUT_MSB1;
773  }
774 }
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 776 of file HcaluLUTTPGCoder.cc.

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

776  {
777  int lutId = getLUTId(HcalDetId(df.id()));
778  const Lut& lut = inputLUT_.at(lutId);
779  for (int i = 0; i < df.samples(); ++i) {
780  msb[i][0] = lut.at(df[i].adc()) & QIE11_LUT_MSB0;
781  msb[i][1] = lut.at(df[i].adc()) & QIE11_LUT_MSB1;
782  }
783 }
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_2023v12_cff::eta1, HLT_2023v12_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 65 of file HcaluLUTTPGCoder.h.

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

Referenced by HcalTPGCoderULUT::buildCoder().

65  {
67  linearLSB_QIE8_ = lsb8;
68  linearLSB_QIE11_ = lsb11;
69  linearLSB_QIE11Overlap_ = lsb11overlap;
70  };
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 63 of file HcaluLUTTPGCoder.h.

References FG_HF_thresholds_.

Referenced by HcalTPGCoderULUT::buildCoder().

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

◆ setLUTGenerationMode()

void HcaluLUTTPGCoder::setLUTGenerationMode ( bool  gen)
inline

Definition at line 62 of file HcaluLUTTPGCoder.h.

References relval_steps::gen(), and LUTGenerationMode_.

Referenced by HcalTPGCoderULUT::buildCoder().

62 { LUTGenerationMode_ = gen; };
def gen(fragment, howMuch)
Production test section ####.

◆ 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, HcalQIECoder::charge(), submitPVValidationJobs::conditions, contain1TSHB_, contain1TSHE_, containPhaseNSHB_, containPhaseNSHE_, alignCSCRings::corr, castor_dqm_sourceclient-live_cfg::correctionPhaseNS, cosh_ieta(), cosh_ieta_, HcalTopology::dddConstants(), delay_, HcalDetId::depth(), HcalZDCDetId::EM, FG_HF_thresholds_, PedestalClient_cfi::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(), SiStripPI::max, MaximumFractionalError, OccupancyTask_cfi::metadata, SiStripPI::min, or, overrideDBweightsAndFilterHB_, overrideDBweightsAndFilterHE_, ped_, pulseCorr_, QIE10, QIE10_LUT_BITMASK, QIE10_LUT_MSB0, QIE10_LUT_MSB1, QIE10_ZDC_LUT_BITMASK, QIE11, QIE11_LUT_BITMASK, QIE8, QIE8_LUT_BITMASK, 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 zdc_lsb_.

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;
479  const int MASK = qieType == QIE8 ? QIE8_LUT_BITMASK : qieType == QIE10 ? QIE10_LUT_BITMASK : QIE11_LUT_BITMASK;
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  int weight = tpParam->getauxi1();
599 
600  int lutId = getLUTId(cell);
601  int lutId_ootpu = lutId + sizeZDC_;
602  Lut& lut = inputLUT_[lutId];
603  Lut& lut_ootpu = inputLUT_[lutId_ootpu];
604  float ped = 0;
605  float gain = 0;
606  float pedWidth = 0;
607  uint32_t status = 0;
608 
609  if (LUTGenerationMode_) {
610  const HcalCalibrations& calibrations = conditions.getHcalCalibrations(cell);
611  for (auto capId : {0, 1, 2, 3}) {
612  ped += calibrations.effpedestal(capId);
613  gain += calibrations.LUTrespcorrgain(capId);
614  pedWidth += effPedestals->getWidth(capId);
615  }
616  ped /= 4.0;
617  gain /= 4.0;
618  pedWidth /= 4.0;
619 
620  const HcalChannelStatus* channelStatus = conditions.getHcalChannelStatus(cell);
621  status = channelStatus->getValue();
622 
623  } else {
624  const HcalL1TriggerObject* myL1TObj = conditions.getHcalL1TriggerObject(cell);
625  ped = myL1TObj->getPedestal();
626  gain = myL1TObj->getRespGain();
627  status = myL1TObj->getFlag();
628  } // LUTGenerationMode_
629 
630  ped_[lutId] = ped;
631  gain_[lutId] = gain;
632  bool isMasked = ((status & bitToMask_) > 0);
633  float rcalib = meta->getRCalib();
634 
635  auto adc2fC = [channelCoder, shape](unsigned int adc) {
636  float fC = 0;
637  for (auto capId : {0, 1, 2, 3})
638  fC += channelCoder->charge(*shape, adc, capId);
639  return fC / 4;
640  };
641 
642  int qieType = conditions.getHcalQIEType(cell)->getValue();
643 
644  const size_t SIZE = qieType == QIE8 ? INPUT_LUT_SIZE : UPGRADE_LUT_SIZE;
645  const int MASK = QIE10_ZDC_LUT_BITMASK;
646 
647  lut.resize(SIZE, 0);
648  lut_ootpu.resize(SIZE, 0);
649 
650  for (unsigned int adc = 0; adc < SIZE; ++adc) {
651  if (isMasked) {
652  lut[adc] = 0;
653  lut_ootpu[adc] = 0;
654  } else {
655  if ((adc2fC(adc) - ped) < (pedWidth * 5.)) {
656  lut[adc] = 0;
657  lut_ootpu[adc] = 0;
658  } else {
659  lut[adc] = std::min(std::max(0, int((adc2fC(adc) - ped) * gain * rcalib / zdc_lsb_)), MASK);
660  lut_ootpu[adc] =
661  std::min(std::max(0, int((adc2fC(adc) - ped) * gain * rcalib * weight / (zdc_lsb_ * 256))), MASK);
662  }
663  }
664  }
665  } else {
666  continue;
667  }
668  }
669 }
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:35
int lastHBRing() const
Definition: HcalTopology.h:92
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 float zdc_lsb_
static const size_t INPUT_LUT_SIZE
int lastHERing() const
Definition: HcalTopology.h:94
const HcalDDDRecConstants * dddConstants() const
Definition: HcalTopology.h:164
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
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, l1ctLayer2EG_cff::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, Exception, corrVsCorr::filename, XMLProcessor::getInstance(), LutXml::getLutFast(), getLUTId(), HcalBarrel, HcalEndcap, HcalForward, mps_fire::i, l1ctLayer2EG_cff::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:338
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:72
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 128 of file HcaluLUTTPGCoder.h.

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

◆ applyFixPCC_

bool HcaluLUTTPGCoder::applyFixPCC_
private

Definition at line 132 of file HcaluLUTTPGCoder.h.

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

◆ bitToMask_

int HcaluLUTTPGCoder::bitToMask_
private

Definition at line 117 of file HcaluLUTTPGCoder.h.

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

◆ contain1TSHB_

bool HcaluLUTTPGCoder::contain1TSHB_
private

Definition at line 129 of file HcaluLUTTPGCoder.h.

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

◆ contain1TSHE_

bool HcaluLUTTPGCoder::contain1TSHE_
private

Definition at line 129 of file HcaluLUTTPGCoder.h.

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

◆ containPhaseNSHB_

double HcaluLUTTPGCoder::containPhaseNSHB_ = 6.0
private

Definition at line 130 of file HcaluLUTTPGCoder.h.

Referenced by setContainPhaseHB(), and update().

◆ containPhaseNSHE_

double HcaluLUTTPGCoder::containPhaseNSHE_ = 6.0
private

Definition at line 131 of file HcaluLUTTPGCoder.h.

Referenced by setContainPhaseHE(), and update().

◆ cosh_ieta_

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

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

Referenced by cosh_ieta(), and make_cosh_ieta_map().

◆ delay_

const HcalTimeSlew* HcaluLUTTPGCoder::delay_
private

Definition at line 114 of file HcaluLUTTPGCoder.h.

Referenced by init(), and update().

◆ FG_HF_thresholds_

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

Definition at line 116 of file HcaluLUTTPGCoder.h.

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

◆ firstHBEta_

int HcaluLUTTPGCoder::firstHBEta_
private

Definition at line 118 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ firstHEEta_

int HcaluLUTTPGCoder::firstHEEta_
private

Definition at line 119 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ firstHFEta_

int HcaluLUTTPGCoder::firstHFEta_
private

Definition at line 120 of file HcaluLUTTPGCoder.h.

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

◆ gain_

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

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

Referenced by update().

◆ inputLUT_

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

◆ lastHBEta_

int HcaluLUTTPGCoder::lastHBEta_
private

Definition at line 118 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ lastHEEta_

int HcaluLUTTPGCoder::lastHEEta_
private

Definition at line 119 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ lastHFEta_

int HcaluLUTTPGCoder::lastHFEta_
private

Definition at line 120 of file HcaluLUTTPGCoder.h.

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

◆ linearLSB_QIE11_

double HcaluLUTTPGCoder::linearLSB_QIE11_
private

Definition at line 133 of file HcaluLUTTPGCoder.h.

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

◆ linearLSB_QIE11Overlap_

double HcaluLUTTPGCoder::linearLSB_QIE11Overlap_
private

Definition at line 133 of file HcaluLUTTPGCoder.h.

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

◆ linearLSB_QIE8_

double HcaluLUTTPGCoder::linearLSB_QIE8_
private

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

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

◆ maxDepthHB_

int HcaluLUTTPGCoder::maxDepthHB_
private

Definition at line 118 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ maxDepthHE_

int HcaluLUTTPGCoder::maxDepthHE_
private

Definition at line 119 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ maxDepthHF_

int HcaluLUTTPGCoder::maxDepthHF_
private

Definition at line 120 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nFi_

const int HcaluLUTTPGCoder::nFi_ = 72
staticprivate

Definition at line 104 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nHBEta_

int HcaluLUTTPGCoder::nHBEta_
private

Definition at line 118 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nHEEta_

int HcaluLUTTPGCoder::nHEEta_
private

Definition at line 119 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ nHFEta_

int HcaluLUTTPGCoder::nHFEta_
private

Definition at line 120 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ overrideDBweightsAndFilterHB_

bool HcaluLUTTPGCoder::overrideDBweightsAndFilterHB_ = false
private

Definition at line 135 of file HcaluLUTTPGCoder.h.

Referenced by setOverrideDBweightsAndFilterHB(), and update().

◆ overrideDBweightsAndFilterHE_

bool HcaluLUTTPGCoder::overrideDBweightsAndFilterHE_ = false
private

Definition at line 136 of file HcaluLUTTPGCoder.h.

Referenced by setOverrideDBweightsAndFilterHE(), and update().

◆ ped_

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

Definition at line 124 of file HcaluLUTTPGCoder.h.

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

◆ pulseCorr_

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

Definition at line 134 of file HcaluLUTTPGCoder.h.

Referenced by init(), and update().

◆ QIE10_LUT_BITMASK

const int HcaluLUTTPGCoder::QIE10_LUT_BITMASK = 0x7FF
static

Definition at line 92 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), and update().

◆ QIE10_LUT_MSB0

const int HcaluLUTTPGCoder::QIE10_LUT_MSB0 = 0x1000
staticprivate

Definition at line 109 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB(), and update().

◆ QIE10_LUT_MSB1

const int HcaluLUTTPGCoder::QIE10_LUT_MSB1 = 0x2000
staticprivate

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

Referenced by adc2Linear(), and update().

◆ QIE11_LUT_BITMASK

const int HcaluLUTTPGCoder::QIE11_LUT_BITMASK = 0x3FF
static

Definition at line 93 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), and update().

◆ QIE11_LUT_MSB0

const int HcaluLUTTPGCoder::QIE11_LUT_MSB0 = 0x400
staticprivate

Definition at line 107 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB().

◆ QIE11_LUT_MSB1

const int HcaluLUTTPGCoder::QIE11_LUT_MSB1 = 0x800
staticprivate

Definition at line 108 of file HcaluLUTTPGCoder.h.

Referenced by lookupMSB().

◆ QIE8_LUT_BITMASK

const int HcaluLUTTPGCoder::QIE8_LUT_BITMASK = 0x3FF
static

Definition at line 91 of file HcaluLUTTPGCoder.h.

Referenced by adc2Linear(), and update().

◆ QIE8_LUT_MSB

const int HcaluLUTTPGCoder::QIE8_LUT_MSB = 0x400
staticprivate

Definition at line 106 of file HcaluLUTTPGCoder.h.

Referenced by getMSB(), and update().

◆ sizeHB_

int HcaluLUTTPGCoder::sizeHB_
private

Definition at line 118 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ sizeHE_

int HcaluLUTTPGCoder::sizeHE_
private

Definition at line 119 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ sizeHF_

int HcaluLUTTPGCoder::sizeHF_
private

Definition at line 120 of file HcaluLUTTPGCoder.h.

Referenced by getLUTId(), and init().

◆ sizeZDC_

int HcaluLUTTPGCoder::sizeZDC_
private

Definition at line 121 of file HcaluLUTTPGCoder.h.

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

◆ topo_

const HcalTopology* HcaluLUTTPGCoder::topo_
private

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

Referenced by update(), and updateXML().

◆ zdc_lsb_

const float HcaluLUTTPGCoder::zdc_lsb_ = 50.
static

Definition at line 35 of file HcaluLUTTPGCoder.h.

Referenced by update().