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 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), 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<bool> 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<bool> 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<bool> 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  int ADCLong = details.LongDigi[ibin].adc();
410  int ADCShort = details.ShortDigi[ibin].adc();
411  if(HCALFEM != 0)
412  {
413  finegrain[ibin] = (finegrain[ibin] || HCALFEM->fineGrainbit(ADCShort, details.ShortDigi.id(), details.ShortDigi[ibin].capid(), ADCLong, details.LongDigi.id(), details.LongDigi[ibin].capid()));
414  }
415  }
416  }
417 
418  for (int bin = 0; bin < numberOfSamples_; ++bin) {
419  static const unsigned int MAX_OUTPUT = 0x3FF; // 0x3FF = 1023
420  output[bin] = min({MAX_OUTPUT, output[bin] >> HF_LUMI_SHIFT});
421  }
422  outcoder_->compress(output, finegrain, result);
423 
424 }
425 
427  for (HcalTrigPrimDigiCollection::iterator tp = result.begin(); tp != result.end(); ++tp){
428  bool ZS = true;
429  for (int i=0; i<tp->size(); ++i) {
430  if (tp->sample(i).compressedEt() > ZS_threshold_I_) {
431  ZS=false;
432  break;
433  }
434  }
435  if (ZS) tp->setZSInfo(false,true);
436  else tp->setZSInfo(true,false);
437  }
438 }
439 
441  const HcalElectronicsMap *emap,
443  ){
444  std::set<uint32_t> FrontEndErrors;
445 
447  const FEDRawData& raw = rawraw->FEDData(i);
448  if (raw.size()<12) continue;
449  const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(raw.data());
450  if(!dccHeader) continue;
451  HcalHTRData htr;
452  for (int spigot=0; spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++) {
453  if (!dccHeader->getSpigotPresent(spigot)) continue;
454  dccHeader->getSpigotData(spigot,htr,raw.size());
455  int dccid = dccHeader->getSourceId();
456  int errWord = htr.getErrorsWord() & 0x1FFFF;
457  bool HTRError = (!htr.check() || htr.isHistogramEvent() || (errWord & 0x800)!=0);
458 
459  if(HTRError) {
460  bool valid =false;
461  for(int fchan=0; fchan<3 && !valid; fchan++) {
462  for(int fib=0; fib<9 && !valid; fib++) {
463  HcalElectronicsId eid(fchan,fib,spigot,dccid-FEDNumbering::MINHCALFEDID);
464  eid.setHTR(htr.readoutVMECrateId(),htr.htrSlot(),htr.htrTopBottom());
465  DetId detId = emap->lookup(eid);
466  if(detId.null()) continue;
467  HcalSubdetector subdet=(HcalSubdetector(detId.subdetId()));
468  if (detId.det()!=4||
469  (subdet!=HcalBarrel && subdet!=HcalEndcap &&
470  subdet!=HcalForward )) continue;
471  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(detId);
472  for (std::vector<HcalTrigTowerDetId>::const_iterator triggerId=ids.begin(); triggerId != ids.end(); ++triggerId) {
473  FrontEndErrors.insert(triggerId->rawId());
474  }
475  //valid = true;
476  }
477  }
478  }
479  }
480  }
481 
482  // Loop over TP collection
483  // Set TP to zero if there is FE Format Error
484  HcalTriggerPrimitiveSample zeroSample(0);
485  for (HcalTrigPrimDigiCollection::iterator tp = result.begin(); tp != result.end(); ++tp){
486  if (FrontEndErrors.find(tp->id().rawId()) != FrontEndErrors.end()) {
487  for (int i=0; i<tp->size(); ++i) tp->setSample(i, zeroSample);
488  }
489  }
490 }
491 
492 void HcalTriggerPrimitiveAlgo::addFG(const HcalTrigTowerDetId& id, std::vector<bool>& msb){
493  FGbitMap::iterator itr = fgMap_.find(id);
494  if (itr != fgMap_.end()){
495  std::vector<bool>& _msb = itr->second;
496  for (size_t i=0; i<msb.size(); ++i)
497  _msb[i] = _msb[i] || msb[i];
498  }
499  else fgMap_[id] = msb;
500 }
501 
503  if (algo <=0 && algo>2)
504  throw cms::Exception("ERROR: Only algo 1 & 2 are supported.") << std::endl;
506 }
507 
510 }
511 
514 }
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)
int presamples() const
access presample information
HcalTriggerPrimitiveAlgo(bool pf, const std::vector< double > &w, int latency, uint32_t FG_threshold, uint32_t ZS_threshold, int numberOfSamples, int numberOfPresamples, int numberOfSamplesHF, int numberOfPresamplesHF, uint32_t minSignalThreshold=0, uint32_t PMT_NoiseThreshold=0)
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:95
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
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
void compress(const IntegerCaloSamples &ics, const std::vector< bool > &fineGrain, HcalTriggerPrimitiveDigi &digi) 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