CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DataMixingHcalDigiWorker.cc
Go to the documentation of this file.
1 // File: DataMixingHcalDigiWorker.cc
2 // Description: see DataMixingHcalDigiWorker.h
3 // Author: Mike Hildreth, University of Notre Dame
4 //
5 //--------------------------------------------
6 
11 #include <map>
12 #include <memory>
13 // calibration headers, for future reference
16 //
17 //
19 
20 using namespace std;
21 
22 namespace {
23 
24  typedef std::multimap<DetId, CaloSamples> HcalDigiMap;
25 
26  template <class DIGI>
27  void convertFc2adc(const CaloSamples &fC, const HcalDbService &conditions, DIGI &digi, int capIdOffset = 0) {
28  HcalDetId id = fC.id();
29  const HcalQIECoder *channelCoder = conditions.getHcalCoder(id);
30  const HcalQIEShape *shape = conditions.getHcalShape(channelCoder);
31  HcalCoderDb coder(*channelCoder, *shape);
32  coder.fC2adc(fC, digi, capIdOffset);
33  }
34 
35  template <class DIGI>
36  void convertAdc2fChelper(const DIGI &digi, const HcalDbService &conditions, CaloSamples &fC, const HcalDetId &id) {
37  const HcalCalibrations &calib = conditions.getHcalCalibrations(id);
38  for (int i = 0; i < digi.size(); ++i) {
39  int capId(digi.sample(i).capid());
40  fC[i] -= calib.pedestal(capId);
41  }
42  }
43 
44  template <>
45  void convertAdc2fChelper<QIE10DataFrame>(const QIE10DataFrame &digi,
47  CaloSamples &fC,
48  const HcalDetId &id) {
49  const HcalCalibrations &calib = conditions.getHcalCalibrations(id);
50  for (int i = 0; i < digi.samples(); ++i) {
51  int capId(digi[i].capid());
52  fC[i] -= calib.pedestal(capId);
53  }
54  }
55 
56  template <>
57  void convertAdc2fChelper<QIE11DataFrame>(const QIE11DataFrame &digi,
59  CaloSamples &fC,
60  const HcalDetId &id) {
61  const HcalCalibrations &calib = conditions.getHcalCalibrations(id);
62  for (int i = 0; i < digi.samples(); ++i) {
63  int capId(digi[i].capid());
64  fC[i] -= calib.pedestal(capId);
65  }
66  }
67 
68  template <class DIGI>
69  void convertAdc2fC(const DIGI &digi, const HcalDbService &conditions, bool keepPedestals, CaloSamples &fC) {
70  HcalDetId id(digi.id());
71  const HcalQIECoder *channelCoder = conditions.getHcalCoder(id);
72  const HcalQIEShape *shape = conditions.getHcalShape(channelCoder);
73  HcalCoderDb coder(*channelCoder, *shape);
74  coder.adc2fC(digi, fC);
75  if (!keepPedestals) { // subtract pedestals
76  convertAdc2fChelper(digi, conditions, fC, id);
77  }
78  }
79 
80  template <class DIGIS>
81  void convertHcalDigis(const DIGIS &digis, const HcalDbService &conditions, bool keepPedestals, HcalDigiMap &map) {
82  for (auto digi = digis.begin(); digi != digis.end(); ++digi) {
83  CaloSamples fC;
84  convertAdc2fC(*digi, conditions, keepPedestals, fC);
85  if (!keepPedestals && map.find(digi->id()) == map.end()) {
86  edm::LogWarning("DataMixingHcalDigiWorker")
87  << "No signal hits found for HCAL cell " << digi->id() << " Pedestals may be lost for mixed hit";
88  }
89  map.insert(HcalDigiMap::value_type(digi->id(), fC));
90  }
91  }
92 
93  template <>
94  void convertHcalDigis<QIE10DigiCollection>(const QIE10DigiCollection &digis,
96  bool keepPedestals,
97  HcalDigiMap &map) {
98  for (auto digiItr = digis.begin(); digiItr != digis.end(); ++digiItr) {
99  QIE10DataFrame digi(*digiItr);
100  CaloSamples fC;
101  convertAdc2fC(digi, conditions, keepPedestals, fC);
102  if (!keepPedestals && map.find(digi.id()) == map.end()) {
103  edm::LogWarning("DataMixingHcalDigiWorker")
104  << "No signal hits found for HCAL cell " << digi.id() << " Pedestals may be lost for mixed hit";
105  }
106  map.insert(HcalDigiMap::value_type(digi.id(), fC));
107  }
108  }
109 
110  template <>
111  void convertHcalDigis<QIE11DigiCollection>(const QIE11DigiCollection &digis,
112  const HcalDbService &conditions,
113  bool keepPedestals,
114  HcalDigiMap &map) {
115  for (auto digiItr = digis.begin(); digiItr != digis.end(); ++digiItr) {
116  QIE11DataFrame digi(*digiItr);
117  CaloSamples fC;
118  convertAdc2fC(digi, conditions, keepPedestals, fC);
119  if (!keepPedestals && map.find(digi.id()) == map.end()) {
120  edm::LogWarning("DataMixingHcalDigiWorker")
121  << "No signal hits found for HCAL cell " << digi.id() << " Pedestals may be lost for mixed hit";
122  }
123  map.insert(HcalDigiMap::value_type(digi.id(), fC));
124  }
125  }
126 
127  template <class DIGIS>
128  bool convertSignalHcalDigis(const edm::Event &e,
130  const HcalDbService &conditions,
131  HcalDigiMap &map) {
132  edm::Handle<DIGIS> digis;
133  if (!e.getByToken(token, digis))
134  return false;
135  convertHcalDigis(*digis, conditions, true, map); // keep pedestals
136  return true;
137  }
138 
139  template <class DIGIS>
140  bool convertPileupHcalDigis(const edm::EventPrincipal &ep,
141  const edm::InputTag &tag,
142  const edm::ModuleCallingContext *mcc,
143  const HcalDbService &conditions,
144  HcalDigiMap &map) {
145  auto digis = edm::getProductByTag<DIGIS>(ep, tag, mcc);
146  if (!digis)
147  return false;
148  convertHcalDigis(*(digis->product()), conditions, false,
149  map); // subtract pedestals
150  return true;
151  }
152 
153  template <class DIGIS>
154  void buildHcalDigisHelper(DIGIS &digis,
155  const DetId &formerID,
156  CaloSamples &resultSample,
157  const HcalDbService &conditions) {
158  // make new digi
159  digis.push_back(typename DIGIS::value_type(formerID));
160  convertFc2adc(resultSample, conditions, digis.back(),
161  0); // FR guess: simulation starts with 0
162  }
163 
164  template <>
165  void buildHcalDigisHelper<QIE10DigiCollection>(QIE10DigiCollection &digis,
166  const DetId &formerID,
167  CaloSamples &resultSample,
168  const HcalDbService &conditions) {
169  // make new digi
170  digis.push_back(formerID.rawId());
171  QIE10DataFrame digi(digis.back());
172  convertFc2adc(resultSample, conditions, digi,
173  0); // FR guess: simulation starts with 0
174  }
175 
176  template <>
177  void buildHcalDigisHelper<QIE11DigiCollection>(QIE11DigiCollection &digis,
178  const DetId &formerID,
179  CaloSamples &resultSample,
180  const HcalDbService &conditions) {
181  // make new digi
182  digis.push_back(formerID.rawId());
183  QIE11DataFrame digi(digis.back());
184  convertFc2adc(resultSample, conditions, digi,
185  0); // FR guess: simulation starts with 0
186  }
187 
188  template <class DIGIS>
189  std::unique_ptr<DIGIS> buildHcalDigis(const HcalDigiMap &map, const HcalDbService &conditions) {
190  std::unique_ptr<DIGIS> digis(new DIGIS);
191  // loop over the maps we have, re-making individual hits or digis if
192  // necessary.
193  DetId formerID = 0;
194  CaloSamples resultSample;
195 
196  for (auto hit = map.begin(); hit != map.end(); ++hit) {
197  DetId currentID = hit->first;
198  const CaloSamples &hitSample = hit->second;
199 
200  if (currentID == formerID) { // accumulating hits
201  // loop over digi samples in each CaloSample
202  unsigned int sizenew = (hitSample).size();
203  unsigned int sizeold = resultSample.size();
204  if (sizenew > sizeold) { // extend sample
205  resultSample.setSize(sizenew);
206  }
207  for (unsigned int isamp = 0; isamp < sizenew; isamp++) { // add new values
208  resultSample[isamp] += hitSample[isamp]; // for debugging below
209  }
210  }
211  auto hit1 = hit;
212  bool lastEntry = (++hit1 == map.end());
213  if (currentID != formerID || lastEntry) { // store current digi
214  if (formerID > 0 || lastEntry) {
215  // make new digi
216  buildHcalDigisHelper(*digis, formerID, resultSample, conditions);
217  }
218  // reset pointers for next iteration
219  formerID = currentID;
220  resultSample = hitSample;
221  }
222  }
223  return digis;
224  }
225 
226 } // namespace
227 
228 namespace edm {
229 
230  // Virtual constructor
231 
232  DataMixingHcalDigiWorker::DataMixingHcalDigiWorker() {}
233 
234  // Constructor
235  DataMixingHcalDigiWorker::DataMixingHcalDigiWorker(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
236  : label_(ps.getParameter<std::string>("Label")) {
237  // get the subdetector names
238  // this->getSubdetectorNames(); //something like this may be useful to
239  // check what we are supposed to do...
240 
241  // declare the products to produce
242 
243  // Hcal
244 
245  HBHEdigiCollectionSig_ = ps.getParameter<edm::InputTag>("HBHEdigiCollectionSig");
246  HOdigiCollectionSig_ = ps.getParameter<edm::InputTag>("HOdigiCollectionSig");
247  HFdigiCollectionSig_ = ps.getParameter<edm::InputTag>("HFdigiCollectionSig");
248  ZDCdigiCollectionSig_ = ps.getParameter<edm::InputTag>("ZDCdigiCollectionSig");
249  QIE10digiCollectionSig_ = ps.getParameter<edm::InputTag>("QIE10digiCollectionSig");
250  QIE11digiCollectionSig_ = ps.getParameter<edm::InputTag>("QIE11digiCollectionSig");
251 
252  HBHEPileInputTag_ = ps.getParameter<edm::InputTag>("HBHEPileInputTag");
253  HOPileInputTag_ = ps.getParameter<edm::InputTag>("HOPileInputTag");
254  HFPileInputTag_ = ps.getParameter<edm::InputTag>("HFPileInputTag");
255  ZDCPileInputTag_ = ps.getParameter<edm::InputTag>("ZDCPileInputTag");
256  QIE10PileInputTag_ = ps.getParameter<edm::InputTag>("QIE10PileInputTag");
257  QIE11PileInputTag_ = ps.getParameter<edm::InputTag>("QIE11PileInputTag");
258 
264 
270 
271  DoZDC_ = false;
272  if (!ZDCPileInputTag_.label().empty())
273  DoZDC_ = true;
274 
275  if (DoZDC_) {
278  }
279 
280  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
281  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
282  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
283  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
284  QIE10DigiCollectionDM_ = ps.getParameter<std::string>("QIE10DigiCollectionDM");
285  QIE11DigiCollectionDM_ = ps.getParameter<std::string>("QIE11DigiCollectionDM");
286 
287  dbToken_ = iC.esConsumes<HcalDbService, HcalDbRecord>();
288  }
289 
290  // Virtual destructor needed.
292 
294  // Calibration stuff will look like this:
295  // get conditions
296  const auto &conditions = ES.getHandle(dbToken_);
297 
298  // fill in maps of hits
299 
300  LogInfo("DataMixingHcalDigiWorker") << "===============> adding MC signals for " << e.id();
301  convertSignalHcalDigis<HBHEDigiCollection>(e, HBHEDigiToken_, *conditions, HBHEDigiStorage_);
302  convertSignalHcalDigis<HODigiCollection>(e, HODigiToken_, *conditions, HODigiStorage_);
303  convertSignalHcalDigis<HFDigiCollection>(e, HFDigiToken_, *conditions, HFDigiStorage_);
304  convertSignalHcalDigis<QIE10DigiCollection>(e, QIE10DigiToken_, *conditions, QIE10DigiStorage_);
305  convertSignalHcalDigis<QIE11DigiCollection>(e, QIE11DigiToken_, *conditions, QIE11DigiStorage_);
306 
307  // ZDC next
308 
309  if (DoZDC_) {
310  Handle<ZDCDigiCollection> pZDCDigis;
311 
312  const ZDCDigiCollection *ZDCDigis = nullptr;
313 
314  if (e.getByToken(ZDCDigiToken_, pZDCDigis)) {
315  ZDCDigis = pZDCDigis.product(); // get a ptr to the product
316 #ifdef DEBUG
317  LogDebug("DataMixingHcalDigiWorker") << "total # ZDC digis: " << ZDCDigis->size();
318 #endif
319  }
320 
321  if (ZDCDigis) {
322  // loop over digis, storing them in a map so we can add pileup later
323  for (ZDCDigiCollection::const_iterator it = ZDCDigis->begin(); it != ZDCDigis->end(); ++it) {
324  // calibration, for future reference: (same block for all Hcal types)
325  // ZDC is different
326  HcalZDCDetId cell = it->id();
327  // const HcalCalibrations&
328  // calibrations=conditions->getHcalCalibrations(cell);
329  const HcalQIECoder *channelCoder = conditions->getHcalCoder(cell);
330  const HcalQIEShape *shape = conditions->getHcalShape(channelCoder); // this one is generic
331  HcalCoderDb coder(*channelCoder, *shape);
332 
333  CaloSamples tool;
334  coder.adc2fC((*it), tool);
335 
336  ZDCDigiStorage_.insert(ZDCDigiMap::value_type((it->id()), tool));
337 
338 #ifdef DEBUG
339  // Commented out because this does not compile anymore
340  // LogDebug("DataMixingHcalDigiWorker") << "processed ZDCDigi with
341  // rawId: "
342  // << it->id() << "\n"
343  // << " digi energy: " <<
344  // it->energy();
345 #endif
346  }
347  }
348  }
349 
350  } // end of addHCalSignals
351 
353  const EventPrincipal *ep,
354  unsigned int eventNr,
355  const edm::EventSetup &ES,
356  ModuleCallingContext const *mcc) {
357  LogDebug("DataMixingHcalDigiWorker") << "\n===============> adding pileups from event " << ep->id()
358  << " for bunchcrossing " << bcr;
359 
360  // get conditions
361  const auto &conditions = ES.getHandle(dbToken_);
362 
363  convertPileupHcalDigis<HBHEDigiCollection>(*ep, HBHEPileInputTag_, mcc, *conditions, HBHEDigiStorage_);
364  convertPileupHcalDigis<HODigiCollection>(*ep, HOPileInputTag_, mcc, *conditions, HODigiStorage_);
365  convertPileupHcalDigis<HFDigiCollection>(*ep, HFPileInputTag_, mcc, *conditions, HFDigiStorage_);
366  convertPileupHcalDigis<QIE10DigiCollection>(*ep, QIE10PileInputTag_, mcc, *conditions, QIE10DigiStorage_);
367  convertPileupHcalDigis<QIE11DigiCollection>(*ep, QIE11PileInputTag_, mcc, *conditions, QIE11DigiStorage_);
368 
369  // ZDC Next
370 
371  if (DoZDC_) {
372  std::shared_ptr<Wrapper<ZDCDigiCollection> const> ZDCDigisPTR =
373  getProductByTag<ZDCDigiCollection>(*ep, ZDCPileInputTag_, mcc);
374 
375  if (ZDCDigisPTR) {
376  const ZDCDigiCollection *ZDCDigis = const_cast<ZDCDigiCollection *>(ZDCDigisPTR->product());
377 
378  LogDebug("DataMixingHcalDigiWorker") << "total # ZDC digis: " << ZDCDigis->size();
379 
380  // loop over digis, adding these to the existing maps
381  for (ZDCDigiCollection::const_iterator it = ZDCDigis->begin(); it != ZDCDigis->end(); ++it) {
382  // calibration, for future reference: (same block for all Hcal types)
383  // ZDC is different
384  HcalZDCDetId cell = it->id();
385  const HcalQIECoder *channelCoder = conditions->getHcalCoder(cell);
386  const HcalQIEShape *shape = conditions->getHcalShape(channelCoder); // this one is generic
387  HcalCoderDb coder(*channelCoder, *shape);
388 
389  CaloSamples tool;
390  coder.adc2fC((*it), tool);
391 
392  ZDCDigiStorage_.insert(ZDCDigiMap::value_type((it->id()), tool));
393 
394 #ifdef DEBUG
395  // Commented out because this does not compile anymore
396  // LogDebug("DataMixingHcalDigiWorker") << "processed ZDCDigi with
397  // rawId: "
398  // << it->id() << "\n"
399  // << " digi energy: " <<
400  // it->energy();
401 #endif
402  }
403  }
404  }
405  }
406 
408  const auto &conditions = ES.getHandle(dbToken_);
409 
410  // collection of digis to put in the event
411  std::unique_ptr<HBHEDigiCollection> HBHEdigis = buildHcalDigis<HBHEDigiCollection>(HBHEDigiStorage_, *conditions);
412  std::unique_ptr<HODigiCollection> HOdigis = buildHcalDigis<HODigiCollection>(HODigiStorage_, *conditions);
413  std::unique_ptr<HFDigiCollection> HFdigis = buildHcalDigis<HFDigiCollection>(HFDigiStorage_, *conditions);
414  std::unique_ptr<QIE10DigiCollection> QIE10digis =
415  buildHcalDigis<QIE10DigiCollection>(QIE10DigiStorage_, *conditions);
416  std::unique_ptr<QIE11DigiCollection> QIE11digis =
417  buildHcalDigis<QIE11DigiCollection>(QIE11DigiStorage_, *conditions);
418  std::unique_ptr<ZDCDigiCollection> ZDCdigis(new ZDCDigiCollection);
419 
420  // loop over the maps we have, re-making individual hits or digis if
421  // necessary.
422  DetId formerID = 0;
423  DetId currentID;
424 
425  double fC_new;
426  double fC_old;
427  double fC_sum;
428 
429  // ZDC next...
430 
431  // loop over the maps we have, re-making individual hits or digis if
432  // necessary.
433  formerID = 0;
434  CaloSamples ZDC_old;
435 
436  ZDCDigiMap::const_iterator iZDCchk;
437 
438  for (ZDCDigiMap::const_iterator iZDC = ZDCDigiStorage_.begin(); iZDC != ZDCDigiStorage_.end(); ++iZDC) {
439  currentID = iZDC->first;
440 
441  if (currentID == formerID) { // we have to add these digis together
442 
443  // loop over digi samples in each CaloSample
444  unsigned int sizenew = (iZDC->second).size();
445  unsigned int sizeold = ZDC_old.size();
446 
447  unsigned int max_samp = std::max(sizenew, sizeold);
448 
449  CaloSamples ZDC_bigger(currentID, max_samp);
450 
451  bool usenew = false;
452 
453  if (sizenew > sizeold)
454  usenew = true;
455 
456  // samples from different events can be of different lengths - sum all
457  // that overlap.
458 
459  for (unsigned int isamp = 0; isamp < max_samp; isamp++) {
460  if (isamp < sizenew) {
461  fC_new = (iZDC->second)[isamp];
462  } else {
463  fC_new = 0;
464  }
465 
466  if (isamp < sizeold) {
467  fC_old = ZDC_old[isamp];
468  } else {
469  fC_old = 0;
470  }
471 
472  // add values
473  fC_sum = fC_new + fC_old;
474 
475  if (usenew) {
476  ZDC_bigger[isamp] = fC_sum;
477  } else {
478  ZDC_old[isamp] = fC_sum;
479  } // overwrite old sample, adding new info
480  }
481  if (usenew)
482  ZDC_old = ZDC_bigger; // save new, larger sized sample in "old" slot
483 
484  } else {
485  if (formerID > 0) {
486  // make new digi
487  ZDCdigis->push_back(ZDCDataFrame(formerID));
488 
489  // set up information to convert back
490 
491  HcalZDCDetId cell = ZDC_old.id();
492  const HcalQIECoder *channelCoder = conditions->getHcalCoder(cell);
493  const HcalQIEShape *shape = conditions->getHcalShape(channelCoder); // this one is generic
494  HcalCoderDb coder(*channelCoder, *shape);
495 
496  unsigned int sizeold = ZDC_old.size();
497  for (unsigned int isamp = 0; isamp < sizeold; isamp++) {
498  coder.fC2adc(ZDC_old, (ZDCdigis->back()),
499  1); // as per simulation, capid=1
500  }
501  }
502  // save pointers for next iteration
503  formerID = currentID;
504  ZDC_old = iZDC->second;
505  }
506 
507  iZDCchk = iZDC;
508  if ((++iZDCchk) == ZDCDigiStorage_.end()) { // make sure not to lose the last one
509  // make new digi
510  ZDCdigis->push_back(ZDCDataFrame(currentID));
511 
512  // set up information to convert back
513 
514  HcalZDCDetId cell = (iZDC->second).id();
515  const HcalQIECoder *channelCoder = conditions->getHcalCoder(cell);
516  const HcalQIEShape *shape = conditions->getHcalShape(channelCoder); // this one is generic
517  HcalCoderDb coder(*channelCoder, *shape);
518 
519  unsigned int sizeold = (iZDC->second).size();
520  for (unsigned int isamp = 0; isamp < sizeold; isamp++) {
521  coder.fC2adc(ZDC_old, (ZDCdigis->back()),
522  1); // as per simulation, capid=1
523  }
524  }
525  }
526 
527  // done merging
528 
529  // put the collection of recunstructed hits in the event
530  LogInfo("DataMixingHcalDigiWorker") << "total # HBHE Merged digis: " << HBHEdigis->size();
531  LogInfo("DataMixingHcalDigiWorker") << "total # HO Merged digis: " << HOdigis->size();
532  LogInfo("DataMixingHcalDigiWorker") << "total # HF Merged digis: " << HFdigis->size();
533  LogInfo("DataMixingHcalDigiWorker") << "total # QIE10 Merged digis: " << QIE10digis->size();
534  LogInfo("DataMixingHcalDigiWorker") << "total # QIE11 Merged digis: " << QIE11digis->size();
535  LogInfo("DataMixingHcalDigiWorker") << "total # ZDC Merged digis: " << ZDCdigis->size();
536 
537  e.put(std::move(HBHEdigis), HBHEDigiCollectionDM_);
538  e.put(std::move(HOdigis), HODigiCollectionDM_);
539  e.put(std::move(HFdigis), HFDigiCollectionDM_);
540  e.put(std::move(QIE10digis), QIE10DigiCollectionDM_);
541  e.put(std::move(QIE11digis), QIE11DigiCollectionDM_);
542  e.put(std::move(ZDCdigis), ZDCDigiCollectionDM_);
543 
544  // clear local storage after this event
545  HBHEDigiStorage_.clear();
546  HODigiStorage_.clear();
547  HFDigiStorage_.clear();
548  QIE10DigiStorage_.clear();
549  QIE11DigiStorage_.clear();
550  ZDCDigiStorage_.clear();
551  }
552 
553 } // namespace edm
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::EDGetTokenT< HBHEDigiCollection > HBHEDigiPToken_
edm::EDGetTokenT< HODigiCollection > HODigiToken_
uint16_t *__restrict__ id
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< ZDCDigiCollection > ZDCDigiToken_
void setSize(unsigned int size)
Definition: CaloSamples.h:55
void fC2adc(const CaloSamples &clf, HBHEDataFrame &df, int fCapIdOffset) const override
Definition: HcalCoderDb.cc:81
edm::EDGetTokenT< HODigiCollection > HODigiPToken_
EventID const & id() const
std::vector< T >::const_iterator const_iterator
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES, ModuleCallingContext const *)
edm::EDGetTokenT< ZDCDigiCollection > ZDCDigiPToken_
void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const override
Definition: HcalCoderDb.cc:73
edm::EDGetTokenT< HFDigiCollection > HFDigiPToken_
void putHcal(edm::Event &e, const edm::EventSetup &ES)
edm::ESGetToken< HcalDbService, HcalDbRecord > dbToken_
def move
Definition: eostools.py:511
const_iterator end() const
Log< level::Info, false > LogInfo
Definition: DetId.h:17
constexpr double pedestal(int fCapId) const
get pedestal for capid=0..3
T const * product() const
Definition: Handle.h:70
int size() const
get the size
Definition: CaloSamples.h:24
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
edm::EDGetTokenT< HFDigiCollection > HFDigiToken_
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< QIE11DigiCollection > QIE11DigiToken_
edm::EventID id() const
Definition: EventBase.h:59
size_type size() const
DetId id() const
get the (generic) id
Definition: CaloSamples.h:21
edm::EDGetTokenT< QIE11DigiCollection > QIE11DigiPToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
Log< level::Warning, false > LogWarning
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES)
edm::EDGetTokenT< QIE10DigiCollection > QIE10DigiToken_
tuple size
Write out results.
edm::EDGetTokenT< QIE10DigiCollection > QIE10DigiPToken_
const_iterator begin() const
edm::EDGetTokenT< HBHEDigiCollection > HBHEDigiToken_
#define LogDebug(id)