CMS 3D CMS Logo

HcaluLUTTPGCoder.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <fstream>
3 #include <cmath>
4 #include <string>
30 
31 const float HcaluLUTTPGCoder::lsb_ = 1. / 16;
32 
36 
37 constexpr double MaximumFractionalError = 0.002; // 0.2% error allowed from this source
38 
40  : topo_{},
41  delay_{},
42  LUTGenerationMode_{},
43  FG_HF_thresholds_{},
44  bitToMask_{},
45  firstHBEta_{},
46  lastHBEta_{},
47  nHBEta_{},
48  maxDepthHB_{},
49  sizeHB_{},
50  firstHEEta_{},
51  lastHEEta_{},
52  nHEEta_{},
53  maxDepthHE_{},
54  sizeHE_{},
55  firstHFEta_{},
56  lastHFEta_{},
57  nHFEta_{},
58  maxDepthHF_{},
59  sizeHF_{},
60  cosh_ieta_28_HE_low_depths_{},
61  cosh_ieta_28_HE_high_depths_{},
62  cosh_ieta_29_HE_{},
63  allLinear_{},
64  contain1TSHB_{},
65  contain1TSHE_{},
66  linearLSB_QIE8_{},
67  linearLSB_QIE11_{},
68  linearLSB_QIE11Overlap_{} {}
69 
71 
73  topo_ = top;
74  delay_ = delay;
75  LUTGenerationMode_ = true;
76  FG_HF_thresholds_ = {0, 0};
77  bitToMask_ = 0;
78  allLinear_ = false;
79  contain1TSHB_ = false;
80  contain1TSHE_ = false;
81  linearLSB_QIE8_ = 1.;
82  linearLSB_QIE11_ = 1.;
84  pulseCorr_ = std::make_unique<HcalPulseContainmentManager>(MaximumFractionalError);
87  nHBEta_ = (lastHBEta_ - firstHBEta_ + 1);
89  sizeHB_ = 2 * nHBEta_ * nFi_ * maxDepthHB_;
92  nHEEta_ = (lastHEEta_ - firstHEEta_ + 1);
94  sizeHE_ = 2 * nHEEta_ * nFi_ * maxDepthHE_;
97  nHFEta_ = (lastHFEta_ - firstHFEta_ + 1);
99  sizeHF_ = 2 * nHFEta_ * nFi_ * maxDepthHF_;
100  size_t nluts = (size_t)(sizeHB_ + sizeHE_ + sizeHF_ + 1);
101  inputLUT_ = std::vector<HcaluLUTTPGCoder::Lut>(nluts);
102  gain_ = std::vector<float>(nluts, 0.);
103  ped_ = std::vector<float>(nluts, 0.);
105 }
106 
108  const std::vector<bool>& featureBits,
109  HcalTriggerPrimitiveDigi& tp) const {
110  throw cms::Exception("PROBLEM: This method should never be invoked!");
111 }
112 
114 
116  int retval(0);
117  if (id == HcalBarrel) {
118  retval = (depth - 1) + maxDepthHB_ * (iphi - 1);
119  if (ieta > 0)
120  retval += maxDepthHB_ * nFi_ * (ieta - firstHBEta_);
121  else
122  retval += maxDepthHB_ * nFi_ * (ieta + lastHBEta_ + nHBEta_);
123  } else if (id == HcalEndcap) {
124  retval = sizeHB_;
125  retval += (depth - 1) + maxDepthHE_ * (iphi - 1);
126  if (ieta > 0)
127  retval += maxDepthHE_ * nFi_ * (ieta - firstHEEta_);
128  else
129  retval += maxDepthHE_ * nFi_ * (ieta + lastHEEta_ + nHEEta_);
130  } else if (id == HcalForward) {
131  retval = sizeHB_ + sizeHE_;
132  retval += (depth - 1) + maxDepthHF_ * (iphi - 1);
133  if (ieta > 0)
134  retval += maxDepthHF_ * nFi_ * (ieta - firstHFEta_);
135  else
136  retval += maxDepthHF_ * nFi_ * (ieta + lastHFEta_ + nHFEta_);
137  }
138  return retval;
139 }
140 
141 int HcaluLUTTPGCoder::getLUTId(uint32_t rawid) const {
142  HcalDetId detid(rawid);
143  return getLUTId(detid.subdet(), detid.ieta(), detid.iphi(), detid.depth());
144 }
145 
146 int HcaluLUTTPGCoder::getLUTId(const HcalDetId& detid) const {
147  return getLUTId(detid.subdet(), detid.ieta(), detid.iphi(), detid.depth());
148 }
149 
150 void HcaluLUTTPGCoder::update(const char* filename, bool appendMSB) {
151  std::ifstream file(filename, std::ios::in);
152  assert(file.is_open());
153 
154  std::vector<HcalSubdetector> subdet;
156 
157  // Drop first (comment) line
158  std::getline(file, buffer);
159  std::getline(file, buffer);
160 
161  unsigned int index = buffer.find('H', 0);
162  while (index < buffer.length()) {
163  std::string subdetStr = buffer.substr(index, 2);
164  if (subdetStr == "HB")
165  subdet.push_back(HcalBarrel);
166  else if (subdetStr == "HE")
167  subdet.push_back(HcalEndcap);
168  else if (subdetStr == "HF")
169  subdet.push_back(HcalForward);
170  //TODO Check subdet
171  //else exception
172  index += 2;
173  index = buffer.find('H', index);
174  }
175 
176  // Get upper/lower ranges for ieta/iphi/depth
177  size_t nCol = subdet.size();
178  assert(nCol > 0);
179 
180  std::vector<int> ietaU;
181  std::vector<int> ietaL;
182  std::vector<int> iphiU;
183  std::vector<int> iphiL;
184  std::vector<int> depU;
185  std::vector<int> depL;
186  std::vector<Lut> lutFromFile(nCol);
187  LutElement lutValue;
188 
189  for (size_t i = 0; i < nCol; ++i) {
190  int ieta;
191  file >> ieta;
192  ietaL.push_back(ieta);
193  }
194 
195  for (size_t i = 0; i < nCol; ++i) {
196  int ieta;
197  file >> ieta;
198  ietaU.push_back(ieta);
199  }
200 
201  for (size_t i = 0; i < nCol; ++i) {
202  int iphi;
203  file >> iphi;
204  iphiL.push_back(iphi);
205  }
206 
207  for (size_t i = 0; i < nCol; ++i) {
208  int iphi;
209  file >> iphi;
210  iphiU.push_back(iphi);
211  }
212 
213  for (size_t i = 0; i < nCol; ++i) {
214  int dep;
215  file >> dep;
216  depL.push_back(dep);
217  }
218 
219  for (size_t i = 0; i < nCol; ++i) {
220  int dep;
221  file >> dep;
222  depU.push_back(dep);
223  }
224 
225  // Read Lut Entry
226  for (size_t i = 0; file >> lutValue; i = (i + 1) % nCol) {
227  lutFromFile[i].push_back(lutValue);
228  }
229 
230  // Check lut size
231  for (size_t i = 0; i < nCol; ++i)
232  assert(lutFromFile[i].size() == INPUT_LUT_SIZE);
233 
234  for (size_t i = 0; i < nCol; ++i) {
235  for (int ieta = ietaL[i]; ieta <= ietaU[i]; ++ieta) {
236  for (int iphi = iphiL[i]; iphi <= iphiU[i]; ++iphi) {
237  for (int depth = depL[i]; depth <= depU[i]; ++depth) {
238  HcalDetId id(subdet[i], ieta, iphi, depth);
239  if (!topo_->valid(id))
240  continue;
241 
242  int lutId = getLUTId(id);
243  for (size_t adc = 0; adc < INPUT_LUT_SIZE; ++adc) {
244  if (appendMSB) {
245  // Append FG bit LUT to MSB
246  // MSB = Most Significant Bit = bit 10
247  // Overwrite bit 10
248  LutElement msb = (lutFromFile[i][adc] != 0 ? QIE8_LUT_MSB : 0);
249  inputLUT_[lutId][adc] = (msb | (inputLUT_[lutId][adc] & QIE8_LUT_BITMASK));
250  } else
251  inputLUT_[lutId][adc] = lutFromFile[i][adc];
252  } // for adc
253  } // for depth
254  } // for iphi
255  } // for ieta
256  } // for nCol
257 }
258 
260  LutXml* _xml = new LutXml(filename);
261  _xml->create_lut_map();
264  for (unsigned int iphi = 0; iphi <= HcalDetId::kHcalPhiMask2; ++iphi) {
265  for (unsigned int depth = 1; depth < HcalDetId::kHcalDepthMask2; ++depth) {
266  for (int isub = 0; isub < 3; ++isub) {
267  HcalDetId detid(subdet[isub], ieta, iphi, depth);
268  if (!topo_->valid(detid))
269  continue;
270  int id = getLUTId(subdet[isub], ieta, iphi, depth);
271  std::vector<unsigned int>* lut = _xml->getLutFast(detid);
272  if (lut == nullptr)
273  throw cms::Exception("PROBLEM: No inputLUT_ in xml file for ") << detid << std::endl;
274  if (lut->size() != INPUT_LUT_SIZE)
275  throw cms::Exception("PROBLEM: Wrong inputLUT_ size in xml file for ") << detid << std::endl;
276  for (unsigned int i = 0; i < INPUT_LUT_SIZE; ++i)
277  inputLUT_[id][i] = (LutElement)lut->at(i);
278  }
279  }
280  }
281  }
282  delete _xml;
284 }
285 
287  // ieta = 28 and 29 are both associated with trigger tower 28
288  // so special handling is required. HF ieta=29 channels included in TT30
289  // are already handled correctly in cosh_ieta_
290  if (abs(ieta) >= 28 && subdet == HcalEndcap && allLinear_) {
291  if (abs(ieta) == 29)
292  return cosh_ieta_29_HE_;
293  if (abs(ieta) == 28) {
294  if (depth <= 3)
296  else
298  }
299  }
300 
301  return cosh_ieta_[ieta];
302 }
303 
305  cosh_ieta_ = std::vector<double>(lastHFEta_ + 1, -1.0);
306 
307  HcalTrigTowerGeometry triggeo(topo_);
308 
309  for (int i = 1; i <= firstHFEta_; ++i) {
310  double eta_low = 0., eta_high = 0.;
311  triggeo.towerEtaBounds(i, 0, eta_low, eta_high);
312  cosh_ieta_[i] = cosh((eta_low + eta_high) / 2.);
313  }
314  for (int i = firstHFEta_; i <= lastHFEta_; ++i) {
315  std::pair<double, double> etas = topo_->etaRange(HcalForward, i);
316  double eta1 = etas.first;
317  double eta2 = etas.second;
318  cosh_ieta_[i] = cosh((eta1 + eta2) / 2.);
319  }
320 
321  // trigger tower 28 in HE has a more complicated geometry
322  std::pair<double, double> eta28 = topo_->etaRange(HcalEndcap, 28);
323  std::pair<double, double> eta29 = topo_->etaRange(HcalEndcap, 29);
324  cosh_ieta_29_HE_ = cosh((eta29.first + eta29.second) / 2.);
325  cosh_ieta_28_HE_low_depths_ = cosh((eta28.first + eta28.second) / 2.);
326  // for higher depths in ieta = 28, the trigger tower extends past
327  // the ieta = 29 channels
328  cosh_ieta_28_HE_high_depths_ = cosh((eta28.first + eta29.second) / 2.);
329 }
330 
332  const HcalLutMetadata* metadata = conditions.getHcalLutMetadata();
333  assert(metadata != nullptr);
334  float nominalgain_ = metadata->getNominalGain();
335 
336  pulseCorr_->beginRun(&conditions, delay_);
337 
339 
340  for (const auto& id : metadata->getAllChannels()) {
341  if (not(id.det() == DetId::Hcal and topo_->valid(id)))
342  continue;
343 
344  HcalDetId cell(id);
345  HcalSubdetector subdet = cell.subdet();
346 
347  if (subdet != HcalBarrel and subdet != HcalEndcap and subdet != HcalForward)
348  continue;
349 
350  const HcalQIECoder* channelCoder = conditions.getHcalCoder(cell);
351  const HcalQIEShape* shape = conditions.getHcalShape(cell);
352  HcalCoderDb coder(*channelCoder, *shape);
353  const HcalLutMetadatum* meta = metadata->getValues(cell);
354 
355  unsigned int mipMax = 0;
356  unsigned int mipMin = 0;
357 
358  bool is2018OrLater = topo_->triggerMode() >= HcalTopologyMode::TriggerMode_2018 or
360  if (is2018OrLater or topo_->dddConstants()->isPlan1(cell)) {
361  const HcalTPChannelParameter* channelParameters = conditions.getHcalTPChannelParameter(cell);
362  mipMax = channelParameters->getFGBitInfo() >> 16;
363  mipMin = channelParameters->getFGBitInfo() & 0xFFFF;
364  }
365 
366  int lutId = getLUTId(cell);
367  Lut& lut = inputLUT_[lutId];
368  float ped = 0;
369  float gain = 0;
370  uint32_t status = 0;
371 
372  if (LUTGenerationMode_) {
373  const HcalCalibrations& calibrations = conditions.getHcalCalibrations(cell);
374  for (auto capId : {0, 1, 2, 3}) {
375  ped += calibrations.effpedestal(capId);
376  gain += calibrations.LUTrespcorrgain(capId);
377  }
378  ped /= 4.0;
379  gain /= 4.0;
380 
381  //Get Channel Quality
382  const HcalChannelStatus* channelStatus = conditions.getHcalChannelStatus(cell);
383  status = channelStatus->getValue();
384 
385  } else {
386  const HcalL1TriggerObject* myL1TObj = conditions.getHcalL1TriggerObject(cell);
387  ped = myL1TObj->getPedestal();
388  gain = myL1TObj->getRespGain();
389  status = myL1TObj->getFlag();
390  } // LUTGenerationMode_
391 
392  ped_[lutId] = ped;
393  gain_[lutId] = gain;
394  bool isMasked = ((status & bitToMask_) > 0);
395  float rcalib = meta->getRCalib();
396 
397  auto adc2fC = [channelCoder, shape](unsigned int adc) {
398  float fC = 0;
399  for (auto capId : {0, 1, 2, 3})
400  fC += channelCoder->charge(*shape, adc, capId);
401  return fC / 4;
402  };
403 
404  int qieType = conditions.getHcalQIEType(cell)->getValue();
405 
406  const size_t SIZE = qieType == QIE8 ? INPUT_LUT_SIZE : UPGRADE_LUT_SIZE;
407  const int MASK = qieType == QIE8 ? QIE8_LUT_BITMASK : qieType == QIE10 ? QIE10_LUT_BITMASK : QIE11_LUT_BITMASK;
408  double linearLSB = linearLSB_QIE8_;
409  if (qieType == QIE11 and cell.ietaAbs() == topo_->lastHBRing())
410  linearLSB = linearLSB_QIE11Overlap_;
411  else if (qieType == QIE11)
412  linearLSB = linearLSB_QIE11_;
413 
414  lut.resize(SIZE, 0);
415 
416  // Input LUT for HB/HE/HF
417  if (subdet == HcalBarrel || subdet == HcalEndcap) {
418  int granularity = meta->getLutGranularity();
419 
420  double correctionPhaseNS = conditions.getHcalRecoParam(cell)->correctionPhaseNS();
421 
422  // When containPhaseNS is not -999.0, and for QIE11 only, override from configuration
423  if (qieType == QIE11) {
424  if (containPhaseNSHB_ != -999.0 and cell.ietaAbs() <= topo_->lastHBRing())
426  else if (containPhaseNSHE_ != -999.0 and cell.ietaAbs() > topo_->lastHBRing())
428  }
429  for (unsigned int adc = 0; adc < SIZE; ++adc) {
430  if (isMasked)
431  lut[adc] = 0;
432  else {
433  double nonlinearityCorrection = 1.0;
434  double containmentCorrection = 1.0;
435  // SiPM nonlinearity was not corrected in 2017
436  // and containment corrections were not
437  // ET-dependent prior to 2018
438  if (is2018OrLater) {
439  double containmentCorrection1TS = pulseCorr_->correction(cell, 1, correctionPhaseNS, adc2fC(adc));
440  // Use the 1-TS containment correction to estimate the charge of the pulse
441  // from the individual samples
442  double correctedCharge = containmentCorrection1TS * adc2fC(adc);
443  double containmentCorrection2TSCorrected =
444  pulseCorr_->correction(cell, 2, correctionPhaseNS, correctedCharge);
445  if (qieType == QIE11) {
446  // When contain1TS_ is set, it should still only apply for QIE11-related things
447  if ((contain1TSHB_ and cell.ietaAbs() <= topo_->lastHBRing()) or
448  (contain1TSHE_ and cell.ietaAbs() > topo_->lastHBRing())) {
449  containmentCorrection = containmentCorrection1TS;
450  } else {
451  containmentCorrection = containmentCorrection2TSCorrected;
452  }
453 
454  const HcalSiPMParameter& siPMParameter(*conditions.getHcalSiPMParameter(cell));
456  conditions.getHcalSiPMCharacteristics()->getNonLinearities(siPMParameter.getType()));
457  const double fcByPE = siPMParameter.getFCByPE();
458  const double effectivePixelsFired = correctedCharge / fcByPE;
459  nonlinearityCorrection = corr.getRecoCorrectionFactor(effectivePixelsFired);
460  } else {
461  containmentCorrection = containmentCorrection2TSCorrected;
462  }
463  }
464  if (allLinear_)
465  lut[adc] = (LutElement)std::min(
466  std::max(0,
467  int((adc2fC(adc) - ped) * gain * rcalib * nonlinearityCorrection * containmentCorrection /
468  linearLSB / cosh_ieta(cell.ietaAbs(), cell.depth(), HcalEndcap))),
469  MASK);
470  else
471  lut[adc] = (LutElement)std::min(std::max(0,
472  int((adc2fC(adc) - ped) * gain * rcalib * nonlinearityCorrection *
473  containmentCorrection / nominalgain_ / granularity)),
474  MASK);
475 
476  if (qieType == QIE11) {
477  if (adc >= mipMin and adc < mipMax)
478  lut[adc] |= QIE11_LUT_MSB0;
479  else if (adc >= mipMax)
480  lut[adc] |= QIE11_LUT_MSB1;
481  }
482  }
483  }
484  } else if (subdet == HcalForward) {
485  for (unsigned int adc = 0; adc < SIZE; ++adc) {
486  if (isMasked)
487  lut[adc] = 0;
488  else {
489  lut[adc] =
490  std::min(std::max(0, int((adc2fC(adc) - ped) * gain * rcalib / lsb_ / cosh_ieta_[cell.ietaAbs()])), MASK);
491  if (adc > FG_HF_thresholds_[0])
492  lut[adc] |= QIE10_LUT_MSB0;
493  if (adc > FG_HF_thresholds_[1])
494  lut[adc] |= QIE10_LUT_MSB1;
495  }
496  }
497  }
498  }
499 }
500 
502  int lutId = getLUTId(df.id());
503  const Lut& lut = inputLUT_.at(lutId);
504  for (int i = 0; i < df.size(); i++) {
505  ics[i] = (lut.at(df[i].adc()) & QIE8_LUT_BITMASK);
506  }
507 }
508 
510  int lutId = getLUTId(df.id());
511  const Lut& lut = inputLUT_.at(lutId);
512  for (int i = 0; i < df.size(); i++) {
513  ics[i] = (lut.at(df[i].adc()) & QIE8_LUT_BITMASK);
514  }
515 }
516 
518  int lutId = getLUTId(HcalDetId(df.id()));
519  const Lut& lut = inputLUT_.at(lutId);
520  for (int i = 0; i < df.samples(); i++) {
521  ics[i] = (lut.at(df[i].adc()) & QIE10_LUT_BITMASK);
522  }
523 }
524 
526  int lutId = getLUTId(HcalDetId(df.id()));
527  const Lut& lut = inputLUT_.at(lutId);
528  for (int i = 0; i < df.samples(); i++) {
529  ics[i] = (lut.at(df[i].adc()) & QIE11_LUT_BITMASK);
530  }
531 }
532 
534  int lutId = getLUTId(id);
535  return ((inputLUT_.at(lutId)).at(sample.adc()) & QIE8_LUT_BITMASK);
536 }
537 
539  int lutId = getLUTId(id);
540  return ped_.at(lutId);
541 }
542 
544  int lutId = getLUTId(id);
545  return gain_.at(lutId);
546 }
547 
548 std::vector<unsigned short> HcaluLUTTPGCoder::getLinearizationLUT(HcalDetId id) const {
549  int lutId = getLUTId(id);
550  return inputLUT_.at(lutId);
551 }
552 
553 void HcaluLUTTPGCoder::lookupMSB(const HBHEDataFrame& df, std::vector<bool>& msb) const {
554  msb.resize(df.size());
555  for (int i = 0; i < df.size(); ++i)
556  msb[i] = getMSB(df.id(), df.sample(i).adc());
557 }
558 
559 bool HcaluLUTTPGCoder::getMSB(const HcalDetId& id, int adc) const {
560  int lutId = getLUTId(id);
561  const Lut& lut = inputLUT_.at(lutId);
562  return (lut.at(adc) & QIE8_LUT_MSB);
563 }
564 
565 void HcaluLUTTPGCoder::lookupMSB(const QIE10DataFrame& df, std::vector<std::bitset<2>>& msb) const {
566  msb.resize(df.samples());
567  int lutId = getLUTId(HcalDetId(df.id()));
568  const Lut& lut = inputLUT_.at(lutId);
569  for (int i = 0; i < df.samples(); ++i) {
570  msb[i][0] = lut.at(df[i].adc()) & QIE10_LUT_MSB0;
571  msb[i][1] = lut.at(df[i].adc()) & QIE10_LUT_MSB1;
572  }
573 }
574 
575 void HcaluLUTTPGCoder::lookupMSB(const QIE11DataFrame& df, std::vector<std::bitset<2>>& msb) const {
576  int lutId = getLUTId(HcalDetId(df.id()));
577  const Lut& lut = inputLUT_.at(lutId);
578  for (int i = 0; i < df.samples(); ++i) {
579  msb[i][0] = lut.at(df[i].adc()) & QIE11_LUT_MSB0;
580  msb[i][1] = lut.at(df[i].adc()) & QIE11_LUT_MSB1;
581  }
582 }
HcaluLUTTPGCoder::bitToMask_
int bitToMask_
Definition: HcaluLUTTPGCoder.h:105
HcalDDDRecConstants::isPlan1
bool isPlan1(const HcalDetId &id) const
Definition: HcalDDDRecConstants.h:110
HcaluLUTTPGCoder::update
void update(const HcalDbService &conditions)
Definition: HcaluLUTTPGCoder.cc:331
HcalLutMetadatum
Definition: HcalLutMetadatum.h:12
HcaluLUTTPGCoder::cosh_ieta_29_HE_
double cosh_ieta_29_HE_
Definition: HcaluLUTTPGCoder.h:114
HcaluLUTTPGCoder::sizeHF_
int sizeHF_
Definition: HcaluLUTTPGCoder.h:108
HcalCalibrations.h
mps_fire.i
i
Definition: mps_fire.py:428
XMLProcessor::getInstance
static XMLProcessor * getInstance()
Definition: XMLProcessor.h:134
MessageLogger.h
HcaluLUTTPGCoder::nHEEta_
int nHEEta_
Definition: HcaluLUTTPGCoder.h:107
HcaluLUTTPGCoder::ped_
std::vector< float > ped_
Definition: HcaluLUTTPGCoder.h:111
QIE8
Definition: HcalQIENum.h:4
HcaluLUTTPGCoder::contain1TSHE_
bool contain1TSHE_
Definition: HcaluLUTTPGCoder.h:116
castor_dqm_sourceclient-live_cfg.correctionPhaseNS
correctionPhaseNS
Definition: castor_dqm_sourceclient-live_cfg.py:60
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
HcaluLUTTPGCoder::linearLSB_QIE11_
double linearLSB_QIE11_
Definition: HcaluLUTTPGCoder.h:118
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
HcaluLUTTPGCoder::QIE8_LUT_BITMASK
static const int QIE8_LUT_BITMASK
Definition: HcaluLUTTPGCoder.h:80
LutXml::create_lut_map
int create_lut_map(void)
Definition: LutXml.cc:336
mps_update.status
status
Definition: mps_update.py:69
HcalQIECoder::charge
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.
Definition: HcalQIECoder.cc:20
Lut
Definition: Lut.h:31
min
T min(T a, T b)
Definition: MathUtil.h:58
HcalL1TriggerObjects.h
HcaluLUTTPGCoder::allLinear_
bool allLinear_
Definition: HcaluLUTTPGCoder.h:115
HcaluLUTTPGCoder::cosh_ieta
double cosh_ieta(int ieta, int depth, HcalSubdetector subdet)
Definition: HcaluLUTTPGCoder.cc:286
XMLProcessor::terminate
int terminate(void)
Definition: XMLProcessor.cc:313
HcaluLUTTPGCoder::QIE10_LUT_BITMASK
static const int QIE10_LUT_BITMASK
Definition: HcaluLUTTPGCoder.h:81
HcaluLUTTPGCoder::nHFEta_
int nHFEta_
Definition: HcaluLUTTPGCoder.h:108
HcaluLUTTPGCoder::QIE11_LUT_MSB1
static const int QIE11_LUT_MSB1
Definition: HcaluLUTTPGCoder.h:96
HcaluLUTTPGCoder::updateXML
void updateXML(const char *filename)
Definition: HcaluLUTTPGCoder.cc:259
HcalTopology
Definition: HcalTopology.h:26
HcaluLUTTPGCoder::sizeHE_
int sizeHE_
Definition: HcaluLUTTPGCoder.h:107
DetId::Hcal
Definition: DetId.h:28
HcalL1TriggerObject.h
HcaluLUTTPGCoder::compress
void compress(const IntegerCaloSamples &ics, const std::vector< bool > &featureBits, HcalTriggerPrimitiveDigi &tp) const override
Definition: HcaluLUTTPGCoder.cc:107
cms::cuda::assert
assert(be >=bs)
HcaluLUTTPGCoder::INPUT_LUT_SIZE
static const size_t INPUT_LUT_SIZE
Definition: HcaluLUTTPGCoder.h:90
AlignmentProducer_cff.calibrations
calibrations
Definition: AlignmentProducer_cff.py:59
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
HcaluLUTTPGCoder::lastHBEta_
int lastHBEta_
Definition: HcaluLUTTPGCoder.h:106
MaximumFractionalError
constexpr double MaximumFractionalError
Definition: HcaluLUTTPGCoder.cc:37
HcaluLUTTPGCoder::sizeHB_
int sizeHB_
Definition: HcaluLUTTPGCoder.h:106
HcalBarrel
Definition: HcalAssistant.h:33
HcaluLUTTPGCoder::nFi_
static const int nFi_
Definition: HcaluLUTTPGCoder.h:92
LutXml.h
HcalTopology::firstHERing
int firstHERing() const
Definition: HcalTopology.h:93
HcaluLUTTPGCoder::maxDepthHE_
int maxDepthHE_
Definition: HcaluLUTTPGCoder.h:107
IntegerCaloSamples
Definition: IntegerCaloSamples.h:16
adc2fC
static const float adc2fC[128]
Definition: CMTRawAnalyzer.h:410
HcalTimeSlew
Definition: HcalTimeSlew.h:19
HcalQIESample
Definition: HcalQIESample.h:32
HcalCoderDb.h
HcaluLUTTPGCoder::LUTGenerationMode_
bool LUTGenerationMode_
Definition: HcaluLUTTPGCoder.h:103
HcaluLUTTPGCoder::FG_HF_thresholds_
std::vector< uint32_t > FG_HF_thresholds_
Definition: HcaluLUTTPGCoder.h:104
HcaluLUTTPGCoder::UPGRADE_LUT_SIZE
static const size_t UPGRADE_LUT_SIZE
Definition: HcaluLUTTPGCoder.h:91
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HcalTopology::maxDepth
int maxDepth(void) const
Definition: HcalTopology.cc:980
ecalLiteDTU::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalLiteDTUSample.h:12
HcaluLUTTPGCoder::cosh_ieta_28_HE_low_depths_
double cosh_ieta_28_HE_low_depths_
Definition: HcaluLUTTPGCoder.h:114
HcaluLUTTPGCoder::containPhaseNSHB_
double containPhaseNSHB_
Definition: HcaluLUTTPGCoder.h:117
HcalTopology::firstHFRing
int firstHFRing() const
Definition: HcalTopology.h:96
HcaluLUTTPGCoder.h
MakerMacros.h
HcalL1TriggerObject::getRespGain
float getRespGain() const
Definition: HcalL1TriggerObject.h:23
HcaluLUTTPGCoder::HcaluLUTTPGCoder
HcaluLUTTPGCoder()
Definition: HcaluLUTTPGCoder.cc:39
HcaluLUTTPGCoder::lsb_
static const float lsb_
Definition: HcaluLUTTPGCoder.h:34
HcaluLUTTPGCoder::gain_
std::vector< float > gain_
Definition: HcaluLUTTPGCoder.h:110
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
EnergyCorrector.etas
etas
Definition: EnergyCorrector.py:45
HcalDetId::kHcalPhiMask2
static constexpr uint32_t kHcalPhiMask2
Definition: HcalDetId.h:15
HcalChannelStatus
Definition: HcalChannelStatus.h:13
HcaluLUTTPGCoder::getLUTPedestal
float getLUTPedestal(HcalDetId id) const override
Definition: HcaluLUTTPGCoder.cc:538
HLT_FULL_cff.eta2
eta2
Definition: HLT_FULL_cff.py:9605
HcaluLUTTPGCoder::lastHEEta_
int lastHEEta_
Definition: HcaluLUTTPGCoder.h:107
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
HcaluLUTTPGCoder::lastHFEta_
int lastHFEta_
Definition: HcaluLUTTPGCoder.h:108
HcalCalibrations
Definition: HcalCalibrations.h:9
TrackingMonitor_cfi.metadata
metadata
Definition: TrackingMonitor_cfi.py:71
HcaluLUTTPGCoder::nHBEta_
int nHBEta_
Definition: HcaluLUTTPGCoder.h:106
HcalL1TriggerObject::getPedestal
float getPedestal() const
Definition: HcalL1TriggerObject.h:22
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
HcalTPChannelParameter
Definition: HcalTPChannelParameter.h:7
HcalDetId::kHcalDepthMask2
static constexpr uint32_t kHcalDepthMask2
Definition: HcalDetId.h:25
HcaluLUTTPGCoder::cosh_ieta_28_HE_high_depths_
double cosh_ieta_28_HE_high_depths_
Definition: HcaluLUTTPGCoder.h:114
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalTrigTowerDetId.h
HcalL1TriggerObject::getFlag
uint32_t getFlag() const
Definition: HcalL1TriggerObject.h:24
HLT_FULL_cff.eta1
eta1
Definition: HLT_FULL_cff.py:9604
HBHEDataFrame
Definition: HBHEDataFrame.h:14
HcalL1TriggerObject
Definition: HcalL1TriggerObject.h:13
HcaluLUTTPGCoder::getLUTGain
float getLUTGain(HcalDetId id) const override
Definition: HcaluLUTTPGCoder.cc:543
HcaluLUTTPGCoder::containPhaseNSHE_
double containPhaseNSHE_
Definition: HcaluLUTTPGCoder.h:117
HcalChannelStatus::getValue
uint32_t getValue() const
Definition: HcalChannelStatus.h:60
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcaluLUTTPGCoder::firstHEEta_
int firstHEEta_
Definition: HcaluLUTTPGCoder.h:107
HcalTriggerPrimitiveDigi
Definition: HcalTriggerPrimitiveDigi.h:13
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
HcaluLUTTPGCoder::linearLSB_QIE11Overlap_
double linearLSB_QIE11Overlap_
Definition: HcaluLUTTPGCoder.h:118
Event.h
HcaluLUTTPGCoder::linearLSB_QIE8_
double linearLSB_QIE8_
Definition: HcaluLUTTPGCoder.h:118
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HcalTopology::dddConstants
const HcalDDDRecConstants * dddConstants() const
Definition: HcalTopology.h:164
recoMuon::in
Definition: RecoMuonEnumerators.h:6
HcaluLUTTPGCoder::init
void init(const HcalTopology *top, const HcalTimeSlew *delay)
Definition: HcaluLUTTPGCoder.cc:72
HcaluLUTTPGCoder::LutElement
unsigned short LutElement
Definition: HcaluLUTTPGCoder.h:86
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcaluLUTTPGCoder::lookupMSB
void lookupMSB(const HBHEDataFrame &df, std::vector< bool > &msb) const
Definition: HcaluLUTTPGCoder.cc:553
QIE10DataFrame.h
HcalDetId
Definition: HcalDetId.h:12
HcalTopology::triggerMode
HcalTopologyMode::TriggerMode triggerMode() const
Definition: HcalTopology.h:35
createfilelist.int
int
Definition: createfilelist.py:10
HFDataFrame
Definition: HFDataFrame.h:14
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
HcalPulseContainmentCorrection.h
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
HcalTopology::firstHBRing
int firstHBRing() const
Definition: HcalTopology.h:91
HcalLutMetadatum::getRCalib
float getRCalib() const
Definition: HcalLutMetadatum.h:20
IdealGeometryRecord.h
LutXml::getLutFast
std::vector< unsigned int > * getLutFast(uint32_t det_id)
Definition: LutXml.cc:71
HcalTopology::lastHERing
int lastHERing() const
Definition: HcalTopology.h:94
HcalTrigTowerGeometry.h
HcaluLUTTPGCoder::topo_
const HcalTopology * topo_
Definition: HcaluLUTTPGCoder.h:101
HcalTrigTowerGeometry
Definition: HcalTrigTowerGeometry.h:10
HcaluLUTTPGCoder::maxDepthHB_
int maxDepthHB_
Definition: HcaluLUTTPGCoder.h:106
HcalQIECoder
Definition: HcalQIECoder.h:20
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
HcalTopology::valid
bool valid(const DetId &id) const override
Definition: HcalTopology.cc:225
HcalTopologyMode::TriggerMode_2018
Definition: HcalTopologyMode.h:34
HcaluLUTTPGCoder::firstHBEta_
int firstHBEta_
Definition: HcaluLUTTPGCoder.h:106
HcaluLUTTPGCoder::QIE11_LUT_BITMASK
static const int QIE11_LUT_BITMASK
Definition: HcaluLUTTPGCoder.h:82
StopReason::SIZE
HcaluLUTTPGCoder::getMSB
bool getMSB(const HcalDetId &id, int adc) const
Definition: HcaluLUTTPGCoder.cc:559
HcalDbService
Definition: HcalDbService.h:26
HcaluLUTTPGCoder::cosh_ieta_
std::vector< double > cosh_ieta_
Definition: HcaluLUTTPGCoder.h:112
submitPVValidationJobs.conditions
list conditions
Definition: submitPVValidationJobs.py:674
HcalLutMetadata
Definition: HcalLutMetadata.h:15
HcalDbASCIIIO.h
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:640
QIE10DataFrame
Definition: QIE10DataFrame.h:11
HcalEndcap
Definition: HcalAssistant.h:34
HcaluLUTTPGCoder::~HcaluLUTTPGCoder
~HcaluLUTTPGCoder() override
Definition: HcaluLUTTPGCoder.cc:113
Frameworkfwd.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
QIE11DataFrame
Definition: QIE11DataFrame.h:11
HcalTPChannelParameter::getFGBitInfo
uint32_t getFGBitInfo() const
get FG bit information
Definition: HcalTPChannelParameter.h:12
Exception
Definition: hltDiff.cc:246
CaloGeometry.h
HcaluLUTTPGCoder::getLinearizationLUT
std::vector< unsigned short > getLinearizationLUT(HcalDetId id) const override
Get the full linearization LUT (128 elements). Default implementation just uses adc2Linear to get all...
Definition: HcaluLUTTPGCoder.cc:548
HcaluLUTTPGCoder::contain1TSHB_
bool contain1TSHB_
Definition: HcaluLUTTPGCoder.h:116
HcaluLUTTPGCoder::QIE10_LUT_MSB1
static const int QIE10_LUT_MSB1
Definition: HcaluLUTTPGCoder.h:98
HcaluLUTTPGCoder::QIE10_LUT_MSB0
static const int QIE10_LUT_MSB0
Definition: HcaluLUTTPGCoder.h:97
HcalTopology::etaRange
std::pair< double, double > etaRange(HcalSubdetector subdet, int ieta) const
Definition: HcalTopology.cc:1124
HcaluLUTTPGCoder::make_cosh_ieta_map
void make_cosh_ieta_map(void)
Definition: HcaluLUTTPGCoder.cc:304
QIE11DataFrame.h
HcalQIENum.h
EventSetup.h
HcalTopology::lastHFRing
int lastHFRing() const
Definition: HcalTopology.h:97
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
HcaluLUTTPGCoder::inputLUT_
std::vector< Lut > inputLUT_
Definition: HcaluLUTTPGCoder.h:109
Exception.h
Ecal07UnpackerData_cfi.ics
ics
Definition: Ecal07UnpackerData_cfi.py:55
HcalQIEShape
Definition: HcalQIEShape.h:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HcaluLUTTPGCoder::getLUTId
int getLUTId(HcalSubdetector id, int ieta, int iphi, int depth) const
Definition: HcaluLUTTPGCoder.cc:115
HcalCoderDb
Definition: HcalCoderDb.h:15
XMLProcessor.h
HcalDbService.h
HcalDetId::kHcalEtaMask2
static constexpr uint32_t kHcalEtaMask2
Definition: HcalDetId.h:19
HcaluLUTTPGCoder::QIE11_LUT_MSB0
static const int QIE11_LUT_MSB0
Definition: HcaluLUTTPGCoder.h:95
phase2TrackerDigitizer_cfi.delay
delay
Definition: phase2TrackerDigitizer_cfi.py:49
cms::Exception
Definition: Exception.h:70
HcaluLUTTPGCoder::firstHFEta_
int firstHFEta_
Definition: HcaluLUTTPGCoder.h:108
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalDetId::ietaAbs
constexpr int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:148
ParameterSet.h
HcaluLUTTPGCoder::QIE8_LUT_MSB
static const int QIE8_LUT_MSB
Definition: HcaluLUTTPGCoder.h:94
HcalSiPMnonlinearity
Definition: HcalSiPMnonlinearity.h:7
HcalLutMetadatum::getLutGranularity
uint8_t getLutGranularity() const
Definition: HcalLutMetadatum.h:21
LutXml
Definition: LutXml.h:27
QIE11
Definition: HcalQIENum.h:4
HcalTrigTowerGeometry::towerEtaBounds
void towerEtaBounds(int ieta, int version, double &eta1, double &eta2) const
where this tower begins and ends in eta
Definition: HcalTrigTowerGeometry.cc:237
HcaluLUTTPGCoder::delay_
const HcalTimeSlew * delay_
Definition: HcaluLUTTPGCoder.h:102
HcaluLUTTPGCoder::pulseCorr_
std::unique_ptr< HcalPulseContainmentManager > pulseCorr_
Definition: HcaluLUTTPGCoder.h:119
HcalTopologyMode::TriggerMode_2018legacy
Definition: HcalTopologyMode.h:31
HcalSiPMnonlinearity.h
HcalSiPMParameter
Definition: HcalSiPMParameter.h:7
HcaluLUTTPGCoder::adc2Linear
void adc2Linear(const HBHEDataFrame &df, IntegerCaloSamples &ics) const override
Definition: HcaluLUTTPGCoder.cc:501
QIE10
Definition: HcalQIENum.h:4
HcalTopology::lastHBRing
int lastHBRing() const
Definition: HcalTopology.h:92
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
HcaluLUTTPGCoder::maxDepthHF_
int maxDepthHF_
Definition: HcaluLUTTPGCoder.h:108