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  peak_finder_algorithm_(2)
31 {
32  //No peak finding setting (for Fastsim)
33  if (!peakfind_){
34  numberOfSamples_ = 1;
36  numberOfSamplesHF_ = 1;
38  }
39  // Switch to integer for comparisons - remove compiler warning
41 }
42 
43 
45 }
46 
47 
49  const HcalTPGCompressor* outcoder,
50  const HBHEDigiCollection& hbheDigis,
51  const HFDigiCollection& hfDigis,
53  const HcalTrigTowerGeometry* trigTowerGeometry,
54  float rctlsb, const HcalFeatureBit* LongvrsShortCut) {
55  theTrigTowerGeometry = trigTowerGeometry;
56 
57  incoder_=dynamic_cast<const HcaluLUTTPGCoder*>(incoder);
58  outcoder_=outcoder;
59 
60  theSumMap.clear();
61  theTowerMapFGSum.clear();
62  HF_Veto.clear();
63  fgMap_.clear();
64  theHFDetailMap.clear();
65 
66  // do the HB/HE digis
67  for(HBHEDigiCollection::const_iterator hbheItr = hbheDigis.begin();
68  hbheItr != hbheDigis.end(); ++hbheItr) {
69  addSignal(*hbheItr);
70  }
71 
72  // and the HF digis
73  for(HFDigiCollection::const_iterator hfItr = hfDigis.begin();
74  hfItr != hfDigis.end(); ++hfItr) {
75  addSignal(*hfItr);
76 
77  }
78 
79  // VME produces additional bits on the front used by lumi but not the
80  // trigger, this shift corrects those out by right shifting over them.
81  int hf_lumi_shift = 0;
82  if (0.2 <= rctlsb && rctlsb < 0.3) {
83  hf_lumi_shift = 2;
84  } else if (0.3 <= rctlsb) {
85  hf_lumi_shift = 3;
86  }
87  for(SumMap::iterator mapItr = theSumMap.begin(); mapItr != theSumMap.end(); ++mapItr) {
88  result.push_back(HcalTriggerPrimitiveDigi(mapItr->first));
89  HcalTrigTowerDetId detId(mapItr->second.id());
90  if(detId.ietaAbs() >= theTrigTowerGeometry->firstHFTower(detId.version())) {
91  if (detId.version() == 0) {
92  analyzeHF(mapItr->second, result.back(), hf_lumi_shift);
93  } else if (detId.version() == 1) {
94  analyzeHFV1(mapItr->second, result.back(), hf_lumi_shift, LongvrsShortCut);
95  } else {
96  // Things are going to go poorly
97  }
98  }
99  else {
100  analyze(mapItr->second, result.back());
101  }
102  }
103 
104  // Free up some memory
105  theSumMap.clear();
106  theTowerMapFGSum.clear();
107  HF_Veto.clear();
108  fgMap_.clear();
109  theHFDetailMap.clear();
110 
111  return;
112 }
113 
114 
116  // TODO: Need to add support for seperate 28, 29 in HE
117  //Hack for 300_pre10, should be removed.
118  if (frame.id().depth()==5) return;
119 
120  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(frame.id());
121  assert(ids.size() == 1 || ids.size() == 2);
122  IntegerCaloSamples samples1(ids[0], int(frame.size()));
123 
124  samples1.setPresamples(frame.presamples());
125  incoder_->adc2Linear(frame, samples1);
126 
127  std::vector<bool> msb;
128  incoder_->lookupMSB(frame, msb);
129 
130  if(ids.size() == 2) {
131  // make a second trigprim for the other one, and split the energy
132  IntegerCaloSamples samples2(ids[1], samples1.size());
133  for(int i = 0; i < samples1.size(); ++i) {
134  samples1[i] = uint32_t(samples1[i]*0.5);
135  samples2[i] = samples1[i];
136  }
137  samples2.setPresamples(frame.presamples());
138  addSignal(samples2);
139  addFG(ids[1], msb);
140  }
141  addSignal(samples1);
142  addFG(ids[0], msb);
143 }
144 
145 
147  if(frame.id().depth() == 1 || frame.id().depth() == 2) {
148  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(frame.id());
149  std::vector<HcalTrigTowerDetId>::const_iterator it;
150  for (it = ids.begin(); it != ids.end(); ++it) {
151  HcalTrigTowerDetId trig_tower_id = *it;
152  IntegerCaloSamples samples(trig_tower_id, frame.size());
153  samples.setPresamples(frame.presamples());
154  incoder_->adc2Linear(frame, samples);
155 
156  // Don't add to final collection yet
157  // HF PMT veto sum is calculated in analyzerHF()
158  IntegerCaloSamples zero_samples(trig_tower_id, frame.size());
159  zero_samples.setPresamples(frame.presamples());
160  addSignal(zero_samples);
161 
162  // Pre-LS1 Configuration
163  if (trig_tower_id.version() == 0) {
164  // Mask off depths: fgid is the same for both depths
165  uint32_t fgid = (frame.id().maskDepth());
166 
167  if ( theTowerMapFGSum.find(trig_tower_id) == theTowerMapFGSum.end() ) {
168  SumFGContainer sumFG;
169  theTowerMapFGSum.insert(std::pair<HcalTrigTowerDetId, SumFGContainer>(trig_tower_id, sumFG));
170  }
171 
172  SumFGContainer& sumFG = theTowerMapFGSum[trig_tower_id];
173  SumFGContainer::iterator sumFGItr;
174  for ( sumFGItr = sumFG.begin(); sumFGItr != sumFG.end(); ++sumFGItr) {
175  if (sumFGItr->id() == fgid) { break; }
176  }
177  // If find
178  if (sumFGItr != sumFG.end()) {
179  for (int i=0; i<samples.size(); ++i) {
180  (*sumFGItr)[i] += samples[i];
181  }
182  }
183  else {
184  //Copy samples (change to fgid)
185  IntegerCaloSamples sumFGSamples(DetId(fgid), samples.size());
186  sumFGSamples.setPresamples(samples.presamples());
187  for (int i=0; i<samples.size(); ++i) {
188  sumFGSamples[i] = samples[i];
189  }
190  sumFG.push_back(sumFGSamples);
191  }
192 
193  // set veto to true if Long or Short less than threshold
194  if (HF_Veto.find(fgid) == HF_Veto.end()) {
195  vector<bool> vetoBits(samples.size(), false);
196  HF_Veto[fgid] = vetoBits;
197  }
198  for (int i=0; i<samples.size(); ++i) {
199  if (samples[i] < minSignalThreshold_) {
200  HF_Veto[fgid][i] = true;
201  }
202  }
203  }
204  // HF 1x1
205  else if (trig_tower_id.version() == 1) {
206  uint32_t fgid = (frame.id().maskDepth());
207  HFDetails& details = theHFDetailMap[trig_tower_id][fgid];
208  // Check the frame type to determine long vs short
209  if (frame.id().depth() == 1) { // Long
210  details.long_fiber = samples;
211  details.LongDigi = frame;
212  } else if (frame.id().depth() == 2) { // Short
213  details.short_fiber = samples;
214  details.ShortDigi = frame;
215  } else {
216  // Neither long nor short... So we have no idea what to do
217  edm::LogWarning("HcalTPAlgo") << "Unable to figure out what to do with data frame for " << frame.id();
218  return;
219  }
220  }
221  // Uh oh, we are in a bad/unknown state! Things will start crashing.
222  else {
223  return;
224  }
225  }
226  }
227 }
228 
229 
231  HcalTrigTowerDetId id(samples.id());
232  SumMap::iterator itr = theSumMap.find(id);
233  if(itr == theSumMap.end()) {
234  theSumMap.insert(std::make_pair(id, samples));
235  }
236  else {
237  // wish CaloSamples had a +=
238  for(int i = 0; i < samples.size(); ++i) {
239  (itr->second)[i] += samples[i];
240  }
241  }
242 }
243 
244 
246  int shrink = weights_.size() - 1;
247  std::vector<bool>& msb = fgMap_[samples.id()];
248  IntegerCaloSamples sum(samples.id(), samples.size());
249 
250  //slide algo window
251  for(int ibin = 0; ibin < int(samples.size())- shrink; ++ibin) {
252  int algosumvalue = 0;
253  for(unsigned int i = 0; i < weights_.size(); i++) {
254  //add up value * scale factor
255  algosumvalue += int(samples[ibin+i] * weights_[i]);
256  }
257  if (algosumvalue<0) sum[ibin]=0; // low-side
258  //high-side
259  //else if (algosumvalue>0x3FF) sum[ibin]=0x3FF;
260  else sum[ibin] = algosumvalue; //assign value to sum[]
261  }
262 
263  // Align digis and TP
264  int dgPresamples=samples.presamples();
265  int tpPresamples=numberOfPresamples_;
266  int shift = dgPresamples - tpPresamples;
267  int dgSamples=samples.size();
268  int tpSamples=numberOfSamples_;
269  if(peakfind_){
270  if((shift<shrink) || (shift + tpSamples + shrink > dgSamples - (peak_finder_algorithm_ - 1) ) ){
271  edm::LogInfo("HcalTriggerPrimitiveAlgo::analyze") <<
272  "TP presample or size from the configuration file is out of the accessible range. Using digi values from data instead...";
273  shift=shrink;
274  tpPresamples=dgPresamples-shrink;
275  tpSamples=dgSamples-(peak_finder_algorithm_-1)-shrink-shift;
276  }
277  }
278 
279  std::vector<bool> finegrain(tpSamples,false);
280 
281  IntegerCaloSamples output(samples.id(), tpSamples);
282  output.setPresamples(tpPresamples);
283 
284  for (int ibin = 0; ibin < tpSamples; ++ibin) {
285  // ibin - index for output TP
286  // idx - index for samples + shift
287  int idx = ibin + shift;
288 
289  //Peak finding
290  if (peakfind_) {
291  bool isPeak = false;
292  switch (peak_finder_algorithm_) {
293  case 1 :
294  isPeak = (samples[idx] > samples[idx-1] && samples[idx] >= samples[idx+1] && samples[idx] > theThreshold);
295  break;
296  case 2:
297  isPeak = (sum[idx] > sum[idx-1] && sum[idx] >= sum[idx+1] && sum[idx] > theThreshold);
298  break;
299  default:
300  break;
301  }
302 
303  if (isPeak){
304  output[ibin] = std::min<unsigned int>(sum[idx],0x3FF);
305  finegrain[ibin] = msb[idx];
306  }
307  // Not a peak
308  else output[ibin] = 0;
309  }
310  else { // No peak finding, just output running sum
311  output[ibin] = std::min<unsigned int>(sum[idx],0x3FF);
312  finegrain[ibin] = msb[idx];
313  }
314 
315  // Only Pegged for 1-TS algo.
316  if (peak_finder_algorithm_ == 1) {
317  if (samples[idx] >= 0x3FF)
318  output[ibin] = 0x3FF;
319  }
320  }
321  outcoder_->compress(output, finegrain, result);
322 }
323 
324 
326  HcalTrigTowerDetId detId(samples.id());
327 
328  // Align digis and TP
329  int dgPresamples=samples.presamples();
330  int tpPresamples=numberOfPresamplesHF_;
331  int shift = dgPresamples - tpPresamples;
332  int dgSamples=samples.size();
333  int tpSamples=numberOfSamplesHF_;
334  if(shift<0 || shift+tpSamples>dgSamples){
335  edm::LogInfo("HcalTriggerPrimitiveAlgo::analyzeHF") <<
336  "TP presample or size from the configuration file is out of the accessible range. Using digi values from data instead...";
337  tpPresamples=dgPresamples;
338  shift=0;
339  tpSamples=dgSamples;
340  }
341 
342  std::vector<bool> finegrain(tpSamples, false);
343 
344  TowerMapFGSum::const_iterator tower2fg = theTowerMapFGSum.find(detId);
345  assert(tower2fg != theTowerMapFGSum.end());
346 
347  const SumFGContainer& sumFG = tower2fg->second;
348  // Loop over all L+S pairs that mapped from samples.id()
349  // Note: 1 samples.id() = 6 x (L+S) without noZS
350  for (SumFGContainer::const_iterator sumFGItr = sumFG.begin(); sumFGItr != sumFG.end(); ++sumFGItr) {
351  const std::vector<bool>& veto = HF_Veto[sumFGItr->id().rawId()];
352  for (int ibin = 0; ibin < tpSamples; ++ibin) {
353  int idx = ibin + shift;
354  // if not vetod, add L+S to total sum and calculate FG
355  bool vetoed = idx<int(veto.size()) && veto[idx];
356  if (!(vetoed && (*sumFGItr)[idx] > PMT_NoiseThreshold_)) {
357  samples[idx] += (*sumFGItr)[idx];
358  finegrain[ibin] = (finegrain[ibin] || (*sumFGItr)[idx] >= FG_threshold_);
359  }
360  }
361  }
362 
363  IntegerCaloSamples output(samples.id(), tpSamples);
364  output.setPresamples(tpPresamples);
365 
366  for (int ibin = 0; ibin < tpSamples; ++ibin) {
367  int idx = ibin + shift;
368  output[ibin] = samples[idx] >> hf_lumi_shift;
369  static const int MAX_OUTPUT = 0x3FF; // 0x3FF = 1023
370  if (output[ibin] > MAX_OUTPUT) output[ibin] = MAX_OUTPUT;
371  }
372  outcoder_->compress(output, finegrain, result);
373 }
374 
376  const IntegerCaloSamples& SAMPLES,
378  const int HF_LUMI_SHIFT,
379  const HcalFeatureBit* HCALFEM
380  ) {
381  // Align digis and TP
382  const int SHIFT = SAMPLES.presamples() - numberOfPresamples_;
383  assert(SHIFT >= 0);
384  assert((SHIFT + numberOfSamples_) <= SAMPLES.size());
385 
386  // Try to find the HFDetails from the map corresponding to our samples
387  const HcalTrigTowerDetId detId(SAMPLES.id());
388  HFDetailMap::const_iterator it = theHFDetailMap.find(detId);
389  // Missing values will give an empty digi
390  if (it == theHFDetailMap.end()) {
391  return;
392  }
393 
394  std::vector<bool> finegrain(numberOfSamples_, false);
395 
396  // Set up out output of IntergerCaloSamples
398  output.setPresamples(numberOfPresamples_);
399 
400  for (const auto& item: it->second) {
401  auto& details = item.second;
402  for (int ibin = 0; ibin < numberOfSamples_; ++ibin) {
403  const int IDX = ibin + SHIFT;
404  int long_fiber_val = 0;
405  if (IDX < details.long_fiber.size()) {
406  long_fiber_val = details.long_fiber[IDX];
407  }
408  int short_fiber_val = 0;
409  if (IDX < details.short_fiber.size()) {
410  short_fiber_val = details.short_fiber[IDX];
411  }
412  output[ibin] += (long_fiber_val + short_fiber_val);
413 
414  int ADCLong = details.LongDigi[ibin].adc();
415  int ADCShort = details.ShortDigi[ibin].adc();
416  if(HCALFEM != 0)
417  {
418  finegrain[ibin] = (finegrain[ibin] || HCALFEM->fineGrainbit(ADCShort, details.ShortDigi.id(), details.ShortDigi[ibin].capid(), ADCLong, details.LongDigi.id(), details.LongDigi[ibin].capid()));
419  }
420  }
421  }
422 
423  for (int bin = 0; bin < numberOfSamples_; ++bin) {
424  static const unsigned int MAX_OUTPUT = 0x3FF; // 0x3FF = 1023
425  output[bin] = min({MAX_OUTPUT, output[bin] >> HF_LUMI_SHIFT});
426  }
427  outcoder_->compress(output, finegrain, result);
428 
429 }
430 
432  for (HcalTrigPrimDigiCollection::iterator tp = result.begin(); tp != result.end(); ++tp){
433  bool ZS = true;
434  for (int i=0; i<tp->size(); ++i) {
435  if (tp->sample(i).compressedEt() > ZS_threshold_I_) {
436  ZS=false;
437  break;
438  }
439  }
440  if (ZS) tp->setZSInfo(false,true);
441  else tp->setZSInfo(true,false);
442  }
443 }
444 
446  const HcalElectronicsMap *emap,
448  ){
449  std::set<uint32_t> FrontEndErrors;
450 
452  const FEDRawData& raw = rawraw->FEDData(i);
453  if (raw.size()<12) continue;
454  const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(raw.data());
455  if(!dccHeader) continue;
456  HcalHTRData htr;
457  for (int spigot=0; spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++) {
458  if (!dccHeader->getSpigotPresent(spigot)) continue;
459  dccHeader->getSpigotData(spigot,htr,raw.size());
460  int dccid = dccHeader->getSourceId();
461  int errWord = htr.getErrorsWord() & 0x1FFFF;
462  bool HTRError = (!htr.check() || htr.isHistogramEvent() || (errWord & 0x800)!=0);
463 
464  if(HTRError) {
465  bool valid =false;
466  for(int fchan=0; fchan<3 && !valid; fchan++) {
467  for(int fib=0; fib<9 && !valid; fib++) {
468  HcalElectronicsId eid(fchan,fib,spigot,dccid-FEDNumbering::MINHCALFEDID);
469  eid.setHTR(htr.readoutVMECrateId(),htr.htrSlot(),htr.htrTopBottom());
470  DetId detId = emap->lookup(eid);
471  if(detId.null()) continue;
472  HcalSubdetector subdet=(HcalSubdetector(detId.subdetId()));
473  if (detId.det()!=4||
474  (subdet!=HcalBarrel && subdet!=HcalEndcap &&
475  subdet!=HcalForward )) continue;
476  std::vector<HcalTrigTowerDetId> ids = theTrigTowerGeometry->towerIds(detId);
477  for (std::vector<HcalTrigTowerDetId>::const_iterator triggerId=ids.begin(); triggerId != ids.end(); ++triggerId) {
478  FrontEndErrors.insert(triggerId->rawId());
479  }
480  //valid = true;
481  }
482  }
483  }
484  }
485  }
486 
487  // Loop over TP collection
488  // Set TP to zero if there is FE Format Error
489  HcalTriggerPrimitiveSample zeroSample(0);
490  for (HcalTrigPrimDigiCollection::iterator tp = result.begin(); tp != result.end(); ++tp){
491  if (FrontEndErrors.find(tp->id().rawId()) != FrontEndErrors.end()) {
492  for (int i=0; i<tp->size(); ++i) tp->setSample(i, zeroSample);
493  }
494  }
495 }
496 
497 void HcalTriggerPrimitiveAlgo::addFG(const HcalTrigTowerDetId& id, std::vector<bool>& msb){
498  FGbitMap::iterator itr = fgMap_.find(id);
499  if (itr != fgMap_.end()){
500  std::vector<bool>& _msb = itr->second;
501  for (size_t i=0; i<msb.size(); ++i)
502  _msb[i] = _msb[i] || msb[i];
503  }
504  else fgMap_[id] = msb;
505 }
506 
508  if (algo <=0 && algo>2)
509  throw cms::Exception("ERROR: Only algo 1 & 2 are supported.") << std::endl;
511 }
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
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
tuple result
Definition: query.py:137
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