CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 #include <string>
26 #include <vector>
27 using namespace edm;
28 using namespace std;
29 
30 //
31 // constants, enums and typedefs
32 //
33 
34 //
35 // static data member definitions
36 //
37 float EcalDisplaysByEvent::gainRatio[3] = { 1., 2. , 12. };
39 
40 //
41 // constructors and destructor
42 //
44  EBRecHitCollection_ (iConfig.getParameter<edm::InputTag>("EcalRecHitCollectionEB")),
45  EERecHitCollection_ (iConfig.getParameter<edm::InputTag>("EcalRecHitCollectionEE")),
46  EBDigis_ (iConfig.getParameter<edm::InputTag>("EBDigiCollection")),
47  EEDigis_ (iConfig.getParameter<edm::InputTag>("EEDigiCollection")),
48  headerProducer_ (iConfig.getParameter<edm::InputTag> ("headerProducer")),
49  runNum_(-1),
50  side_ (iConfig.getUntrackedParameter<int>("side", 3)),
51  threshold_ (iConfig.getUntrackedParameter<double>("amplitudeThreshold", 0.5)),
52  minTimingAmp_ (iConfig.getUntrackedParameter<double>("minimumTimingAmplitude", 0.100)),
53  makeDigiGraphs_ (iConfig.getUntrackedParameter<bool>("makeDigiGraphs", false)),
54  makeTimingHistos_ (iConfig.getUntrackedParameter<bool>("makeTimingHistos", true)),
55  makeEnergyHistos_ (iConfig.getUntrackedParameter<bool>("makeEnergyHistos", true)),
56  makeOccupancyHistos_ (iConfig.getUntrackedParameter<bool>("makeOccupancyHistos", true)),
57  histRangeMin_ (iConfig.getUntrackedParameter<double>("histogramMinRange",0.0)),
58  histRangeMax_ (iConfig.getUntrackedParameter<double>("histogramMaxRange",1.8)),
59  minTimingEnergyEB_ (iConfig.getUntrackedParameter<double>("minTimingEnergyEB",0.0)),
60  minTimingEnergyEE_ (iConfig.getUntrackedParameter<double>("minTimingEnergyEE",0.0))
61 {
62  vector<int> listDefaults;
63  listDefaults.push_back(-1);
64 
65  maskedChannels_ = iConfig.getUntrackedParameter<vector<int> >("maskedChannels", listDefaults);
66  maskedFEDs_ = iConfig.getUntrackedParameter<vector<int> >("maskedFEDs", listDefaults);
67  seedCrys_ = iConfig.getUntrackedParameter<vector<int> >("seedCrys",listDefaults);
68 
69  vector<string> defaultMaskedEBs;
70  defaultMaskedEBs.push_back("none");
71  maskedEBs_ = iConfig.getUntrackedParameter<vector<string> >("maskedEBs",defaultMaskedEBs);
72 
73  fedMap_ = new EcalFedMap();
74 
75  string title1 = "Jitter for all FEDs all events";
76  string name1 = "JitterAllFEDsAllEvents";
77  allFedsTimingHist_ = fileService->make<TH1F>(name1.c_str(),title1.c_str(),150,-7,7);
78 
79  // load up the maskedFED list with the proper FEDids
80  if(maskedFEDs_[0]==-1)
81  {
82  //if "actual" EB id given, then convert to FEDid and put in listFEDs_
83  if(maskedEBs_[0] != "none")
84  {
85  maskedFEDs_.clear();
86  for(vector<string>::const_iterator ebItr = maskedEBs_.begin(); ebItr != maskedEBs_.end(); ++ebItr)
87  {
88  maskedFEDs_.push_back(fedMap_->getFedFromSlice(*ebItr));
89  }
90  }
91  }
92 
93  for (int i=0; i<10; i++)
94  abscissa[i] = i;
95 
96  naiveEvtNum_ = 0;
97 
99 }
100 
101 
103 {
104 }
105 
106 
107 //
108 // member functions
109 //
110 
111 // ------------ method called once each job just before starting event loop ------------
112 void
114 {
116  c.get< EcalMappingRcd >().get(handle);
117  ecalElectronicsMap_ = handle.product();
118 }
119 
120 // ------------ method called to for each event ------------
121 void
123 {
124 
125  // get the headers
126  // (one header for each supermodule)
128  iEvent.getByLabel(headerProducer_, DCCHeaders);
129 
130  for (EcalRawDataCollection::const_iterator headerItr= DCCHeaders->begin();
131  headerItr != DCCHeaders->end ();
132  ++headerItr)
133  {
134  FEDsAndDCCHeaders_[headerItr->id()+600] = *headerItr;
135  }
136 
137  int ievt = iEvent.id().event();
138  naiveEvtNum_++;
139 
140  if(runNum_==-1)
141  {
142  runNum_ = iEvent.id().run();
143  canvasNames_ = fileService->make<TTree>("canvasNames","Names of written canvases");
144  names = new std::vector<string>();
145  canvasNames_->Branch("names","vector<string>",&names);
146 
147  histoCanvasNames_ = fileService->make<TTree>("histoCanvasNames","Names of written canvases with histos");
148  histoCanvasNamesVector = new std::vector<string>();
149  histoCanvasNames_->Branch("histoCanvasNamesVector","vector<string>",&histoCanvasNamesVector);
150  }
151 
152  //We only want the 3x3's for this event...
153  listEBChannels.clear();
154  listEEChannels.clear();
155 
156  //Get hits, digis, caloTopology from event/eventSetup
159  ESHandle<CaloTopology> caloTopo;
160  iSetup.get<CaloTopologyRecord>().get(caloTopo);
161  iEvent.getByLabel(EBRecHitCollection_, EBhits);
162  iEvent.getByLabel(EERecHitCollection_, EEhits);
165 
166  // Initialize histos for this event
168 
169  bool hasEBdigis = false;
170  bool hasEEdigis = false;
171  if(EBdigisHandle->size() > 0)
172  hasEBdigis = true;
173  if(EEdigisHandle->size() > 0)
174  hasEEdigis = true;
175 
176  // Produce the digi graphs
177  if(makeDigiGraphs_)
178  {
179  if(hasEBdigis) //if event has digis, it should have hits
180  selectHits(EBhits, ievt, caloTopo);
181  if(hasEEdigis)
182  selectHits(EEhits, ievt, caloTopo);
183  }
184 
185  // Produce the histos
186  if(hasEBdigis)
187  {
189  makeHistos(EBhits);
190  }
191  if(hasEEdigis)
192  {
194  makeHistos(EEhits);
195  }
196 
197  if(hasEBdigis || hasEEdigis)
198  drawHistos();
199 
201 }
202 
203 
205  int ievt, ESHandle<CaloTopology> caloTopo)
206 {
207  for (EcalRecHitCollection::const_iterator hitItr = hits->begin(); hitItr != hits->end(); ++hitItr)
208  {
209  EcalRecHit hit = (*hitItr);
210  DetId det = hit.id();
212  int FEDid = 600+elecId.dccId();
213  bool isBarrel = true;
214  if(FEDid < 610 || FEDid > 645)
215  isBarrel = false;
216  int cryIndex = isBarrel ? ((EBDetId)det).hashedIndex() : getEEIndex(elecId);
217  int ic = isBarrel ? ((EBDetId)det).ic() : getEEIndex(elecId);
218 
219  float ampli = hit.energy();
220 
221  vector<int>::iterator result;
222  result = find(maskedFEDs_.begin(), maskedFEDs_.end(), FEDid);
223  if(result != maskedFEDs_.end())
224  {
225  //LogWarning("EcalDisplaysByEvent") << "skipping uncalRecHit for FED " << FEDid << " ; amplitude " << ampli;
226  continue;
227  }
228  result = find(maskedChannels_.begin(), maskedChannels_.end(), cryIndex);
229  if (result != maskedChannels_.end())
230  {
231  //LogWarning("EcalDisplaysByEvent") << "skipping uncalRecHit for channel: " << cryIndex << " in fed: " << FEDid << " with amplitude " << ampli ;
232  continue;
233  }
234  bool cryIsInList = false;
235  result = find(seedCrys_.begin(), seedCrys_.end(), cryIndex);
236  if (result != seedCrys_.end())
237  cryIsInList = true;
238 
239  // Either we must have a user-requested cry (in which case there is no amplitude selection)
240  // Or we pick all crys that pass the amplitude cut (in which case there is no fixed crystal selection)
241  if(cryIsInList || (seedCrys_.empty() && ampli > threshold_))
242  {
243  // We have a winner!
244  crysAndAmplitudesMap_[cryIndex] = ampli;
245  string name = "Digis_Event" + intToString(naiveEvtNum_) + "_ic" + intToString(ic)
246  + "_FED" + intToString(FEDid);
247  string title = "Digis";
248  string seed = "ic" + intToString(ic) + "_FED" + intToString(FEDid);
249  int freq=1;
250  pair<map<string,int>::iterator,bool> pair = seedFrequencyMap_.insert(make_pair(seed,freq));
251  if(!pair.second)
252  {
253  ++(pair.first->second);
254  }
255 
256  //TODO: move this also to TFileService
257  TCanvas can(name.c_str(),title.c_str(),200,50,900,900);
258  can.Divide(side_,side_);
259  TGraph* myGraph;
260 
261  CaloNavigator<DetId> cursor = CaloNavigator<DetId>(det,caloTopo->getSubdetectorTopology(det));
262  //Now put each graph in one by one
263  for(int j=side_/2; j>=-side_/2; --j)
264  {
265  for(int i=-side_/2; i<=side_/2; ++i)
266  {
267  cursor.home();
268  cursor.offsetBy(i,j);
269  can.cd(i+1+side_/2+side_*(1-j));
270  myGraph = selectDigi(*cursor,ievt);
271  myGraph->Draw("A*");
272  }
273  }
274  can.Write();
275  names->push_back(name);
276  }
277  }
278 }
279 
280 TGraph* EcalDisplaysByEvent::selectDigi(DetId thisDet, int ievt)
281 {
282  int emptyY[10];
283  for (int i=0; i<10; i++)
284  emptyY[i] = 0;
285  TGraph* emptyGraph = fileService->make<TGraph>(10, abscissa, emptyY);
286  emptyGraph->SetTitle("NOT ECAL");
287 
288  //If the DetId is not from Ecal, return
289  if(thisDet.det() != DetId::Ecal)
290  return emptyGraph;
291 
292  emptyGraph->SetTitle("NO DIGIS");
293  //find digi we need -- can't get find() to work; need DataFrame(DetId det) to work?
295  int FEDid = 600+elecId.dccId();
296  bool isBarrel = true;
297  if(FEDid < 610 || FEDid > 645)
298  isBarrel = false;
299  int cryIndex = isBarrel ? ((EBDetId)thisDet).hashedIndex() : getEEIndex(elecId);
300  int ic = isBarrel ? ((EBDetId)thisDet).ic() : cryIndex;
301 
302  string sliceName = fedMap_->getSliceFromFed(FEDid);
303  EcalDataFrame df;
304  if(isBarrel)
305  {
307  while(digiItr != EBdigisHandle->end() && ((*digiItr).id() != (EBDetId)thisDet))
308  {
309  ++digiItr;
310  }
311  if(digiItr==EBdigisHandle->end())
312  {
313  //LogWarning("EcalDisplaysByEvent") << "Cannot find digi for ic:" << ic
314  // << " FED:" << FEDid << " evt:" << naiveEvtNum_;
315  return emptyGraph;
316  }
317  else
318  df = *digiItr;
319  }
320  else
321  {
323  while(digiItr != EEdigisHandle->end() && ((*digiItr).id() != (EEDetId)thisDet))
324  {
325  ++digiItr;
326  }
327  if(digiItr==EEdigisHandle->end())
328  {
329  //LogWarning("EcalDisplaysByEvent") << "Cannot find digi for ic:" << ic
330  // << " FED:" << FEDid << " evt:" << naiveEvtNum_;
331  return emptyGraph;
332  }
333  else df = *digiItr;
334  }
335 
336  int gainId = FEDsAndDCCHeaders_[FEDid].getMgpaGain();
337  int gainHuman;
338  if (gainId ==1) gainHuman =12;
339  else if (gainId ==2) gainHuman =6;
340  else if (gainId ==3) gainHuman =1;
341  else gainHuman =-1;
342 
343  double pedestal = 200;
344 
345  emptyGraph->SetTitle("FIRST TWO SAMPLES NOT GAIN12");
346  if(df.sample(0).gainId()!=1 || df.sample(1).gainId()!=1) return emptyGraph; //goes to the next digi
347  else {
348  ordinate[0] = df.sample(0).adc();
349  ordinate[1] = df.sample(1).adc();
350  pedestal = (double)(ordinate[0]+ordinate[1])/(double)2;
351  }
352 
353 
354  for (int i=0; i < df.size(); ++i ) {
355  if (df.sample(i).gainId() != 0)
356  ordinate[i] = (int)(pedestal+(df.sample(i).adc()-pedestal)*gainRatio[df.sample(i).gainId()-1]);
357  else
358  ordinate[i] = 49152; //Saturation of gain1
359  }
360 
361  TGraph* oneGraph = fileService->make<TGraph>(10, abscissa, ordinate);
362  string name = "Graph_ev" + intToString(naiveEvtNum_) + "_ic" + intToString(ic)
363  + "_FED" + intToString(FEDid);
364  string gainString = (gainId==1) ? "Free" : intToString(gainHuman);
365  string title = "Event" + intToString(naiveEvtNum_) + "_lv1a" + intToString(ievt) +
366  "_ic" + intToString(ic) + "_" + sliceName + "_gain" + gainString;
367 
368  float energy = 0;
369  map<int,float>::const_iterator itr;
370  itr = crysAndAmplitudesMap_.find(cryIndex);
371  if(itr!=crysAndAmplitudesMap_.end())
372  {
373  //edm::LogWarning("EcalDisplaysByEvent")<< "itr->second(ampli)="<< itr->second;
374  energy = (float) itr->second;
375  }
376  //else
377  //edm::LogWarning("EcalDisplaysByEvent") << "cry " << ic << "not found in ampMap";
378 
379  title+="_Energy"+floatToString(round(energy*1000));
380 
381  oneGraph->SetTitle(title.c_str());
382  oneGraph->SetName(name.c_str());
383  oneGraph->GetXaxis()->SetTitle("sample");
384  oneGraph->GetYaxis()->SetTitle("ADC");
385  return oneGraph;
386 }
387 
389 {
390  int FEDid = 600+elecId.dccId();
391  return 10000*FEDid+100*elecId.towerId()+5*(elecId.stripId()-1)+elecId.xtalId();
392 }
393 
395  const EBDigiCollection* ebDigis = ebDigiHandle.product();
396  for(EBDigiCollection::const_iterator digiItr = ebDigis->begin(); digiItr != ebDigis->end(); ++digiItr) {
397  EBDetId digiId = digiItr->id();
398  int ieta = digiId.ieta();
399  int iphi = digiId.iphi();
400  digiOccupancyEBAll_->Fill(iphi,ieta);
401  digiOccupancyEBcoarseAll_->Fill(iphi,ieta);
403  {
404  digiOccupancyEB_->Fill(iphi,ieta);
405  digiOccupancyEBcoarse_->Fill(iphi,ieta);
406  }
407  }
408 }
409 
411  const EEDigiCollection* eeDigis = eeDigiHandle.product();
412  for(EEDigiCollection::const_iterator digiItr = eeDigis->begin(); digiItr != eeDigis->end(); ++digiItr) {
413  DetId det = digiItr->id();
415  size_t FEDid = 600+elecId.dccId();
416  bool isEEM = false;
417  if(FEDid < 610)
418  isEEM = true;
419  EEDetId digiId = digiItr->id();
420  int ieta = digiId.iy();
421  int iphi = digiId.ix();
422  if(isEEM)
423  {
424  digiOccupancyEEMAll_->Fill(iphi,ieta);
425  digiOccupancyEEMcoarseAll_->Fill(iphi,ieta);
427  {
428  digiOccupancyEEMcoarse_->Fill(iphi,ieta);
429  digiOccupancyEEM_->Fill(iphi,ieta);
430  }
431  }
432  else
433  {
434  digiOccupancyEEPAll_->Fill(iphi,ieta);
435  digiOccupancyEEPcoarseAll_->Fill(iphi,ieta);
437  {
438  digiOccupancyEEP_->Fill(iphi,ieta);
439  digiOccupancyEEPcoarse_->Fill(iphi,ieta);
440  }
441  }
442  }
443 }
444 
446 {
447  for (EcalRecHitCollection::const_iterator hitItr = hits->begin(); hitItr != hits->end(); ++hitItr)
448  {
449  EcalRecHit hit = (*hitItr);
450  DetId det = hit.id();
452  int FEDid = 600+elecId.dccId();
453  bool isBarrel = true;
454  bool isEEM = false;
455  if(FEDid < 610 || FEDid > 645)
456  {
457  isBarrel = false;
458  if(FEDid < 610)
459  isEEM = true;
460  }
461  int iphi = isBarrel ? ((EBDetId)det).iphi() : ((EEDetId)det).ix();
462  int ieta = isBarrel ? ((EBDetId)det).ieta() : ((EEDetId)det).iy();
463  float energy = hit.energy();
464  float time = hit.time();
465 
466  // Fill energy histos
468  {
469  if(isBarrel)
470  {
471  energyEB_->Fill(energy);
472  energyMapEB_->Fill(iphi,ieta,energy);
473  energyMapEBcoarse_->Fill(iphi,ieta,energy);
474  }
475  else if(isEEM)
476  {
477  energyEEM_->Fill(energy);
478  energyMapEEM_->Fill(iphi,ieta,energy);
479  energyMapEEMcoarse_->Fill(iphi,ieta,energy);
480  }
481  else
482  {
483  energyEEP_->Fill(energy);
484  energyMapEEP_->Fill(iphi,ieta,energy);
485  energyMapEEPcoarse_->Fill(iphi,ieta,energy);
486  }
487  }
488  // Fill occupancy histos
490  {
491  if(isBarrel)
492  {
493  recHitOccupancyEB_->Fill(iphi,ieta);
494  recHitOccupancyEBcoarse_->Fill(iphi,ieta);
495  }
496  else if(isEEM)
497  {
498  recHitOccupancyEEM_->Fill(iphi,ieta);
499  recHitOccupancyEEMcoarse_->Fill(iphi,ieta);
500  }
501  else
502  {
503  recHitOccupancyEEP_->Fill(iphi,ieta);
504  recHitOccupancyEEPcoarse_->Fill(iphi,ieta);
505  }
506  }
507 
508  // Fill timing histos
510  {
511  if(isBarrel) {
512  timingEB_->Fill(time);
513  if(energy > minTimingEnergyEB_) {
514  timingMapEB_->Fill(iphi,ieta,time);
515  //timingMapEBCoarse_->Fill(iphi,ieta,time);
516  }
517  }
518  else if(isEEM) {
519  timingEEM_->Fill(time);
520  if(energy > minTimingEnergyEE_)
521  {
522  timingMapEEM_->Fill(iphi,ieta,time);
523  //timingMapEEMCoarse_->Fill(iphi,ieta,time);
524  }
525  }
526  else {
527  timingEEP_->Fill(time);
528  if(energy > minTimingEnergyEE_)
529  {
530  timingMapEEP_->Fill(iphi,ieta,time);
531  //timingMapEEPCoarse_->Fill(iphi,ieta,time);
532  }
533  }
534  }
535 
536  //All events
537  if(isBarrel)
538  {
539  energyEBAll_->Fill(energy);
540  energyMapEBAll_->Fill(iphi,ieta,energy);
541  energyMapEBcoarseAll_->Fill(iphi,ieta,energy);
542  recHitOccupancyEBAll_->Fill(iphi,ieta);
543  recHitOccupancyEBcoarseAll_->Fill(iphi,ieta);
544  timingEBAll_->Fill(time);
545  if(energy > minTimingEnergyEB_)
546  {
547  timingMapEBAll_->Fill(iphi,ieta,time);
548  timingMapEBCoarseAll_->Fill(iphi,ieta,time);
549  }
550  }
551  else if(isEEM)
552  {
553  energyEEMAll_->Fill(energy);
554  energyMapEEMAll_->Fill(iphi,ieta,energy);
555  energyMapEEMcoarseAll_->Fill(iphi,ieta,energy);
556  recHitOccupancyEEMAll_->Fill(iphi,ieta);
557  recHitOccupancyEEMcoarseAll_->Fill(iphi,ieta);
558  timingEEMAll_->Fill(time);
559  if(energy > minTimingEnergyEE_)
560  {
561  timingMapEEMAll_->Fill(iphi,ieta,time);
562  timingMapEEMCoarseAll_->Fill(iphi,ieta,time);
563  }
564  }
565  else
566  {
567  energyEEPAll_->Fill(energy);
568  energyMapEEPAll_->Fill(iphi,ieta,energy);
569  energyMapEEPcoarseAll_->Fill(iphi,ieta,energy);
570  recHitOccupancyEEPAll_->Fill(iphi,ieta);
571  recHitOccupancyEEPcoarseAll_->Fill(iphi,ieta);
572  timingEEPAll_->Fill(time);
573  if(energy > minTimingEnergyEE_)
574  {
575  timingMapEEPAll_->Fill(iphi,ieta,time);
576  timingMapEEPCoarseAll_->Fill(iphi,ieta,time);
577  }
578  }
579  // Fill FED-by-FED timing histos (all events)
580  TH1F* timingHist = FEDsAndTimingHists_[FEDid];
581  if(timingHist==0)
582  {
583  initHists(FEDid);
584  timingHist = FEDsAndTimingHists_[FEDid];
585  }
586  if(energy > minTimingAmp_)
587  {
588  timingHist->Fill(hit.time());
589  allFedsTimingHist_->Fill(hit.time());
590  }
591  }
592 }
593 
594 // ------------ method called once each job just after ending the event loop ------------
595 void
597 {
598  //All-event canvases
608 
609  if(runNum_ != -1) {
610  canvasNames_->Fill();
611  histoCanvasNames_->Fill();
612  }
613 
614  string frequencies = "";
615  for(std::map<std::string,int>::const_iterator itr = seedFrequencyMap_.begin();
616  itr != seedFrequencyMap_.end(); ++itr)
617  {
618  if(itr->second > 1)
619  {
620  frequencies+=itr->first;
621  frequencies+=" Frequency: ";
622  frequencies+=intToString(itr->second);
623  frequencies+="\n";
624  }
625  }
626  LogWarning("EcalDisplaysByEvent") << "Found seeds with frequency > 1: " << "\n\n" << frequencies;
627 
628  std::string channels;
629  for(std::vector<int>::const_iterator itr = maskedChannels_.begin();
630  itr != maskedChannels_.end(); ++itr)
631  {
632  channels+=intToString(*itr);
633  channels+=",";
634  }
635 
636  std::string feds;
637  for(std::vector<int>::const_iterator itr = maskedFEDs_.begin();
638  itr != maskedFEDs_.end(); ++itr)
639  {
640  feds+=intToString(*itr);
641  feds+=",";
642  }
643 
644  LogWarning("EcalDisplaysByEvent") << "Masked channels are: " << channels;
645  LogWarning("EcalDisplaysByEvent") << "Masked FEDs are: " << feds << " and that is all!";
646 }
647 
649 {
650  using namespace std;
651  ostringstream myStream;
652  myStream << num << flush;
653  return(myStream.str()); //returns the string form of the stringstream object
654 }
655 
657 {
658  using namespace std;
659  ostringstream myStream;
660  myStream << num << flush;
661  return(myStream.str()); //returns the string form of the stringstream object
662 }
663 
664 // insert the hist map into the map keyed by FED number
666 {
667  using namespace std;
668 
669  string title1 = "Jitter for ";
670  title1.append(fedMap_->getSliceFromFed(FED));
671  string name1 = "JitterFED";
672  name1.append(intToString(FED));
673  TH1F* timingHist = fileService->make<TH1F>(name1.c_str(),title1.c_str(),150,-7,7);
674  FEDsAndTimingHists_[FED] = timingHist;
675 }
676 
678 {
679  string lastPart = intToString(naiveEvtNum_)+"_LV1a"+intToString(ievt);
681  {
682  string canvasTitle = "Timing_Event"+lastPart;
683  timingEB_ = new TH1F("timeForAllFedsEB","timeForAllFeds;Relative Time (1 clock = 25ns)",78,-7,7);
684  timingEEM_ = new TH1F("timeForAllFedsEEM","timeForAllFeds_EEM;Relative Time (1 clock = 25ns)",78,-7,7);
685  timingEEP_ = new TH1F("timeForAllFedsEEP","timeForAllFeds_EEP;Relative Time (1 clock = 25ns)",78,-7,7);
686  timingCanvas_ = new TCanvas(canvasTitle.c_str(), canvasTitle.c_str(),300,60,500,200);
687  timingMapEB_ = init3DEcalHist("TimingMap", EB_FINE);
688  timingMapEEM_ = init3DEcalHist("TimingMap", EEM_FINE);
689  timingMapEEP_ = init3DEcalHist("TimingMap", EEP_FINE);
690  timingMapCanvas_ = init2DEcalCanvas("TimingMap_Event"+lastPart);
691  //timingMapEBCoarse_ = init3DEcalHist("TimingMap", EB_COARSE);
694  //timingMapCoarseCanvas_ = init2DEcalCanvas("TimingMapCoarse_Event"+lastPart);
695  }
697  {
698  energyEB_ = new TH1F("energyEB","Energy for EB Feds (GeV)",200,histRangeMin_,histRangeMax_);
699  energyEEM_ = new TH1F("energyEEM","Energy for EEM Feds (GeV)",200,histRangeMin_,10.0);
700  energyEEP_ = new TH1F("energyEEP","Energy for EEP Feds (GeV)",200,histRangeMin_,10.0);
701  string canvasTitle = "Energy_Event"+lastPart;
702  energyCanvas_ = new TCanvas(canvasTitle.c_str(), canvasTitle.c_str(),300,60,500,200);
703 
704  // Energy map hists
705  energyMapEB_ = init2DEcalHist("EnergyMap",EB_FINE);
708  energyMapEEM_ = init2DEcalHist("EnergyMap",EEM_FINE);
710  energyMapEEP_ = init2DEcalHist("EnergyMap",EEP_FINE);
711  energyMapCanvas_ = init2DEcalCanvas("EnergyMap_Event"+lastPart);
712  energyMapCoarseCanvas_ = init2DEcalCanvas("EnergyMapCoarse_Event"+lastPart);
713  }
715  {
716  // RecHit Occupancy
717  recHitOccupancyEB_ = init2DEcalHist("RecHitOccupancy",EB_FINE);
720  recHitOccupancyEEM_ = init2DEcalHist("RecHitOccupancy",EEM_FINE);
722  recHitOccupancyEEP_ = init2DEcalHist("RecHitOccupancy",EEP_FINE);
723  recHitOccupancyCanvas_ = init2DEcalCanvas("RecHitOccupancy_Event"+lastPart);
724  recHitOccupancyCoarseCanvas_ =init2DEcalCanvas("RecHitOccupancyCoarse_Event"+lastPart);
725 
726  //DigiOccupancy
727  digiOccupancyEB_ = init2DEcalHist("DigiOccupancy",EB_FINE);
728  digiOccupancyEBcoarse_ = init2DEcalHist("DigiOccupancy", EB_COARSE);
730  digiOccupancyEEM_ = init2DEcalHist("DigiOccupancy",EEM_FINE);
732  digiOccupancyEEP_ = init2DEcalHist("DigiOccupancy",EEP_FINE);
733  digiOccupancyCanvas_ = init2DEcalCanvas("DigiOccupancy_Event"+lastPart);
734  digiOccupancyCoarseCanvas_ = init2DEcalCanvas("DigiOccupancyCoarse_Event"+lastPart);
735  }
736 }
737 
739 {
740  delete timingEB_;
741  delete timingEEM_;
742  delete timingEEP_;
743  delete timingMapEB_;
744  delete timingMapEEM_;
745  delete timingMapEEP_;
746  delete timingCanvas_;
747  delete timingMapCanvas_;
748  delete energyEB_;
749  delete energyEEM_;
750  delete energyEEP_;
751  delete energyMapEB_;
752  delete energyMapEEM_;
753  delete energyMapEEP_;
754  delete energyMapEBcoarse_;
755  delete energyMapEEMcoarse_;
756  delete energyMapEEPcoarse_;
757  delete energyCanvas_;
758  delete energyMapCanvas_;
759  delete energyMapCoarseCanvas_;
760  delete recHitOccupancyEB_;
761  delete recHitOccupancyEEP_;
762  delete recHitOccupancyEEM_;
766  delete digiOccupancyEB_;
767  delete digiOccupancyEEM_;
768  delete digiOccupancyEEP_;
769  delete digiOccupancyEBcoarse_;
772  delete recHitOccupancyCanvas_;
774  delete digiOccupancyCanvas_;
776 }
777 
779 {
780  string canvasTitle = "Timing_AllEvents";
781  timingEBAll_ = new TH1F("timeForAllFedsEBAll","timeForAllFeds;Relative Time (1 clock = 25ns)",78,-7,7);
782  timingEEMAll_ = new TH1F("timeForAllFedsEEMAll","timeForAllFeds_EEM;Relative Time (1 clock = 25ns)",78,-7,7);
783  timingEEPAll_ = new TH1F("timeForAllFedsEEPAll","timeForAllFeds_EEP;Relative Time (1 clock = 25ns)",78,-7,7);
784  timingCanvasAll_ = new TCanvas(canvasTitle.c_str(), canvasTitle.c_str(),300,60,500,200);
785  timingMapEBAll_ = init3DEcalHist("TimingMapA", EB_FINE);
786  timingMapEEMAll_ = init3DEcalHist("TimingMapA", EEM_FINE);
787  timingMapEEPAll_ = init3DEcalHist("TimingMapA", EEP_FINE);
788  timingMapCanvasAll_ = init2DEcalCanvas("TimingMap_AllEvents");
792  //timingMapCoarseCanvasAll_ = init2DEcalCanvas("TimingMapCoarse_AllEvents");
793  energyEBAll_ = new TH1F("energyEBAllEvents","Energy for EB Feds (GeV)",200,histRangeMin_,histRangeMax_);
794  energyEEMAll_ = new TH1F("energyEEMAllEvents","Energy for EEM Feds (GeV)",200,histRangeMin_,10.0);
795  energyEEPAll_ = new TH1F("energyEEPAllEvents","Energy for EEP Feds (GeV)",200,histRangeMin_,10.0);
796  canvasTitle = "Energy_AllEvents";
797  energyCanvasAll_ = new TCanvas(canvasTitle.c_str(), canvasTitle.c_str(),300,60,500,200);
798 
799  // Energy map hists
800  energyMapEBAll_ = init2DEcalHist("EnergyMapA",EB_FINE);
803  energyMapEEMAll_ = init2DEcalHist("EnergyMapA",EEM_FINE);
805  energyMapEEPAll_ = init2DEcalHist("EnergyMapA",EEP_FINE);
806  energyMapCanvasAll_ = init2DEcalCanvas("EnergyMap_AllEvents");
807  energyMapCoarseCanvasAll_ = init2DEcalCanvas("EnergyMapCoarse_AllEvents");
808  // RecHit Occupancy
809  recHitOccupancyEBAll_ = init2DEcalHist("RecHitOccupancyA",EB_FINE);
812  recHitOccupancyEEMAll_ = init2DEcalHist("RecHitOccupancyA",EEM_FINE);
814  recHitOccupancyEEPAll_ = init2DEcalHist("RecHitOccupancyA",EEP_FINE);
815  recHitOccupancyCanvasAll_ = init2DEcalCanvas("RecHitOccupancy_AllEvents");
816  recHitOccupancyCoarseCanvasAll_ =init2DEcalCanvas("RecHitOccupancyCoarse_AllEvents");
817 
818  //DigiOccupancy
819  digiOccupancyEBAll_ = init2DEcalHist("DigiOccupancyA",EB_FINE);
822  digiOccupancyEEMAll_ = init2DEcalHist("DigiOccupancyA",EEM_FINE);
824  digiOccupancyEEPAll_ = init2DEcalHist("DigiOccupancyA",EEP_FINE);
825  digiOccupancyCanvasAll_ = init2DEcalCanvas("DigiOccupancy_AllEvents");
826  digiOccupancyCoarseCanvasAll_ = init2DEcalCanvas("DigiOccupancyCoarse_AllEvents");
827 
828 }
829 
830 
831 TH3F* EcalDisplaysByEvent::init3DEcalHist(std::string histTypeName, int subDet) {
832  TH3F* hist;
833  bool isBarrel = (subDet == EB_FINE || subDet == EB_COARSE) ? true : false;
834  bool isCoarse = (subDet == EB_COARSE || subDet == EEM_COARSE || subDet == EEP_COARSE) ? true : false;
835  bool isEEM = (subDet == EEM_FINE || subDet == EEM_COARSE) ? true : false;
836  std::string histName = histTypeName;
837  std::string histTitle = histTypeName;
838  double ttEtaBins[36] = {-85, -80, -75, -70, -65, -60, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 76, 81, 86 };
839  double modEtaBins[10]={-85, -65, -45, -25, 0, 1, 26, 46, 66, 86};
840  double ttPhiBins[73];
841  double modPhiBins[19];
842  double timingBins[79];
843  for (int i = 0; i < 79; ++i)
844  {
845  timingBins[i]= 6 - 7. + double(i) * 14. / 78.;
846  if (i<73)
847  {
848  ttPhiBins[i]=1+5*i;
849  if ( i < 19)
850  {
851  modPhiBins[i]=1+20*i;
852  }
853  }
854 
855  }
856 
857  if(isBarrel) {
858  histName = histName + "EB";
859  histTitle = histTitle + " EB";
860  if(isCoarse) {
861  histName = histName + "Coarse";
862  histTitle = histTitle + " by Module Nominal value = 6;iphi;ieta ";
863  hist = new TH3F(histName.c_str(),histTitle.c_str(),18,modPhiBins,9,modEtaBins,78,timingBins);
864  }
865  else {
866  histTitle = histTitle + " by TT Nominal value = 6;iphi;ieta";
867  hist = new TH3F(histName.c_str(),histTitle.c_str(),360/5,ttPhiBins,35,ttEtaBins,78,timingBins);
868  }
869  }
870  else {
871  double ttXBins[21];
872  double ttYBins[21];
873  for(int i=0;i!=21;++i) {
874  ttXBins[i] = 1 + 5*i;
875  ttYBins[i] = 1 + 5*i;
876  }
877  if(isEEM) {
878  histName = histName + "EEM";
879  histTitle = histTitle + " EEM";
880  }
881  else {
882  histName = histName + "EEP";
883  histTitle = histTitle + " EEP";
884  }
885  if(isCoarse) {
886  histName = histName + "Coarse";
887  histTitle = histTitle + " by Module Nominal value = 6;ix;iy";
888  hist = new TH3F(histName.c_str(),histTitle.c_str(),20,ttXBins,20,ttYBins,78,timingBins);
889  }
890  else {
891  histTitle = histTitle + " by TT Nominal value = 6;ix;iy";
892  hist = new TH3F(histName.c_str(),histTitle.c_str(),20,ttXBins,20,ttYBins,78,timingBins);
893  }
894  }
895  return hist;
896 }
897 
898 TH2F* EcalDisplaysByEvent::init2DEcalHist(std::string histTypeName, int subDet) {
899  TH2F* hist;
900  bool isBarrel = (subDet == EB_FINE || subDet == EB_COARSE) ? true : false;
901  bool isCoarse = (subDet == EB_COARSE || subDet == EEM_COARSE || subDet == EEP_COARSE) ? true : false;
902  bool isEEM = (subDet == EEM_FINE || subDet == EEM_COARSE) ? true : false;
903  std::string histName = histTypeName;
904  std::string histTitle = histTypeName;
905  if(isBarrel) {
906  histName = histName + "EB";
907  histTitle = histTitle + " EB";
908  if(isCoarse) {
909  histName = histName + "Coarse";
910  histTitle = histTitle + " Coarse;iphi;ieta";
911  double ttEtaBins[36] = {-85, -80, -75, -70, -65, -60, -55, -50, -45, -40,
912  -35, -30, -25, -20, -15, -10, -5, 0, 1, 6, 11, 16,
913  21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 76, 81, 86 };
914  hist = new TH2F(histName.c_str(),histTitle.c_str(),360/5,1,361.,35,ttEtaBins);
915  }
916  else {
917  histTitle = histTitle + ";iphi;ieta";
918  hist = new TH2F(histName.c_str(),histTitle.c_str(),360,1,361.,172,-86,86);
919  }
920  }
921  else {
922  if(isEEM) {
923  histName = histName + "EEM";
924  histTitle = histTitle + " EEM";
925  }
926  else {
927  histName = histName + "EEP";
928  histTitle = histTitle + " EEP";
929  }
930  if(isCoarse) {
931  histName = histName + "Coarse";
932  histTitle = histTitle + " Coarse;ix;iy";
933  hist = new TH2F(histName.c_str(),histTitle.c_str(),20,1,101,20,1,101);
934  }
935  else {
936  histTitle = histTitle + ";ix;iy";
937  hist = new TH2F(histName.c_str(),histTitle.c_str(),100,1,101,100,1,101);
938  }
939  }
940  return hist;
941 }
942 
944  TCanvas* canvas = new TCanvas(canvasTitle.c_str(), canvasTitle.c_str(),300,60,500,200);
945  return canvas;
946 }
947 
949 {
951  {
952  // Put the timing canvas together
954  // drawCanvas(timingMapCoarseCanvas_,timingMapEEMCoarse_,timingMapEBCoarse_,timingMapEEPCoarse_);
956  }
958  {
959  // Put the energy canvas together
961  // Put the energy map canvas together
964  }
966  {
967  // Put the occupancy canvas together
970  // And the same for the digis
973  }
974 }
975 
976 void EcalDisplaysByEvent::drawCanvas(TCanvas* canvas, TH1F* hist1, TH1F* hist2, TH1F* hist3) {
977  canvas->Divide(1,2);
978  canvas->cd(1)->Divide(2,1);
979  canvas->cd(1)->cd(1);
980  hist1->Draw();
981  canvas->cd(2);
982  hist2->Draw();
983  canvas->cd(1)->cd(2);
984  hist3->Draw();
985  histoCanvasNamesVector->push_back(canvas->GetName());
986  canvas->SetCanvasSize(500,500);
987  canvas->SetFixedAspectRatio(true);
988  canvas->Write();
989 }
990 
991 void EcalDisplaysByEvent::drawCanvas(TCanvas* canvas, TH2F* hist1, TH2F* hist2, TH2F* hist3) {
992  canvas->Divide(1,2);
993  canvas->cd(1)->Divide(2,1);
994  // EEM
995  canvas->cd(1)->cd(1);
996  hist1->Draw("colz");
997  drawEELines();
998  // EB
999  canvas->cd(2);
1000  hist2->Draw("colz");
1001  hist2->GetXaxis()->SetNdivisions(-18);
1002  hist2->GetYaxis()->SetNdivisions(2);
1003  canvas->GetPad(2)->SetGridx(1);
1004  canvas->GetPad(2)->SetGridy(1);
1005  // EEP
1006  canvas->cd(1)->cd(2);
1007  hist3->Draw("colz");
1008  drawEELines();
1009  histoCanvasNamesVector->push_back(canvas->GetName());
1010  canvas->SetCanvasSize(500,500);
1011  canvas->SetFixedAspectRatio(true);
1012  canvas->Write();
1013 }
1014 
1015 void EcalDisplaysByEvent::drawCanvas(TCanvas* canvas, TH3F* hist1, TH3F* hist2, TH3F* hist3) {
1016  if(canvas == timingMapCoarseCanvas_) {
1017  canvas->cd();
1018  TProfile2D* profile2 = (TProfile2D*) hist2->Project3DProfile("yx");
1019  profile2->Draw("colz");
1020  drawTimingErrors(profile2);
1021  }
1022  else {
1023  canvas->Divide(1,2);
1024  canvas->cd(1)->Divide(2,1);
1025  // EEM
1026  canvas->cd(1)->cd(1);
1027  TProfile2D* profile1 = (TProfile2D*) hist1->Project3DProfile("yx");
1028  profile1->Draw("colz");
1029  drawEELines();
1030  // EB
1031  canvas->cd(2);
1032  TProfile2D* profile2 = (TProfile2D*) hist2->Project3DProfile("yx");
1033  profile2->Draw("colz");
1034  profile2->GetXaxis()->SetNdivisions(-18);
1035  profile2->GetYaxis()->SetNdivisions(2);
1036  canvas->GetPad(2)->SetGridx(1);
1037  canvas->GetPad(2)->SetGridy(1);
1038  // EEP
1039  canvas->cd(1)->cd(2);
1040  TProfile2D* profile3 = (TProfile2D*) hist3->Project3DProfile("yx");
1041  profile3->Draw("colz");
1042  drawEELines();
1043  }
1044  histoCanvasNamesVector->push_back(canvas->GetName());
1045  canvas->SetCanvasSize(500,500);
1046  canvas->SetFixedAspectRatio(true);
1047  canvas->Write();
1048 }
1049 
1050 void EcalDisplaysByEvent::drawTimingErrors(TProfile2D* profile) {
1051  int nxb = profile->GetNbinsX();
1052  int nyb = profile->GetNbinsY();
1053  char tempErr[200];
1054  for(int i=0;i!=nxb;++i) {
1055  for(int j=0;j!=nyb;++j) {
1056  int xb = i+1;
1057  int yb = j+1;
1058 // std::cout << "xb: " << xb << "\tyb: " << yb << std::endl;
1059  double xcorr = profile->GetBinCenter(xb);
1060  double ycorr = profile->GetBinCenter(yb);
1061  sprintf(tempErr,"%0.2f",profile->GetBinError(xb,yb));
1062  int nBin = profile->GetBin(xb,yb,0);
1063  int nBinEntries = (int) profile->GetBinEntries(nBin);
1064  if(nBinEntries != 0) {
1065  TLatex* tex = new TLatex(xcorr,ycorr,tempErr);
1066  tex->SetTextAlign(23);
1067  tex->SetTextSize(42);
1068  tex->SetTextSize(0.025);
1069  tex->SetLineWidth(2);
1070  tex->Draw();
1071  delete tex;
1072  }
1073  sprintf(tempErr,"%i",nBinEntries);
1074  if(nBinEntries!=0) {
1075  TLatex* tex = new TLatex(xcorr,ycorr,tempErr);
1076  tex->SetTextAlign(21);
1077  tex->SetTextFont(42);
1078  tex->SetTextSize(0.025);
1079  tex->SetLineWidth(2);
1080  tex->Draw();
1081  delete tex;
1082  }
1083  }
1084  }
1085 }
1086 
1088 
1089  int ixSectorsEE[202] = {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, 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, 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, 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, 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, 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, 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, 30, 20, 20, 10, 10, 8, 0, 45, 45, 40, 40, 35, 35, 0, 55, 55, 60, 60, 65, 65};
1090 
1091  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, 45, 45, 43, 43, 42, 42, 41, 41, 40, 40, 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, 45, 45, 50, 0, 50, 60, 60, 65, 65, 75, 75, 80, 80, 85, 85, 87, 87, 92, 92, 95, 95, 97, 97,100,100, 97, 97, 95, 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, 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, 40, 50, 0, 45, 45, 40, 40, 35, 35, 30, 30, 25, 25, 0, 50, 50, 55, 55, 60, 60, 0, 60, 60, 65, 65, 70, 70, 75, 75, 85, 85, 87, 0, 61,100, 0, 60, 60, 65, 65, 70, 70, 75, 75, 85, 85, 87, 0, 50, 50, 55, 55, 60, 60, 0, 45, 45, 40, 40, 35, 35, 30, 30, 25, 25, 0, 39, 30, 30, 15, 15, 5, 0, 39, 30, 30, 15, 15, 5};
1092 
1093 
1094  for ( int i=0; i<202; i++) {
1095  ixSectorsEE[i] += 1;
1096  iySectorsEE[i] += 1;
1097 // std::cout << i << " " << ixSectorsEE[i] << " " << iySectorsEE[i] << std::endl;
1098  }
1099 
1100  TLine l;
1101  l.SetLineWidth(1);
1102  for ( int i=0; i<201; i=i+1) {
1103  if ( (ixSectorsEE[i]!=1 || iySectorsEE[i]!=1) &&
1104  (ixSectorsEE[i+1]!=1 || iySectorsEE[i+1]!=1) ) {
1105  l.DrawLine(ixSectorsEE[i], iySectorsEE[i],
1106  ixSectorsEE[i+1], iySectorsEE[i+1]);
1107  }
1108  }
1109 
1110 
1111 }
RunNumber_t run() const
Definition: EventID.h:39
std::map< int, TH1F * > FEDsAndTimingHists_
std::vector< std::string > maskedEBs_
EventNumber_t event() const
Definition: EventID.h:41
T getUntrackedParameter(std::string const &, T const &) const
std::set< EBDetId > listEBChannels
int i
Definition: DBlmapReader.cc:9
edm::Handle< EEDigiCollection > EEdigisHandle
int ix() const
Definition: EEDetId.h:76
int xtalId() const
get the channel id
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
int gainId(sample_type sample)
get the gainId (2 bits)
int stripId() const
get the tower id
TH2F * init2DEcalHist(std::string histTypeName, int subDet)
std::vector< int > maskedChannels_
std::map< int, float > crysAndAmplitudesMap_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::vector< std::string > * names
const EcalElectronicsMapping * ecalElectronicsMap_
int getEEIndex(EcalElectronicsId elecId)
bool isBarrel(GeomDetEnumerators::SubDetector m)
edm::InputTag headerProducer_
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:29
void drawTimingErrors(TProfile2D *profile)
int towerId() const
get the tower id
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
float time() const
Definition: EcalRecHit.h:70
const_iterator begin() const
TCanvas * digiOccupancyCoarseCanvasAll_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
int gainId() const
get the gainId (2 bits)
std::set< EEDetId > listEEChannels
int size() const
Definition: EcalDataFrame.h:26
void drawCanvas(TCanvas *canvas, TH1F *hist1, TH1F *hist2, TH1F *hist3)
def canvas
Definition: svgfig.py:481
std::string getSliceFromFed(int)
Definition: EcalFedMap.cc:93
std::vector< std::string > * histoCanvasNamesVector
int iphi() const
get the crystal iphi
Definition: EBDetId.h:53
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
T offsetBy(int deltaX, int deltaY) const
Free movement of arbitray steps.
Definition: CaloNavigator.h:80
int iEvent
Definition: GenABIO.cc:230
std::vector< int > maskedFEDs_
tuple result
Definition: query.py:137
TCanvas * recHitOccupancyCoarseCanvasAll_
std::map< int, EcalDCCHeaderBlock > FEDsAndDCCHeaders_
tuple handle
Definition: patZpeak.py:22
int j
Definition: DBlmapReader.cc:9
float energy() const
Definition: EcalRecHit.h:68
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
int iy() const
Definition: EEDetId.h:82
int ieta() const
get the crystal ieta
Definition: EBDetId.h:51
static edm::Service< TFileService > fileService
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:405
std::string intToString(int num)
void home() const
move the navigator back to the starting point
Definition: DetId.h:18
static float gainRatio[3]
void makeHistos(edm::Handle< EBDigiCollection > ebDigis)
void selectHits(edm::Handle< EcalRecHitCollection > hits, int ievt, edm::ESHandle< CaloTopology > caloTopo)
edm::Handle< EBDigiCollection > EBdigisHandle
std::map< std::string, int > seedFrequencyMap_
DetId id() const
get the id
Definition: EcalRecHit.h:76
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
const_iterator end() const
void initEvtByEvtHists(int naiveEvtNum_, int ievt)
TCanvas * digiOccupancyCoarseCanvas_
std::vector< int > seedCrys_
edm::InputTag EERecHitCollection_
std::string floatToString(float num)
edm::EventID id() const
Definition: EventBase.h:60
edm::InputTag EBRecHitCollection_
TGraph * selectDigi(DetId det, int ievt)
TH3F * init3DEcalHist(std::string histTypeName, int dubDet)
virtual void analyze(edm::Event const &, edm::EventSetup const &)
volatile std::atomic< bool > shutdown_flag false
TCanvas * init2DEcalCanvas(std::string canvasName)
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
tuple tex
Definition: cuy.py:772
TCanvas * recHitOccupancyCoarseCanvas_
EcalDisplaysByEvent(const edm::ParameterSet &)
Definition: Run.h:41
int adc() const
get the ADC sample (12 bits)