CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalTriggerPrimitiveAlgo.cc
Go to the documentation of this file.
3 
4 
12 #include "SimCalorimetry/HcalTrigPrimAlgos/interface/HcalFeatureHFEMBit.h"//cuts based on short and long energy deposited.
13 #include <iostream>
14 using namespace std;
15 
16 HcalTriggerPrimitiveAlgo::HcalTriggerPrimitiveAlgo( bool pf, const std::vector<double>& w, int latency,
17  uint32_t FG_threshold, uint32_t FG_HF_threshold, uint32_t ZS_threshold,
18  int numberOfSamples, int numberOfPresamples,
19  int numberOfSamplesHF, int numberOfPresamplesHF,
20  uint32_t minSignalThreshold, uint32_t PMT_NoiseThreshold)
21  : incoder_(0), outcoder_(0),
22  theThreshold(0), peakfind_(pf), weights_(w), latency_(latency),
23  FG_threshold_(FG_threshold), FG_HF_threshold_(FG_HF_threshold), ZS_threshold_(ZS_threshold),
24  numberOfSamples_(numberOfSamples),
25  numberOfPresamples_(numberOfPresamples),
26  numberOfSamplesHF_(numberOfSamplesHF),
27  numberOfPresamplesHF_(numberOfPresamplesHF),
28  minSignalThreshold_(minSignalThreshold),
29  PMT_NoiseThreshold_(PMT_NoiseThreshold),
30  NCTScaleShift(0), RCTScaleShift(0),
31  peak_finder_algorithm_(2)
32 {
33  //No peak finding setting (for Fastsim)
34  if (!peakfind_){
35  numberOfSamples_ = 1;
37  numberOfSamplesHF_ = 1;
39  }
40  // Switch to integer for comparisons - remove compiler warning
42 }
43 
44 
46 }
47 
48 
50  const HcalTPGCompressor* outcoder,
51  const HBHEDigiCollection& hbheDigis,
52  const HFDigiCollection& hfDigis,
54  const HcalTrigTowerGeometry* trigTowerGeometry,
55  float rctlsb, const HcalFeatureBit* LongvrsShortCut) {
56  theTrigTowerGeometry = trigTowerGeometry;
57 
58  incoder_=dynamic_cast<const HcaluLUTTPGCoder*>(incoder);
59  outcoder_=outcoder;
60 
61  theSumMap.clear();
62  theTowerMapFGSum.clear();
63  HF_Veto.clear();
64  fgMap_.clear();
65  theHFDetailMap.clear();
66 
67  // do the HB/HE digis
68  for(HBHEDigiCollection::const_iterator hbheItr = hbheDigis.begin();
69  hbheItr != hbheDigis.end(); ++hbheItr) {
70  addSignal(*hbheItr);
71  }
72 
73  // and the HF digis
74  for(HFDigiCollection::const_iterator hfItr = hfDigis.begin();
75  hfItr != hfDigis.end(); ++hfItr) {
76  addSignal(*hfItr);
77 
78  }
79 
80  // VME produces additional bits on the front used by lumi but not the
81  // trigger, this shift corrects those out by right shifting over them.
82  for(SumMap::iterator mapItr = theSumMap.begin(); mapItr != theSumMap.end(); ++mapItr) {
83  result.push_back(HcalTriggerPrimitiveDigi(mapItr->first));
84  HcalTrigTowerDetId detId(mapItr->second.id());
85  if(detId.ietaAbs() >= theTrigTowerGeometry->firstHFTower(detId.version())) {
86  if (detId.version() == 0) {
87  analyzeHF(mapItr->second, result.back(), RCTScaleShift);
88  } else if (detId.version() == 1) {
89  analyzeHFV1(mapItr->second, result.back(), NCTScaleShift, LongvrsShortCut);
90  } else {
91  // Things are going to go poorly
92  }
93  }
94  else {
95  analyze(mapItr->second, result.back());
96  }
97  }
98 
99  // Free up some memory
100  theSumMap.clear();
101  theTowerMapFGSum.clear();
102  HF_Veto.clear();
103  fgMap_.clear();
104  theHFDetailMap.clear();
105 
106  return;
107 }
108 
109 
111  // TODO: Need to add support for seperate 28, 29 in HE
112  //Hack for 300_pre10, should be removed.
113  if (frame.id().depth()==5) return;
114 
115  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(frame.id());
116  assert(ids.size() == 1 || ids.size() == 2);
117  IntegerCaloSamples samples1(ids[0], int(frame.size()));
118 
119  samples1.setPresamples(frame.presamples());
120  incoder_->adc2Linear(frame, samples1);
121 
122  std::vector<bool> msb;
123  incoder_->lookupMSB(frame, msb);
124 
125  if(ids.size() == 2) {
126  // make a second trigprim for the other one, and split the energy
127  IntegerCaloSamples samples2(ids[1], samples1.size());
128  for(int i = 0; i < samples1.size(); ++i) {
129  samples1[i] = uint32_t(samples1[i]*0.5);
130  samples2[i] = samples1[i];
131  }
132  samples2.setPresamples(frame.presamples());
133  addSignal(samples2);
134  addFG(ids[1], msb);
135  }
136  addSignal(samples1);
137  addFG(ids[0], msb);
138 }
139 
140 
142  if(frame.id().depth() == 1 || frame.id().depth() == 2) {
143  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(frame.id());
144  std::vector<HcalTrigTowerDetId>::const_iterator it;
145  for (it = ids.begin(); it != ids.end(); ++it) {
146  HcalTrigTowerDetId trig_tower_id = *it;
147  IntegerCaloSamples samples(trig_tower_id, frame.size());
148  samples.setPresamples(frame.presamples());
149  incoder_->adc2Linear(frame, samples);
150 
151  // Don't add to final collection yet
152  // HF PMT veto sum is calculated in analyzerHF()
153  IntegerCaloSamples zero_samples(trig_tower_id, frame.size());
154  zero_samples.setPresamples(frame.presamples());
155  addSignal(zero_samples);
156 
157  // Pre-LS1 Configuration
158  if (trig_tower_id.version() == 0) {
159  // Mask off depths: fgid is the same for both depths
160  uint32_t fgid = (frame.id().maskDepth());
161 
162  if ( theTowerMapFGSum.find(trig_tower_id) == theTowerMapFGSum.end() ) {
163  SumFGContainer sumFG;
164  theTowerMapFGSum.insert(std::pair<HcalTrigTowerDetId, SumFGContainer>(trig_tower_id, sumFG));
165  }
166 
167  SumFGContainer& sumFG = theTowerMapFGSum[trig_tower_id];
168  SumFGContainer::iterator sumFGItr;
169  for ( sumFGItr = sumFG.begin(); sumFGItr != sumFG.end(); ++sumFGItr) {
170  if (sumFGItr->id() == fgid) { break; }
171  }
172  // If find
173  if (sumFGItr != sumFG.end()) {
174  for (int i=0; i<samples.size(); ++i) {
175  (*sumFGItr)[i] += samples[i];
176  }
177  }
178  else {
179  //Copy samples (change to fgid)
180  IntegerCaloSamples sumFGSamples(DetId(fgid), samples.size());
181  sumFGSamples.setPresamples(samples.presamples());
182  for (int i=0; i<samples.size(); ++i) {
183  sumFGSamples[i] = samples[i];
184  }
185  sumFG.push_back(sumFGSamples);
186  }
187 
188  // set veto to true if Long or Short less than threshold
189  if (HF_Veto.find(fgid) == HF_Veto.end()) {
190  vector<bool> vetoBits(samples.size(), false);
191  HF_Veto[fgid] = vetoBits;
192  }
193  for (int i=0; i<samples.size(); ++i) {
194  if (samples[i] < minSignalThreshold_) {
195  HF_Veto[fgid][i] = true;
196  }
197  }
198  }
199  // HF 1x1
200  else if (trig_tower_id.version() == 1) {
201  uint32_t fgid = (frame.id().maskDepth());
202  HFDetails& details = theHFDetailMap[trig_tower_id][fgid];
203  // Check the frame type to determine long vs short
204  if (frame.id().depth() == 1) { // Long
205  details.long_fiber = samples;
206  details.LongDigi = frame;
207  } else if (frame.id().depth() == 2) { // Short
208  details.short_fiber = samples;
209  details.ShortDigi = frame;
210  } else {
211  // Neither long nor short... So we have no idea what to do
212  edm::LogWarning("HcalTPAlgo") << "Unable to figure out what to do with data frame for " << frame.id();
213  return;
214  }
215  }
216  // Uh oh, we are in a bad/unknown state! Things will start crashing.
217  else {
218  return;
219  }
220  }
221  }
222 }
223 
224 
226  HcalTrigTowerDetId id(samples.id());
227  SumMap::iterator itr = theSumMap.find(id);
228  if(itr == theSumMap.end()) {
229  theSumMap.insert(std::make_pair(id, samples));
230  }
231  else {
232  // wish CaloSamples had a +=
233  for(int i = 0; i < samples.size(); ++i) {
234  (itr->second)[i] += samples[i];
235  }
236  }
237 }
238 
239 
241  int shrink = weights_.size() - 1;
242  std::vector<bool>& msb = fgMap_[samples.id()];
243  IntegerCaloSamples sum(samples.id(), samples.size());
244 
245  //slide algo window
246  for(int ibin = 0; ibin < int(samples.size())- shrink; ++ibin) {
247  int algosumvalue = 0;
248  for(unsigned int i = 0; i < weights_.size(); i++) {
249  //add up value * scale factor
250  algosumvalue += int(samples[ibin+i] * weights_[i]);
251  }
252  if (algosumvalue<0) sum[ibin]=0; // low-side
253  //high-side
254  //else if (algosumvalue>0x3FF) sum[ibin]=0x3FF;
255  else sum[ibin] = algosumvalue; //assign value to sum[]
256  }
257 
258  // Align digis and TP
259  int dgPresamples=samples.presamples();
260  int tpPresamples=numberOfPresamples_;
261  int shift = dgPresamples - tpPresamples;
262  int dgSamples=samples.size();
263  int tpSamples=numberOfSamples_;
264  if(peakfind_){
265  if((shift<shrink) || (shift + tpSamples + shrink > dgSamples - (peak_finder_algorithm_ - 1) ) ){
266  edm::LogInfo("HcalTriggerPrimitiveAlgo::analyze") <<
267  "TP presample or size from the configuration file is out of the accessible range. Using digi values from data instead...";
268  shift=shrink;
269  tpPresamples=dgPresamples-shrink;
270  tpSamples=dgSamples-(peak_finder_algorithm_-1)-shrink-shift;
271  }
272  }
273 
274  std::vector<int> finegrain(tpSamples,false);
275 
276  IntegerCaloSamples output(samples.id(), tpSamples);
277  output.setPresamples(tpPresamples);
278 
279  for (int ibin = 0; ibin < tpSamples; ++ibin) {
280  // ibin - index for output TP
281  // idx - index for samples + shift
282  int idx = ibin + shift;
283 
284  //Peak finding
285  if (peakfind_) {
286  bool isPeak = false;
287  switch (peak_finder_algorithm_) {
288  case 1 :
289  isPeak = (samples[idx] > samples[idx-1] && samples[idx] >= samples[idx+1] && samples[idx] > theThreshold);
290  break;
291  case 2:
292  isPeak = (sum[idx] > sum[idx-1] && sum[idx] >= sum[idx+1] && sum[idx] > theThreshold);
293  break;
294  default:
295  break;
296  }
297 
298  if (isPeak){
299  output[ibin] = std::min<unsigned int>(sum[idx],0x3FF);
300  finegrain[ibin] = msb[idx];
301  }
302  // Not a peak
303  else output[ibin] = 0;
304  }
305  else { // No peak finding, just output running sum
306  output[ibin] = std::min<unsigned int>(sum[idx],0x3FF);
307  finegrain[ibin] = msb[idx];
308  }
309 
310  // Only Pegged for 1-TS algo.
311  if (peak_finder_algorithm_ == 1) {
312  if (samples[idx] >= 0x3FF)
313  output[ibin] = 0x3FF;
314  }
315  }
316  outcoder_->compress(output, finegrain, result);
317 }
318 
319 
321  HcalTrigTowerDetId detId(samples.id());
322 
323  // Align digis and TP
324  int dgPresamples=samples.presamples();
325  int tpPresamples=numberOfPresamplesHF_;
326  int shift = dgPresamples - tpPresamples;
327  int dgSamples=samples.size();
328  int tpSamples=numberOfSamplesHF_;
329  if(shift<0 || shift+tpSamples>dgSamples){
330  edm::LogInfo("HcalTriggerPrimitiveAlgo::analyzeHF") <<
331  "TP presample or size from the configuration file is out of the accessible range. Using digi values from data instead...";
332  tpPresamples=dgPresamples;
333  shift=0;
334  tpSamples=dgSamples;
335  }
336 
337  std::vector<int> finegrain(tpSamples, false);
338 
339  TowerMapFGSum::const_iterator tower2fg = theTowerMapFGSum.find(detId);
340  assert(tower2fg != theTowerMapFGSum.end());
341 
342  const SumFGContainer& sumFG = tower2fg->second;
343  // Loop over all L+S pairs that mapped from samples.id()
344  // Note: 1 samples.id() = 6 x (L+S) without noZS
345  for (SumFGContainer::const_iterator sumFGItr = sumFG.begin(); sumFGItr != sumFG.end(); ++sumFGItr) {
346  const std::vector<bool>& veto = HF_Veto[sumFGItr->id().rawId()];
347  for (int ibin = 0; ibin < tpSamples; ++ibin) {
348  int idx = ibin + shift;
349  // if not vetod, add L+S to total sum and calculate FG
350  bool vetoed = idx<int(veto.size()) && veto[idx];
351  if (!(vetoed && (*sumFGItr)[idx] > PMT_NoiseThreshold_)) {
352  samples[idx] += (*sumFGItr)[idx];
353  finegrain[ibin] = (finegrain[ibin] || (*sumFGItr)[idx] >= FG_threshold_);
354  }
355  }
356  }
357 
358  IntegerCaloSamples output(samples.id(), tpSamples);
359  output.setPresamples(tpPresamples);
360 
361  for (int ibin = 0; ibin < tpSamples; ++ibin) {
362  int idx = ibin + shift;
363  output[ibin] = samples[idx] >> hf_lumi_shift;
364  static const int MAX_OUTPUT = 0x3FF; // 0x3FF = 1023
365  if (output[ibin] > MAX_OUTPUT) output[ibin] = MAX_OUTPUT;
366  }
367  outcoder_->compress(output, finegrain, result);
368 }
369 
371  const IntegerCaloSamples& SAMPLES,
373  const int HF_LUMI_SHIFT,
374  const HcalFeatureBit* HCALFEM
375  ) {
376  // Align digis and TP
377  const int SHIFT = SAMPLES.presamples() - numberOfPresamples_;
378  assert(SHIFT >= 0);
379  assert((SHIFT + numberOfSamples_) <= SAMPLES.size());
380 
381  // Try to find the HFDetails from the map corresponding to our samples
382  const HcalTrigTowerDetId detId(SAMPLES.id());
383  HFDetailMap::const_iterator it = theHFDetailMap.find(detId);
384  // Missing values will give an empty digi
385  if (it == theHFDetailMap.end()) {
386  return;
387  }
388 
389  std::vector<std::bitset<2>> finegrain(numberOfSamples_, false);
390 
391  // Set up out output of IntergerCaloSamples
393  output.setPresamples(numberOfPresamples_);
394 
395  for (const auto& item: it->second) {
396  auto& details = item.second;
397  for (int ibin = 0; ibin < numberOfSamples_; ++ibin) {
398  const int IDX = ibin + SHIFT;
399  int long_fiber_val = 0;
400  if (IDX < details.long_fiber.size()) {
401  long_fiber_val = details.long_fiber[IDX];
402  }
403  int short_fiber_val = 0;
404  if (IDX < details.short_fiber.size()) {
405  short_fiber_val = details.short_fiber[IDX];
406  }
407  output[ibin] += (long_fiber_val + short_fiber_val);
408 
409  uint32_t ADCLong = details.LongDigi[ibin].adc();
410  uint32_t ADCShort = details.ShortDigi[ibin].adc();
411 
412  if (details.LongDigi.id().ietaAbs() != 29) {
413  finegrain[ibin][1] = (ADCLong > FG_HF_threshold_ || ADCShort > FG_HF_threshold_);
414 
415  if (HCALFEM != 0) {
416  finegrain[ibin][0] = HCALFEM->fineGrainbit(
417  ADCShort, details.ShortDigi.id(),
418  details.ShortDigi[ibin].capid(),
419  ADCLong, details.LongDigi.id(),
420  details.LongDigi[ibin].capid()
421  );
422  }
423  }
424  }
425  }
426 
427  for (int bin = 0; bin < numberOfSamples_; ++bin) {
428  static const unsigned int MAX_OUTPUT = 0x3FF; // 0x3FF = 1023
429  output[bin] = min({MAX_OUTPUT, output[bin] >> HF_LUMI_SHIFT});
430  }
431 
432  std::vector<int> finegrain_converted;
433  for (const auto& fg: finegrain)
434  finegrain_converted.push_back(fg.to_ulong());
435  outcoder_->compress(output, finegrain_converted, result);
436 
437 }
438 
440  for (HcalTrigPrimDigiCollection::iterator tp = result.begin(); tp != result.end(); ++tp){
441  bool ZS = true;
442  for (int i=0; i<tp->size(); ++i) {
443  if (tp->sample(i).compressedEt() > ZS_threshold_I_) {
444  ZS=false;
445  break;
446  }
447  }
448  if (ZS) tp->setZSInfo(false,true);
449  else tp->setZSInfo(true,false);
450  }
451 }
452 
454  const HcalElectronicsMap *emap,
456  ){
457  std::set<uint32_t> FrontEndErrors;
458 
460  const FEDRawData& raw = rawraw->FEDData(i);
461  if (raw.size()<12) continue;
462  const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(raw.data());
463  if(!dccHeader) continue;
464  HcalHTRData htr;
465  for (int spigot=0; spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++) {
466  if (!dccHeader->getSpigotPresent(spigot)) continue;
467  dccHeader->getSpigotData(spigot,htr,raw.size());
468  int dccid = dccHeader->getSourceId();
469  int errWord = htr.getErrorsWord() & 0x1FFFF;
470  bool HTRError = (!htr.check() || htr.isHistogramEvent() || (errWord & 0x800)!=0);
471 
472  if(HTRError) {
473  bool valid =false;
474  for(int fchan=0; fchan<3 && !valid; fchan++) {
475  for(int fib=0; fib<9 && !valid; fib++) {
476  HcalElectronicsId eid(fchan,fib,spigot,dccid-FEDNumbering::MINHCALFEDID);
477  eid.setHTR(htr.readoutVMECrateId(),htr.htrSlot(),htr.htrTopBottom());
478  DetId detId = emap->lookup(eid);
479  if(detId.null()) continue;
480  HcalSubdetector subdet=(HcalSubdetector(detId.subdetId()));
481  if (detId.det()!=4||
482  (subdet!=HcalBarrel && subdet!=HcalEndcap &&
483  subdet!=HcalForward )) continue;
484  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(detId);
485  for (std::vector<HcalTrigTowerDetId>::const_iterator triggerId=ids.begin(); triggerId != ids.end(); ++triggerId) {
486  FrontEndErrors.insert(triggerId->rawId());
487  }
488  //valid = true;
489  }
490  }
491  }
492  }
493  }
494 
495  // Loop over TP collection
496  // Set TP to zero if there is FE Format Error
497  HcalTriggerPrimitiveSample zeroSample(0);
498  for (HcalTrigPrimDigiCollection::iterator tp = result.begin(); tp != result.end(); ++tp){
499  if (FrontEndErrors.find(tp->id().rawId()) != FrontEndErrors.end()) {
500  for (int i=0; i<tp->size(); ++i) tp->setSample(i, zeroSample);
501  }
502  }
503 }
504 
505 void HcalTriggerPrimitiveAlgo::addFG(const HcalTrigTowerDetId& id, std::vector<bool>& msb){
506  FGbitMap::iterator itr = fgMap_.find(id);
507  if (itr != fgMap_.end()){
508  std::vector<bool>& _msb = itr->second;
509  for (size_t i=0; i<msb.size(); ++i)
510  _msb[i] = _msb[i] || msb[i];
511  }
512  else fgMap_[id] = msb;
513 }
514 
516  if (algo <=0 && algo>2)
517  throw cms::Exception("ERROR: Only algo 1 & 2 are supported.") << std::endl;
519 }
520 
523 }
524 
527 }
void analyzeHFV1(const IntegerCaloSamples &SAMPLES, HcalTriggerPrimitiveDigi &result, const int HF_LUMI_SHIFT, const HcalFeatureBit *HCALFEM)
void analyze(IntegerCaloSamples &samples, HcalTriggerPrimitiveDigi &result)
adds the actual RecHits
int i
Definition: DBlmapReader.cc:9
void runFEFormatError(const FEDRawDataCollection *rawraw, const HcalElectronicsMap *emap, HcalTrigPrimDigiCollection &result)
HcalTriggerPrimitiveAlgo(bool pf, const std::vector< double > &w, int latency, uint32_t FG_threshold, uint32_t FG_HF_threshold, uint32_t ZS_threshold, int numberOfSamples, int numberOfPresamples, int numberOfSamplesHF, int numberOfPresamplesHF, uint32_t minSignalThreshold=0, uint32_t PMT_NoiseThreshold=0)
int presamples() const
access presample information
void analyzeHF(IntegerCaloSamples &samples, HcalTriggerPrimitiveDigi &result, const int hf_lumi_shift)
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event...
Definition: HcalHTRData.cc:62
std::vector< HcalTrigTowerDetId > towerIds(const HcalDetId &cellId) const
the mapping to and from DetIds
const double w
Definition: UKUtility.cc:23
unsigned int htrTopBottom() const
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
Definition: HcalHTRData.cc:342
int size() const
total number of samples in the digi
Definition: HBHEDataFrame.h:26
assert(m_qm.get())
std::vector< HBHEDataFrame >::const_iterator const_iterator
void push_back(T const &t)
const HcalTPGCompressor * outcoder_
void setPresamples(int pre)
set presample information
void addFG(const HcalTrigTowerDetId &id, std::vector< bool > &msb)
int getSpigotData(int nspigot, HcalHTRData &decodeTool, int validSize) const
uint32_t maskDepth() const
get the tower depth
Definition: HcalDetId.cc:119
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
tuple result
Definition: mps_fire.py:84
std::vector< IntegerCaloSamples > SumFGContainer
int size() const
get the size
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
Definition: HcalHTRData.cc:338
int depth() const
get the tower depth
Definition: HcalDetId.cc:106
const HcalTrigTowerGeometry * theTrigTowerGeometry
void lookupMSB(const HBHEDataFrame &df, std::vector< bool > &msb) const
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
HcalSubdetector
Definition: HcalAssistant.h:31
bool getSpigotPresent(unsigned int nspigot) const
Read the &quot;PRESENT&quot; bit for this spigot.
std::vector< double > weights_
T min(T a, T b)
Definition: MathUtil.h:58
void compress(const IntegerCaloSamples &ics, const std::vector< int > &fineGrain, HcalTriggerPrimitiveDigi &digi) const
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
int presamples() const
number of samples before the sample from the triggered beam crossing (according to the hardware) ...
Definition: HBHEDataFrame.h:28
void runZS(HcalTrigPrimDigiCollection &tp)
std::vector< HcalTriggerPrimitiveDigi >::iterator iterator
const_iterator end() const
int getSourceId() const
Definition: HcalDCCHeader.h:32
Definition: DetId.h:18
void setHTR(int crate, int slot, int tb)
int size() const
total number of samples in the digi
Definition: HFDataFrame.h:26
virtual bool fineGrainbit(int ADCShort, HcalDetId Sid, int CapIdS, int ADCLong, HcalDetId Lid, int CapIdL) const
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
unsigned int getErrorsWord() const
Get the errors word.
Definition: HcalHTRData.h:157
int version() const
get the version code for the trigger tower
bool null() const
is this a null id ?
Definition: DetId.h:45
unsigned int readoutVMECrateId() const
HcalElectronicsId-style VME crate number.
Definition: HcalHTRData.cc:346
const HcaluLUTTPGCoder * incoder_
static const int SPIGOT_COUNT
Definition: HcalDCCHeader.h:19
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
static unsigned int const shift
const HcalDetId & id() const
Definition: HBHEDataFrame.h:22
virtual void adc2Linear(const HBHEDataFrame &df, IntegerCaloSamples &ics) const
int presamples() const
number of samples before the sample from the triggered beam crossing (according to the hardware) ...
Definition: HFDataFrame.h:28
const HcalDetId & id() const
Definition: HFDataFrame.h:22
DetId id() const
get the (generic) id
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
Readout chain identification for Hcal.
void addSignal(const HBHEDataFrame &frame)
adds the signal to the map
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
bool isHistogramEvent() const
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
Definition: HcalHTRData.cc:385
const_iterator begin() const
const_reference back() const
void run(const HcalTPGCoder *incoder, const HcalTPGCompressor *outcoder, const HBHEDigiCollection &hbheDigis, const HFDigiCollection &hfDigis, HcalTrigPrimDigiCollection &result, const HcalTrigTowerGeometry *trigTowerGeometry, float rctlsb, const HcalFeatureBit *LongvrsShortCut=0)
int firstHFTower(int version) const