CMS 3D CMS Logo

EcalDisplaysByEvent.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: EcalDisplaysByEvent
4 // Class: EcalDisplaysByEvent
5 //
13 //
14 // Original Author: Seth COOPER
15 // Created: Th Aug 28 5:46:22 CEST 2007
16 //
17 //
18 
21 #include "TLatex.h"
22 #include "TLine.h"
23 #include "TProfile2D.h"
24 #include <utility>
25 using namespace edm;
26 using namespace std;
27 
28 //
29 // constants, enums and typedefs
30 //
31 
32 //
33 // static data member definitions
34 //
35 float EcalDisplaysByEvent::gainRatio[3] = {1., 2., 12.};
37 
38 //
39 // constructors and destructor
40 //
42  : EBRecHitCollection_(iConfig.getParameter<edm::InputTag>("EcalRecHitCollectionEB")),
43  EERecHitCollection_(iConfig.getParameter<edm::InputTag>("EcalRecHitCollectionEE")),
44  EBDigis_(iConfig.getParameter<edm::InputTag>("EBDigiCollection")),
45  EEDigis_(iConfig.getParameter<edm::InputTag>("EEDigiCollection")),
46  headerProducer_(iConfig.getParameter<edm::InputTag>("headerProducer")),
47  rawDataToken_(consumes<EcalRawDataCollection>(headerProducer_)),
48  ebRecHitToken_(consumes<EcalRecHitCollection>(EBRecHitCollection_)),
49  eeRecHitToken_(consumes<EcalRecHitCollection>(EERecHitCollection_)),
50  ebDigiToken_(consumes<EBDigiCollection>(EBDigis_)),
51  eeDigiToken_(consumes<EEDigiCollection>(EEDigis_)),
52  ecalMappingToken_(esConsumes<edm::Transition::BeginRun>()),
53  topologyToken_(esConsumes()),
54  runNum_(-1),
55  side_(iConfig.getUntrackedParameter<int>("side", 3)),
56  threshold_(iConfig.getUntrackedParameter<double>("amplitudeThreshold", 0.5)),
57  minTimingAmp_(iConfig.getUntrackedParameter<double>("minimumTimingAmplitude", 0.100)),
58  makeDigiGraphs_(iConfig.getUntrackedParameter<bool>("makeDigiGraphs", false)),
59  makeTimingHistos_(iConfig.getUntrackedParameter<bool>("makeTimingHistos", true)),
60  makeEnergyHistos_(iConfig.getUntrackedParameter<bool>("makeEnergyHistos", true)),
61  makeOccupancyHistos_(iConfig.getUntrackedParameter<bool>("makeOccupancyHistos", true)),
62  histRangeMin_(iConfig.getUntrackedParameter<double>("histogramMinRange", 0.0)),
63  histRangeMax_(iConfig.getUntrackedParameter<double>("histogramMaxRange", 1.8)),
64  minTimingEnergyEB_(iConfig.getUntrackedParameter<double>("minTimingEnergyEB", 0.0)),
65  minTimingEnergyEE_(iConfig.getUntrackedParameter<double>("minTimingEnergyEE", 0.0)) {
66  vector<int> listDefaults;
67  listDefaults.push_back(-1);
68 
69  maskedChannels_ = iConfig.getUntrackedParameter<vector<int> >("maskedChannels", listDefaults);
70  maskedFEDs_ = iConfig.getUntrackedParameter<vector<int> >("maskedFEDs", listDefaults);
71  seedCrys_ = iConfig.getUntrackedParameter<vector<int> >("seedCrys", listDefaults);
72 
73  vector<string> defaultMaskedEBs;
74  defaultMaskedEBs.push_back("none");
75  maskedEBs_ = iConfig.getUntrackedParameter<vector<string> >("maskedEBs", defaultMaskedEBs);
76 
77  fedMap_ = new EcalFedMap();
78 
79  string title1 = "Jitter for all FEDs all events";
80  string name1 = "JitterAllFEDsAllEvents";
81  allFedsTimingHist_ = fileService->make<TH1F>(name1.c_str(), title1.c_str(), 150, -7, 7);
82 
83  // load up the maskedFED list with the proper FEDids
84  if (maskedFEDs_[0] == -1) {
85  //if "actual" EB id given, then convert to FEDid and put in listFEDs_
86  if (maskedEBs_[0] != "none") {
87  maskedFEDs_.clear();
88  for (vector<string>::const_iterator ebItr = maskedEBs_.begin(); ebItr != maskedEBs_.end(); ++ebItr) {
89  maskedFEDs_.push_back(fedMap_->getFedFromSlice(*ebItr));
90  }
91  }
92  }
93 
94  for (int i = 0; i < 10; i++)
95  abscissa[i] = i;
96 
97  naiveEvtNum_ = 0;
98 
100 }
101 
103 
104 //
105 // member functions
106 //
107 
108 // ------------ method called once each job just before starting event loop ------------
111 }
112 
114 
115 // ------------ method called to for each event ------------
117  // get the headers
118  // (one header for each supermodule)
120  iEvent.getByToken(rawDataToken_, DCCHeaders);
121 
122  for (EcalRawDataCollection::const_iterator headerItr = DCCHeaders->begin(); headerItr != DCCHeaders->end();
123  ++headerItr) {
124  FEDsAndDCCHeaders_[headerItr->id() + 600] = *headerItr;
125  }
126 
127  int ievt = iEvent.id().event();
128  naiveEvtNum_++;
129 
130  if (runNum_ == -1) {
131  runNum_ = iEvent.id().run();
132  canvasNames_ = fileService->make<TTree>("canvasNames", "Names of written canvases");
133  names = new std::vector<string>();
134  canvasNames_->Branch("names", "vector<string>", &names);
135 
136  histoCanvasNames_ = fileService->make<TTree>("histoCanvasNames", "Names of written canvases with histos");
137  histoCanvasNamesVector = new std::vector<string>();
138  histoCanvasNames_->Branch("histoCanvasNamesVector", "vector<string>", &histoCanvasNamesVector);
139  }
140 
141  //We only want the 3x3's for this event...
142  listEBChannels.clear();
143  listEEChannels.clear();
144 
145  //Get hits, digis, caloTopology from event/eventSetup
146  caloTopo_ = &iSetup.getData(topologyToken_);
147 
150  iEvent.getByToken(ebRecHitToken_, EBhits);
151  iEvent.getByToken(eeRecHitToken_, EEhits);
152  iEvent.getByToken(ebDigiToken_, EBdigisHandle);
153  iEvent.getByToken(eeDigiToken_, EEdigisHandle);
154 
155  // Initialize histos for this event
157 
158  bool hasEBdigis = false;
159  bool hasEEdigis = false;
160  if (!EBdigisHandle->empty())
161  hasEBdigis = true;
162  if (!EEdigisHandle->empty())
163  hasEEdigis = true;
164 
165  // Produce the digi graphs
166  if (makeDigiGraphs_) {
167  if (hasEBdigis) //if event has digis, it should have hits
168  selectHits(EBhits, ievt);
169  if (hasEEdigis)
170  selectHits(EEhits, ievt);
171  }
172 
173  // Produce the histos
174  if (hasEBdigis) {
176  makeHistos(EBhits);
177  }
178  if (hasEEdigis) {
180  makeHistos(EEhits);
181  }
182 
183  if (hasEBdigis || hasEEdigis)
184  drawHistos();
185 
187 }
188 
190  for (EcalRecHitCollection::const_iterator hitItr = hits->begin(); hitItr != hits->end(); ++hitItr) {
191  EcalRecHit hit = (*hitItr);
192  DetId det = hit.id();
194  int FEDid = 600 + elecId.dccId();
195  bool isBarrel = true;
196  if (FEDid < 610 || FEDid > 645)
197  isBarrel = false;
198  int cryIndex = isBarrel ? ((EBDetId)det).hashedIndex() : getEEIndex(elecId);
199  int ic = isBarrel ? ((EBDetId)det).ic() : getEEIndex(elecId);
200 
201  float ampli = hit.energy();
202 
203  vector<int>::iterator result;
204  result = find(maskedFEDs_.begin(), maskedFEDs_.end(), FEDid);
205  if (result != maskedFEDs_.end()) {
206  //LogWarning("EcalDisplaysByEvent") << "skipping uncalRecHit for FED " << FEDid << " ; amplitude " << ampli;
207  continue;
208  }
209  result = find(maskedChannels_.begin(), maskedChannels_.end(), cryIndex);
210  if (result != maskedChannels_.end()) {
211  //LogWarning("EcalDisplaysByEvent") << "skipping uncalRecHit for channel: " << cryIndex << " in fed: " << FEDid << " with amplitude " << ampli ;
212  continue;
213  }
214  bool cryIsInList = false;
215  result = find(seedCrys_.begin(), seedCrys_.end(), cryIndex);
216  if (result != seedCrys_.end())
217  cryIsInList = true;
218 
219  // Either we must have a user-requested cry (in which case there is no amplitude selection)
220  // Or we pick all crys that pass the amplitude cut (in which case there is no fixed crystal selection)
221  if (cryIsInList || (seedCrys_.empty() && ampli > threshold_)) {
222  // We have a winner!
223  crysAndAmplitudesMap_[cryIndex] = ampli;
224  string name = "Digis_Event" + intToString(naiveEvtNum_) + "_ic" + intToString(ic) + "_FED" + intToString(FEDid);
225  string title = "Digis";
226  string seed = "ic" + intToString(ic) + "_FED" + intToString(FEDid);
227  int freq = 1;
228  pair<map<string, int>::iterator, bool> pair = seedFrequencyMap_.insert(make_pair(seed, freq));
229  if (!pair.second) {
230  ++(pair.first->second);
231  }
232 
233  //TODO: move this also to TFileService
234  TCanvas can(name.c_str(), title.c_str(), 200, 50, 900, 900);
235  can.Divide(side_, side_);
236  TGraph* myGraph;
237 
239  //Now put each graph in one by one
240  for (int j = side_ / 2; j >= -side_ / 2; --j) {
241  for (int i = -side_ / 2; i <= side_ / 2; ++i) {
242  cursor.home();
243  cursor.offsetBy(i, j);
244  can.cd(i + 1 + side_ / 2 + side_ * (1 - j));
245  myGraph = selectDigi(*cursor, ievt);
246  myGraph->Draw("A*");
247  }
248  }
249  can.Write();
250  names->push_back(name);
251  }
252  }
253 }
254 
255 TGraph* EcalDisplaysByEvent::selectDigi(DetId thisDet, int ievt) {
256  int emptyY[10];
257  for (int i = 0; i < 10; i++)
258  emptyY[i] = 0;
259  TGraph* emptyGraph = fileService->make<TGraph>(10, abscissa, emptyY);
260  emptyGraph->SetTitle("NOT ECAL");
261 
262  //If the DetId is not from Ecal, return
263  if (thisDet.det() != DetId::Ecal)
264  return emptyGraph;
265 
266  emptyGraph->SetTitle("NO DIGIS");
267  //find digi we need -- can't get find() to work; need DataFrame(DetId det) to work?
269  int FEDid = 600 + elecId.dccId();
270  bool isBarrel = true;
271  if (FEDid < 610 || FEDid > 645)
272  isBarrel = false;
273  int cryIndex = isBarrel ? ((EBDetId)thisDet).hashedIndex() : getEEIndex(elecId);
274  int ic = isBarrel ? ((EBDetId)thisDet).ic() : cryIndex;
275 
276  string sliceName = fedMap_->getSliceFromFed(FEDid);
278  if (isBarrel) {
280  while (digiItr != EBdigisHandle->end() && ((*digiItr).id() != (EBDetId)thisDet)) {
281  ++digiItr;
282  }
283  if (digiItr == EBdigisHandle->end()) {
284  //LogWarning("EcalDisplaysByEvent") << "Cannot find digi for ic:" << ic
285  // << " FED:" << FEDid << " evt:" << naiveEvtNum_;
286  return emptyGraph;
287  } else
288  df = *digiItr;
289  } else {
291  while (digiItr != EEdigisHandle->end() && ((*digiItr).id() != (EEDetId)thisDet)) {
292  ++digiItr;
293  }
294  if (digiItr == EEdigisHandle->end()) {
295  //LogWarning("EcalDisplaysByEvent") << "Cannot find digi for ic:" << ic
296  // << " FED:" << FEDid << " evt:" << naiveEvtNum_;
297  return emptyGraph;
298  } else
299  df = *digiItr;
300  }
301 
302  int gainId = FEDsAndDCCHeaders_[FEDid].getMgpaGain();
303  int gainHuman;
304  if (gainId == 1)
305  gainHuman = 12;
306  else if (gainId == 2)
307  gainHuman = 6;
308  else if (gainId == 3)
309  gainHuman = 1;
310  else
311  gainHuman = -1;
312 
313  double pedestal = 200;
314 
315  emptyGraph->SetTitle("FIRST TWO SAMPLES NOT GAIN12");
316  if (df.sample(0).gainId() != 1 || df.sample(1).gainId() != 1)
317  return emptyGraph; //goes to the next digi
318  else {
319  ordinate[0] = df.sample(0).adc();
320  ordinate[1] = df.sample(1).adc();
321  pedestal = (double)(ordinate[0] + ordinate[1]) / (double)2;
322  }
323 
324  for (int i = 0; i < df.size(); ++i) {
325  if (df.sample(i).gainId() != 0)
326  ordinate[i] = (int)(pedestal + (df.sample(i).adc() - pedestal) * gainRatio[df.sample(i).gainId() - 1]);
327  else
328  ordinate[i] = 49152; //Saturation of gain1
329  }
330 
331  TGraph* oneGraph = fileService->make<TGraph>(10, abscissa, ordinate);
332  string name = "Graph_ev" + intToString(naiveEvtNum_) + "_ic" + intToString(ic) + "_FED" + intToString(FEDid);
333  string gainString = (gainId == 1) ? "Free" : intToString(gainHuman);
334  string title = "Event" + intToString(naiveEvtNum_) + "_lv1a" + intToString(ievt) + "_ic" + intToString(ic) + "_" +
335  sliceName + "_gain" + gainString;
336 
337  float energy = 0;
338  map<int, float>::const_iterator itr;
339  itr = crysAndAmplitudesMap_.find(cryIndex);
340  if (itr != crysAndAmplitudesMap_.end()) {
341  //edm::LogWarning("EcalDisplaysByEvent")<< "itr->second(ampli)="<< itr->second;
342  energy = (float)itr->second;
343  }
344  //else
345  //edm::LogWarning("EcalDisplaysByEvent") << "cry " << ic << "not found in ampMap";
346 
347  title += "_Energy" + floatToString(round(energy * 1000));
348 
349  oneGraph->SetTitle(title.c_str());
350  oneGraph->SetName(name.c_str());
351  oneGraph->GetXaxis()->SetTitle("sample");
352  oneGraph->GetYaxis()->SetTitle("ADC");
353  return oneGraph;
354 }
355 
357  int FEDid = 600 + elecId.dccId();
358  return 10000 * FEDid + 100 * elecId.towerId() + 5 * (elecId.stripId() - 1) + elecId.xtalId();
359 }
360 
362  const EBDigiCollection* ebDigis = ebDigiHandle.product();
363  for (EBDigiCollection::const_iterator digiItr = ebDigis->begin(); digiItr != ebDigis->end(); ++digiItr) {
364  EBDetId digiId = digiItr->id();
365  int ieta = digiId.ieta();
366  int iphi = digiId.iphi();
367  digiOccupancyEBAll_->Fill(iphi, ieta);
369  if (makeOccupancyHistos_) {
370  digiOccupancyEB_->Fill(iphi, ieta);
372  }
373  }
374 }
375 
377  const EEDigiCollection* eeDigis = eeDigiHandle.product();
378  for (EEDigiCollection::const_iterator digiItr = eeDigis->begin(); digiItr != eeDigis->end(); ++digiItr) {
379  DetId det = digiItr->id();
381  size_t FEDid = 600 + elecId.dccId();
382  bool isEEM = false;
383  if (FEDid < 610)
384  isEEM = true;
385  EEDetId digiId = digiItr->id();
386  int ieta = digiId.iy();
387  int iphi = digiId.ix();
388  if (isEEM) {
391  if (makeOccupancyHistos_) {
393  digiOccupancyEEM_->Fill(iphi, ieta);
394  }
395  } else {
398  if (makeOccupancyHistos_) {
399  digiOccupancyEEP_->Fill(iphi, ieta);
401  }
402  }
403  }
404 }
405 
407  for (EcalRecHitCollection::const_iterator hitItr = hits->begin(); hitItr != hits->end(); ++hitItr) {
408  EcalRecHit hit = (*hitItr);
409  DetId det = hit.id();
411  int FEDid = 600 + elecId.dccId();
412  bool isBarrel = true;
413  bool isEEM = false;
414  if (FEDid < 610 || FEDid > 645) {
415  isBarrel = false;
416  if (FEDid < 610)
417  isEEM = true;
418  }
419  int iphi = isBarrel ? ((EBDetId)det).iphi() : ((EEDetId)det).ix();
420  int ieta = isBarrel ? ((EBDetId)det).ieta() : ((EEDetId)det).iy();
421  float energy = hit.energy();
422  float time = hit.time();
423 
424  // Fill energy histos
425  if (makeEnergyHistos_) {
426  if (isBarrel) {
427  energyEB_->Fill(energy);
428  energyMapEB_->Fill(iphi, ieta, energy);
430  } else if (isEEM) {
431  energyEEM_->Fill(energy);
432  energyMapEEM_->Fill(iphi, ieta, energy);
434  } else {
435  energyEEP_->Fill(energy);
436  energyMapEEP_->Fill(iphi, ieta, energy);
438  }
439  }
440  // Fill occupancy histos
441  if (makeOccupancyHistos_) {
442  if (isBarrel) {
443  recHitOccupancyEB_->Fill(iphi, ieta);
445  } else if (isEEM) {
446  recHitOccupancyEEM_->Fill(iphi, ieta);
448  } else {
449  recHitOccupancyEEP_->Fill(iphi, ieta);
451  }
452  }
453 
454  // Fill timing histos
455  if (makeTimingHistos_) {
456  if (isBarrel) {
457  timingEB_->Fill(time);
458  if (energy > minTimingEnergyEB_) {
459  timingMapEB_->Fill(iphi, ieta, time);
460  //timingMapEBCoarse_->Fill(iphi,ieta,time);
461  }
462  } else if (isEEM) {
463  timingEEM_->Fill(time);
464  if (energy > minTimingEnergyEE_) {
465  timingMapEEM_->Fill(iphi, ieta, time);
466  //timingMapEEMCoarse_->Fill(iphi,ieta,time);
467  }
468  } else {
469  timingEEP_->Fill(time);
470  if (energy > minTimingEnergyEE_) {
471  timingMapEEP_->Fill(iphi, ieta, time);
472  //timingMapEEPCoarse_->Fill(iphi,ieta,time);
473  }
474  }
475  }
476 
477  //All events
478  if (isBarrel) {
479  energyEBAll_->Fill(energy);
480  energyMapEBAll_->Fill(iphi, ieta, energy);
484  timingEBAll_->Fill(time);
485  if (energy > minTimingEnergyEB_) {
486  timingMapEBAll_->Fill(iphi, ieta, time);
488  }
489  } else if (isEEM) {
490  energyEEMAll_->Fill(energy);
491  energyMapEEMAll_->Fill(iphi, ieta, energy);
495  timingEEMAll_->Fill(time);
496  if (energy > minTimingEnergyEE_) {
497  timingMapEEMAll_->Fill(iphi, ieta, time);
499  }
500  } else {
501  energyEEPAll_->Fill(energy);
502  energyMapEEPAll_->Fill(iphi, ieta, energy);
506  timingEEPAll_->Fill(time);
507  if (energy > minTimingEnergyEE_) {
508  timingMapEEPAll_->Fill(iphi, ieta, time);
510  }
511  }
512  // Fill FED-by-FED timing histos (all events)
513  TH1F* timingHist = FEDsAndTimingHists_[FEDid];
514  if (timingHist == nullptr) {
515  initHists(FEDid);
516  timingHist = FEDsAndTimingHists_[FEDid];
517  }
518  if (energy > minTimingAmp_) {
519  timingHist->Fill(hit.time());
520  allFedsTimingHist_->Fill(hit.time());
521  }
522  }
523 }
524 
525 // ------------ method called once each job just after ending the event loop ------------
527  //All-event canvases
539  drawCanvas(
541 
542  if (runNum_ != -1) {
543  canvasNames_->Fill();
544  histoCanvasNames_->Fill();
545  }
546 
547  string frequencies = "";
548  for (std::map<std::string, int>::const_iterator itr = seedFrequencyMap_.begin(); itr != seedFrequencyMap_.end();
549  ++itr) {
550  if (itr->second > 1) {
551  frequencies += itr->first;
552  frequencies += " Frequency: ";
553  frequencies += intToString(itr->second);
554  frequencies += "\n";
555  }
556  }
557  LogWarning("EcalDisplaysByEvent") << "Found seeds with frequency > 1: "
558  << "\n\n"
559  << frequencies;
560 
562  for (std::vector<int>::const_iterator itr = maskedChannels_.begin(); itr != maskedChannels_.end(); ++itr) {
563  channels += intToString(*itr);
564  channels += ",";
565  }
566 
568  for (std::vector<int>::const_iterator itr = maskedFEDs_.begin(); itr != maskedFEDs_.end(); ++itr) {
569  feds += intToString(*itr);
570  feds += ",";
571  }
572 
573  LogWarning("EcalDisplaysByEvent") << "Masked channels are: " << channels;
574  LogWarning("EcalDisplaysByEvent") << "Masked FEDs are: " << feds << " and that is all!";
575 }
576 
578  using namespace std;
579  ostringstream myStream;
580  myStream << num << flush;
581  return (myStream.str()); //returns the string form of the stringstream object
582 }
583 
585  using namespace std;
586  ostringstream myStream;
587  myStream << num << flush;
588  return (myStream.str()); //returns the string form of the stringstream object
589 }
590 
591 // insert the hist map into the map keyed by FED number
593  using namespace std;
594 
595  string title1 = "Jitter for ";
596  title1.append(fedMap_->getSliceFromFed(FED));
597  string name1 = "JitterFED";
598  name1.append(intToString(FED));
599  TH1F* timingHist = fileService->make<TH1F>(name1.c_str(), title1.c_str(), 150, -7, 7);
600  FEDsAndTimingHists_[FED] = timingHist;
601 }
602 
604  string lastPart = intToString(naiveEvtNum_) + "_LV1a" + intToString(ievt);
605  if (makeTimingHistos_) {
606  string canvasTitle = "Timing_Event" + lastPart;
607  timingEB_ = new TH1F("timeForAllFedsEB", "timeForAllFeds;Relative Time (1 clock = 25ns)", 78, -7, 7);
608  timingEEM_ = new TH1F("timeForAllFedsEEM", "timeForAllFeds_EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
609  timingEEP_ = new TH1F("timeForAllFedsEEP", "timeForAllFeds_EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
610  timingCanvas_ = new TCanvas(canvasTitle.c_str(), canvasTitle.c_str(), 300, 60, 500, 200);
611  timingMapEB_ = init3DEcalHist("TimingMap", EB_FINE);
612  timingMapEEM_ = init3DEcalHist("TimingMap", EEM_FINE);
613  timingMapEEP_ = init3DEcalHist("TimingMap", EEP_FINE);
614  timingMapCanvas_ = init2DEcalCanvas("TimingMap_Event" + lastPart);
615  //timingMapEBCoarse_ = init3DEcalHist("TimingMap", EB_COARSE);
618  //timingMapCoarseCanvas_ = init2DEcalCanvas("TimingMapCoarse_Event"+lastPart);
619  }
620  if (makeEnergyHistos_) {
621  energyEB_ = new TH1F("energyEB", "Energy for EB Feds (GeV)", 200, histRangeMin_, histRangeMax_);
622  energyEEM_ = new TH1F("energyEEM", "Energy for EEM Feds (GeV)", 200, histRangeMin_, 10.0);
623  energyEEP_ = new TH1F("energyEEP", "Energy for EEP Feds (GeV)", 200, histRangeMin_, 10.0);
624  string canvasTitle = "Energy_Event" + lastPart;
625  energyCanvas_ = new TCanvas(canvasTitle.c_str(), canvasTitle.c_str(), 300, 60, 500, 200);
626 
627  // Energy map hists
628  energyMapEB_ = init2DEcalHist("EnergyMap", EB_FINE);
631  energyMapEEM_ = init2DEcalHist("EnergyMap", EEM_FINE);
633  energyMapEEP_ = init2DEcalHist("EnergyMap", EEP_FINE);
634  energyMapCanvas_ = init2DEcalCanvas("EnergyMap_Event" + lastPart);
635  energyMapCoarseCanvas_ = init2DEcalCanvas("EnergyMapCoarse_Event" + lastPart);
636  }
637  if (makeOccupancyHistos_) {
638  // RecHit Occupancy
639  recHitOccupancyEB_ = init2DEcalHist("RecHitOccupancy", EB_FINE);
640  recHitOccupancyEBcoarse_ = init2DEcalHist("RecHitOccupancy", EB_COARSE);
642  recHitOccupancyEEM_ = init2DEcalHist("RecHitOccupancy", EEM_FINE);
644  recHitOccupancyEEP_ = init2DEcalHist("RecHitOccupancy", EEP_FINE);
645  recHitOccupancyCanvas_ = init2DEcalCanvas("RecHitOccupancy_Event" + lastPart);
646  recHitOccupancyCoarseCanvas_ = init2DEcalCanvas("RecHitOccupancyCoarse_Event" + lastPart);
647 
648  //DigiOccupancy
649  digiOccupancyEB_ = init2DEcalHist("DigiOccupancy", EB_FINE);
650  digiOccupancyEBcoarse_ = init2DEcalHist("DigiOccupancy", EB_COARSE);
652  digiOccupancyEEM_ = init2DEcalHist("DigiOccupancy", EEM_FINE);
654  digiOccupancyEEP_ = init2DEcalHist("DigiOccupancy", EEP_FINE);
655  digiOccupancyCanvas_ = init2DEcalCanvas("DigiOccupancy_Event" + lastPart);
656  digiOccupancyCoarseCanvas_ = init2DEcalCanvas("DigiOccupancyCoarse_Event" + lastPart);
657  }
658 }
659 
661  delete timingEB_;
662  delete timingEEM_;
663  delete timingEEP_;
664  delete timingMapEB_;
665  delete timingMapEEM_;
666  delete timingMapEEP_;
667  delete timingCanvas_;
668  delete timingMapCanvas_;
669  delete energyEB_;
670  delete energyEEM_;
671  delete energyEEP_;
672  delete energyMapEB_;
673  delete energyMapEEM_;
674  delete energyMapEEP_;
675  delete energyMapEBcoarse_;
676  delete energyMapEEMcoarse_;
677  delete energyMapEEPcoarse_;
678  delete energyCanvas_;
679  delete energyMapCanvas_;
680  delete energyMapCoarseCanvas_;
681  delete recHitOccupancyEB_;
682  delete recHitOccupancyEEP_;
683  delete recHitOccupancyEEM_;
687  delete digiOccupancyEB_;
688  delete digiOccupancyEEM_;
689  delete digiOccupancyEEP_;
690  delete digiOccupancyEBcoarse_;
693  delete recHitOccupancyCanvas_;
695  delete digiOccupancyCanvas_;
697 }
698 
700  string canvasTitle = "Timing_AllEvents";
701  timingEBAll_ = new TH1F("timeForAllFedsEBAll", "timeForAllFeds;Relative Time (1 clock = 25ns)", 78, -7, 7);
702  timingEEMAll_ = new TH1F("timeForAllFedsEEMAll", "timeForAllFeds_EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
703  timingEEPAll_ = new TH1F("timeForAllFedsEEPAll", "timeForAllFeds_EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
704  timingCanvasAll_ = new TCanvas(canvasTitle.c_str(), canvasTitle.c_str(), 300, 60, 500, 200);
705  timingMapEBAll_ = init3DEcalHist("TimingMapA", EB_FINE);
706  timingMapEEMAll_ = init3DEcalHist("TimingMapA", EEM_FINE);
707  timingMapEEPAll_ = init3DEcalHist("TimingMapA", EEP_FINE);
708  timingMapCanvasAll_ = init2DEcalCanvas("TimingMap_AllEvents");
712  //timingMapCoarseCanvasAll_ = init2DEcalCanvas("TimingMapCoarse_AllEvents");
713  energyEBAll_ = new TH1F("energyEBAllEvents", "Energy for EB Feds (GeV)", 200, histRangeMin_, histRangeMax_);
714  energyEEMAll_ = new TH1F("energyEEMAllEvents", "Energy for EEM Feds (GeV)", 200, histRangeMin_, 10.0);
715  energyEEPAll_ = new TH1F("energyEEPAllEvents", "Energy for EEP Feds (GeV)", 200, histRangeMin_, 10.0);
716  canvasTitle = "Energy_AllEvents";
717  energyCanvasAll_ = new TCanvas(canvasTitle.c_str(), canvasTitle.c_str(), 300, 60, 500, 200);
718 
719  // Energy map hists
720  energyMapEBAll_ = init2DEcalHist("EnergyMapA", EB_FINE);
723  energyMapEEMAll_ = init2DEcalHist("EnergyMapA", EEM_FINE);
725  energyMapEEPAll_ = init2DEcalHist("EnergyMapA", EEP_FINE);
726  energyMapCanvasAll_ = init2DEcalCanvas("EnergyMap_AllEvents");
727  energyMapCoarseCanvasAll_ = init2DEcalCanvas("EnergyMapCoarse_AllEvents");
728  // RecHit Occupancy
729  recHitOccupancyEBAll_ = init2DEcalHist("RecHitOccupancyA", EB_FINE);
732  recHitOccupancyEEMAll_ = init2DEcalHist("RecHitOccupancyA", EEM_FINE);
734  recHitOccupancyEEPAll_ = init2DEcalHist("RecHitOccupancyA", EEP_FINE);
735  recHitOccupancyCanvasAll_ = init2DEcalCanvas("RecHitOccupancy_AllEvents");
736  recHitOccupancyCoarseCanvasAll_ = init2DEcalCanvas("RecHitOccupancyCoarse_AllEvents");
737 
738  //DigiOccupancy
739  digiOccupancyEBAll_ = init2DEcalHist("DigiOccupancyA", EB_FINE);
742  digiOccupancyEEMAll_ = init2DEcalHist("DigiOccupancyA", EEM_FINE);
744  digiOccupancyEEPAll_ = init2DEcalHist("DigiOccupancyA", EEP_FINE);
745  digiOccupancyCanvasAll_ = init2DEcalCanvas("DigiOccupancy_AllEvents");
746  digiOccupancyCoarseCanvasAll_ = init2DEcalCanvas("DigiOccupancyCoarse_AllEvents");
747 }
748 
749 TH3F* EcalDisplaysByEvent::init3DEcalHist(std::string histTypeName, int subDet) {
750  TH3F* hist;
751  bool isBarrel = (subDet == EB_FINE || subDet == EB_COARSE) ? true : false;
752  bool isCoarse = (subDet == EB_COARSE || subDet == EEM_COARSE || subDet == EEP_COARSE) ? true : false;
753  bool isEEM = (subDet == EEM_FINE || subDet == EEM_COARSE) ? true : false;
754  std::string histName = histTypeName;
755  std::string histTitle = histTypeName;
756  double ttEtaBins[36] = {-85, -80, -75, -70, -65, -60, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0,
757  1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 76, 81, 86};
758  double modEtaBins[10] = {-85, -65, -45, -25, 0, 1, 26, 46, 66, 86};
759  double ttPhiBins[73];
760  double modPhiBins[19];
761  double timingBins[79];
762  for (int i = 0; i < 79; ++i) {
763  timingBins[i] = 6 - 7. + double(i) * 14. / 78.;
764  if (i < 73) {
765  ttPhiBins[i] = 1 + 5 * i;
766  if (i < 19) {
767  modPhiBins[i] = 1 + 20 * i;
768  }
769  }
770  }
771 
772  if (isBarrel) {
773  histName = histName + "EB";
774  histTitle = histTitle + " EB";
775  if (isCoarse) {
776  histName = histName + "Coarse";
777  histTitle = histTitle + " by Module Nominal value = 6;iphi;ieta ";
778  hist = new TH3F(histName.c_str(), histTitle.c_str(), 18, modPhiBins, 9, modEtaBins, 78, timingBins);
779  } else {
780  histTitle = histTitle + " by TT Nominal value = 6;iphi;ieta";
781  hist = new TH3F(histName.c_str(), histTitle.c_str(), 360 / 5, ttPhiBins, 35, ttEtaBins, 78, timingBins);
782  }
783  } else {
784  double ttXBins[21];
785  double ttYBins[21];
786  for (int i = 0; i != 21; ++i) {
787  ttXBins[i] = 1 + 5 * i;
788  ttYBins[i] = 1 + 5 * i;
789  }
790  if (isEEM) {
791  histName = histName + "EEM";
792  histTitle = histTitle + " EEM";
793  } else {
794  histName = histName + "EEP";
795  histTitle = histTitle + " EEP";
796  }
797  if (isCoarse) {
798  histName = histName + "Coarse";
799  histTitle = histTitle + " by Module Nominal value = 6;ix;iy";
800  hist = new TH3F(histName.c_str(), histTitle.c_str(), 20, ttXBins, 20, ttYBins, 78, timingBins);
801  } else {
802  histTitle = histTitle + " by TT Nominal value = 6;ix;iy";
803  hist = new TH3F(histName.c_str(), histTitle.c_str(), 20, ttXBins, 20, ttYBins, 78, timingBins);
804  }
805  }
806  return hist;
807 }
808 
809 TH2F* EcalDisplaysByEvent::init2DEcalHist(std::string histTypeName, int subDet) {
810  TH2F* hist;
811  bool isBarrel = (subDet == EB_FINE || subDet == EB_COARSE) ? true : false;
812  bool isCoarse = (subDet == EB_COARSE || subDet == EEM_COARSE || subDet == EEP_COARSE) ? true : false;
813  bool isEEM = (subDet == EEM_FINE || subDet == EEM_COARSE) ? true : false;
814  std::string histName = histTypeName;
815  std::string histTitle = histTypeName;
816  if (isBarrel) {
817  histName = histName + "EB";
818  histTitle = histTitle + " EB";
819  if (isCoarse) {
820  histName = histName + "Coarse";
821  histTitle = histTitle + " Coarse;iphi;ieta";
822  double ttEtaBins[36] = {-85, -80, -75, -70, -65, -60, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0,
823  1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 76, 81, 86};
824  hist = new TH2F(histName.c_str(), histTitle.c_str(), 360 / 5, 1, 361., 35, ttEtaBins);
825  } else {
826  histTitle = histTitle + ";iphi;ieta";
827  hist = new TH2F(histName.c_str(), histTitle.c_str(), 360, 1, 361., 172, -86, 86);
828  }
829  } else {
830  if (isEEM) {
831  histName = histName + "EEM";
832  histTitle = histTitle + " EEM";
833  } else {
834  histName = histName + "EEP";
835  histTitle = histTitle + " EEP";
836  }
837  if (isCoarse) {
838  histName = histName + "Coarse";
839  histTitle = histTitle + " Coarse;ix;iy";
840  hist = new TH2F(histName.c_str(), histTitle.c_str(), 20, 1, 101, 20, 1, 101);
841  } else {
842  histTitle = histTitle + ";ix;iy";
843  hist = new TH2F(histName.c_str(), histTitle.c_str(), 100, 1, 101, 100, 1, 101);
844  }
845  }
846  return hist;
847 }
848 
850  TCanvas* canvas = new TCanvas(canvasTitle.c_str(), canvasTitle.c_str(), 300, 60, 500, 200);
851  return canvas;
852 }
853 
855  if (makeTimingHistos_) {
856  // Put the timing canvas together
858  // drawCanvas(timingMapCoarseCanvas_,timingMapEEMCoarse_,timingMapEBCoarse_,timingMapEEPCoarse_);
860  }
861  if (makeEnergyHistos_) {
862  // Put the energy canvas together
864  // Put the energy map canvas together
867  }
868  if (makeOccupancyHistos_) {
869  // Put the occupancy canvas together
871  drawCanvas(
873  // And the same for the digis
876  }
877 }
878 
879 void EcalDisplaysByEvent::drawCanvas(TCanvas* canvas, TH1F* hist1, TH1F* hist2, TH1F* hist3) {
880  canvas->Divide(1, 2);
881  canvas->cd(1)->Divide(2, 1);
882  canvas->cd(1)->cd(1);
883  hist1->Draw();
884  canvas->cd(2);
885  hist2->Draw();
886  canvas->cd(1)->cd(2);
887  hist3->Draw();
888  histoCanvasNamesVector->push_back(canvas->GetName());
889  canvas->SetCanvasSize(500, 500);
890  canvas->SetFixedAspectRatio(true);
891  canvas->Write();
892 }
893 
894 void EcalDisplaysByEvent::drawCanvas(TCanvas* canvas, TH2F* hist1, TH2F* hist2, TH2F* hist3) {
895  canvas->Divide(1, 2);
896  canvas->cd(1)->Divide(2, 1);
897  // EEM
898  canvas->cd(1)->cd(1);
899  hist1->Draw("colz");
900  drawEELines();
901  // EB
902  canvas->cd(2);
903  hist2->Draw("colz");
904  hist2->GetXaxis()->SetNdivisions(-18);
905  hist2->GetYaxis()->SetNdivisions(2);
906  canvas->GetPad(2)->SetGridx(1);
907  canvas->GetPad(2)->SetGridy(1);
908  // EEP
909  canvas->cd(1)->cd(2);
910  hist3->Draw("colz");
911  drawEELines();
912  histoCanvasNamesVector->push_back(canvas->GetName());
913  canvas->SetCanvasSize(500, 500);
914  canvas->SetFixedAspectRatio(true);
915  canvas->Write();
916 }
917 
918 void EcalDisplaysByEvent::drawCanvas(TCanvas* canvas, TH3F* hist1, TH3F* hist2, TH3F* hist3) {
920  canvas->cd();
921  TProfile2D* profile2 = (TProfile2D*)hist2->Project3DProfile("yx");
922  profile2->Draw("colz");
923  drawTimingErrors(profile2);
924  } else {
925  canvas->Divide(1, 2);
926  canvas->cd(1)->Divide(2, 1);
927  // EEM
928  canvas->cd(1)->cd(1);
929  TProfile2D* profile1 = (TProfile2D*)hist1->Project3DProfile("yx");
930  profile1->Draw("colz");
931  drawEELines();
932  // EB
933  canvas->cd(2);
934  TProfile2D* profile2 = (TProfile2D*)hist2->Project3DProfile("yx");
935  profile2->Draw("colz");
936  profile2->GetXaxis()->SetNdivisions(-18);
937  profile2->GetYaxis()->SetNdivisions(2);
938  canvas->GetPad(2)->SetGridx(1);
939  canvas->GetPad(2)->SetGridy(1);
940  // EEP
941  canvas->cd(1)->cd(2);
942  TProfile2D* profile3 = (TProfile2D*)hist3->Project3DProfile("yx");
943  profile3->Draw("colz");
944  drawEELines();
945  }
946  histoCanvasNamesVector->push_back(canvas->GetName());
947  canvas->SetCanvasSize(500, 500);
948  canvas->SetFixedAspectRatio(true);
949  canvas->Write();
950 }
951 
953  int nxb = profile->GetNbinsX();
954  int nyb = profile->GetNbinsY();
955  char tempErr[200];
956  for (int i = 0; i != nxb; ++i) {
957  for (int j = 0; j != nyb; ++j) {
958  int xb = i + 1;
959  int yb = j + 1;
960  // std::cout << "xb: " << xb << "\tyb: " << yb << std::endl;
961  double xcorr = profile->GetBinCenter(xb);
962  double ycorr = profile->GetBinCenter(yb);
963  sprintf(tempErr, "%0.2f", profile->GetBinError(xb, yb));
964  int nBin = profile->GetBin(xb, yb, 0);
965  int nBinEntries = (int)profile->GetBinEntries(nBin);
966  if (nBinEntries != 0) {
967  TLatex* tex = new TLatex(xcorr, ycorr, tempErr);
968  tex->SetTextAlign(23);
969  tex->SetTextSize(42);
970  tex->SetTextSize(0.025);
971  tex->SetLineWidth(2);
972  tex->Draw();
973  delete tex;
974  }
975  sprintf(tempErr, "%i", nBinEntries);
976  if (nBinEntries != 0) {
977  TLatex* tex = new TLatex(xcorr, ycorr, tempErr);
978  tex->SetTextAlign(21);
979  tex->SetTextFont(42);
980  tex->SetTextSize(0.025);
981  tex->SetLineWidth(2);
982  tex->Draw();
983  delete tex;
984  }
985  }
986  }
987 }
988 
990  int ixSectorsEE[202] = {
991  61, 61, 60, 60, 59, 59, 58, 58, 57, 57, 55, 55, 45, 45, 43, 43, 42, 42, 41, 41, 40, 40, 39, 39, 40, 40,
992  41, 41, 42, 42, 43, 43, 45, 45, 55, 55, 57, 57, 58, 58, 59, 59, 60, 60, 61, 61, 0, 100, 100, 97, 97, 95,
993  95, 92, 92, 87, 87, 85, 85, 80, 80, 75, 75, 65, 65, 60, 60, 40, 40, 35, 35, 25, 25, 20, 20, 15, 15, 13,
994  13, 8, 8, 5, 5, 3, 3, 0, 0, 3, 3, 5, 5, 8, 8, 13, 13, 15, 15, 20, 20, 25, 25, 35, 35, 40,
995  40, 60, 60, 65, 65, 75, 75, 80, 80, 85, 85, 87, 87, 92, 92, 95, 95, 97, 97, 100, 100, 0, 61, 65, 65, 70,
996  70, 80, 80, 90, 90, 92, 0, 61, 65, 65, 90, 90, 97, 0, 57, 60, 60, 65, 65, 70, 70, 75, 75, 80, 80, 0,
997  50, 50, 0, 43, 40, 40, 35, 35, 30, 30, 25, 25, 20, 20, 0, 39, 35, 35, 10, 10, 3, 0, 39, 35, 35, 30,
998  30, 20, 20, 10, 10, 8, 0, 45, 45, 40, 40, 35, 35, 0, 55, 55, 60, 60, 65, 65};
999 
1000  int iySectorsEE[202] = {50, 55, 55, 57, 57, 58, 58, 59, 59, 60, 60, 61, 61, 60, 60, 59, 59, 58, 58, 57, 57, 55, 55,
1001  45, 45, 43, 43, 42, 42, 41, 41, 40, 40, 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, 45, 45, 50,
1002  0, 50, 60, 60, 65, 65, 75, 75, 80, 80, 85, 85, 87, 87, 92, 92, 95, 95, 97, 97, 100, 100, 97,
1003  97, 95, 95, 92, 92, 87, 87, 85, 85, 80, 80, 75, 75, 65, 65, 60, 60, 40, 40, 35, 35, 25, 25,
1004  20, 20, 15, 15, 13, 13, 8, 8, 5, 5, 3, 3, 0, 0, 3, 3, 5, 5, 8, 8, 13, 13, 15,
1005  15, 20, 20, 25, 25, 35, 35, 40, 40, 50, 0, 45, 45, 40, 40, 35, 35, 30, 30, 25, 25, 0, 50,
1006  50, 55, 55, 60, 60, 0, 60, 60, 65, 65, 70, 70, 75, 75, 85, 85, 87, 0, 61, 100, 0, 60, 60,
1007  65, 65, 70, 70, 75, 75, 85, 85, 87, 0, 50, 50, 55, 55, 60, 60, 0, 45, 45, 40, 40, 35, 35,
1008  30, 30, 25, 25, 0, 39, 30, 30, 15, 15, 5, 0, 39, 30, 30, 15, 15, 5};
1009 
1010  for (int i = 0; i < 202; i++) {
1011  ixSectorsEE[i] += 1;
1012  iySectorsEE[i] += 1;
1013  // std::cout << i << " " << ixSectorsEE[i] << " " << iySectorsEE[i] << std::endl;
1014  }
1015 
1016  TLine l;
1017  l.SetLineWidth(1);
1018  for (int i = 0; i < 201; i = i + 1) {
1019  if ((ixSectorsEE[i] != 1 || iySectorsEE[i] != 1) && (ixSectorsEE[i + 1] != 1 || iySectorsEE[i + 1] != 1)) {
1020  l.DrawLine(ixSectorsEE[i], iySectorsEE[i], ixSectorsEE[i + 1], iySectorsEE[i + 1]);
1021  }
1022  }
1023 }
std::vector< std::string > maskedEBs_
std::set< EBDetId > listEBChannels
edm::Handle< EEDigiCollection > EEdigisHandle
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void endRun(edm::Run const &, edm::EventSetup const &) override
void home() const
move the navigator back to the starting point
Definition: CaloNavigator.h:96
const edm::EDGetTokenT< EcalRawDataCollection > rawDataToken_
TH2F * init2DEcalHist(std::string histTypeName, int subDet)
std::vector< int > maskedChannels_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
std::vector< std::string > * names
const EcalElectronicsMapping * ecalElectronicsMap_
int getEEIndex(EcalElectronicsId elecId)
int getFedFromSlice(std::string)
Definition: EcalFedMap.cc:96
T const * product() const
Definition: Handle.h:70
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
int ix() const
Definition: EEDetId.h:77
std::vector< T >::const_iterator const_iterator
const double minTimingEnergyEB_
void analyze(edm::Event const &, edm::EventSetup const &) override
std::map< int, EcalDCCHeaderBlock > FEDsAndDCCHeaders_
void drawTimingErrors(TProfile2D *profile)
TCanvas * digiOccupancyCoarseCanvasAll_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
std::set< EEDetId > listEEChannels
void drawCanvas(TCanvas *canvas, TH1F *hist1, TH1F *hist2, TH1F *hist3)
std::string getSliceFromFed(int)
Definition: EcalFedMap.cc:86
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
std::vector< std::string > * histoCanvasNamesVector
T getUntrackedParameter(std::string const &, T const &) const
const edm::EDGetTokenT< EcalRecHitCollection > ebRecHitToken_
int iEvent
Definition: GenABIO.cc:224
std::vector< int > maskedFEDs_
const edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
tex
Definition: cuy.py:773
int towerId() const
get the tower id
void selectHits(edm::Handle< EcalRecHitCollection > hits, int ievt)
TCanvas * recHitOccupancyCoarseCanvasAll_
Transition
Definition: Transition.h:12
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > ecalMappingToken_
std::map< int, TH1F * > FEDsAndTimingHists_
const edm::EDGetTokenT< EcalRecHitCollection > eeRecHitToken_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
const_iterator begin() const
static edm::Service< TFileService > fileService
const CaloTopology * caloTopo_
const_iterator end() const
unsigned int id
const_iterator end() const
std::string intToString(int num)
__shared__ Hist hist
Definition: DetId.h:17
static float gainRatio[3]
void makeHistos(edm::Handle< EBDigiCollection > ebDigis)
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
edm::Handle< EBDigiCollection > EBdigisHandle
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:17
const_iterator begin() const
The iterator returned can not safely be used across threads.
const double minTimingEnergyEE_
T offsetBy(int deltaX, int deltaY) const
Free movement of arbitray steps.
Definition: CaloNavigator.h:66
int stripId() const
get the tower id
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
std::map< std::string, int > seedFrequencyMap_
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > topologyToken_
void initEvtByEvtHists(int naiveEvtNum_, int ievt)
TCanvas * digiOccupancyCoarseCanvas_
std::vector< int > seedCrys_
int xtalId() const
get the channel id
std::string floatToString(float num)
HLT enums.
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
def canvas(sub, attr)
Definition: svgfig.py:482
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
TGraph * selectDigi(DetId det, int ievt)
TH3F * init3DEcalHist(std::string histTypeName, int dubDet)
TCanvas * init2DEcalCanvas(std::string canvasName)
Log< level::Warning, false > LogWarning
void beginRun(edm::Run const &, edm::EventSetup const &) override
TCanvas * recHitOccupancyCoarseCanvas_
EcalDisplaysByEvent(const edm::ParameterSet &)
const edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
Definition: Run.h:45
std::map< int, float > crysAndAmplitudesMap_
int iy() const
Definition: EEDetId.h:83