CMS 3D CMS Logo

EcalSelectiveReadoutProducer.cc
Go to the documentation of this file.
10 //#include "DataFormats/EcalDigi/interface/EcalMGPASample.h"
11 
13 
14 #include <memory>
15 #include <fstream>
16 #include <atomic>
17 
18 using namespace std;
19 
21  : params_(params), firstCallEB_(true), firstCallEE_(true), iEvent_(1) {
22  //settings:
23  // settings which are only in python config files:
24  digiProducer_ = params.getParameter<string>("digiProducer");
25  ebdigiCollection_ = params.getParameter<std::string>("EBdigiCollection");
26  eedigiCollection_ = params.getParameter<std::string>("EEdigiCollection");
27  ebSRPdigiCollection_ = params.getParameter<std::string>("EBSRPdigiCollection");
28  eeSRPdigiCollection_ = params.getParameter<std::string>("EESRPdigiCollection");
29  ebSrFlagCollection_ = params.getParameter<std::string>("EBSrFlagCollection");
30  eeSrFlagCollection_ = params.getParameter<std::string>("EESrFlagCollection");
31  trigPrimProducer_ = params.getParameter<string>("trigPrimProducer");
32  trigPrimCollection_ = params.getParameter<string>("trigPrimCollection");
33  trigPrimBypass_ = params.getParameter<bool>("trigPrimBypass");
34  trigPrimBypassMode_ = params.getParameter<int>("trigPrimBypassMode");
35  dumpFlags_ = params.getUntrackedParameter<int>("dumpFlags", 0);
36  writeSrFlags_ = params.getUntrackedParameter<bool>("writeSrFlags", false);
37  produceDigis_ = params.getUntrackedParameter<bool>("produceDigis", true);
38  // settings which can come from either condition database or python configuration file:
39  useCondDb_ = false;
40  try {
41  if (params.getParameter<bool>("configFromCondDB")) {
42  useCondDb_ = true;
43  }
44  } catch (cms::Exception const&) {
45  /* pameter not found */
46  edm::LogWarning("EcalSelectiveReadout") << "Parameter configFromCondDB of EcalSelectiveReadout module not found. "
47  "Selective readout configuration will be read from python file.";
48  }
49  if (!useCondDb_) {
50  settingsFromFile_ = unique_ptr<EcalSRSettings>(new EcalSRSettings());
53  }
54 
55  //declares the products made by this producer:
56  if (produceDigis_) {
57  produces<EBDigiCollection>(ebSRPdigiCollection_);
58  produces<EEDigiCollection>(eeSRPdigiCollection_);
59  }
60 
61  if (writeSrFlags_) {
62  produces<EBSrFlagCollection>(ebSrFlagCollection_);
63  produces<EESrFlagCollection>(eeSrFlagCollection_);
64  }
65 
66  useFullReadout_ = false;
67  useFullReadout_ = params.getParameter<bool>("UseFullReadout");
68 
69  theGeometry = nullptr;
70  theTriggerTowerMap = nullptr;
71  theElecMap = nullptr;
72 
73  EB_token = consumes<EBDigiCollection>(edm::InputTag(digiProducer_, ebdigiCollection_));
74  EE_token = consumes<EEDigiCollection>(edm::InputTag(digiProducer_, eedigiCollection_));
75  ;
76  EcTP_token = consumes<EcalTrigPrimDigiCollection>(edm::InputTag(trigPrimProducer_, trigPrimCollection_));
77  ;
78 }
79 
81 
83  if (useCondDb_) {
84  //getting selective readout configuration:
86 
87  if (useFullReadout_) {
88  eventSetup.get<EcalSRSettingsRcd>().get("fullReadout", hSr);
89  } else {
90  eventSetup.get<EcalSRSettingsRcd>().get(hSr);
91  }
92  settings_ = hSr.product();
93  }
94 
95  //gets the trigger primitives:
96  EcalTrigPrimDigiCollection emptyTPColl;
97  const EcalTrigPrimDigiCollection* trigPrims =
98  (trigPrimBypass_ && trigPrimBypassMode_ == 0) ? &emptyTPColl : getTrigPrims(event);
99 
100  //gets the digis from the events:
101  EBDigiCollection dummyEbDigiColl;
102  EEDigiCollection dummyEeDigiColl;
103 
104  const EBDigiCollection* ebDigis = produceDigis_ ? getEBDigis(event) : &dummyEbDigiColl;
105  const EEDigiCollection* eeDigis = produceDigis_ ? getEEDigis(event) : &dummyEeDigiColl;
106 
107  //runs the selective readout algorithm:
108  unique_ptr<EBDigiCollection> selectedEBDigis;
109  unique_ptr<EEDigiCollection> selectedEEDigis;
110  unique_ptr<EBSrFlagCollection> ebSrFlags;
111  unique_ptr<EESrFlagCollection> eeSrFlags;
112 
113  if (produceDigis_) {
114  selectedEBDigis = unique_ptr<EBDigiCollection>(new EBDigiCollection);
115  selectedEEDigis = unique_ptr<EEDigiCollection>(new EEDigiCollection);
116  }
117 
118  if (writeSrFlags_) {
119  ebSrFlags = unique_ptr<EBSrFlagCollection>(new EBSrFlagCollection);
120  eeSrFlags = unique_ptr<EESrFlagCollection>(new EESrFlagCollection);
121  }
122 
123  if (suppressor_.get() == nullptr) {
124  //Check the validity of EcalSRSettings
126 
127  //instantiates the selective readout algorithm:
128  suppressor_ = unique_ptr<EcalSelectiveReadoutSuppressor>(new EcalSelectiveReadoutSuppressor(params_, settings_));
129 
130  // check that everything is up-to-date
131  checkGeometry(eventSetup);
132  checkTriggerMap(eventSetup);
133  checkElecMap(eventSetup);
134  }
135 
136  suppressor_->run(eventSetup,
137  *trigPrims,
138  *ebDigis,
139  *eeDigis,
140  selectedEBDigis.get(),
141  selectedEEDigis.get(),
142  ebSrFlags.get(),
143  eeSrFlags.get());
144 
145  if (dumpFlags_ >= iEvent_) {
146  ofstream ttfFile("TTF.txt", (iEvent_ == 1 ? ios::trunc : ios::app));
147  suppressor_->printTTFlags(ttfFile, iEvent_, iEvent_ == 1 ? true : false);
148 
149  ofstream srfFile("SRF.txt", (iEvent_ == 1 ? ios::trunc : ios::app));
150  if (iEvent_ == 1) {
151  suppressor_->getEcalSelectiveReadout()->printHeader(srfFile);
152  }
153  srfFile << "# Event " << iEvent_ << "\n";
154  suppressor_->getEcalSelectiveReadout()->print(srfFile);
155  srfFile << "\n";
156 
157  ofstream afFile("AF.txt", (iEvent_ == 1 ? ios::trunc : ios::app));
158  printSrFlags(afFile, *ebSrFlags, *eeSrFlags, iEvent_, iEvent_ == 1 ? true : false);
159  }
160 
161  ++iEvent_; //event counter
162 
163  if (produceDigis_) {
164  //puts the selected digis into the event:
165  event.put(std::move(selectedEBDigis), ebSRPdigiCollection_);
166  event.put(std::move(selectedEEDigis), eeSRPdigiCollection_);
167  }
168 
169  //puts the SR flags into the event:
170  if (writeSrFlags_) {
171  event.put(std::move(ebSrFlags), ebSrFlagCollection_);
172  event.put(std::move(eeSrFlags), eeSrFlagCollection_);
173  }
174 }
175 
178  event.getByToken(EB_token, hEBDigis);
179  //product() method is called before id() in order to get an exception
180  //if the handle is not available (check not done by id() method).
181  const EBDigiCollection* result = hEBDigis.product();
182  if (firstCallEB_) {
183  checkWeights(event, hEBDigis.id());
184  firstCallEB_ = false;
185  }
186  return result;
187 }
188 
191  event.getByToken(EE_token, hEEDigis);
192  //product() method is called before id() in order to get an exception
193  //if the handle is not available (check not done by id() method).
194  const EEDigiCollection* result = hEEDigis.product();
195  if (firstCallEE_) {
196  checkWeights(event, hEEDigis.id());
197  firstCallEE_ = false;
198  }
199  return result;
200 }
201 
204  event.getByToken(EcTP_token, hTPDigis);
205  return hTPDigis.product();
206 }
207 
209  edm::ESHandle<CaloGeometry> hGeometry;
210  eventSetup.get<CaloGeometryRecord>().get(hGeometry);
211 
212  const CaloGeometry* pGeometry = &*hGeometry;
213 
214  // see if we need to update
215  if (pGeometry != theGeometry) {
216  theGeometry = pGeometry;
217  suppressor_->setGeometry(theGeometry);
218  }
219 }
220 
223  eventSetup.get<IdealGeometryRecord>().get(eTTmap);
224 
225  const EcalTrigTowerConstituentsMap* pMap = &*eTTmap;
226 
227  // see if we need to update
228  if (pMap != theTriggerTowerMap) {
229  theTriggerTowerMap = pMap;
230  suppressor_->setTriggerMap(theTriggerTowerMap);
231  }
232 }
233 
236  eventSetup.get<EcalMappingRcd>().get(eElecmap);
237 
238  const EcalElectronicsMapping* pMap = &*eElecmap;
239 
240  // see if we need to update
241  if (pMap != theElecMap) {
242  theElecMap = pMap;
243  suppressor_->setElecMap(theElecMap);
244  }
245 }
246 
248  const char tccFlagMarker[] = {'x', '.', 'S', '?', 'C', 'E', 'E', 'E', 'E'};
251 
252  //static bool firstCall=true;
253  // if(firstCall){
254  // firstCall=false;
255  os << "# TCC flag map\n#\n"
256  "# +-->Phi "
257  << tccFlagMarker[0 + 1]
258  << ": 000 (low interest)\n"
259  "# | "
260  << tccFlagMarker[1 + 1]
261  << ": 001 (mid interest)\n"
262  "# | "
263  << tccFlagMarker[2 + 1]
264  << ": 010 (not valid)\n"
265  "# V Eta "
266  << tccFlagMarker[3 + 1]
267  << ": 011 (high interest)\n"
268  "# "
269  << tccFlagMarker[4 + 1]
270  << ": 1xx forced readout (Hw error)\n"
271  "#\n";
272  //}
273 
274  vector<vector<int> > ttf(nEta, vector<int>(nPhi, -1));
275  for (EcalTrigPrimDigiCollection::const_iterator it = tp.begin(); it != tp.end(); ++it) {
276  const EcalTriggerPrimitiveDigi& trigPrim = *it;
277  if (trigPrim.size() > 0) {
278  int iEta = trigPrim.id().ieta();
279  int iEta0 = iEta < 0 ? iEta + nEta / 2 : iEta + nEta / 2 - 1;
280  int iPhi0 = trigPrim.id().iphi() - 1;
281  ttf[iEta0][iPhi0] = trigPrim.ttFlag();
282  }
283  }
284  for (int iEta = 0; iEta < nEta; ++iEta) {
285  for (int iPhi = 0; iPhi < nPhi; ++iPhi) {
286  os << tccFlagMarker[ttf[iEta][iPhi] + 1];
287  }
288  os << "\n";
289  }
290 }
291 
292 void EcalSelectiveReadoutProducer::checkWeights(const edm::Event& evt, const edm::ProductID& noZsDigiId) const {
293  const vector<float>& weights =
294  settings_->dccNormalizedWeights_[0]; //params_.getParameter<vector<double> >("dccNormalizedWeights");
296  static std::atomic<bool> warnWeightCnt{true};
297  bool expected = true;
298  if ((int)weights.size() > nFIRTaps &&
299  warnWeightCnt.compare_exchange_strong(expected, false, std::memory_order_acq_rel)) {
300  edm::LogWarning("Configuration") << "The list of DCC zero suppression FIR "
301  "weights given in parameter dccNormalizedWeights is longer "
302  "than the expected depth of the FIR filter :("
303  << nFIRTaps
304  << "). "
305  "The last weights will be discarded.";
306  }
307 
308  if (!weights.empty()) {
309  int iMaxWeight = 0;
310  double maxWeight = weights[iMaxWeight];
311  //looks for index of maximum weight
312  for (unsigned i = 0; i < weights.size(); ++i) {
313  if (weights[i] > maxWeight) {
314  iMaxWeight = i;
315  maxWeight = weights[iMaxWeight];
316  }
317  }
318 
319  //position of time sample whose maximum weight is applied:
320  int maxWeightBin = settings_->ecalDccZs1stSample_[0] //params_.getParameter<int>("ecalDccZs1stSample")
321  + iMaxWeight;
322 
323  //gets the bin of maximum (in case of raw data it will not exist)
324  int binOfMax = 0;
325  bool rc = getBinOfMax(evt, noZsDigiId, binOfMax);
326 
327  if (rc && maxWeightBin != binOfMax) {
328  edm::LogWarning("Configuration") << "The maximum weight of DCC zero suppression FIR filter is not "
329  "applied to the expected maximum sample("
330  << binOfMax
331  << (binOfMax == 1 ? "st"
332  : (binOfMax == 2 ? "nd" : (binOfMax == 3 ? "rd" : "th")))
333  << " time sample). This may indicate faulty 'dccNormalizedWeights' "
334  "or 'ecalDccZs1sSample' parameters.";
335  }
336  }
337 }
338 
340  const edm::ProductID& noZsDigiId,
341  int& binOfMax) const {
342  bool rc;
343  const edm::Provenance p = evt.getProvenance(noZsDigiId);
345  vector<string> ebDigiParamList = result.getParameterNames();
346  string bofm("binOfMaximum");
347  if (find(ebDigiParamList.begin(), ebDigiParamList.end(), bofm) != ebDigiParamList.end()) { //bofm found
348  binOfMax = result.getParameter<int>("binOfMaximum");
349  rc = true;
350  } else {
351  rc = false;
352  }
353  return rc;
354 }
355 
357  const EBSrFlagCollection& ebSrFlags,
358  const EESrFlagCollection& eeSrFlags,
359  int iEvent,
360  bool withHeader) {
361  const char srpFlagMarker[] = {'.', 'z', 'Z', 'F', '4', '5', '6', '7'};
362  if (withHeader) {
363  time_t t;
364  time(&t);
365  const char* date = ctime(&t);
366  os << "#SRP flag map\n#\n"
367  "# Generatied on: "
368  << date
369  << "\n#\n"
370  "# +-->Phi/Y "
371  << srpFlagMarker[0]
372  << ": suppressed\n"
373  "# | "
374  << srpFlagMarker[1]
375  << ": ZS 1\n"
376  "# | "
377  << srpFlagMarker[2]
378  << ": ZS 2\n"
379  "# V Eta/X "
380  << srpFlagMarker[3]
381  << ": full readout\n"
382  "#\n";
383  }
384 
385  //EE-,EB,EE+ map wil be written onto file in following format:
386  //
387  // 72
388  // <-------------->
389  // 20
390  // <--->
391  // EEE A +-----> Y
392  // EEEEE | |
393  // EE EE | 20 EE- |
394  // EEEEE | |
395  // EEE V V X
396  // BBBBBBBBBBBBBBBBB A
397  // BBBBBBBBBBBBBBBBB | +-----> Phi
398  // BBBBBBBBBBBBBBBBB | |
399  // BBBBBBBBBBBBBBBBB | 34 EB |
400  // BBBBBBBBBBBBBBBBB | |
401  // BBBBBBBBBBBBBBBBB | V Eta
402  // BBBBBBBBBBBBBBBBB |
403  // BBBBBBBBBBBBBBBBB |
404  // BBBBBBBBBBBBBBBBB V
405  // EEE A +-----> Y
406  // EEEEE | |
407  // EE EE | 20 EE+ |
408  // EEEEE | |
409  // EEE V V X
410  //
411  //
412  //
413  //
414  //event header:
415  if (iEvent >= 0) {
416  os << "# Event " << iEvent << "\n";
417  }
418 
419  //retrieve flags:
420  const int nEndcaps = 2;
421  const int nScX = 20;
422  const int nScY = 20;
423  int eeSrf[nEndcaps][nScX][nScY];
424  for (size_t i = 0; i < sizeof(eeSrf) / sizeof(int); ((int*)eeSrf)[i++] = -1) {
425  };
426  for (EESrFlagCollection::const_iterator it = eeSrFlags.begin(); it != eeSrFlags.end(); ++it) {
427  const EESrFlag& flag = *it;
428  int iZ0 = flag.id().zside() > 0 ? 1 : 0;
429  int iX0 = flag.id().ix() - 1;
430  int iY0 = flag.id().iy() - 1;
431  assert(iZ0 >= 0 && iZ0 < nEndcaps);
432  assert(iX0 >= 0 && iX0 < nScX);
433  assert(iY0 >= 0 && iY0 < nScY);
434  eeSrf[iZ0][iX0][iY0] = flag.value();
435  }
436  const int nEbTtEta = 34;
437  const int nEeTtEta = 11;
438  const int nTtEta = nEeTtEta * 2 + nEbTtEta;
439  const int nTtPhi = 72;
440  int ebSrf[nEbTtEta][nTtPhi];
441  for (size_t i = 0; i < sizeof(ebSrf) / sizeof(int); ((int*)ebSrf)[i++] = -1) {
442  };
443  for (EBSrFlagCollection::const_iterator it = ebSrFlags.begin(); it != ebSrFlags.end(); ++it) {
444  const EBSrFlag& flag = *it;
445  int iEta = flag.id().ieta();
446  int iEta0 = iEta + nTtEta / 2 - (iEta >= 0 ? 1 : 0); //0->55 from eta=-3 to eta=3
447  int iEbEta0 = iEta0 - nEeTtEta; //0->33 from eta=-1.48 to eta=1.48
448  int iPhi0 = flag.id().iphi() - 1;
449  assert(iEbEta0 >= 0 && iEbEta0 < nEbTtEta);
450  assert(iPhi0 >= 0 && iPhi0 < nTtPhi);
451 
452  // cout << __FILE__ << ":" << __LINE__ << ": "
453  // << iEta << "\t" << flag.id().iphi() << " -> "
454  // << iEbEta0 << "\t" << iPhi0
455  // << "... Flag: " << flag.value() << "\n";
456 
457  ebSrf[iEbEta0][iPhi0] = flag.value();
458  }
459 
460  //print flags:
461 
462  //EE-
463  for (int iX0 = 0; iX0 < nScX; ++iX0) {
464  for (int iY0 = 0; iY0 < nScY; ++iY0) {
465  int srFlag = eeSrf[0][iX0][iY0];
466  assert(srFlag >= -1 && srFlag < (int)(sizeof(srpFlagMarker) / sizeof(srpFlagMarker[0])));
467  os << (srFlag == -1 ? ' ' : srpFlagMarker[srFlag]);
468  }
469  os << "\n"; //one Y supercystal column per line
470  } //next supercrystal X-index
471 
472  //EB
473  for (int iEta0 = 0; iEta0 < nEbTtEta; ++iEta0) {
474  for (int iPhi0 = 0; iPhi0 < nTtPhi; ++iPhi0) {
475  int srFlag = ebSrf[iEta0][iPhi0];
476  assert(srFlag >= -1 && srFlag < (int)(sizeof(srpFlagMarker) / sizeof(srpFlagMarker[0])));
477  os << (srFlag == -1 ? '?' : srpFlagMarker[srFlag]);
478  }
479  os << "\n"; //one phi per line
480  }
481 
482  //EE+
483  for (int iX0 = 0; iX0 < nScX; ++iX0) {
484  for (int iY0 = 0; iY0 < nScY; ++iY0) {
485  int srFlag = eeSrf[1][iX0][iY0];
486  assert(srFlag >= -1 && srFlag < (int)(sizeof(srpFlagMarker) / sizeof(srpFlagMarker[0])));
487  os << (srFlag == -1 ? ' ' : srpFlagMarker[srFlag]);
488  }
489  os << "\n"; //one Y supercystal column per line
490  } //next supercrystal X-index
491 
492  //event trailer:
493  os << "\n";
494 }
495 
497  if (settings.dccNormalizedWeights_.size() != 1) {
498  throw cms::Exception("Configuration")
499  << "Selective readout emulator, EcalSelectiveReadout, supports only single set of ZS weights. "
500  "while the configuration contains "
501  << settings.dccNormalizedWeights_.size() << " set(s)\n";
502  }
503 
504  // if(settings.dccNormalizedWeights_.size() != 1
505  // && settings.dccNormalizedWeights_.size() != 2
506  // && settings.dccNormalizedWeights_.size() != 54
507  // && settings.dccNormalizedWeights_.size() != 75848){
508  // throw cms::Exception("Configuration") << "Invalid number of DCC weight set (" << settings.dccNormalizedWeights_.size()
509  // << ") in condition object EcalSRSetting::dccNormalizedWeights_. "
510  // << "Valid counts are: 1 (single set), 2 (EB and EE), 54 (one per DCC) and 75848 "
511  // "(one per crystal)\n";
512  // }
513 
514  if (settings.dccNormalizedWeights_.size() != settings.ecalDccZs1stSample_.size()) {
515  throw cms::Exception("Configuration")
516  << "Inconsistency between number of weigth sets (" << settings.dccNormalizedWeights_.size() << ") and "
517  << "number of ecalDccZs1Sample values (" << settings.ecalDccZs1stSample_.size() << ").";
518  }
519 }
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
EcalSRCondTools::importParameterSet
static void importParameterSet(EcalSRSettings &sr, const edm::ParameterSet &ps)
Definition: EcalSRCondTools.cc:149
EcalSelectiveReadoutProducer::settingsFromFile_
std::unique_ptr< EcalSRSettings > settingsFromFile_
Definition: EcalSelectiveReadoutProducer.h:141
EcalTriggerPrimitiveDigi::size
int size() const
Definition: EcalTriggerPrimitiveDigi.h:30
EESrFlag
Definition: EESrFlag.h:13
EcalSelectiveReadoutSuppressor::getFIRTapCount
static int getFIRTapCount()
Definition: EcalSelectiveReadoutSuppressor.h:30
HLT_2018_cff.weights
weights
Definition: HLT_2018_cff.py:87167
mps_fire.i
i
Definition: mps_fire.py:355
EcalTrigTowerDetId::iphi
int iphi() const
get the tower iphi
Definition: EcalTrigTowerDetId.h:52
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
MessageLogger.h
EcalSelectiveReadoutProducer::checkWeights
void checkWeights(const edm::Event &evt, const edm::ProductID &noZSDigiId) const
Definition: EcalSelectiveReadoutProducer.cc:292
EcalSelectiveReadoutProducer::printTTFlags
void printTTFlags(const EcalTrigPrimDigiCollection &tp, std::ostream &os) const
Definition: EcalSelectiveReadoutProducer.cc:247
EcalSRSettingsRcd.h
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ESHandle.h
EcalSelectiveReadoutProducer::digiProducer_
std::string digiProducer_
Definition: EcalSelectiveReadoutProducer.h:85
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
EcalSelectiveReadoutProducer::EE_token
edm::EDGetTokenT< EEDigiCollection > EE_token
Definition: EcalSelectiveReadoutProducer.h:146
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EcalSelectiveReadoutProducer::trigPrimCollection_
std::string trigPrimCollection_
Definition: EcalSelectiveReadoutProducer.h:93
cms::cuda::assert
assert(be >=bs)
edm::SortedCollection
Definition: SortedCollection.h:49
EcalSelectiveReadoutProducer::getBinOfMax
bool getBinOfMax(const edm::Event &evt, const edm::ProductID &noZsDigiId, int &binOfMax) const
Definition: EcalSelectiveReadoutProducer.cc:339
EcalSelectiveReadoutProducer::useFullReadout_
bool useFullReadout_
Definition: EcalSelectiveReadoutProducer.h:130
EcalSelectiveReadoutProducer::EcalSelectiveReadoutProducer
EcalSelectiveReadoutProducer(const edm::ParameterSet &params)
Definition: EcalSelectiveReadoutProducer.cc:20
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle< EBDigiCollection >
EcalTriggerPrimitiveDigi::ttFlag
int ttFlag() const
get the Trigger tower Flag of interesting sample
Definition: EcalTriggerPrimitiveDigi.cc:36
EcalSelectiveReadoutProducer::printSrFlags
static void printSrFlags(std::ostream &os, const EBSrFlagCollection &ebSrFlags, const EESrFlagCollection &eeSrFlags, int iEvent=-1, bool withHeader=true)
Definition: EcalSelectiveReadoutProducer.cc:356
EcalSelectiveReadoutProducer::EcTP_token
edm::EDGetTokenT< EcalTrigPrimDigiCollection > EcTP_token
Definition: EcalSelectiveReadoutProducer.h:147
EcalSelectiveReadoutProducer::getTrigPrims
const EcalTrigPrimDigiCollection * getTrigPrims(edm::Event &event) const
Definition: EcalSelectiveReadoutProducer.cc:202
EcalSelectiveReadoutProducer::ebdigiCollection_
std::string ebdigiCollection_
Definition: EcalSelectiveReadoutProducer.h:86
CaloGeometry
Definition: CaloGeometry.h:21
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
nEndcaps
const static int nEndcaps
Definition: GenABIO.cc:115
EcalSelectiveReadoutProducer::checkValidity
static void checkValidity(const EcalSRSettings &settings)
Definition: EcalSelectiveReadoutProducer.cc:496
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
srpFlagMarker
const char srpFlagMarker[]
Definition: GenABIO.cc:163
EcalSelectiveReadoutProducer::produceDigis_
bool produceDigis_
Definition: EcalSelectiveReadoutProducer.h:116
EcalSelectiveReadoutProducer::writeSrFlags_
bool writeSrFlags_
Definition: EcalSelectiveReadoutProducer.h:111
EBSrFlag
Definition: EBSrFlag.h:13
EcalSelectiveReadoutProducer::~EcalSelectiveReadoutProducer
~EcalSelectiveReadoutProducer() override
Definition: EcalSelectiveReadoutProducer.cc:80
EcalMappingRcd.h
edm::ESHandle
Definition: DTSurvey.h:22
OrderedSet.t
t
Definition: OrderedSet.py:90
EcalSelectiveReadoutProducer::ebSrFlagCollection_
std::string ebSrFlagCollection_
Definition: EcalSelectiveReadoutProducer.h:90
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
EcalSelectiveReadoutProducer::trigPrimProducer_
std::string trigPrimProducer_
Definition: EcalSelectiveReadoutProducer.h:92
CaloGeometryRecord.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
EcalTrigTowerConstituentsMap
Definition: EcalTrigTowerConstituentsMap.h:19
EcalSelectiveReadoutProducer::eeSRPdigiCollection_
std::string eeSRPdigiCollection_
Definition: EcalSelectiveReadoutProducer.h:89
funct::true
true
Definition: Factorize.h:173
edm::Event::processHistory
ProcessHistory const & processHistory() const override
Definition: Event.cc:239
edm::ParameterSet
Definition: ParameterSet.h:36
EcalSelectiveReadout::nTriggerTowersInEta
const static size_t nTriggerTowersInEta
Definition: EcalSelectiveReadout.h:140
Event.h
EcalSelectiveReadoutProducer::getEBDigis
const EBDigiCollection * getEBDigis(edm::Event &event)
Definition: EcalSelectiveReadoutProducer.cc:176
EcalSelectiveReadoutProducer::suppressor_
std::unique_ptr< EcalSelectiveReadoutSuppressor > suppressor_
Definition: EcalSelectiveReadoutProducer.h:84
EBDigiCollection
Definition: EcalDigiCollections.h:32
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EcalSelectiveReadoutProducer::eeSrFlagCollection_
std::string eeSrFlagCollection_
Definition: EcalSelectiveReadoutProducer.h:91
EEDigiCollection
Definition: EcalDigiCollections.h:45
EcalSelectiveReadoutProducer::eedigiCollection_
std::string eedigiCollection_
Definition: EcalSelectiveReadoutProducer.h:87
EcalSRCondTools.h
EcalSelectiveReadoutProducer::dumpFlags_
int dumpFlags_
Definition: EcalSelectiveReadoutProducer.h:107
EcalSRSettingsRcd
Definition: EcalSRSettingsRcd.h:5
iEvent
int iEvent
Definition: GenABIO.cc:224
EcalSelectiveReadoutProducer::ebSRPdigiCollection_
std::string ebSRPdigiCollection_
Definition: EcalSelectiveReadoutProducer.h:88
HLT_2018_cff.nEta
nEta
Definition: HLT_2018_cff.py:5271
EcalSelectiveReadoutProducer::produce
void produce(edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: EcalSelectiveReadoutProducer.cc:82
edm::EventSetup
Definition: EventSetup.h:57
EcalSelectiveReadoutProducer::theGeometry
const CaloGeometry * theGeometry
Definition: EcalSelectiveReadoutProducer.h:96
get
#define get
EcalTrigTowerDetId::ieta
int ieta() const
get the tower ieta
Definition: EcalTrigTowerDetId.h:44
EcalSelectiveReadoutProducer::firstCallEB_
bool firstCallEB_
Definition: EcalSelectiveReadoutProducer.h:134
EcalSelectiveReadoutProducer::iEvent_
int iEvent_
Definition: EcalSelectiveReadoutProducer.h:136
EcalSelectiveReadoutProducer::EB_token
edm::EDGetTokenT< EBDigiCollection > EB_token
Definition: EcalSelectiveReadoutProducer.h:145
EcalSelectiveReadoutProducer::firstCallEE_
bool firstCallEE_
Definition: EcalSelectiveReadoutProducer.h:135
EcalSRSettings
Definition: EcalSRSettings.h:29
EcalSRSettings::dccNormalizedWeights_
std::vector< std::vector< float > > dccNormalizedWeights_
Definition: EcalSRSettings.h:99
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
indexGen.date
date
Definition: indexGen.py:99
EcalMappingRcd
Definition: EcalMappingRcd.h:15
EcalTriggerPrimitiveDigi::id
const EcalTrigTowerDetId & id() const
Definition: EcalTriggerPrimitiveDigi.h:29
EcalSelectiveReadoutProducer::checkTriggerMap
void checkTriggerMap(const edm::EventSetup &eventSetup)
Definition: EcalSelectiveReadoutProducer.cc:221
tccFlagMarker
const char tccFlagMarker[]
Definition: GenABIO.cc:164
EcalSRSettings::ecalDccZs1stSample_
std::vector< int > ecalDccZs1stSample_
Definition: EcalSRSettings.h:80
EcalSelectiveReadoutProducer::trigPrimBypass_
bool trigPrimBypass_
Definition: EcalSelectiveReadoutProducer.h:101
EcalSelectiveReadoutProducer.h
EcalTriggerPrimitiveDigi
Definition: EcalTriggerPrimitiveDigi.h:16
EcalSelectiveReadoutProducer::checkGeometry
void checkGeometry(const edm::EventSetup &eventSetup)
Definition: EcalSelectiveReadoutProducer.cc:208
Exception
Definition: hltDiff.cc:246
EcalSelectiveReadoutSuppressor
Definition: EcalSelectiveReadoutSuppressor.h:17
EcalSelectiveReadoutProducer::checkElecMap
void checkElecMap(const edm::EventSetup &eventSetup)
Definition: EcalSelectiveReadoutProducer.cc:234
EcalSelectiveReadoutProducer::settings_
const EcalSRSettings * settings_
Definition: EcalSelectiveReadoutProducer.h:120
edm::parameterSet
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
Provenance.h
EventSetup.h
EcalSelectiveReadoutProducer::getEEDigis
const EEDigiCollection * getEEDigis(edm::Event &event)
Definition: EcalSelectiveReadoutProducer.cc:189
EcalSelectiveReadoutProducer::trigPrimBypassMode_
int trigPrimBypassMode_
Definition: EcalSelectiveReadoutProducer.h:103
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
HLT_2018_cff.nPhi
nPhi
Definition: HLT_2018_cff.py:5272
mps_fire.result
result
Definition: mps_fire.py:303
cms::Exception
Definition: Exception.h:70
EcalSelectiveReadoutProducer::theElecMap
const EcalElectronicsMapping * theElecMap
Definition: EcalSelectiveReadoutProducer.h:98
EcalSelectiveReadoutProducer::theTriggerTowerMap
const EcalTrigTowerConstituentsMap * theTriggerTowerMap
Definition: EcalSelectiveReadoutProducer.h:97
edm::Event::getProvenance
Provenance getProvenance(BranchID const &theID) const
Definition: Event.cc:113
edm::Provenance
Definition: Provenance.h:34
ntuplemaker.time
time
Definition: ntuplemaker.py:310
event
Definition: event.py:1
EcalSelectiveReadoutProducer::params_
edm::ParameterSet params_
Definition: EcalSelectiveReadoutProducer.h:99
edm::Event
Definition: Event.h:73
pileupReCalc_HLTpaths.trunc
trunc
Definition: pileupReCalc_HLTpaths.py:144
edm::HandleBase::id
ProductID id() const
Definition: HandleBase.cc:13
SimL1EmulatorDM_cff.eeDigis
eeDigis
Definition: SimL1EmulatorDM_cff.py:18
EcalSelectiveReadout::nTriggerTowersInPhi
const static size_t nTriggerTowersInPhi
Definition: EcalSelectiveReadout.h:143
edm::InputTag
Definition: InputTag.h:15
edm::ProductID
Definition: ProductID.h:27
IdealGeometryRecord
Definition: IdealGeometryRecord.h:27
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
EcalSelectiveReadoutProducer::useCondDb_
bool useCondDb_
Definition: EcalSelectiveReadoutProducer.h:125