CMS 3D CMS Logo

EcalCosmicsHists.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: EcalCosmicsHists
4 // Class: EcalCosmicsHists
5 //
20 
26 
29 
37 
38 #include <vector>
39 #include "TLine.h"
40 
41 using namespace cms;
42 using namespace edm;
43 using namespace std;
44 
45 //
46 // constants, enums and typedefs
47 //
48 
49 //
50 // static data member definitions
51 //
52 
53 //
54 // constructors and destructor
55 //
57  : ecalRawDataColl_(iConfig.getParameter<edm::InputTag>("ecalRawDataColl")),
58  ecalRecHitCollectionEB_(iConfig.getParameter<edm::InputTag>("ecalRecHitCollectionEB")),
59  ecalRecHitCollectionEE_(iConfig.getParameter<edm::InputTag>("ecalRecHitCollectionEE")),
60  barrelClusterCollection_(iConfig.getParameter<edm::InputTag>("barrelClusterCollection")),
61  endcapClusterCollection_(iConfig.getParameter<edm::InputTag>("endcapClusterCollection")),
62  l1GTReadoutRecTag_(iConfig.getUntrackedParameter<std::string>("L1GlobalReadoutRecord", "gtDigis")),
63  l1GMTReadoutRecTag_(iConfig.getUntrackedParameter<std::string>("L1GlobalMuonReadoutRecord", "gtDigis")),
64  runNum_(-1),
65  histRangeMax_(iConfig.getUntrackedParameter<double>("histogramMaxRange", 1.8)),
66  histRangeMin_(iConfig.getUntrackedParameter<double>("histogramMinRange", 0.0)),
67  minTimingAmpEB_(iConfig.getUntrackedParameter<double>("MinTimingAmpEB", 0.100)),
68  minTimingAmpEE_(iConfig.getUntrackedParameter<double>("MinTimingAmpEE", 0.100)),
69  minRecHitAmpEB_(iConfig.getUntrackedParameter<double>("MinRecHitAmpEB", 0.027)),
70  minRecHitAmpEE_(iConfig.getUntrackedParameter<double>("MinRecHitAmpEE", 0.18)),
71  minHighEnergy_(iConfig.getUntrackedParameter<double>("MinHighEnergy", 2.0)),
72  fileName_(iConfig.getUntrackedParameter<std::string>("fileName", std::string("ecalCosmicHists"))),
73  runInFileName_(iConfig.getUntrackedParameter<bool>("runInFileName", true)),
74  startTime_(iConfig.getUntrackedParameter<double>("TimeStampStart", 1215107133.)),
75  runTimeLength_(iConfig.getUntrackedParameter<double>("TimeStampLength", 3.)),
76  numTimingBins_(iConfig.getUntrackedParameter<int>("TimeStampBins", 1800)) {
77  naiveEvtNum_ = 0;
78  cosmicCounter_ = 0;
79  cosmicCounterEB_ = 0;
83 
84  // TrackAssociator parameters
85  edm::ParameterSet trkParameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
87  trackParameters_.loadParameters(trkParameters, iC);
89 
90  string title1 = "Seed Energy for All Feds; Seed Energy (GeV)";
91  string name1 = "SeedEnergyAllFEDs";
92  int numBins = 200; //(int)round(histRangeMax_-histRangeMin_)+1;
93  allFedsHist_ = new TH1F(name1.c_str(), title1.c_str(), numBins, histRangeMin_, histRangeMax_);
94 
95  fedMap_ = new EcalFedMap();
96 }
97 
99 
100 //
101 // member functions
102 //
103 
104 // ------------ method called to for each event ------------
106  bool hasEndcapClusters = true;
107  int ievt = iEvent.id().event();
108 
111 
112  naiveEvtNum_++;
113 
114  //LogDebug("EcalCosmicsHists")<< " My Event: " << naiveEvtNum_ << " " << iEvent.id().run() << " " << iEvent.id().event() << " " << iEvent.time().value();
115  //LogDebug("EcalCosmicsHists")<< "Timestamp: " << iEvent.id().run() << " " << iEvent.id().event() << " " << iEvent.time().value();
116 
117  // check DB payload
119  iSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
120  const EcalADCToGeVConstant* agc = pAgc.product();
121  if (naiveEvtNum_ <= 1) {
122  LogWarning("EcalCosmicsHists") << "Global EB ADC->GeV scale: " << agc->getEBValue() << " GeV/ADC count";
123  LogWarning("EcalCosmicsHists") << "Global EE ADC->GeV scale: " << agc->getEEValue() << " GeV/ADC count";
124  }
125  //float adcEBconst = agc->getEBValue();
126  //float adcEEconst = agc->getEEValue();
127 
128  //
129 
130  //===================TIMESTAMP INFORMTION=================================
131  // Code added to get the time in seconds
132  unsigned int timeStampLow = (0xFFFFFFFF & iEvent.time().value());
133  unsigned int timeStampHigh = (iEvent.time().value() >> 32);
134  double rawEventTime = (double)(timeStampHigh) + ((double)(timeStampLow) / 1000000.);
135  double eventTime = rawEventTime - startTime_; //Notice the subtraction of the "starttime"
136  //std::cout << "Event Time " << eventTime << " High " <<timeStampHigh<< " low"<<timeStampLow <<" value " <<iEvent.time().value() << std::endl;
137  //========================================================================
138 
139  iEvent.getByLabel(barrelClusterCollection_, bscHandle);
140  if (!(bscHandle.isValid())) {
141  LogWarning("EcalCosmicsHists") << barrelClusterCollection_ << " not available";
142  return;
143  }
144  LogDebug("EcalCosmicsHists") << "event " << ievt;
145 
146  iEvent.getByLabel(endcapClusterCollection_, escHandle);
147  if (!(escHandle.isValid())) {
148  LogWarning("EcalCosmicsHists") << endcapClusterCollection_ << " not available";
149  hasEndcapClusters = false;
150  //return;
151  }
152 
154  iEvent.getByLabel(ecalRecHitCollectionEB_, hits);
155  if (!(hits.isValid())) {
156  LogWarning("EcalCosmicsHists") << ecalRecHitCollectionEB_ << " not available";
157  return;
158  }
160  iEvent.getByLabel(ecalRecHitCollectionEE_, hitsEE);
161  if (!(hitsEE.isValid())) {
162  LogWarning("EcalCosmicsHists") << ecalRecHitCollectionEE_ << " not available";
163  return;
164  }
165 
167  iEvent.getByLabel(ecalRawDataColl_, DCCHeaders);
168  if (!DCCHeaders.isValid())
169  LogWarning("EcalCosmicsHists") << "DCC headers not available";
170 
171  //make the bx histos right here
172  //TODO: Right now we are filling histos for errors...
173  int orbit = -100;
174  int bx = -100;
175  int runType = -100;
176 
177  for (EcalRawDataCollection::const_iterator headerItr = DCCHeaders->begin(); headerItr != DCCHeaders->end();
178  ++headerItr) {
179  headerItr->getEventSettings();
180  int myorbit = headerItr->getOrbit();
181  int mybx = headerItr->getBX();
182  int myRunType = headerItr->getRunType();
183  int FEDid = headerItr->fedId();
184  TH2F* dccRuntypeHist = FEDsAndDCCRuntypeVsBxHists_[FEDid];
185  if (dccRuntypeHist == nullptr) {
186  initHists(FEDid);
187  dccRuntypeHist = FEDsAndDCCRuntypeVsBxHists_[FEDid];
188  }
189  dccRuntypeHist->Fill(mybx, myRunType);
190 
191  if (bx == -100) {
192  bx = mybx;
193  } else if (bx != mybx) {
194  LogWarning("EcalCosmicsHists") << "This header has a conflicting bx OTHERS were " << bx << " here " << mybx;
195  dccBXErrorByFEDHist_->Fill(headerItr->fedId());
196  if (bx != -100) {
197  dccErrorVsBxHist_->Fill(bx, 0);
198  }
199  }
200 
201  if (runType == -100) {
202  runType = myRunType;
203  } else if (runType != myRunType) {
204  LogWarning("EcalCosmicsHists") << "This header has a conflicting runType OTHERS were " << bx << " here " << mybx;
205  dccRuntypeErrorByFEDHist_->Fill(headerItr->fedId());
206  if (bx != -100)
207  dccErrorVsBxHist_->Fill(bx, 2);
208  }
209 
210  if (orbit == -100) {
211  orbit = myorbit;
212  } else if (orbit != myorbit) {
213  LogWarning("EcalCosmicsHists") << "This header has a conflicting orbit; OTHERS were " << orbit << " here "
214  << myorbit;
215  dccOrbitErrorByFEDHist_->Fill(headerItr->fedId());
216  if (bx != -100)
217  dccErrorVsBxHist_->Fill(bx, 1);
218  }
219  }
220  dccEventVsBxHist_->Fill(bx, runType);
221  dccRuntypeHist_->Fill(runType);
222 
223  std::vector<bool> l1Triggers = determineTriggers(iEvent, iSetup);
224  bool isEcalL1 = l1Triggers[4];
225  bool isHCALL1 = l1Triggers[3];
226  bool isRPCL1 = l1Triggers[2];
227  bool isCSCL1 = l1Triggers[1];
228  bool isDTL1 = l1Triggers[0];
229 
230  if (runNum_ == -1) {
231  runNum_ = iEvent.id().run();
232  }
233 
234  int numberOfCosmics = 0;
235  int numberOfCosmicsEB = 0;
236  int numberOfCosmicsEEP = 0;
237  int numberOfCosmicsEEM = 0;
238  int numberOfCosmicsTop = 0;
239  int numberOfCosmicsBottom = 0;
240  int numberOfHighEClusters = 0;
241  //int eventnum = iEvent.id().event();
242  std::vector<EBDetId> seeds;
243 
244  //++++++++++++++++++BEGIN LOOP OVER EB SUPERCLUSTERS+++++++++++++++++++++++++//
245 
246  const reco::SuperClusterCollection* clusterCollection_p = bscHandle.product();
247  for (reco::SuperClusterCollection::const_iterator clus = clusterCollection_p->begin();
248  clus != clusterCollection_p->end();
249  ++clus) {
250  double energy = clus->energy();
251  double phi = clus->phi();
252  double eta = clus->eta();
253  double time = -1000.0;
254  double ampli = 0.;
255  double secondMin = 0.;
256  double secondTime = -1000.;
257  int numXtalsinCluster = 0;
258 
259  EBDetId maxDet;
260  EBDetId secDet;
261 
262  numberofBCinSC_->Fill(clus->clustersSize());
263  numberofBCinSCphi_->Fill(phi, clus->clustersSize());
264 
265  for (reco::CaloCluster_iterator bclus = (clus->clustersBegin()); bclus != (clus->clustersEnd()); ++bclus) {
266  double cphi = (*bclus)->phi();
267  double ceta = (*bclus)->eta();
268  TrueBCOccupancy_->Fill(cphi, ceta);
269  TrueBCOccupancyCoarse_->Fill(cphi, ceta);
270  }
271 
272  std::vector<std::pair<DetId, float> > clusterDetIds = clus->hitsAndFractions(); //get these from the cluster
273  for (std::vector<std::pair<DetId, float> >::const_iterator detitr = clusterDetIds.begin();
274  detitr != clusterDetIds.end();
275  ++detitr) {
276  //Here I use the "find" on a digi collection... I have been warned...
277  if ((*detitr).first.det() != DetId::Ecal) {
278  std::cout << " det is " << (*detitr).first.det() << std::endl;
279  continue;
280  }
281  if ((*detitr).first.subdetId() != EcalBarrel) {
282  std::cout << " subdet is " << (*detitr).first.subdetId() << std::endl;
283  continue;
284  }
285  EcalRecHitCollection::const_iterator thishit = hits->find((*detitr).first);
286  if (thishit == hits->end())
287  continue;
288  //The checking above should no longer be needed...... as only those in the cluster would already have rechits..
289 
290  EcalRecHit myhit = (*thishit);
291 
292  double thisamp = myhit.energy();
293  if (thisamp > minRecHitAmpEB_) {
294  numXtalsinCluster++;
295  }
296  if (thisamp > secondMin) {
297  secondMin = thisamp;
298  secondTime = myhit.time();
299  secDet = (EBDetId)(*detitr).first;
300  }
301  if (secondMin > ampli) {
302  std::swap(ampli, secondMin);
303  std::swap(time, secondTime);
304  std::swap(maxDet, secDet);
305  }
306  }
307 
308  double fullnumXtalsinCluster = clusterDetIds.size();
309 
310  float E2 = ampli + secondMin;
312  int FEDid = 600 + elecId.dccId();
313 
314  numberOfCosmics++;
315  numberOfCosmicsEB++;
316 
317  //Set some more values
318  seeds.push_back(maxDet);
319  int ieta = maxDet.ieta();
320  int iphi = maxDet.iphi();
321  int ietaSM = maxDet.ietaSM();
322  int iphiSM = maxDet.iphiSM();
323 
324  int LM = ecalElectronicsMap_->getLMNumber(maxDet); //FIX ME
325 
326  // top and bottom clusters
327  if (iphi > 0 && iphi < 180) {
328  numberOfCosmicsTop++;
329  } else {
330  numberOfCosmicsBottom++;
331  }
332 
333  // fill the proper hist
334  TH1F* uRecHist = FEDsAndHists_[FEDid];
335  TH1F* E2uRecHist = FEDsAndE2Hists_[FEDid];
336  TH1F* energyuRecHist = FEDsAndenergyHists_[FEDid];
337  TH1F* timingHist = FEDsAndTimingHists_[FEDid];
338  TH1F* freqHist = FEDsAndFrequencyHists_[FEDid];
339  TH1F* iphiProfileHist = FEDsAndiPhiProfileHists_[FEDid];
340  TH1F* ietaProfileHist = FEDsAndiEtaProfileHists_[FEDid];
341  TH2F* timingHistVsFreq = FEDsAndTimingVsFreqHists_[FEDid];
342  TH2F* timingHistVsAmp = FEDsAndTimingVsAmpHists_[FEDid];
343  TH2F* E2vsE1uRecHist = FEDsAndE2vsE1Hists_[FEDid];
344  TH2F* energyvsE1uRecHist = FEDsAndenergyvsE1Hists_[FEDid];
345  TH2F* occupHist = FEDsAndOccupancyHists_[FEDid];
346  TH2F* timingHistVsPhi = FEDsAndTimingVsPhiHists_[FEDid];
347  TH2F* timingHistVsModule = FEDsAndTimingVsModuleHists_[FEDid];
348 
349  if (uRecHist == nullptr) {
350  initHists(FEDid);
351  uRecHist = FEDsAndHists_[FEDid];
352  E2uRecHist = FEDsAndE2Hists_[FEDid];
353  energyuRecHist = FEDsAndenergyHists_[FEDid];
354  timingHist = FEDsAndTimingHists_[FEDid];
355  freqHist = FEDsAndFrequencyHists_[FEDid];
356  timingHistVsFreq = FEDsAndTimingVsFreqHists_[FEDid];
357  timingHistVsAmp = FEDsAndTimingVsAmpHists_[FEDid];
358  iphiProfileHist = FEDsAndiPhiProfileHists_[FEDid];
359  ietaProfileHist = FEDsAndiEtaProfileHists_[FEDid];
360  E2vsE1uRecHist = FEDsAndE2vsE1Hists_[FEDid];
361  energyvsE1uRecHist = FEDsAndenergyvsE1Hists_[FEDid];
362  occupHist = FEDsAndOccupancyHists_[FEDid];
363  timingHistVsPhi = FEDsAndTimingVsPhiHists_[FEDid];
364  timingHistVsModule = FEDsAndTimingVsModuleHists_[FEDid];
365  }
366 
367  uRecHist->Fill(ampli);
368  E2uRecHist->Fill(E2);
369  E2vsE1uRecHist->Fill(ampli, E2);
370  energyuRecHist->Fill(energy);
371  energyvsE1uRecHist->Fill(ampli, energy);
372  allFedsHist_->Fill(ampli);
373  allFedsE2Hist_->Fill(E2);
374  allFedsenergyHist_->Fill(energy);
376  allFedsE2vsE1Hist_->Fill(ampli, E2);
377  allFedsenergyvsE1Hist_->Fill(ampli, energy);
378  freqHist->Fill(naiveEvtNum_);
379  iphiProfileHist->Fill(iphi);
380  ietaProfileHist->Fill(ieta);
381 
385  allOccupancy_->Fill(iphi, ieta);
386  TrueOccupancy_->Fill(phi, eta);
387  allOccupancyCoarse_->Fill(iphi, ieta);
388  TrueOccupancyCoarse_->Fill(phi, eta);
389  allFedsNumXtalsInClusterHist_->Fill(numXtalsinCluster);
390  NumXtalsInClusterHist_->Fill(fullnumXtalsinCluster);
391  numxtalsVsEnergy_->Fill(energy, numXtalsinCluster);
392  numxtalsVsHighEnergy_->Fill(energy, numXtalsinCluster);
393 
394  //Fill the hists for the time stamp information
395  allFedsFreqTimeVsPhiHist_->Fill(iphi, eventTime);
396  allFedsFreqTimeVsPhiTTHist_->Fill(iphi, eventTime);
397  allFedsFreqTimeVsEtaHist_->Fill(eventTime, ieta);
398  allFedsFreqTimeVsEtaTTHist_->Fill(eventTime, ieta);
399  //end time stamp hists
400 
401  occupHist->Fill(ietaSM, iphiSM);
402  if (fullnumXtalsinCluster == 1) {
405  }
406 
407  // Exclusive trigger plots
408 
409  if (isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
412  if (ampli > minTimingAmpEB_) {
416  allFedsTimingLMHistECAL_->Fill(LM, time);
417  }
418  triggerExclusiveHist_->Fill(0);
419  }
420 
421  if (!isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && isHCALL1) {
424  if (ampli > minTimingAmpEB_) {
428  allFedsTimingLMHistHCAL_->Fill(LM, time);
429  }
430  triggerExclusiveHist_->Fill(1);
431  }
432 
433  if (!isEcalL1 && isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
436  if (ampli > minTimingAmpEB_) {
437  allFedsTimingHistDT_->Fill(time);
440  allFedsTimingLMHistDT_->Fill(LM, time);
441  }
442  triggerExclusiveHist_->Fill(2);
443  }
444 
445  if (!isEcalL1 && !isDTL1 && isRPCL1 && !isCSCL1 && !isHCALL1) {
448  if (ampli > minTimingAmpEB_) {
452  allFedsTimingLMHistRPC_->Fill(LM, time);
453  }
454  triggerExclusiveHist_->Fill(3);
455  }
456 
457  if (!isEcalL1 && !isDTL1 && !isRPCL1 && isCSCL1 && !isHCALL1) {
460  if (ampli > minTimingAmpEB_) {
464  allFedsTimingLMHistCSC_->Fill(LM, time);
465  }
466  triggerExclusiveHist_->Fill(4);
467  }
468 
469  // Inclusive trigger plots
470 
471  if (isEcalL1) {
472  triggerHist_->Fill(0);
473  allOccupancyECAL_->Fill(iphi, ieta);
475  }
476  if (isHCALL1) {
477  triggerHist_->Fill(1);
478  allOccupancyHCAL_->Fill(iphi, ieta);
480  }
481  if (isDTL1) {
482  triggerHist_->Fill(2);
483  allOccupancyDT_->Fill(iphi, ieta);
485  }
486  if (isRPCL1) {
487  triggerHist_->Fill(3);
488  allOccupancyRPC_->Fill(iphi, ieta);
490  }
491  if (isCSCL1) {
492  triggerHist_->Fill(4);
493  allOccupancyCSC_->Fill(iphi, ieta);
495  }
496 
497  // Fill histo for Ecal+muon coincidence
498  if (isEcalL1 && (isCSCL1 || isRPCL1 || isDTL1) && !isHCALL1)
500 
501  if (ampli > minTimingAmpEB_) {
502  timingHist->Fill(time);
503  timingHistVsFreq->Fill(time, naiveEvtNum_);
504  timingHistVsAmp->Fill(time, ampli);
505  allFedsTimingHist_->Fill(time);
506  allFedsTimingVsAmpHist_->Fill(time, ampli);
508  timingHistVsPhi->Fill(time, iphiSM);
509  timingHistVsModule->Fill(time, ietaSM);
513  allFedsTimingLMHist_->Fill(LM, time);
514  if (FEDid >= 610 && FEDid <= 627)
516  if (FEDid >= 628 && FEDid <= 645)
518 
519  if (FEDid >= 610 && FEDid <= 627)
521  if (FEDid >= 628 && FEDid <= 645)
523  if (FEDid >= 613 && FEDid <= 616)
525  if (FEDid >= 631 && FEDid <= 634)
527  if (FEDid >= 622 && FEDid <= 625)
529  if (FEDid >= 640 && FEDid <= 643)
531  }
532 
533  // *** High Energy Clusters Analysis ** //
534 
535  if (energy > minHighEnergy_) {
536  LogInfo("EcalCosmicsHists") << "High energy event " << iEvent.id().run() << " : " << iEvent.id().event() << " "
537  << naiveEvtNum_ << " : " << energy << " " << numXtalsinCluster << " : " << iphi << " "
538  << ieta << " : " << isEcalL1 << isHCALL1 << isDTL1 << isRPCL1 << isCSCL1;
539 
540  numberOfHighEClusters++;
545 
548 
549  HighEnergy_NumXtal->Fill(fullnumXtalsinCluster);
550  HighEnergy_NumXtalFedId->Fill(FEDid, fullnumXtalsinCluster);
551  HighEnergy_NumXtaliphi->Fill(iphi, fullnumXtalsinCluster);
553  HighEnergy_energyNumXtal->Fill(fullnumXtalsinCluster, energy);
554 
555  if (energy > 100.0) {
556  LogInfo("EcalCosmicsHists") << "Very high energy event " << iEvent.id().run() << " : " << iEvent.id().event()
557  << " " << naiveEvtNum_ << " : " << energy << " " << numXtalsinCluster << " : "
558  << iphi << " " << ieta << " : " << isEcalL1 << isHCALL1 << isDTL1 << isRPCL1
559  << isCSCL1;
560 
563  }
564  }
565 
566  // *** end of High Energy Clusters analysis *** //
567 
568  } //++++++++++++++++++END LOOP OVER EB SUPERCLUSTERS+++++++++++++++++++++++//
569 
570  //+++++++++++++++++++LOOP OVER ENDCAP EE CLUSTERS++++++++++++++++++++//
571 
572  if (hasEndcapClusters) {
573  clusterCollection_p = escHandle.product();
574  for (reco::SuperClusterCollection::const_iterator clus = clusterCollection_p->begin();
575  clus != clusterCollection_p->end();
576  ++clus) {
577  double energy = clus->energy();
578  //double phi = clus->phi();
579  //double eta = clus->eta();
580  double time = -1000.0;
581  double ampli = 0.;
582  double secondMin = 0.;
583  double secondTime = -1000.;
584  int clusSize = clus->clustersSize();
585  int numXtalsinCluster = 0;
586 
587  EEDetId maxDet;
588  EEDetId secDet;
589  //LogInfo("EcalCosmicsHists") << "Here is what we initialized the maxDet to: " << maxDet;
590 
591  // for (reco::basicCluster_iterator bclus = (clus->clustersBegin()); bclus != (clus->clustersEnd()); ++bclus) {
592  // //double cphi = (*bclus)->phi();
593  // //double ceta = (*bclus)->eta();
594  // //TODO: extend histos to EE
595  // //TrueBCOccupancy_->Fill(cphi,ceta);
596  // //TrueBCOccupancyCoarse_->Fill(cphi,ceta);
597  // }
598 
599  std::vector<std::pair<DetId, float> > clusterDetIds = clus->hitsAndFractions(); //get these from the cluster
600  for (std::vector<std::pair<DetId, float> >::const_iterator detitr = clusterDetIds.begin();
601  detitr != clusterDetIds.end();
602  ++detitr) {
603  //LogInfo("EcalCosmicsHists") << " Here is the DetId inside the cluster: " << (EEDetId)(*detitr);
604  //Here I use the "find" on a digi collection... I have been warned...
605 
606  if ((*detitr).first.det() != DetId::Ecal) {
607  LogError("EcalCosmicsHists") << " det is " << (*detitr).first.det();
608  continue;
609  }
610  if ((*detitr).first.subdetId() != EcalEndcap) {
611  LogError("EcalCosmicsHists") << " subdet is " << (*detitr).first.subdetId();
612  continue;
613  }
614 
615  EcalRecHitCollection::const_iterator thishit = hitsEE->find((*detitr).first);
616 
617  if (thishit == hitsEE->end()) {
618  LogInfo("EcalCosmicsHists") << " WARNING: EEDetId not found in the RecHit collection!";
619  continue;
620  }
621  // The checking above should no longer be needed......
622  // as only those in the cluster would already have rechits..
623 
624  EcalRecHit myhit = (*thishit);
625 
626  //LogInfo("EcalCosmicsHists") << " Found hit for DetId: " << (EEDetId)(*detitr);
627  double thisamp = myhit.energy();
628  if (thisamp > minRecHitAmpEE_) {
629  numXtalsinCluster++;
630  }
631  if (thisamp > secondMin) {
632  secondMin = thisamp;
633  secondTime = myhit.time();
634  secDet = (EEDetId)(*detitr).first;
635  }
636  if (secondMin > ampli) {
637  std::swap(ampli, secondMin);
638  std::swap(time, secondTime);
639  std::swap(maxDet, secDet);
640  }
641 
642  //LogInfo("EcalCosmicsHists") << "maxDetId is now: " << (EEDetId)(maxDet);
643  }
644 
645  double fullnumXtalsinCluster = clusterDetIds.size();
646 
647  float E2 = ampli + secondMin;
648 
650  //int FEDid = 600+elecId.dccId();
651 
652  //Set some more values
653  //TODO: need to fix the seeds vector to be DetId or have another one for EE
654  //seeds.push_back(maxDet);
655 
656  int ix = maxDet.ix();
657  int iy = maxDet.iy();
658  int iz = maxDet.zside();
659 
660  // LogWarning("EcalCosmicsHists") << "EE cluster (x,y,z) : ( "
661  // << ix << " , " << iy << " , " << iz
662  // << " ) " << std::endl;
663 
664  if (!EEDetId::validDetId(ix, iy, iz)) {
665  LogWarning("EcalCosmicsHists") << "INVALID EE DetId !!!" << endl;
666  return;
667  }
668 
669  numberOfCosmics++;
670  if (iz < 0) {
671  numberOfCosmicsEEM++;
672  } else {
673  numberOfCosmicsEEP++;
674  }
675 
676  //int LM = ecalElectronicsMap_->getLMNumber(maxDet) ;//FIX ME
677 
678  //TODO: extend histos to EE
679  //TH1F* uRecHist = FEDsAndHists_[FEDid];
680  //TH1F* E2uRecHist = FEDsAndE2Hists_[FEDid];
681  //TH1F* energyuRecHist = FEDsAndenergyHists_[FEDid];
682  //TH1F* timingHist = FEDsAndTimingHists_[FEDid];
683  //TH1F* freqHist = FEDsAndFrequencyHists_[FEDid];
684  //TH1F* iphiProfileHist = FEDsAndiPhiProfileHists_[FEDid];
685  //TH1F* ietaProfileHist = FEDsAndiEtaProfileHists_[FEDid];
686  //TH2F* timingHistVsFreq = FEDsAndTimingVsFreqHists_[FEDid];
687  //TH2F* timingHistVsAmp = FEDsAndTimingVsAmpHists_[FEDid];
688  //TH2F* E2vsE1uRecHist = FEDsAndE2vsE1Hists_[FEDid];
689  //TH2F* energyvsE1uRecHist = FEDsAndenergyvsE1Hists_[FEDid];
690  //TH1F* numXtalInClusterHist = FEDsAndNumXtalsInClusterHists_[FEDid];
691  //TH2F* occupHist = FEDsAndOccupancyHists_[FEDid];
692  //TH2F* timingHistVsPhi = FEDsAndTimingVsPhiHists_[FEDid];
693  //TH2F* timingHistVsModule = FEDsAndTimingVsModuleHists_[FEDid];
694  //if(uRecHist==0)
695  //{
696  // initHists(FEDid);
697  // uRecHist = FEDsAndHists_[FEDid];
698  // E2uRecHist = FEDsAndE2Hists_[FEDid];
699  // energyuRecHist = FEDsAndenergyHists_[FEDid];
700  // timingHist = FEDsAndTimingHists_[FEDid];
701  // freqHist = FEDsAndFrequencyHists_[FEDid];
702  // timingHistVsFreq = FEDsAndTimingVsFreqHists_[FEDid];
703  // timingHistVsAmp = FEDsAndTimingVsAmpHists_[FEDid];
704  // iphiProfileHist = FEDsAndiPhiProfileHists_[FEDid];
705  // ietaProfileHist = FEDsAndiEtaProfileHists_[FEDid];
706  // E2vsE1uRecHist = FEDsAndE2vsE1Hists_[FEDid];
707  // energyvsE1uRecHist = FEDsAndenergyvsE1Hists_[FEDid];
708  // numXtalInClusterHist = FEDsAndNumXtalsInClusterHists_[FEDid];
709  // occupHist = FEDsAndOccupancyHists_[FEDid];
710  // timingHistVsPhi = FEDsAndTimingVsPhiHists_[FEDid];
711  // timingHistVsModule = FEDsAndTimingVsModuleHists_[FEDid];
712  //}
713  //uRecHist->Fill(ampli);
714  //E2uRecHist->Fill(E2);
715  //E2vsE1uRecHist->Fill(ampli,E2);
716  //energyuRecHist->Fill(energy);
717  //energyvsE1uRecHist->Fill(ampli,energy);
718  //allFedsHist_->Fill(ampli);
719 
720  if (iz < 0) {
721  EEM_FedsSeedEnergyHist_->Fill(ampli);
724  EEM_FedsE2Hist_->Fill(E2);
725  EEM_FedsE2vsE1Hist_->Fill(ampli, E2);
726  EEM_FedsenergyvsE1Hist_->Fill(ampli, energy);
727  EEM_AllOccupancyCoarse_->Fill(ix - 0.5, iy - 0.5);
728  EEM_AllOccupancy_->Fill(ix - 0.5, iy - 0.5);
729 
730  EEM_FedsNumXtalsInClusterHist_->Fill(numXtalsinCluster);
731  EEM_NumXtalsInClusterHist_->Fill(fullnumXtalsinCluster);
732  EEM_numxtalsVsEnergy_->Fill(energy, numXtalsinCluster);
733  EEM_numxtalsVsHighEnergy_->Fill(energy, numXtalsinCluster);
734  EEM_numberofBCinSC_->Fill(clusSize);
735 
736  if (fullnumXtalsinCluster == 1) {
737  EEM_OccupancySingleXtal_->Fill(ix - 0.5, iy - 0.5);
739  }
740 
741  if (ampli > minTimingAmpEE_) {
742  EEM_FedsTimingHist_->Fill(time);
743  EEM_FedsTimingVsAmpHist_->Fill(time, ampli);
744  EEM_FedsTimingTTHist_->Fill(ix - 0.5, iy - 0.5, time);
745  }
746 
747  // Exclusive trigger plots
748 
749  if (isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
750  EEM_OccupancyExclusiveECAL_->Fill(ix - 0.5, iy - 0.5);
751  EEM_OccupancyCoarseExclusiveECAL_->Fill(ix - 0.5, iy - 0.5);
752  if (ampli > minTimingAmpEE_) {
754  EEM_FedsTimingTTHistECAL_->Fill(ix - 0.5, iy - 0.5, time);
755  }
756  EEM_triggerExclusiveHist_->Fill(0);
757  }
758 
759  if (!isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && isHCALL1) {
760  EEM_OccupancyExclusiveHCAL_->Fill(ix - 0.5, iy - 0.5);
761  EEM_OccupancyCoarseExclusiveHCAL_->Fill(ix - 0.5, iy - 0.5);
762  if (ampli > minTimingAmpEE_) {
764  EEM_FedsTimingTTHistHCAL_->Fill(ix - 0.5, iy - 0.5, time);
765  }
766  EEM_triggerExclusiveHist_->Fill(1);
767  }
768 
769  if (!isEcalL1 && isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
770  EEM_OccupancyExclusiveDT_->Fill(ix - 0.5, iy - 0.5);
771  EEM_OccupancyCoarseExclusiveDT_->Fill(ix - 0.5, iy - 0.5);
772  if (ampli > minTimingAmpEE_) {
774  EEM_FedsTimingTTHistDT_->Fill(ix - 0.5, iy - 0.5, time);
775  }
776  EEM_triggerExclusiveHist_->Fill(2);
777  }
778 
779  if (!isEcalL1 && !isDTL1 && isRPCL1 && !isCSCL1 && !isHCALL1) {
780  EEM_OccupancyExclusiveRPC_->Fill(ix - 0.5, iy - 0.5);
781  EEM_OccupancyCoarseExclusiveRPC_->Fill(ix - 0.5, iy - 0.5);
782  if (ampli > minTimingAmpEE_) {
784  EEM_FedsTimingTTHistRPC_->Fill(ix - 0.5, iy - 0.5, time);
785  }
786  EEM_triggerExclusiveHist_->Fill(3);
787  }
788 
789  if (!isEcalL1 && !isDTL1 && !isRPCL1 && isCSCL1 && !isHCALL1) {
790  EEM_OccupancyExclusiveCSC_->Fill(ix - 0.5, iy - 0.5);
791  EEM_OccupancyCoarseExclusiveCSC_->Fill(ix - 0.5, iy - 0.5);
792  if (ampli > minTimingAmpEE_) {
794  EEM_FedsTimingTTHistCSC_->Fill(ix - 0.5, iy - 0.5, time);
795  }
796  EEM_triggerExclusiveHist_->Fill(4);
797  }
798 
799  // Inclusive trigger plots
800 
801  if (isEcalL1) {
802  EEM_triggerHist_->Fill(0);
803  EEM_OccupancyECAL_->Fill(ix - 0.5, iy - 0.5);
804  EEM_OccupancyCoarseECAL_->Fill(ix - 0.5, iy - 0.5);
805  }
806  if (isHCALL1) {
807  EEM_triggerHist_->Fill(1);
808  EEM_OccupancyHCAL_->Fill(ix - 0.5, iy - 0.5);
809  EEM_OccupancyCoarseHCAL_->Fill(ix - 0.5, iy - 0.5);
810  }
811  if (isDTL1) {
812  EEM_triggerHist_->Fill(2);
813  EEM_OccupancyDT_->Fill(ix - 0.5, iy - 0.5);
814  EEM_OccupancyCoarseDT_->Fill(ix - 0.5, iy - 0.5);
815  }
816  if (isRPCL1) {
817  EEM_triggerHist_->Fill(3);
818  EEM_OccupancyRPC_->Fill(ix - 0.5, iy - 0.5);
819  EEM_OccupancyCoarseRPC_->Fill(ix - 0.5, iy - 0.5);
820  }
821  if (isCSCL1) {
822  EEM_triggerHist_->Fill(4);
823  EEM_OccupancyCSC_->Fill(ix - 0.5, iy - 0.5);
824  EEM_OccupancyCoarseCSC_->Fill(ix - 0.5, iy - 0.5);
825  }
826 
827  } else {
828  EEP_FedsSeedEnergyHist_->Fill(ampli);
831  EEP_FedsE2Hist_->Fill(E2);
832  EEP_FedsE2vsE1Hist_->Fill(ampli, E2);
833  EEP_FedsenergyvsE1Hist_->Fill(ampli, energy);
834  EEP_AllOccupancyCoarse_->Fill(ix - 0.5, iy - 0.5);
835  EEP_AllOccupancy_->Fill(ix - 0.5, iy - 0.5);
836 
837  EEP_FedsNumXtalsInClusterHist_->Fill(numXtalsinCluster);
838  EEP_NumXtalsInClusterHist_->Fill(fullnumXtalsinCluster);
839  EEP_numxtalsVsEnergy_->Fill(energy, numXtalsinCluster);
840  EEP_numxtalsVsHighEnergy_->Fill(energy, numXtalsinCluster);
841  EEP_numberofBCinSC_->Fill(clusSize);
842 
843  if (fullnumXtalsinCluster == 1) {
844  EEP_OccupancySingleXtal_->Fill(ix - 0.5, iy - 0.5);
846  }
847 
848  if (ampli > minTimingAmpEE_) {
849  EEP_FedsTimingHist_->Fill(time);
850  EEP_FedsTimingVsAmpHist_->Fill(time, ampli);
851  EEP_FedsTimingTTHist_->Fill(ix - 0.5, iy - 0.5, time);
852  }
853 
854  // Exclusive trigger plots
855 
856  if (isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
857  EEP_OccupancyExclusiveECAL_->Fill(ix - 0.5, iy - 0.5);
858  EEP_OccupancyCoarseExclusiveECAL_->Fill(ix - 0.5, iy - 0.5);
859  if (ampli > minTimingAmpEE_) {
861  EEP_FedsTimingTTHistECAL_->Fill(ix - 0.5, iy - 0.5, time);
862  }
863  EEP_triggerExclusiveHist_->Fill(0);
864  }
865 
866  if (!isEcalL1 && !isDTL1 && !isRPCL1 && !isCSCL1 && isHCALL1) {
867  EEP_OccupancyExclusiveHCAL_->Fill(ix - 0.5, iy - 0.5);
868  EEP_OccupancyCoarseExclusiveHCAL_->Fill(ix - 0.5, iy - 0.5);
869  if (ampli > minTimingAmpEE_) {
871  EEP_FedsTimingTTHistHCAL_->Fill(ix - 0.5, iy - 0.5, time);
872  }
873  EEP_triggerExclusiveHist_->Fill(1);
874  }
875 
876  if (!isEcalL1 && isDTL1 && !isRPCL1 && !isCSCL1 && !isHCALL1) {
877  EEP_OccupancyExclusiveDT_->Fill(ix - 0.5, iy - 0.5);
878  EEP_OccupancyCoarseExclusiveDT_->Fill(ix - 0.5, iy - 0.5);
879  if (ampli > minTimingAmpEE_) {
881  EEP_FedsTimingTTHistDT_->Fill(ix - 0.5, iy - 0.5, time);
882  }
883  EEP_triggerExclusiveHist_->Fill(2);
884  }
885 
886  if (!isEcalL1 && !isDTL1 && isRPCL1 && !isCSCL1 && !isHCALL1) {
887  EEP_OccupancyExclusiveRPC_->Fill(ix - 0.5, iy - 0.5);
888  EEP_OccupancyCoarseExclusiveRPC_->Fill(ix - 0.5, iy - 0.5);
889  if (ampli > minTimingAmpEE_) {
891  EEP_FedsTimingTTHistRPC_->Fill(ix - 0.5, iy - 0.5, time);
892  }
893  EEP_triggerExclusiveHist_->Fill(3);
894  }
895 
896  if (!isEcalL1 && !isDTL1 && !isRPCL1 && isCSCL1 && !isHCALL1) {
897  EEP_OccupancyExclusiveCSC_->Fill(ix - 0.5, iy - 0.5);
898  EEP_OccupancyCoarseExclusiveCSC_->Fill(ix - 0.5, iy - 0.5);
899  if (ampli > minTimingAmpEE_) {
901  EEP_FedsTimingTTHistCSC_->Fill(ix - 0.5, iy - 0.5, time);
902  }
903  EEP_triggerExclusiveHist_->Fill(4);
904  }
905 
906  // Inclusive trigger plots
907 
908  if (isEcalL1) {
909  EEP_triggerHist_->Fill(0);
910  EEP_OccupancyECAL_->Fill(ix - 0.5, iy - 0.5);
911  EEP_OccupancyCoarseECAL_->Fill(ix - 0.5, iy - 0.5);
912  }
913  if (isHCALL1) {
914  EEP_triggerHist_->Fill(1);
915  EEP_OccupancyHCAL_->Fill(ix - 0.5, iy - 0.5);
916  EEP_OccupancyCoarseHCAL_->Fill(ix - 0.5, iy - 0.5);
917  }
918  if (isDTL1) {
919  EEP_triggerHist_->Fill(2);
920  EEP_OccupancyDT_->Fill(ix - 0.5, iy - 0.5);
921  EEP_OccupancyCoarseDT_->Fill(ix - 0.5, iy - 0.5);
922  }
923  if (isRPCL1) {
924  EEP_triggerHist_->Fill(3);
925  EEP_OccupancyRPC_->Fill(ix - 0.5, iy - 0.5);
926  EEP_OccupancyCoarseRPC_->Fill(ix - 0.5, iy - 0.5);
927  }
928  if (isCSCL1) {
929  EEP_triggerHist_->Fill(4);
930  EEP_OccupancyCSC_->Fill(ix - 0.5, iy - 0.5);
931  EEP_OccupancyCoarseCSC_->Fill(ix - 0.5, iy - 0.5);
932  }
933  }
934 
935  // *** High Energy Clusters Analysis ** //
936 
937  if (energy > minHighEnergy_) {
938  LogInfo("EcalCosmicsHists") << "High energy event in EE " << iEvent.id().run() << " : " << iEvent.id().event()
939  << " " << naiveEvtNum_ << " : " << energy << " " << numXtalsinCluster << " : " << ix
940  << " " << iy << " : " << isEcalL1 << isHCALL1 << isDTL1 << isRPCL1 << isCSCL1;
941 
942  // numberOfHighEClusters++;
943  // allOccupancyHighEnergy_->Fill(iphi, ieta);
944  // allOccupancyHighEnergyCoarse_->Fill(iphi, ieta);
945  // allFedsOccupancyHighEnergyHist_->Fill(iphi,ieta,energy);
946  if (iz < 0) {
948  EEM_OccupancyHighEnergy_->Fill(ix - 0.5, iy - 0.5);
949  EEM_OccupancyHighEnergyCoarse_->Fill(ix - 0.5, iy - 0.5);
950  } else {
952  }
953  // HighEnergy_2GeV_occuCoarse->Fill(iphi,ieta);
954  // HighEnergy_2GeV_occu3D->Fill(iphi,ieta,energy);
955 
956  // HighEnergy_NumXtal->Fill(fullnumXtalsinCluster);
957  // HighEnergy_NumXtalFedId->Fill(FEDid,fullnumXtalsinCluster);
958  // HighEnergy_NumXtaliphi->Fill(iphi,fullnumXtalsinCluster);
959  // HighEnergy_energy3D->Fill(iphi,ieta,energy);
960  // HighEnergy_energyNumXtal->Fill(fullnumXtalsinCluster,energy);
961 
962  if (energy > 100.0) {
963  LogInfo("EcalCosmicsHists") << "Very high energy event in EE " << iEvent.id().run() << " : "
964  << iEvent.id().event() << " " << naiveEvtNum_ << " : " << energy << " "
965  << numXtalsinCluster << " : " << ix << " " << iy << " : " << isEcalL1 << isHCALL1
966  << isDTL1 << isRPCL1 << isCSCL1;
967  // HighEnergy_100GeV_occuCoarse->Fill(iphi,ieta);
968  // HighEnergy_100GeV_occu3D->Fill(iphi,ieta,energy);
969  }
970  }
971 
972  // *** end of High Energy Clusters analysis *** //
973 
974  } //++++++++++++++++++END LOOP OVER EE SUPERCLUSTERS+++++++++++++++++++++++++++++++++++
975  }
976 
977  HighEnergy_numClusHighEn->Fill(numberOfHighEClusters);
978  HighEnergy_ratioClusters->Fill((double(numberOfHighEClusters)) / (double(numberOfCosmics)));
979 
980  numberofCosmicsHist_->Fill(numberOfCosmics);
981  EEP_numberofCosmicsHist_->Fill(numberOfCosmicsEEP);
982  EEM_numberofCosmicsHist_->Fill(numberOfCosmicsEEM);
983  numberofCosmicsHistEB_->Fill(numberOfCosmicsEB);
984 
985  if (numberOfCosmics > 0) {
986  cosmicCounter_++;
988  allFedsFreqTimeHist_->Fill(eventTime);
989  //This line will work in 21X!!
990  //std::cout << " Orbit " << iEvent.orbitNumber() << " BX " << iEvent.bunchCrossing()<< std::endl;
991  //std::cout << " BX " << iEvent.experimentType() << std::endl;
992  }
993 
994  if (numberOfCosmicsEB > 0)
996  if (numberOfCosmicsEEP > 0)
998  if (numberOfCosmicsEEM > 0)
1000 
1001  if (numberOfCosmicsTop && numberOfCosmicsBottom) {
1003  numberofCosmicsTopBottomHist_->Fill(numberOfCosmicsTop + numberOfCosmicsBottom);
1004  }
1005 
1006  // *** TrackAssociator *** //
1007 
1008  // get reco tracks
1010  iEvent.getByLabel("cosmicMuons", recoTracks);
1011 
1012  if (recoTracks.isValid()) {
1013  // LogWarning("EcalCosmicsHists") << "... Valid TrackAssociator recoTracks !!! " << recoTracks.product()->size();
1014  std::map<int, std::vector<DetId> > trackDetIdMap;
1015  int tracks = 0;
1016  for (reco::TrackCollection::const_iterator recoTrack = recoTracks->begin(); recoTrack != recoTracks->end();
1017  ++recoTrack) {
1018  if (fabs(recoTrack->d0()) > 70 || fabs(recoTrack->dz()) > 70)
1019  continue;
1020  if (recoTrack->numberOfValidHits() < 20)
1021  continue;
1022 
1023  //if (recoTrack->pt() < 2) continue; // skip low Pt tracks
1024 
1026 
1027  // edm::LogVerbatim("TrackAssociator") << "\n-------------------------------------------------------\n Track (pt,eta,phi): " <<
1028  // recoTrack->pt() << " , " << recoTrack->eta() << " , " << recoTrack->phi() ;
1029  // edm::LogVerbatim("TrackAssociator") << "Ecal energy in crossed crystals based on RecHits: " <<
1030  // info.crossedEnergy(TrackDetMatchInfo::EcalRecHits);
1031  // edm::LogVerbatim("TrackAssociator") << "Ecal energy in 3x3 crystals based on RecHits: " <<
1032  // info.nXnEnergy(TrackDetMatchInfo::EcalRecHits, 1);
1033  // edm::LogVerbatim("TrackAssociator") << "Hcal energy in crossed towers based on RecHits: " <<
1034  // info.crossedEnergy(TrackDetMatchInfo::HcalRecHits);
1035  // edm::LogVerbatim("TrackAssociator") << "Hcal energy in 3x3 towers based on RecHits: " <<
1036  // info.nXnEnergy(TrackDetMatchInfo::HcalRecHits, 1);
1037  // edm::LogVerbatim("TrackAssociator") << "Number of muon segment matches: " << info.numberOfSegments();
1038 
1039  // std::cout << "\n-------------------------------------------------------\n Track (pt,eta,phi): " <<
1040  // recoTrack->pt() << " , " << recoTrack->eta() << " , " << recoTrack->phi() << std::endl;
1041  // std::cout << "Ecal energy in crossed crystals based on RecHits: " <<
1042  // info.crossedEnergy(TrackDetMatchInfo::EcalRecHits) << std::endl;
1043  // std::cout << "Ecal energy in 3x3 crystals based on RecHits: " <<
1044  // info.nXnEnergy(TrackDetMatchInfo::EcalRecHits, 1) << std::endl;
1045  // std::cout << "Hcal energy in crossed towers based on RecHits: " <<
1046  // info.crossedEnergy(TrackDetMatchInfo::HcalRecHits) << std::endl;
1047  // std::cout << "Hcal energy in 3x3 towers based on RecHits: " <<
1048  // info.nXnEnergy(TrackDetMatchInfo::HcalRecHits, 1) << std::endl;
1049 
1050  for (unsigned int i = 0; i < info.crossedEcalIds.size(); i++) {
1051  // only checks for barrel
1052  if (info.crossedEcalIds[i].det() == DetId::Ecal && info.crossedEcalIds[i].subdetId() == 1) {
1053  EBDetId ebDetId(info.crossedEcalIds[i]);
1054  trackAssoc_muonsEcal_->Fill(ebDetId.iphi(), ebDetId.ieta());
1055  //std::cout << "Crossed iphi: " << ebDetId.iphi()
1056  // << " ieta: " << ebDetId.ieta() << " : nCross " << info.crossedEcalIds.size() << std::endl;
1057 
1058  EcalRecHitCollection::const_iterator thishit = hits->find(ebDetId);
1059  if (thishit == hits->end())
1060  continue;
1061 
1062  //EcalRecHit myhit = (*thishit);
1063  //double thisamp = myhit.energy();
1064  //std::cout << " Crossed energy: " << thisamp << " : nCross " << info.crossedEcalIds.size() << std::endl;
1065  }
1066  }
1067 
1068  //edm::LogVerbatim("TrackAssociator") << " crossedEcalIds size: " << info.crossedEcalIds.size()
1069  // << " crossedEcalRecHits size: " << info.crossedEcalRecHits.size();
1070  numberofCrossedEcalIdsHist_->Fill(info.crossedEcalIds.size());
1071  tracks++;
1072  if (!info.crossedEcalIds.empty())
1073  trackDetIdMap.insert(std::pair<int, std::vector<DetId> >(tracks, info.crossedEcalIds));
1074  }
1075 
1076  // Now to match recoTracks with cosmic clusters
1077 
1078  int numAssocTracks = 0;
1079  int numAssocClusters = 0;
1080  edm::LogVerbatim("TrackAssociator") << "Matching cosmic clusters to tracks...";
1081  int numSeeds = seeds.size();
1082  int numTracks = trackDetIdMap.size();
1083  while (!seeds.empty() && !trackDetIdMap.empty()) {
1084  double bestDr = 1000;
1085  double bestDPhi = 1000;
1086  double bestDEta = 1000;
1087  double bestEtaTrack = 1000;
1088  double bestEtaSeed = 1000;
1089  double bestPhiTrack = 1000;
1090  double bestPhiSeed = 1000;
1091  EBDetId bestTrackDet;
1092  EBDetId bestSeed;
1093  int bestTrack = -1;
1094  std::map<EBDetId, EBDetId> trackDetIdToSeedMap;
1095 
1096  //edm::LogVerbatim("TrackAssociator") << "NumTracks:" << trackDetIdMap.size() << " numClusters:" << seeds.size();
1097 
1098  for (std::vector<EBDetId>::const_iterator seedItr = seeds.begin(); seedItr != seeds.end(); ++seedItr) {
1099  for (std::map<int, std::vector<DetId> >::const_iterator mapItr = trackDetIdMap.begin();
1100  mapItr != trackDetIdMap.end();
1101  ++mapItr) {
1102  for (unsigned int i = 0; i < mapItr->second.size(); i++) {
1103  // only checks for barrel
1104  if (mapItr->second[i].det() == DetId::Ecal && mapItr->second[i].subdetId() == 1) {
1105  EBDetId ebDet = (mapItr->second[i]);
1106  double seedEta = seedItr->ieta();
1107  double deta = ebDet.ieta() - seedEta;
1108  if (seedEta * ebDet.ieta() < 0)
1109  deta > 0 ? (deta = deta - 1.) : (deta = deta + 1.);
1110  double dR;
1111  double dphi = ebDet.iphi() - seedItr->iphi();
1112  if (abs(dphi) > 180)
1113  dphi > 0 ? (dphi = 360 - dphi) : (dphi = -360 - dphi);
1114  dR = sqrt(deta * deta + dphi * dphi);
1115  if (dR < bestDr) {
1116  bestDr = dR;
1117  bestDPhi = dphi;
1118  bestDEta = deta;
1119  bestTrackDet = mapItr->second[i];
1120  bestTrack = mapItr->first;
1121  bestSeed = (*seedItr);
1122  bestEtaTrack = ebDet.ieta();
1123  bestEtaSeed = seedEta;
1124  bestPhiTrack = ebDet.iphi();
1125  bestPhiSeed = seedItr->iphi();
1126  }
1127  }
1128  }
1129  }
1130  }
1131  if (bestDr < 1000) {
1132  //edm::LogVerbatim("TrackAssociator") << "Best deltaR from matched DetId's to cluster:" << bestDr;
1133  deltaRHist_->Fill(bestDr);
1134  deltaPhiHist_->Fill(bestDPhi);
1135  deltaEtaHist_->Fill(bestDEta);
1136  deltaEtaDeltaPhiHist_->Fill(bestDEta, bestDPhi);
1137  seedTrackEtaHist_->Fill(bestEtaSeed, bestEtaTrack);
1138  seedTrackPhiHist_->Fill(bestPhiSeed, bestPhiTrack);
1139  seeds.erase(find(seeds.begin(), seeds.end(), bestSeed));
1140  trackDetIdMap.erase(trackDetIdMap.find(bestTrack));
1141  trackDetIdToSeedMap[bestTrackDet] = bestSeed;
1142  numAssocTracks++;
1143  numAssocClusters++;
1144 
1145  // for high energy analysis
1146  if (bestDPhi < 1.5 && bestDEta < 1.8) {
1147  //edm::LogVerbatim("TrackAssociator") << "Best seed ieta and iphi: ("
1148  // << bestSeed.ieta() << ", " << bestSeed.iphi() << ") ";
1149  //check if the bestSeed is a High Energy one
1150  EcalRecHitCollection::const_iterator Ecalhit = hits->find(bestSeed);
1151  if (Ecalhit == hits->end()) {
1152  continue;
1153  }
1154  double EcalhitEnergy = Ecalhit->energy();
1155  //edm::LogVerbatim("TrackAssociator") << "Best seed energy: " << EcalhitEnergy ;
1156  HighEnergy_bestSeed->Fill(EcalhitEnergy);
1157  HighEnergy_bestSeedOccupancy->Fill(bestSeed.iphi(), bestSeed.ieta());
1158  }
1159  } else {
1160  edm::LogVerbatim("TrackAssociator") << "could not match cluster seed to track." << bestDr;
1161  break; // no match found
1162  }
1163  }
1164  if (numSeeds > 0 && numTracks > 0) {
1165  ratioAssocClustersHist_->AddBinContent(1, numAssocClusters);
1166  ratioAssocClustersHist_->AddBinContent(2, numSeeds);
1167  }
1168  if (numTracks > 0) {
1169  ratioAssocTracksHist_->AddBinContent(1, numAssocTracks);
1170  ratioAssocTracksHist_->AddBinContent(2, numTracks);
1171  numberofCosmicsWTrackHist_->Fill(numSeeds);
1172  }
1173  } else {
1174  // LogWarning("EcalCosmicsHists") << "!!! No TrackAssociator recoTracks !!!";
1175  }
1176 
1177  // Study on Tracks for High Energy events
1178  edm::Handle<reco::TrackCollection> recoTracksBarrel;
1179  iEvent.getByLabel("cosmicMuonsBarrelOnly", recoTracksBarrel);
1180  if (!recoTracksBarrel.isValid()) {
1181  //edm::LogWarning("EcalCosmicsHists") << "RecoTracksBarrel not valid!! " ;
1182  } else {
1183  //edm::LogWarning("EcalCosmicsHists") << "Number of barrel reco tracks found in the event: " << recoTracksBarrel->size() ;
1184  HighEnergy_numRecoTrackBarrel->Fill(recoTracksBarrel->size());
1185  for (reco::TrackCollection::const_iterator recoTrack = recoTracksBarrel->begin();
1186  recoTrack != recoTracksBarrel->end();
1187  ++recoTrack) {
1188  //edm::LogWarning("EcalCosmicsHists") << "Track (pt,eta,phi): " << recoTrack->pt() << " , " << recoTrack->eta() << " , " << recoTrack->phi() ;
1189  //edm::LogWarning("EcalCosmicsHists") << "Track innermost hit: " << recoTrack->innerPosition().phi() ;
1190  }
1191 
1192  for (reco::SuperClusterCollection::const_iterator clus = clusterCollection_p->begin();
1193  clus != clusterCollection_p->end();
1194  ++clus) {
1195  double energy = clus->energy();
1196  double phi = clus->phi();
1197  double eta = clus->eta();
1198 
1199  if (recoTracksBarrel->empty())
1201  if (recoTracksBarrel->size() == 1)
1203  if (recoTracksBarrel->size() == 2)
1205 
1206  std::vector<std::pair<DetId, float> > clusterDetIds = clus->hitsAndFractions(); //get these from the cluster
1207  for (std::vector<std::pair<DetId, float> >::const_iterator detitr = clusterDetIds.begin();
1208  detitr != clusterDetIds.end();
1209  ++detitr) {
1210  if ((*detitr).first.det() != DetId::Ecal) {
1211  continue;
1212  }
1213  if ((*detitr).first.subdetId() != EcalBarrel) {
1214  continue;
1215  }
1216  EcalRecHitCollection::const_iterator thishit = hits->find((*detitr).first);
1217  if (thishit == hits->end()) {
1218  continue;
1219  }
1220 
1221  double rechitenergy = thishit->energy();
1222  int ieta = ((EBDetId)(*detitr).first).ieta();
1223  int iphi = ((EBDetId)(*detitr).first).iphi();
1224  if (rechitenergy > minRecHitAmpEB_) {
1225  if (recoTracksBarrel->empty())
1226  HighEnergy_0tracks_occu3DXtal->Fill(iphi, ieta, rechitenergy);
1227  if (recoTracksBarrel->size() == 1)
1228  HighEnergy_1tracks_occu3DXtal->Fill(iphi, ieta, rechitenergy);
1229  if (recoTracksBarrel->size() == 2)
1230  HighEnergy_2tracks_occu3DXtal->Fill(iphi, ieta, rechitenergy);
1231 
1232  if (rechitenergy > 10)
1233  edm::LogWarning("EcalCosmicsHists") << "!!!!! Crystal with energy " << rechitenergy << " at (ieta,iphi) ("
1234  << ieta << " ," << iphi << "); Id: " << (*detitr).first.det();
1235  }
1236  }
1237  }
1238 
1239  // look at angle between 2 recoTracks
1240  if (recoTracksBarrel->size() == 2) {
1241  reco::TrackCollection::const_iterator Track1 = recoTracksBarrel->begin();
1242  reco::TrackCollection::const_iterator Track2 = (recoTracksBarrel->begin()) + 1;
1243  float angle = (acos(sin(Track1->theta()) * cos(Track1->phi()) * sin(Track2->theta()) * cos(Track2->phi()) +
1244  sin(Track1->theta()) * sin(Track1->phi()) * sin(Track2->theta()) * sin(Track2->phi()) +
1245  cos(Track1->theta()) * cos(Track2->theta()))) /
1246  0.017453292519943;
1247  //edm::LogWarning("EcalCosmicsHists") << "Tracks angle: " << angle;
1249  if ((Track1->innerPosition().phi()) > 0 && (Track2->innerPosition().phi()) < 0) {
1250  //edm::LogWarning("EcalCosmicsHists") << "Top-bottom tracks";
1252  }
1253  }
1254  }
1255 
1256  // *** end of TrackAssociator code *** //
1257 
1258  // *** HCAL RecHits code *** //
1259 
1260  //hcal rechits
1262  iEvent.getByLabel("hbhereco", hbhe);
1263 
1265  iEvent.getByLabel("hfreco", hfrh);
1266 
1268  iEvent.getByLabel("horeco", horh);
1269 
1270  if (hbhe.isValid()) {
1271  // LogInfo("EcalCosmicHists") << "event " << ievt << " HBHE RecHits collection size " << hbhe->size();
1272  const HBHERecHitCollection hbheHit = *(hbhe.product());
1273  for (HBHERecHitCollection::const_iterator hhit = hbheHit.begin(); hhit != hbheHit.end(); hhit++) {
1274  // if (hhit->energy() > 0.6){
1275  hcalEnergy_HBHE_->Fill(hhit->energy());
1276  // }
1277  }
1278  } else {
1279  // LogWarning("EcalCosmicHists") << " HBHE RecHits **NOT** VALID!! " << endl;
1280  }
1281 
1282  if (hfrh.isValid()) {
1283  // LogInfo("EcalCosmicHists") << "event " << ievt << " HF RecHits collection size " << hfrh->size();
1284  const HFRecHitCollection hfHit = *(hfrh.product());
1285  for (HFRecHitCollection::const_iterator hhit = hfHit.begin(); hhit != hfHit.end(); hhit++) {
1286  hcalEnergy_HF_->Fill(hhit->energy());
1287  }
1288  } else {
1289  // LogWarning("EcalCosmicHists") << " HF RecHits **NOT** VALID!! " << endl;
1290  }
1291 
1292  if (horh.isValid()) {
1293  // LogInfo("EcalCosmicHists") << "event " << ievt << " HO RecHits collection size " << horh->size();
1294  const HORecHitCollection hoHit = *(horh.product());
1295  for (HORecHitCollection::const_iterator hhit = hoHit.begin(); hhit != hoHit.end(); hhit++) {
1296  // if (hhit->energy() > 0.6){
1297  hcalEnergy_HO_->Fill(hhit->energy());
1298  // }
1299  }
1300  } else {
1301  // LogWarning("EcalCosmicHists") << " HO RecHits **NOT** VALID!! " << endl;
1302  }
1303 
1304  // *** end of HCAL code *** //
1305 }
1306 
1307 std::vector<bool> EcalCosmicsHists::determineTriggers(const edm::Event& iEvent, const edm::EventSetup& eventSetup) {
1308  std::vector<bool> l1Triggers; //DT,CSC,RPC,HCAL,ECAL
1309  //0 , 1 , 2 , 3 , 4
1310  l1Triggers.reserve(5);
1311  for (int i = 0; i < 5; i++)
1312  l1Triggers.push_back(false);
1313 
1314  // get the GMTReadoutCollection
1315  Handle<L1MuGMTReadoutCollection> gmtrc_handle;
1316  iEvent.getByLabel(l1GMTReadoutRecTag_, gmtrc_handle);
1317  L1MuGMTReadoutCollection const* gmtrc = gmtrc_handle.product();
1318  if (!(gmtrc_handle.isValid())) {
1319  LogWarning("EcalCosmicsHists") << "l1MuGMTReadoutCollection"
1320  << " not available";
1321  return l1Triggers;
1322  }
1323  // get hold of L1GlobalReadoutRecord
1325  iEvent.getByLabel(l1GTReadoutRecTag_, L1GTRR);
1326 
1327  //Ecal
1329  eventSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);
1330  const L1GtTriggerMenu* menu = menuRcd.product();
1332  iEvent.getByLabel(edm::InputTag("gtDigis"), gtRecord);
1333  // Get dWord after masking disabled bits
1334  const DecisionWord dWord = gtRecord->decisionWord();
1335 
1336  bool l1SingleEG1 = menu->gtAlgorithmResult("L1_SingleEG1", dWord);
1337  bool l1SingleEG5 = menu->gtAlgorithmResult("L1_SingleEG5", dWord);
1338  bool l1SingleEG8 = menu->gtAlgorithmResult("L1_SingleEG8", dWord);
1339  bool l1SingleEG10 = menu->gtAlgorithmResult("L1_SingleEG10", dWord);
1340  bool l1SingleEG12 = menu->gtAlgorithmResult("L1_SingleEG12", dWord);
1341  bool l1SingleEG15 = menu->gtAlgorithmResult("L1_SingleEG15", dWord);
1342  bool l1SingleEG20 = menu->gtAlgorithmResult("L1_SingleEG20", dWord);
1343  bool l1SingleEG25 = menu->gtAlgorithmResult("L1_SingleEG25", dWord);
1344  bool l1DoubleNoIsoEGBTBtight = menu->gtAlgorithmResult("L1_DoubleNoIsoEG_BTB_tight", dWord);
1345  bool l1DoubleNoIsoEGBTBloose = menu->gtAlgorithmResult("L1_DoubleNoIsoEG_BTB_loose ", dWord);
1346  bool l1DoubleNoIsoEGTopBottom = menu->gtAlgorithmResult("L1_DoubleNoIsoEGTopBottom", dWord);
1347  bool l1DoubleNoIsoEGTopBottomCen = menu->gtAlgorithmResult("L1_DoubleNoIsoEGTopBottomCen", dWord);
1348  bool l1DoubleNoIsoEGTopBottomCen2 = menu->gtAlgorithmResult("L1_DoubleNoIsoEGTopBottomCen2", dWord);
1349  bool l1DoubleNoIsoEGTopBottomCenVert = menu->gtAlgorithmResult("L1_DoubleNoIsoEGTopBottomCenVert", dWord);
1350 
1351  l1Triggers[4] = l1SingleEG1 || l1SingleEG5 || l1SingleEG8 || l1SingleEG10 || l1SingleEG12 || l1SingleEG15 ||
1352  l1SingleEG20 || l1SingleEG25 || l1DoubleNoIsoEGBTBtight || l1DoubleNoIsoEGBTBloose ||
1353  l1DoubleNoIsoEGTopBottom || l1DoubleNoIsoEGTopBottomCen || l1DoubleNoIsoEGTopBottomCen2 ||
1354  l1DoubleNoIsoEGTopBottomCenVert;
1355 
1356  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
1357  std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
1358  for (igmtrr = gmt_records.begin(); igmtrr != gmt_records.end(); igmtrr++) {
1359  std::vector<L1MuRegionalCand>::const_iterator iter1;
1360  std::vector<L1MuRegionalCand> rmc;
1361 
1362  //DT triggers
1363  int idt = 0;
1364  rmc = igmtrr->getDTBXCands();
1365  for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
1366  if (!(*iter1).empty()) {
1367  idt++;
1368  }
1369  }
1370  //if(idt>0) std::cout << "Found " << idt << " valid DT candidates in bx wrt. L1A = "
1371  // << igmtrr->getBxInEvent() << std::endl;
1372  if (igmtrr->getBxInEvent() == 0 && idt > 0)
1373  l1Triggers[0] = true;
1374 
1375  //RPC triggers
1376  int irpcb = 0;
1377  rmc = igmtrr->getBrlRPCCands();
1378  for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
1379  if (!(*iter1).empty()) {
1380  irpcb++;
1381  }
1382  }
1383  //if(irpcb>0) std::cout << "Found " << irpcb << " valid RPC candidates in bx wrt. L1A = "
1384  // << igmtrr->getBxInEvent() << std::endl;
1385  if (igmtrr->getBxInEvent() == 0 && irpcb > 0)
1386  l1Triggers[2] = true;
1387 
1388  //CSC Triggers
1389  int icsc = 0;
1390  rmc = igmtrr->getCSCCands();
1391  for (iter1 = rmc.begin(); iter1 != rmc.end(); iter1++) {
1392  if (!(*iter1).empty()) {
1393  icsc++;
1394  }
1395  }
1396  //if(icsc>0) std::cout << "Found " << icsc << " valid CSC candidates in bx wrt. L1A = "
1397  // << igmtrr->getBxInEvent() << std::endl;
1398  if (igmtrr->getBxInEvent() == 0 && icsc > 0)
1399  l1Triggers[1] = true;
1400  }
1401 
1402  L1GlobalTriggerReadoutRecord const* gtrr = L1GTRR.product();
1403 
1404  for (int ibx = -1; ibx <= 1; ibx++) {
1405  bool hcal_top = false;
1406  bool hcal_bot = false;
1407  const L1GtPsbWord psb = gtrr->gtPsbWord(0xbb0d, ibx);
1408  std::vector<int> valid_phi;
1409  if ((psb.aData(4) & 0x3f) >= 1) {
1410  valid_phi.push_back((psb.aData(4) >> 10) & 0x1f);
1411  }
1412  if ((psb.bData(4) & 0x3f) >= 1) {
1413  valid_phi.push_back((psb.bData(4) >> 10) & 0x1f);
1414  }
1415  if ((psb.aData(5) & 0x3f) >= 1) {
1416  valid_phi.push_back((psb.aData(5) >> 10) & 0x1f);
1417  }
1418  if ((psb.bData(5) & 0x3f) >= 1) {
1419  valid_phi.push_back((psb.bData(5) >> 10) & 0x1f);
1420  }
1421  std::vector<int>::const_iterator iphi;
1422  for (iphi = valid_phi.begin(); iphi != valid_phi.end(); iphi++) {
1423  //std::cout << "Found HCAL mip with phi=" << *iphi << " in bx wrt. L1A = " << ibx << std::endl;
1424  if (*iphi < 9)
1425  hcal_top = true;
1426  if (*iphi > 8)
1427  hcal_bot = true;
1428  }
1429  if (ibx == 0 && hcal_top && hcal_bot)
1430  l1Triggers[3] = true;
1431  }
1432 
1433  edm::LogInfo("EcalCosmicsHists") << "**** Trigger SourceSource ****";
1434  if (l1Triggers[0])
1435  edm::LogInfo("EcalCosmicsHists") << "DT";
1436  if (l1Triggers[2])
1437  edm::LogInfo("EcalCosmicsHists") << "RPC";
1438  if (l1Triggers[1])
1439  edm::LogInfo("EcalCosmicsHists") << "CSC";
1440  if (l1Triggers[3])
1441  edm::LogInfo("EcalCosmicsHists") << "HCAL";
1442  if (l1Triggers[4])
1443  edm::LogInfo("EcalCosmicsHists") << "ECAL";
1444  edm::LogInfo("EcalCosmicsHists") << "************************";
1445 
1446  return l1Triggers;
1447 }
1448 
1449 // insert the hist map into the map keyed by FED number
1451  using namespace std;
1452 
1453  string FEDid = intToString(FED);
1454  string title1 = "Energy of Seed Crystal ";
1455  title1.append(fedMap_->getSliceFromFed(FED));
1456  title1.append(";Seed Energy (GeV);Number of Cosmics");
1457  string name1 = "SeedEnergyFED";
1458  name1.append(intToString(FED));
1459  int numBins = 200; //(int)round(histRangeMax_-histRangeMin_)+1;
1460  TH1F* hist = new TH1F(name1.c_str(), title1.c_str(), numBins, histRangeMin_, histRangeMax_);
1461  FEDsAndHists_[FED] = hist;
1462  FEDsAndHists_[FED]->SetDirectory(nullptr);
1463 
1464  TH1F* E2hist = new TH1F(Form("E2_FED_%d", FED), Form("E2_FED_%d", FED), numBins, histRangeMin_, histRangeMax_);
1465  FEDsAndE2Hists_[FED] = E2hist;
1466  FEDsAndE2Hists_[FED]->SetDirectory(nullptr);
1467 
1468  TH1F* energyhist =
1469  new TH1F(Form("Energy_FED_%d", FED), Form("Energy_FED_%d", FED), numBins, histRangeMin_, histRangeMax_);
1470  FEDsAndenergyHists_[FED] = energyhist;
1471  FEDsAndenergyHists_[FED]->SetDirectory(nullptr);
1472 
1473  TH2F* E2vsE1hist = new TH2F(Form("E2vsE1_FED_%d", FED),
1474  Form("E2vsE1_FED_%d", FED),
1475  numBins,
1476  histRangeMin_,
1477  histRangeMax_,
1478  numBins,
1479  histRangeMin_,
1480  histRangeMax_);
1481  FEDsAndE2vsE1Hists_[FED] = E2vsE1hist;
1482  FEDsAndE2vsE1Hists_[FED]->SetDirectory(nullptr);
1483 
1484  TH2F* energyvsE1hist = new TH2F(Form("EnergyvsE1_FED_%d", FED),
1485  Form("EnergyvsE1_FED_%d", FED),
1486  numBins,
1487  histRangeMin_,
1488  histRangeMax_,
1489  numBins,
1490  histRangeMin_,
1491  histRangeMax_);
1492  FEDsAndenergyvsE1Hists_[FED] = energyvsE1hist;
1493  FEDsAndenergyvsE1Hists_[FED]->SetDirectory(nullptr);
1494 
1495  title1 = "Time for ";
1496  title1.append(fedMap_->getSliceFromFed(FED));
1497  title1.append(";Relative Time (1 clock = 25ns);Events");
1498  name1 = "TimeFED";
1499  name1.append(intToString(FED));
1500  TH1F* timingHist = new TH1F(name1.c_str(), title1.c_str(), 78, -7, 7);
1501  FEDsAndTimingHists_[FED] = timingHist;
1502  FEDsAndTimingHists_[FED]->SetDirectory(nullptr);
1503 
1504  TH1F* freqHist =
1505  new TH1F(Form("Frequency_FED_%d", FED), Form("Frequency for FED %d;Event Number", FED), 100, 0., 100000);
1506  FEDsAndFrequencyHists_[FED] = freqHist;
1507  FEDsAndFrequencyHists_[FED]->SetDirectory(nullptr);
1508 
1509  TH1F* iphiProfileHist =
1510  new TH1F(Form("iPhi_Profile_FED_%d", FED), Form("iPhi Profile for FED %d", FED), 360, 1., 361);
1511  FEDsAndiPhiProfileHists_[FED] = iphiProfileHist;
1512  FEDsAndiPhiProfileHists_[FED]->SetDirectory(nullptr);
1513 
1514  TH1F* ietaProfileHist =
1515  new TH1F(Form("iEta_Profile_FED_%d", FED), Form("iEta Profile for FED %d", FED), 172, -86, 86);
1516  FEDsAndiEtaProfileHists_[FED] = ietaProfileHist;
1517  FEDsAndiEtaProfileHists_[FED]->SetDirectory(nullptr);
1518 
1519  TH2F* timingHistVsFreq =
1520  new TH2F(Form("timeVsFreqFED_%d", FED), Form("time Vs Freq FED %d", FED), 78, -7, 7, 100, 0., 100000);
1521  FEDsAndTimingVsFreqHists_[FED] = timingHistVsFreq;
1522  FEDsAndTimingVsFreqHists_[FED]->SetDirectory(nullptr);
1523 
1524  TH2F* timingHistVsAmp = new TH2F(
1525  Form("timeVsAmpFED_%d", FED), Form("time Vs Amp FED %d", FED), 78, -7, 7, numBins, histRangeMin_, histRangeMax_);
1526  FEDsAndTimingVsAmpHists_[FED] = timingHistVsAmp;
1527  FEDsAndTimingVsAmpHists_[FED]->SetDirectory(nullptr);
1528 
1529  TH1F* numXtalInClusterHist = new TH1F(Form("NumXtalsInCluster_FED_%d", FED),
1530  Form("Num active Xtals In Cluster for FED %d;Num Active Xtals", FED),
1531  25,
1532  0,
1533  25);
1534  FEDsAndNumXtalsInClusterHists_[FED] = numXtalInClusterHist;
1535  FEDsAndNumXtalsInClusterHists_[FED]->SetDirectory(nullptr);
1536 
1537  TH2F* OccupHist = new TH2F(Form("occupFED_%d", FED), Form("Occupancy FED %d;i#eta;i#phi", FED), 85, 1, 86, 20, 1, 21);
1538  FEDsAndOccupancyHists_[FED] = OccupHist;
1539  FEDsAndOccupancyHists_[FED]->SetDirectory(nullptr);
1540 
1541  TH2F* timingHistVsPhi = new TH2F(Form("timeVsPhiFED_%d", FED),
1542  Form("time Vs Phi FED %d;Relative Time (1 clock = 25ns);i#phi", FED),
1543  78,
1544  -7,
1545  7,
1546  20,
1547  1,
1548  21);
1549  FEDsAndTimingVsPhiHists_[FED] = timingHistVsPhi;
1550  FEDsAndTimingVsPhiHists_[FED]->SetDirectory(nullptr);
1551 
1552  TH2F* timingHistVsModule = new TH2F(Form("timeVsModuleFED_%d", FED),
1553  Form("time Vs Module FED %d;Relative Time (1 clock = 25ns);i#eta", FED),
1554  78,
1555  -7,
1556  7,
1557  4,
1558  1,
1559  86);
1560  FEDsAndTimingVsModuleHists_[FED] = timingHistVsModule;
1561  FEDsAndTimingVsModuleHists_[FED]->SetDirectory(nullptr);
1562 
1563  TH2F* dccRuntypeVsBxFED =
1564  new TH2F(Form("DCCRuntypeVsBxFED_%d", FED), Form("DCC Runtype vs. BX FED %d", FED), 3600, 0, 3600, 24, 0, 24);
1565  FEDsAndDCCRuntypeVsBxHists_[FED] = dccRuntypeVsBxFED;
1566  FEDsAndDCCRuntypeVsBxHists_[FED]->SetDirectory(nullptr);
1567 }
1568 
1569 // ------------ method called once each job just before starting event loop ------------
1570 void EcalCosmicsHists::beginRun(edm::Run const&, edm::EventSetup const& eventSetup) {
1572  eventSetup.get<EcalMappingRcd>().get(handle);
1573  ecalElectronicsMap_ = handle.product();
1574 
1575  //Here I will init some of the specific histograms
1576  int numBins = 200; //(int)round(histRangeMax_-histRangeMin_)+1;
1577 
1578  //=============Special Bins for TT and Modules borders=============================
1579  double ttEtaBins[36] = {-85, -80, -75, -70, -65, -60, -55, -50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0,
1580  1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66, 71, 76, 81, 86};
1581  double modEtaBins[10] = {-85, -65, -45, -25, 0, 1, 26, 46, 66, 86};
1582  double ttPhiBins[73];
1583  double modPhiBins[19];
1584  double timingBins[79];
1585  double highEBins[11];
1586  for (int i = 0; i < 79; ++i) {
1587  timingBins[i] = -7. + double(i) * 14. / 78.;
1588  if (i < 73) {
1589  ttPhiBins[i] = 1 + 5 * i;
1590  if (i < 19) {
1591  modPhiBins[i] = 1 + 20 * i;
1592  if (i < 11) {
1593  highEBins[i] = 10. + double(i) * 20.;
1594  }
1595  }
1596  }
1597  }
1598  //=============END Special Bins for TT and Modules borders===========================
1599 
1600  //====================Frequency for Event timing information=========================
1601  double timingEndInSeconds = runTimeLength_ * 3600.;
1602  double timingBinWidth = timingEndInSeconds / double(numTimingBins_);
1603  //====================END Frequency for Event timing information=====================
1604 
1606  new TH1F("energy_AllClusters", "energy_AllClusters;Cluster Energy (GeV)", numBins, histRangeMin_, histRangeMax_);
1608  new TH1F("energyHigh_AllClusters", "energyHigh_AllClusters;Cluster Energy (GeV)", numBins, histRangeMin_, 200.0);
1609  allFedsenergyOnlyHighHist_ = new TH1F("energyHigh_HighEnergyClusters",
1610  "energy of High Energy Clusters;Cluster Energy (GeV)",
1611  numBins,
1612  histRangeMin_,
1613  200.0);
1614  allFedsE2Hist_ = new TH1F(
1615  "E2_AllClusters", "E2_AllClusters;Seed+highest neighbor energy (GeV)", numBins, histRangeMin_, histRangeMax_);
1616  allFedsE2vsE1Hist_ = new TH2F("E2vsE1_AllClusters",
1617  "E2vsE1_AllClusters;Seed Energy (GeV);Seed+highest neighbor energy (GeV)",
1618  numBins,
1619  histRangeMin_,
1620  histRangeMax_,
1621  numBins,
1622  histRangeMin_,
1623  histRangeMax_);
1624  allFedsenergyvsE1Hist_ = new TH2F("energyvsE1_AllClusters",
1625  "energyvsE1_AllClusters;Seed Energy (GeV);Energy(GeV)",
1626  numBins,
1627  histRangeMin_,
1628  histRangeMax_,
1629  numBins,
1630  histRangeMin_,
1631  histRangeMax_);
1632  allFedsTimingHist_ = new TH1F("timeForAllFeds", "timeForAllFeds;Relative Time (1 clock = 25ns)", 78, -7, 7);
1633  allFedsTimingVsFreqHist_ = new TH2F("timeVsFreqAllEvent",
1634  "time Vs Freq All events;Relative Time (1 clock = 25ns);Event Number",
1635  78,
1636  -7,
1637  7,
1638  2000,
1639  0.,
1640  200000);
1641  allFedsTimingVsAmpHist_ = new TH2F("timeVsAmpAllEvents",
1642  "time Vs Amp All Events;Relative Time (1 clock = 25ns);Amplitude (GeV)",
1643  78,
1644  -7,
1645  7,
1646  numBins,
1647  histRangeMin_,
1648  histRangeMax_);
1649  allFedsFrequencyHist_ = new TH1F("FrequencyAllEvent", "Frequency for All events;Event Number", 2000, 0., 200000);
1650 
1651  //--------Special Hists for times stamp info----------------------------------------------
1652  allFedsFreqTimeHist_ = new TH1F("FrequencyAllEventsInTime",
1653  Form("Time of Cosmic Events; Time (s);Passing Event rate/%5g s", timingBinWidth),
1655  0.,
1656  timingEndInSeconds);
1658  new TH2F("FrequencyAllEventsInTimeVsPhi",
1659  Form("Time of Cosmic Events vs iPhi; iPhi;Time (s)/%5g s", timingBinWidth * 360.),
1660  360,
1661  1.,
1662  361.,
1663  numTimingBins_ / 360,
1664  0.,
1665  timingEndInSeconds);
1667  new TH2F("FrequencyAllEventsInTimeVsTTPhi",
1668  Form("Time of Cosmic Events vs iPhi (TT bins); iPhi;Time (s)/%5g s", timingBinWidth * 72.),
1669  72,
1670  1.,
1671  361.,
1672  numTimingBins_ / 72,
1673  0.,
1674  timingEndInSeconds);
1676  new TH2F("FrequencyAllEventsInTimeVsEta",
1677  Form("Time of Cosmic Events vs iEta; Time (s)/%5g s; iEta", timingBinWidth * 172.),
1678  numTimingBins_ / 172,
1679  0.,
1680  timingEndInSeconds,
1681  172,
1682  -86.,
1683  86.);
1685  new TH2F("FrequencyAllEventsInTimeVsTTEta",
1686  Form("Time of Cosmic Events vs Eta (TT bins);Time (s)/%5g s; iEta", timingBinWidth * 35.),
1687  numTimingBins_ / 35,
1688  0.,
1689  timingEndInSeconds,
1690  35,
1691  ttEtaBins);
1692  //--------END Special Hists for times stamp info------------------------------------------
1693 
1694  allFedsiPhiProfileHist_ = new TH1F("iPhiProfileAllEvents", "iPhi Profile all events;i#phi", 360, 1., 361.);
1695  allFedsiEtaProfileHist_ = new TH1F("iEtaProfileAllEvents", "iEta Profile all events;i#eta", 172, -86, 86);
1696 
1697  allOccupancy_ = new TH2F("OccupancyAllEvents", "Occupancy all events;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1698  TrueOccupancy_ =
1699  new TH2F("TrueOccupancyAllEvents", "True Occupancy all events;#phi;#eta", 360, -3.14159, 3.14159, 172, -1.5, 1.5);
1701  new TH2F("OccupancyAllEventsCoarse", "Occupancy all events Coarse;i#phi;i#eta", 360 / 5, 1, 361., 35, ttEtaBins);
1702  TrueOccupancyCoarse_ = new TH2F("TrueOccupancyAllEventsCoarse",
1703  "True Occupancy all events Coarse;#phi;#eta",
1704  360 / 5,
1705  -3.14159,
1706  3.14159,
1707  34,
1708  -1.5,
1709  1.5);
1710 
1711  // single xtal cluster occupancy
1713  new TH2F("OccupancySingleXtal", "Occupancy single xtal clusters;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1714  energySingleXtalHist_ = new TH1F(
1715  "energy_SingleXtalClusters", "Energy single xtal clusters;Cluster Energy (GeV)", numBins, histRangeMin_, 200.0);
1716 
1717  allFedsTimingPhiHist_ = new TH2F("timePhiAllFEDs",
1718  "time vs Phi for all FEDs (TT binning);i#phi;Relative Time (1 clock = 25ns)",
1719  72,
1720  1,
1721  361,
1722  78,
1723  -7,
1724  7);
1725  allFedsTimingPhiEbpHist_ = new TH2F("timePhiEBP",
1726  "time vs Phi for FEDs in EB+ (TT binning) ;i#phi;Relative Time (1 clock = 25ns)",
1727  72,
1728  1,
1729  361,
1730  78,
1731  -7,
1732  7);
1733  allFedsTimingPhiEbmHist_ = new TH2F("timePhiEBM",
1734  "time vs Phi for FEDs in EB- (TT binning);i#phi;Relative Time (1 clock = 25ns)",
1735  72,
1736  1,
1737  361,
1738  78,
1739  -7,
1740  7);
1742  new TH3F("timePhiEtaAllFEDs",
1743  "(Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1744  18,
1745  modPhiBins,
1746  9,
1747  modEtaBins,
1748  78,
1749  timingBins);
1751  new TH3F("timeTTAllFEDs",
1752  "(Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1753  72,
1754  ttPhiBins,
1755  35,
1756  ttEtaBins,
1757  78,
1758  timingBins);
1759  allFedsTimingLMHist_ = new TH2F(
1760  "timeLMAllFEDs", "(LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)", 92, 1, 92, 78, -7, 7);
1761 
1762  allFedsTimingEbpHist_ = new TH1F("timeEBP", "time for FEDs in EB+;Relative Time (1 clock = 25ns)", 78, -7, 7);
1763  allFedsTimingEbmHist_ = new TH1F("timeEBM", "time for FEDs in EB-;Relative Time (1 clock = 25ns)", 78, -7, 7);
1765  new TH1F("timeEBPTop", "time for FEDs in EB+ Top;Relative Time (1 clock = 25ns)", 78, -7, 7);
1767  new TH1F("timeEBMTop", "time for FEDs in EB- Top;Relative Time (1 clock = 25ns)", 78, -7, 7);
1769  new TH1F("timeEBPBottom", "time for FEDs in EB+ Bottom;Relative Time (1 clock = 25ns)", 78, -7, 7);
1771  new TH1F("timeEBMBottom", "time for FEDs in EB- Bottom;Relative Time (1 clock = 25ns)", 78, -7, 7);
1772 
1774  new TH1F("numberofCosmicsPerEvent", "Number of cosmics per event;Number of Cosmics", 30, 0, 30);
1776  new TH1F("numberofCosmicsPerEvent_EB", "Number of cosmics per event EB;Number of Cosmics", 30, 0, 30);
1777 
1779  new TH1F("numberofCosmicsWTrackPerEvent", "Number of cosmics with track per event", 30, 0, 30);
1780  numberofCosmicsTopBottomHist_ = new TH1F(
1781  "numberofCosmicsTopBottomPerEvent", "Number of top bottom cosmics per event;Number of Cosmics", 30, 0, 30);
1782  numberofGoodEvtFreq_ = new TH1F("frequencyOfGoodEvents",
1783  "Number of events with cosmic vs Event;Event Number;Number of Good Events/100 Events",
1784  2000,
1785  0,
1786  200000);
1787 
1788  numberofCrossedEcalIdsHist_ = new TH1F("numberofCrossedEcalCosmicsPerEvent",
1789  "Number of crossed ECAL cosmics per event;Number of Crossed Cosmics",
1790  10,
1791  0,
1792  10);
1793 
1794  allOccupancyExclusiveECAL_ = new TH2F("OccupancyAllEvents_ExclusiveECAL",
1795  "Occupancy all events Exclusive ECAL ;i#phi;i#eta",
1796  360,
1797  1.,
1798  361.,
1799  172,
1800  -86,
1801  86);
1802  allOccupancyCoarseExclusiveECAL_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveECAL",
1803  "Occupancy all events Coarse Exclusive ECAL;i#phi;i#eta",
1804  360 / 5,
1805  ttPhiBins,
1806  35,
1807  ttEtaBins);
1809  new TH2F("OccupancyAllEvents_ECAL", "Occupancy all events ECAL;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1810  allOccupancyCoarseECAL_ = new TH2F("OccupancyAllEventsCoarse_ECAL",
1811  "Occupancy all events Coarse ECAL;i#phi;i#eta",
1812  360 / 5,
1813  ttPhiBins,
1814  35,
1815  ttEtaBins);
1817  new TH1F("timeForAllFeds_ECAL", "timeForAllFeds ECAL;Relative Time (1 clock = 25ns)", 78, -7, 7);
1819  new TH3F("timePhiEtaAllFEDs_ECAL",
1820  "ECAL (Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1821  18,
1822  modPhiBins,
1823  9,
1824  modEtaBins,
1825  78,
1826  timingBins);
1828  new TH3F("timeTTAllFEDs_ECAL",
1829  "ECAL (Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1830  72,
1831  ttPhiBins,
1832  35,
1833  ttEtaBins,
1834  78,
1835  timingBins);
1836  allFedsTimingLMHistECAL_ = new TH2F("timeLMAllFEDs_ECAL",
1837  "ECAL (LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)",
1838  92,
1839  1,
1840  92,
1841  78,
1842  -7,
1843  7);
1844 
1845  allOccupancyExclusiveDT_ = new TH2F(
1846  "OccupancyAllEvents_ExclusiveDT", "Occupancy all events Exclusive DT;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1847  allOccupancyCoarseExclusiveDT_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveDT",
1848  "Occupancy all events Coarse Exclusive DT;i#phi;i#eta",
1849  360 / 5,
1850  1,
1851  361.,
1852  35,
1853  ttEtaBins);
1854  allOccupancyDT_ =
1855  new TH2F("OccupancyAllEvents_DT", "Occupancy all events DT;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1856  allOccupancyCoarseDT_ = new TH2F(
1857  "OccupancyAllEventsCoarse_DT", "Occupancy all events Coarse DT;i#phi;i#eta", 360 / 5, 1, 361., 35, ttEtaBins);
1858  allFedsTimingHistDT_ = new TH1F("timeForAllFeds_DT", "timeForAllFeds DT;Relative Time (1 clock = 25ns)", 78, -7, 7);
1860  new TH3F("timePhiEtaAllFEDs_DT",
1861  "DT (Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1862  18,
1863  modPhiBins,
1864  9,
1865  modEtaBins,
1866  78,
1867  timingBins);
1869  new TH3F("timeTTAllFEDs_DT",
1870  "DT (Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1871  72,
1872  ttPhiBins,
1873  35,
1874  ttEtaBins,
1875  78,
1876  timingBins);
1877  allFedsTimingLMHistDT_ = new TH2F("timeLMAllFEDs_DT",
1878  "DT (LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)",
1879  92,
1880  1,
1881  92,
1882  78,
1883  -7,
1884  7);
1885 
1886  allOccupancyExclusiveRPC_ = new TH2F(
1887  "OccupancyAllEvents_ExclusiveRPC", "Occupancy all events Exclusive RPC;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1888  allOccupancyCoarseExclusiveRPC_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveRPC",
1889  "Occupancy all events Coarse Exclusive RPC;i#phi;i#eta",
1890  360 / 5,
1891  1,
1892  361.,
1893  35,
1894  ttEtaBins);
1896  new TH2F("OccupancyAllEvents_RPC", "Occupancy all events RPC;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1897  allOccupancyCoarseRPC_ = new TH2F(
1898  "OccupancyAllEventsCoarse_RPC", "Occupancy all events Coarse RPC;i#phi;i#eta", 360 / 5, 1, 361., 35, ttEtaBins);
1900  new TH1F("timeForAllFeds_RPC", "timeForAllFeds RPC;Relative Time (1 clock = 25ns)", 78, -7, 7);
1902  new TH3F("timePhiEtaAllFEDs_RPC",
1903  "RPC (Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1904  18,
1905  modPhiBins,
1906  9,
1907  modEtaBins,
1908  78,
1909  timingBins);
1911  new TH3F("timeTTAllFEDs_RPC",
1912  "RPC (Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1913  72,
1914  ttPhiBins,
1915  35,
1916  ttEtaBins,
1917  78,
1918  timingBins);
1919  allFedsTimingLMHistRPC_ = new TH2F("timeLMAllFEDs_RPC",
1920  "RPC (LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)",
1921  92,
1922  1,
1923  92,
1924  78,
1925  -7,
1926  7);
1927 
1928  allOccupancyExclusiveCSC_ = new TH2F(
1929  "OccupancyAllEvents_ExclusiveCSC", "Occupancy all events Exclusive CSC;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1930  allOccupancyCoarseExclusiveCSC_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveCSC",
1931  "Occupancy all events Coarse Exclusive CSC;i#phi;i#eta",
1932  360 / 5,
1933  1,
1934  361.,
1935  35,
1936  ttEtaBins);
1938  new TH2F("OccupancyAllEvents_CSC", "Occupancy all events CSC;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1939  allOccupancyCoarseCSC_ = new TH2F(
1940  "OccupancyAllEventsCoarse_CSC", "Occupancy all events Coarse CSC;i#phi;i#eta", 360 / 5, 1, 361., 35, ttEtaBins);
1942  new TH1F("timeForAllFeds_CSC", "timeForAllFeds CSC;Relative Time (1 clock = 25ns)", 78, -7, 7);
1944  new TH3F("timePhiEtaAllFEDs_CSC",
1945  "CSC (Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1946  18,
1947  modPhiBins,
1948  9,
1949  modEtaBins,
1950  78,
1951  timingBins);
1953  new TH3F("timeTTAllFEDs_CSC",
1954  "CSC (Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1955  72,
1956  ttPhiBins,
1957  35,
1958  ttEtaBins,
1959  78,
1960  timingBins);
1961  allFedsTimingLMHistCSC_ = new TH2F("timeLMAllFEDs_CSC",
1962  "CSC (LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)",
1963  92,
1964  1,
1965  62,
1966  78,
1967  -7,
1968  7);
1969 
1970  allOccupancyExclusiveHCAL_ = new TH2F("OccupancyAllEvents_ExclusiveHCAL",
1971  "Occupancy all events Exclusive HCAL;i#phi;i#eta",
1972  360,
1973  1.,
1974  361.,
1975  172,
1976  -86,
1977  86);
1978  allOccupancyCoarseExclusiveHCAL_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveHCAL",
1979  "Occupancy all events Coarse Exclusive HCAL;i#phi;i#eta",
1980  360 / 5,
1981  1,
1982  361.,
1983  35,
1984  ttEtaBins);
1986  new TH2F("OccupancyAllEvents_HCAL", "Occupancy all events HCAL;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
1987  allOccupancyCoarseHCAL_ = new TH2F(
1988  "OccupancyAllEventsCoarse_HCAL", "Occupancy all events Coarse HCAL;i#phi;i#eta", 360 / 5, 1, 361., 35, ttEtaBins);
1990  new TH1F("timeForAllFeds_HCAL", "timeForAllFeds HCAL;Relative Time (1 clock = 25ns)", 78, -7, 7);
1992  new TH3F("timePhiEtaAllFEDs_HCAL",
1993  "HCAL (Phi,Eta,time) for all FEDs (SM,M binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
1994  18,
1995  modPhiBins,
1996  9,
1997  modEtaBins,
1998  78,
1999  timingBins);
2001  new TH3F("timeTTAllFEDs_HCAL",
2002  "HCAL (Phi,Eta,time) for all FEDs (SM,TT binning);i#phi;i#eta;Relative Time (1 clock = 25ns)",
2003  72,
2004  ttPhiBins,
2005  35,
2006  ttEtaBins,
2007  78,
2008  timingBins);
2009  allFedsTimingLMHistHCAL_ = new TH2F("timeLMAllFEDs_HCAL",
2010  "HCAL (LM,time) for all FEDs (SM,LM binning);LM;Relative Time (1 clock = 25ns)",
2011  92,
2012  1,
2013  92,
2014  78,
2015  -7,
2016  7);
2017 
2018  TrueBCOccupancy_ = new TH2F(
2019  "BCTrueOccupancyAllEvents", "True SB Occupancy all events;#phi;#eta", 360, -3.14159, 3.14159, 172, -1.5, 1.5);
2020  TrueBCOccupancyCoarse_ = new TH2F("BCTrueOccupancyAllEventsCoarse",
2021  "True BC Occupancy all events Coarse;#phi;#eta",
2022  360 / 5,
2023  -3.14159,
2024  3.14159,
2025  34,
2026  -1.5,
2027  1.5);
2028 
2029  numberofBCinSC_ =
2030  new TH1F("numberofBCinSC", "Number of Basic Clusters in Super Cluster;Num Basic Clusters", 20, 0, 20); //SC
2031  numberofBCinSCphi_ = new TH2F("numberofBCinSCphi",
2032  "Number of Basic Clusters in Super Cluster;phi;Num Basic Clusters",
2033  360 / 5,
2034  -3.14159,
2035  3.14159,
2036  20,
2037  0,
2038  20); //SC
2039 
2041  new TH1F("timeForAllFeds_EcalMuon", "timeForAllFeds Ecal+Muon;Relative Time (1 clock = 25ns)", 78, -7, 7);
2042 
2043  triggerHist_ = new TH1F("triggerHist", "Trigger Number", 5, 0, 5);
2044  triggerHist_->GetXaxis()->SetBinLabel(1, "ECAL");
2045  triggerHist_->GetXaxis()->SetBinLabel(2, "HCAL");
2046  triggerHist_->GetXaxis()->SetBinLabel(3, "DT");
2047  triggerHist_->GetXaxis()->SetBinLabel(4, "RPC");
2048  triggerHist_->GetXaxis()->SetBinLabel(5, "CSC");
2049 
2050  triggerExclusiveHist_ = new TH1F("triggerExclusiveHist", "Trigger Number (Mutually Exclusive)", 5, 0, 5);
2051  triggerExclusiveHist_->GetXaxis()->SetBinLabel(1, "ECAL");
2052  triggerExclusiveHist_->GetXaxis()->SetBinLabel(2, "HCAL");
2053  triggerExclusiveHist_->GetXaxis()->SetBinLabel(3, "DT");
2054  triggerExclusiveHist_->GetXaxis()->SetBinLabel(4, "RPC");
2055  triggerExclusiveHist_->GetXaxis()->SetBinLabel(5, "CSC");
2056 
2057  runNumberHist_ = new TH1F("runNumberHist", "Run Number", 1, 0, 1);
2058 
2059  deltaRHist_ = new TH1F("deltaRHist", "deltaR", 500, -0.5, 499.5);
2060  deltaEtaHist_ = new TH1F("deltaIEtaHist", "deltaIEta", 170, -85.5, 84.5);
2061  deltaPhiHist_ = new TH1F("deltaIPhiHist", "deltaIPhi", 720, -360.5, 359.5);
2062  ratioAssocTracksHist_ = new TH1F("ratioAssocTracks", "num assoc. tracks/tracks through Ecal", 11, 0, 1.1);
2063  ratioAssocClustersHist_ = new TH1F("ratioAssocClusters", "num assoc. clusters/total clusters", 11, 0, 1.1);
2064  trackAssoc_muonsEcal_ = new TH2F(
2065  "trackAssoc_muonsEcal", "Map of muon hits in Ecal", 360, 1., 361., 172, -86, 86); //360, 0 , 360, 170,-85 ,85);
2067  new TH2F("deltaEtaDeltaPhi", "Delta ieta vs. delta iphi", 170, -85.5, 84.5, 720, -360.5, 359.5);
2068  seedTrackEtaHist_ = new TH2F("seedTrackEta", "track ieta vs. seed ieta", 170, -85.5, 84.5, 170, -85.5, 84.5);
2069  seedTrackPhiHist_ = new TH2F("seedTrackPhi", "track iphi vs. seed iphi", 720, -360.5, 359.5, 720, -360.5, 359.5);
2070 
2071  dccEventVsBxHist_ = new TH2F("dccEventVsBx", "DCC Runtype vs. bunch crossing", 3600, 0, 3600, 24, 0, 24);
2072  dccBXErrorByFEDHist_ = new TH1F("dccBXErrorByFED", "Incorrect BX number by FED", 54, 601, 655);
2073  dccOrbitErrorByFEDHist_ = new TH1F("dccOrbitErrorByFED", "Incorrect orbit number by FED", 54, 601, 655);
2074  dccRuntypeErrorByFEDHist_ = new TH1F("dccRuntypeErrorByFED", "Incorrect DCC Runtype by FED", 54, 601, 655);
2075  dccRuntypeHist_ = new TH1F("dccRuntype", "DCC Runtype frequency", 24, 0, 24);
2076  dccErrorVsBxHist_ = new TH2F("dccErrorVsBX", "DCC Errors vs. BX", 3600, 0, 3600, 3, 0, 3);
2077 
2078  hcalEnergy_HBHE_ = new TH1F("hcalEnergy_HBHE", "RecHit Energy HBHE", 440, -10, 100);
2079  hcalEnergy_HF_ = new TH1F("hcalEnergy_HF", "RecHit Energy HF", 440, -10, 100);
2080  hcalEnergy_HO_ = new TH1F("hcalEnergy_HO", "RecHit Energy HO", 440, -10, 100);
2081  hcalHEHBecalEB_ =
2082  new TH2F("hcalHEHBecalEB", "HCAL HBHE RecHit energy vs ECAL EB energy", numBins, histRangeMin_, 300.0, 40, -5, 5);
2083 
2084  NumXtalsInClusterHist_ = new TH1F("NumXtalsInClusterAllHist", "Number of Xtals in Cluster;NumXtals", 150, 0, 150);
2085  numxtalsVsEnergy_ = new TH2F("NumXtalsVsEnergy",
2086  "Number of Xtals in Cluster vs Energy;Energy (GeV);Number of Xtals in Cluster",
2087  numBins,
2088  histRangeMin_,
2089  histRangeMax_,
2090  150,
2091  0,
2092  150);
2093  numxtalsVsHighEnergy_ = new TH2F("NumXtalsVsHighEnergy",
2094  "Number of Xtals in Cluster vs Energy;Energy (GeV);Number of Xtals in Cluster",
2095  numBins,
2096  histRangeMin_,
2097  200.,
2098  150,
2099  0,
2100  150);
2101 
2102  // high energy analysis
2104  new TH2F("OccupancyHighEnergyEvents", "Occupancy high energy events;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
2105  allOccupancyHighEnergyCoarse_ = new TH2F("OccupancyHighEnergyEventsCoarse",
2106  "Occupancy high energy events Coarse;i#phi;i#eta",
2107  72,
2108  ttPhiBins,
2109  35,
2110  ttEtaBins);
2111  allFedsOccupancyHighEnergyHist_ = new TH3F("OccupancyHighEnergyEvents3D",
2112  "(Phi,Eta,energy) for all high energy events;i#phi;i#eta;energy (GeV)",
2113  18,
2114  modPhiBins,
2115  9,
2116  modEtaBins,
2117  10,
2118  highEBins);
2120  new TH1F("NumActiveXtalsInClusterAllHist", "Number of active Xtals in Cluster;NumXtals", 100, 0, 100);
2121 
2122  HighEnergy_NumXtal = new TH1F("HighEnergy_NumXtal", "Num crystals in high E clusters;num crystals", 150, 0, 150);
2123  HighEnergy_NumXtalFedId = new TH2F(
2124  "HighEnergy_NumXtalFedId", "Num crystals in cluster vs FedId;FedId;num crystals", 36, 610., 645., 150, 0, 150);
2125  HighEnergy_NumXtaliphi = new TH2F(
2126  "HighEnergy_NumXtaliphi", "Num crystals in cluster vs iphi;i#phi;num crystals", 360, 1., 361., 150, 0, 150);
2127  HighEnergy_energy3D = new TH3F("HighEnergy_energy3D",
2128  "(Phi,Eta,energy) for all high energy events;i#phi;i#eta;energy (GeV)",
2129  72,
2130  ttPhiBins,
2131  35,
2132  ttEtaBins,
2133  10,
2134  highEBins);
2135 
2136  HighEnergy_energyNumXtal = new TH2F("HighEnergy_energyNumXtal",
2137  "Energy in cluster vs Num crystals in cluster;num crystals;energy",
2138  150,
2139  0,
2140  150,
2141  200,
2142  0.,
2143  200.);
2144 
2145  HighEnergy_bestSeed = new TH1F("HighEnergy_bestSeedEnergy", "BestSeed Energy from TrackAss", 200, 0., 200.);
2146  HighEnergy_bestSeedOccupancy = new TH2F(
2147  "HighEnergy_bestSeedOccupancy", "Occupancy HighEn events from TrackAss;i#phi;i#eta", 360, 1., 361., 172, -86, 86);
2148 
2149  HighEnergy_numClusHighEn = new TH1F("HighEnergy_numClusHighEn", "Num High Energy Clusters", 7, 0, 7);
2151  new TH1F("HighEnergy_ratioClusters", "Num High Energy Clusters/Num tot Clusters", 100, 0., 1.1);
2152 
2153  HighEnergy_numRecoTrackBarrel = new TH1F("HighEnergy_numRecoTracksBarrel", "Num BarrelRecoTracks", 10, 0, 10);
2154  HighEnergy_TracksAngle = new TH1F("HighEnergy_TracksAngle", "Angle between tracks", 720, 0., 180.);
2156  new TH1F("HighEnergy_TopBottomTracksAngle", "Angle between top-bottom tracks", 720, 0., 180.);
2157 
2158  HighEnergy_2GeV_occuCoarse = new TH2F("HighEnergy_occu2GeV_Coarse",
2159  "Occupancy high energy events with more than 2 GeV;i#phi;i#eta",
2160  72,
2161  ttPhiBins,
2162  35,
2163  ttEtaBins);
2164  HighEnergy_2GeV_occu3D = new TH3F("HighEnergy_2GeV_energy3D",
2165  "(iphi,ieta,energy) for all high energy events w > 10 GeV;i#phi;i#eta;energy (GeV)",
2166  72,
2167  ttPhiBins,
2168  35,
2169  ttEtaBins,
2170  10,
2171  highEBins);
2172  HighEnergy_100GeV_occuCoarse = new TH2F("HighEnergy_occu100GeV_Coarse",
2173  "Occupancy high energy events with more than 100 GeV;i#phi;i#eta",
2174  72,
2175  ttPhiBins,
2176  35,
2177  ttEtaBins);
2179  new TH3F("HighEnergy_100GeV_energy3D",
2180  "(iphi,ieta,energy) for all high energy events more than 100 GeV;i#phi;i#eta;energy (GeV)",
2181  72,
2182  ttPhiBins,
2183  35,
2184  ttEtaBins,
2185  10,
2186  highEBins);
2187  HighEnergy_0tracks_occu3D = new TH3F("HighEnergy_0Tracks_energy3D",
2188  "(iphi,ieta,energy) for all events with 0 tracks;i#phi;i#eta;energy (GeV)",
2189  72,
2190  ttPhiBins,
2191  35,
2192  ttEtaBins,
2193  10,
2194  highEBins);
2195  HighEnergy_1tracks_occu3D = new TH3F("HighEnergy_1Tracks_energy3D",
2196  "(iphi,ieta,energy) for all events with 1 tracks;i#phi;i#eta;energy (GeV)",
2197  72,
2198  ttPhiBins,
2199  35,
2200  ttEtaBins,
2201  10,
2202  highEBins);
2203  HighEnergy_2tracks_occu3D = new TH3F("HighEnergy_2Tracks_energy3D",
2204  "(iphi,ieta,energy) for all events with 2 tracks;i#phi;i#eta;energy (GeV)",
2205  72,
2206  ttPhiBins,
2207  35,
2208  ttEtaBins,
2209  10,
2210  highEBins);
2211  HighEnergy_0tracks_occu3DXtal = new TH3F("HighEnergy_0Tracks_energy3DXtal",
2212  "(iphi,ieta,energy) for all events with 0 tracks;i#phi;i#eta;energy (GeV)",
2213  360,
2214  1.,
2215  361.,
2216  172,
2217  -86,
2218  86,
2219  200,
2220  0.,
2221  200.);
2222  HighEnergy_1tracks_occu3DXtal = new TH3F("HighEnergy_1Tracks_energy3DXtal",
2223  "(iphi,ieta,energy) for all events with 1 tracks;i#phi;i#eta;energy (GeV)",
2224  360,
2225  1.,
2226  361.,
2227  172,
2228  -86,
2229  86,
2230  200,
2231  0.,
2232  200.);
2233  HighEnergy_2tracks_occu3DXtal = new TH3F("HighEnergy_2Tracks_energy3DXtal",
2234  "(iphi,ieta,energy) for all events with 2 tracks;i#phi;i#eta;energy (GeV)",
2235  360,
2236  1.,
2237  361.,
2238  172,
2239  -86,
2240  86,
2241  200,
2242  0.,
2243  200.);
2244 
2245  //EE histograms
2246 
2247  // EE-
2249  new TH1F("SeedEnergyAllFEDs", "Seed Energy for EEM Feds; Seed Energy (GeV)", 200, histRangeMin_, 10.0);
2250 
2252  new TH2F("OccupancyAllEventsCoarse", "Occupancy all events Coarse EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2253  EEM_AllOccupancy_ = new TH2F("OccupancyAllEvents", "Occupancy all events EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2255  new TH1F("energy_AllClusters", "energy_AllClusters_EEM;Cluster Energy (GeV)", numBins, histRangeMin_, 10.0);
2256  EEM_FedsenergyHighHist_ = new TH1F(
2257  "energyHigh_AllClusters", "energyHigh_AllClusters in EEM;Cluster Energy (GeV)", numBins, histRangeMin_, 200.0);
2258  EEM_FedsenergyOnlyHighHist_ = new TH1F("energyHigh_HighEnergyClusters",
2259  "energy of High Energy Clusters in EEM;Cluster Energy (GeV)",
2260  numBins,
2261  histRangeMin_,
2262  200.0);
2263  EEM_FedsE2Hist_ =
2264  new TH1F("E2_AllClusters", "E2_AllClusters_EEM;Seed+highest neighbor energy (GeV)", numBins, histRangeMin_, 10.0);
2265  EEM_FedsE2vsE1Hist_ = new TH2F("E2vsE1_AllClusters",
2266  "E2vsE1_AllClusters_EEM;Seed Energy (GeV);Seed+highest neighbor energy (GeV)",
2267  numBins,
2268  histRangeMin_,
2269  10.0,
2270  numBins,
2271  histRangeMin_,
2272  10.0);
2273  EEM_FedsenergyvsE1Hist_ = new TH2F("energyvsE1_AllClusters",
2274  "energyvsE1_AllClusters_EEM;Seed Energy (GeV);Energy(GeV)",
2275  numBins,
2276  histRangeMin_,
2277  10.0,
2278  numBins,
2279  histRangeMin_,
2280  10.0);
2281  EEM_FedsTimingHist_ = new TH1F("timeForAllFeds", "timeForAllFeds_EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2283  new TH1F("numberofCosmicsPerEvent", "Number of cosmics per event EEM;Number of Cosmics", 30, 0, 30);
2284 
2285  EEM_FedsTimingVsAmpHist_ = new TH2F("timeVsAmpAllEvents",
2286  "time Vs Amp All Events EEM;Relative Time (1 clock = 25ns);Amplitude (GeV)",
2287  78,
2288  -7,
2289  7,
2290  numBins,
2291  histRangeMin_,
2292  10.0);
2293  EEM_FedsTimingTTHist_ = new TH3F("timeTTAllFEDs",
2294  "(ix,iy,time) for all FEDs (SM,TT binning) EEM;ix;iy;Relative Time (1 clock = 25ns)",
2295  20,
2296  0,
2297  100,
2298  20,
2299  0,
2300  100,
2301  78,
2302  -7,
2303  7);
2304 
2306  new TH2F("OccupancySingleXtal", "Occupancy single xtal clusters EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2307  EEM_energySingleXtalHist_ = new TH1F("energy_SingleXtalClusters",
2308  "Energy single xtal clusters EEM;Cluster Energy (GeV)",
2309  numBins,
2310  histRangeMin_,
2311  200.0);
2312 
2313  EEM_OccupancyExclusiveECAL_ = new TH2F(
2314  "OccupancyAllEvents_ExclusiveECAL", "Occupancy all events Exclusive ECAL EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2315  EEM_OccupancyCoarseExclusiveECAL_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveECAL",
2316  "Occupancy all events Coarse Exclusive ECAL EEM;ix;iy",
2317  20,
2318  0,
2319  100,
2320  20,
2321  0,
2322  100);
2324  new TH2F("OccupancyAllEvents_ECAL", "Occupancy all events ECAL EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2326  new TH2F("OccupancyAllEventsCoarse_ECAL", "Occupancy all events Coarse ECAL EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2328  new TH1F("timeForAllFeds_ECAL", "timeForAllFeds ECAL EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2330  new TH3F("timeTTAllFEDs_ECAL",
2331  "(ix,iy,time) for all FEDs (SM,TT binning) ECAL EEM;ix;iy;Relative Time (1 clock = 25ns)",
2332  20,
2333  0,
2334  100,
2335  20,
2336  0,
2337  100,
2338  78,
2339  -7,
2340  7);
2341 
2342  EEM_OccupancyExclusiveDT_ = new TH2F(
2343  "OccupancyAllEvents_ExclusiveDT", "Occupancy all events Exclusive DT EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2344  EEM_OccupancyCoarseExclusiveDT_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveDT",
2345  "Occupancy all events Coarse Exclusive DT EEM;ix;iy",
2346  20,
2347  0,
2348  100,
2349  20,
2350  0,
2351  100);
2352  EEM_OccupancyDT_ = new TH2F("OccupancyAllEvents_DT", "Occupancy all events DT EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2354  new TH2F("OccupancyAllEventsCoarse_DT", "Occupancy all events Coarse DT EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2356  new TH1F("timeForAllFeds_DT", "timeForAllFeds DT EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2358  new TH3F("timeTTAllFEDs_DT",
2359  "(ix,iy,time) for all FEDs (SM,TT binning) DT EEM;ix;iy;Relative Time (1 clock = 25ns)",
2360  20,
2361  0,
2362  100,
2363  20,
2364  0,
2365  100,
2366  78,
2367  -7,
2368  7);
2369 
2370  EEM_OccupancyExclusiveRPC_ = new TH2F(
2371  "OccupancyAllEvents_ExclusiveRPC", "Occupancy all events Exclusive RPC EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2372  EEM_OccupancyCoarseExclusiveRPC_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveRPC",
2373  "Occupancy all events Coarse Exclusive RPC EEM;ix;iy",
2374  20,
2375  0,
2376  100,
2377  20,
2378  0,
2379  100);
2381  new TH2F("OccupancyAllEvents_RPC", "Occupancy all events RPC EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2383  new TH2F("OccupancyAllEventsCoarse_RPC", "Occupancy all events Coarse RPC EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2385  new TH1F("timeForAllFeds_RPC", "timeForAllFeds RPC EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2387  new TH3F("timeTTAllFEDs_RPC",
2388  "(ix,iy,time) for all FEDs (SM,TT binning) RPC EEM;ix;iy;Relative Time (1 clock = 25ns)",
2389  20,
2390  0,
2391  100,
2392  20,
2393  0,
2394  100,
2395  78,
2396  -7,
2397  7);
2398 
2399  EEM_OccupancyExclusiveCSC_ = new TH2F(
2400  "OccupancyAllEvents_ExclusiveCSC", "Occupancy all events Exclusive CSC EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2401  EEM_OccupancyCoarseExclusiveCSC_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveCSC",
2402  "Occupancy all events Coarse Exclusive CSC EEM;ix;iy",
2403  20,
2404  0,
2405  100,
2406  20,
2407  0,
2408  100);
2410  new TH2F("OccupancyAllEvents_CSC", "Occupancy all events CSC EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2412  new TH2F("OccupancyAllEventsCoarse_CSC", "Occupancy all events Coarse CSC EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2414  new TH1F("timeForAllFeds_CSC", "timeForAllFeds CSC EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2416  new TH3F("timeTTAllFEDs_CSC",
2417  "(ix,iy,time) for all FEDs (SM,TT binning) CSC EEM;ix;iy;Relative Time (1 clock = 25ns)",
2418  20,
2419  0,
2420  100,
2421  20,
2422  0,
2423  100,
2424  78,
2425  -7,
2426  7);
2427 
2428  EEM_OccupancyExclusiveHCAL_ = new TH2F(
2429  "OccupancyAllEvents_ExclusiveHCAL", "Occupancy all events Exclusive HCAL EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2430  EEM_OccupancyCoarseExclusiveHCAL_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveHCAL",
2431  "Occupancy all events Coarse Exclusive HCAL EEM;ix;iy",
2432  20,
2433  0,
2434  100,
2435  20,
2436  0,
2437  100);
2439  new TH2F("OccupancyAllEvents_HCAL", "Occupancy all events HCAL EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2441  new TH2F("OccupancyAllEventsCoarse_HCAL", "Occupancy all events Coarse HCAL EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2443  new TH1F("timeForAllFeds_HCAL", "timeForAllFeds HCAL EEM;Relative Time (1 clock = 25ns)", 78, -7, 7);
2445  new TH3F("timeTTAllFEDs_HCAL",
2446  "(ix,iy,time) for all FEDs (SM,TT binning) HCAL EEM;ix;iy;Relative Time (1 clock = 25ns)",
2447  20,
2448  0,
2449  100,
2450  20,
2451  0,
2452  100,
2453  78,
2454  -7,
2455  7);
2456 
2458  new TH1F("numberofBCinSC", "Number of Basic Clusters in Super Cluster EEM;Num Basic Clusters", 20, 0, 20);
2459 
2460  EEM_triggerHist_ = new TH1F("triggerHist", "Trigger Number EEM", 5, 0, 5);
2461  EEM_triggerHist_->GetXaxis()->SetBinLabel(1, "ECAL");
2462  EEM_triggerHist_->GetXaxis()->SetBinLabel(2, "HCAL");
2463  EEM_triggerHist_->GetXaxis()->SetBinLabel(3, "DT");
2464  EEM_triggerHist_->GetXaxis()->SetBinLabel(4, "RPC");
2465  EEM_triggerHist_->GetXaxis()->SetBinLabel(5, "CSC");
2466 
2467  EEM_triggerExclusiveHist_ = new TH1F("triggerExclusiveHist", "Trigger Number (Mutually Exclusive) EEM", 5, 0, 5);
2468  triggerExclusiveHist_->GetXaxis()->SetBinLabel(1, "ECAL");
2469  EEM_triggerExclusiveHist_->GetXaxis()->SetBinLabel(2, "HCAL");
2470  EEM_triggerExclusiveHist_->GetXaxis()->SetBinLabel(3, "DT");
2471  EEM_triggerExclusiveHist_->GetXaxis()->SetBinLabel(4, "RPC");
2472  EEM_triggerExclusiveHist_->GetXaxis()->SetBinLabel(5, "CSC");
2473 
2475  new TH1F("NumXtalsInClusterAllHist", "Number of Xtals in Cluster EEM;NumXtals", 150, 0, 150);
2476  EEM_numxtalsVsEnergy_ = new TH2F("NumXtalsVsEnergy",
2477  "Number of Xtals in Cluster vs Energy EEM;Energy (GeV);Number of Xtals in Cluster",
2478  numBins,
2479  histRangeMin_,
2480  10.0,
2481  150,
2482  0,
2483  150);
2485  new TH2F("NumXtalsVsHighEnergy",
2486  "Number of Xtals in Cluster vs Energy EEM;Energy (GeV);Number of Xtals in Cluster",
2487  numBins,
2488  histRangeMin_,
2489  200.,
2490  150,
2491  0,
2492  150);
2493 
2495  new TH2F("OccupancyHighEnergyEvents", "Occupancy high energy events EEM;ix;iy", 100, 0, 100, 100, 0, 100);
2496  EEM_OccupancyHighEnergyCoarse_ = new TH2F(
2497  "OccupancyHighEnergyEventsCoarse", "Occupancy high energy events Coarse EEM;ix;iy", 20, 0, 100, 20, 0, 100);
2498 
2500  new TH1F("NumActiveXtalsInClusterAllHist", "Number of active Xtals in Cluster EEM;NumXtals", 100, 0, 100);
2501 
2502  // EE+
2504  new TH1F("SeedEnergyAllFEDs", "Seed Energy for EEP Feds; Seed Energy (GeV)", 200, histRangeMin_, 10.0);
2505 
2507  new TH2F("OccupancyAllEventsCoarse", "Occupancy all events Coarse EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2508  EEP_AllOccupancy_ = new TH2F("OccupancyAllEvents", "Occupancy all events EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2510  new TH1F("energy_AllClusters", "energy_AllClusters_EEP;Cluster Energy (GeV)", numBins, histRangeMin_, 10.0);
2511  EEP_FedsenergyHighHist_ = new TH1F(
2512  "energyHigh_AllClusters", "energyHigh_AllClusters in EEP;Cluster Energy (GeV)", numBins, histRangeMin_, 200.0);
2513  EEP_FedsenergyOnlyHighHist_ = new TH1F("energyHigh_HighEnergyClusters",
2514  "energy of High Energy Clusters in EEP;Cluster Energy (GeV)",
2515  numBins,
2516  histRangeMin_,
2517  200.0);
2518  EEP_FedsE2Hist_ =
2519  new TH1F("E2_AllClusters", "E2_AllClusters_EEP;Seed+highest neighbor energy (GeV)", numBins, histRangeMin_, 10.0);
2520  EEP_FedsE2vsE1Hist_ = new TH2F("E2vsE1_AllClusters",
2521  "E2vsE1_AllClusters_EEP;Seed Energy (GeV);Seed+highest neighbor energy (GeV)",
2522  numBins,
2523  histRangeMin_,
2524  10.0,
2525  numBins,
2526  histRangeMin_,
2527  10.0);
2528  EEP_FedsenergyvsE1Hist_ = new TH2F("energyvsE1_AllClusters",
2529  "energyvsE1_AllClusters_EEP;Seed Energy (GeV);Energy(GeV)",
2530  numBins,
2531  histRangeMin_,
2532  10.0,
2533  numBins,
2534  histRangeMin_,
2535  10.0);
2536  EEP_FedsTimingHist_ = new TH1F("timeForAllFeds", "timeForAllFeds_EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2538  new TH1F("numberofCosmicsPerEvent", "Number of cosmics per event EEP;Number of Cosmics", 30, 0, 30);
2539 
2540  EEP_FedsTimingVsAmpHist_ = new TH2F("timeVsAmpAllEvents",
2541  "time Vs Amp All Events EEP;Relative Time (1 clock = 25ns);Amplitude (GeV)",
2542  78,
2543  -7,
2544  7,
2545  numBins,
2546  histRangeMin_,
2547  10.0);
2548  EEP_FedsTimingTTHist_ = new TH3F("timeTTAllFEDs",
2549  "(ix,iy,time) for all FEDs (SM,TT binning) EEP;ix;iy;Relative Time (1 clock = 25ns)",
2550  20,
2551  0,
2552  100,
2553  20,
2554  0,
2555  100,
2556  78,
2557  -7,
2558  7);
2559 
2561  new TH2F("OccupancySingleXtal", "Occupancy single xtal clusters EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2562  EEP_energySingleXtalHist_ = new TH1F("energy_SingleXtalClusters",
2563  "Energy single xtal clusters EEP;Cluster Energy (GeV)",
2564  numBins,
2565  histRangeMin_,
2566  200.0);
2567 
2568  EEP_OccupancyExclusiveECAL_ = new TH2F(
2569  "OccupancyAllEvents_ExclusiveECAL", "Occupancy all events Exclusive ECAL EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2570  EEP_OccupancyCoarseExclusiveECAL_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveECAL",
2571  "Occupancy all events Coarse Exclusive ECAL EEP;ix;iy",
2572  20,
2573  0,
2574  100,
2575  20,
2576  0,
2577  100);
2579  new TH2F("OccupancyAllEvents_ECAL", "Occupancy all events ECAL EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2581  new TH2F("OccupancyAllEventsCoarse_ECAL", "Occupancy all events Coarse ECAL EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2583  new TH1F("timeForAllFeds_ECAL", "timeForAllFeds ECAL EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2585  new TH3F("timeTTAllFEDs_ECAL",
2586  "(ix,iy,time) for all FEDs (SM,TT binning) ECAL EEP;ix;iy;Relative Time (1 clock = 25ns)",
2587  20,
2588  0,
2589  100,
2590  20,
2591  0,
2592  100,
2593  78,
2594  -7,
2595  7);
2596 
2597  EEP_OccupancyExclusiveDT_ = new TH2F(
2598  "OccupancyAllEvents_ExclusiveDT", "Occupancy all events Exclusive DT EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2599  EEP_OccupancyCoarseExclusiveDT_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveDT",
2600  "Occupancy all events Coarse Exclusive DT EEP;ix;iy",
2601  20,
2602  0,
2603  100,
2604  20,
2605  0,
2606  100);
2607  EEP_OccupancyDT_ = new TH2F("OccupancyAllEvents_DT", "Occupancy all events DT EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2609  new TH2F("OccupancyAllEventsCoarse_DT", "Occupancy all events Coarse DT EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2611  new TH1F("timeForAllFeds_DT", "timeForAllFeds DT EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2613  new TH3F("timeTTAllFEDs_DT",
2614  "(ix,iy,time) for all FEDs (SM,TT binning) DT EEP;ix;iy;Relative Time (1 clock = 25ns)",
2615  20,
2616  0,
2617  100,
2618  20,
2619  0,
2620  100,
2621  78,
2622  -7,
2623  7);
2624 
2625  EEP_OccupancyExclusiveRPC_ = new TH2F(
2626  "OccupancyAllEvents_ExclusiveRPC", "Occupancy all events Exclusive RPC EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2627  EEP_OccupancyCoarseExclusiveRPC_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveRPC",
2628  "Occupancy all events Coarse Exclusive RPC EEP;ix;iy",
2629  20,
2630  0,
2631  100,
2632  20,
2633  0,
2634  100);
2636  new TH2F("OccupancyAllEvents_RPC", "Occupancy all events RPC EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2638  new TH2F("OccupancyAllEventsCoarse_RPC", "Occupancy all events Coarse RPC EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2640  new TH1F("timeForAllFeds_RPC", "timeForAllFeds RPC EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2642  new TH3F("timeTTAllFEDs_RPC",
2643  "(ix,iy,time) for all FEDs (SM,TT binning) RPC EEP;ix;iy;Relative Time (1 clock = 25ns)",
2644  20,
2645  0,
2646  100,
2647  20,
2648  0,
2649  100,
2650  78,
2651  -7,
2652  7);
2653 
2654  EEP_OccupancyExclusiveCSC_ = new TH2F(
2655  "OccupancyAllEvents_ExclusiveCSC", "Occupancy all events Exclusive CSC EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2656  EEP_OccupancyCoarseExclusiveCSC_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveCSC",
2657  "Occupancy all events Coarse Exclusive CSC EEP;ix;iy",
2658  20,
2659  0,
2660  100,
2661  20,
2662  0,
2663  100);
2665  new TH2F("OccupancyAllEvents_CSC", "Occupancy all events CSC EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2667  new TH2F("OccupancyAllEventsCoarse_CSC", "Occupancy all events Coarse CSC EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2669  new TH1F("timeForAllFeds_CSC", "timeForAllFeds CSC EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2671  new TH3F("timeTTAllFEDs_CSC",
2672  "(ix,iy,time) for all FEDs (SM,TT binning) CSC EEP;ix;iy;Relative Time (1 clock = 25ns)",
2673  20,
2674  0,
2675  100,
2676  20,
2677  0,
2678  100,
2679  78,
2680  -7,
2681  7);
2682 
2683  EEP_OccupancyExclusiveHCAL_ = new TH2F(
2684  "OccupancyAllEvents_ExclusiveHCAL", "Occupancy all events Exclusive HCAL EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2685  EEP_OccupancyCoarseExclusiveHCAL_ = new TH2F("OccupancyAllEventsCoarse_ExclusiveHCAL",
2686  "Occupancy all events Coarse Exclusive HCAL EEP;ix;iy",
2687  20,
2688  0,
2689  100,
2690  20,
2691  0,
2692  100);
2694  new TH2F("OccupancyAllEvents_HCAL", "Occupancy all events HCAL EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2696  new TH2F("OccupancyAllEventsCoarse_HCAL", "Occupancy all events Coarse HCAL EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2698  new TH1F("timeForAllFeds_HCAL", "timeForAllFeds HCAL EEP;Relative Time (1 clock = 25ns)", 78, -7, 7);
2700  new TH3F("timeTTAllFEDs_HCAL",
2701  "(ix,iy,time) for all FEDs (SM,TT binning) HCAL EEP;ix;iy;Relative Time (1 clock = 25ns)",
2702  20,
2703  0,
2704  100,
2705  20,
2706  0,
2707  100,
2708  78,
2709  -7,
2710  7);
2711 
2713  new TH1F("numberofBCinSC", "Number of Basic Clusters in Super Cluster EEP;Num Basic Clusters", 20, 0, 20);
2714 
2715  EEP_triggerHist_ = new TH1F("triggerHist", "Trigger Number EEP", 5, 0, 5);
2716  EEP_triggerHist_->GetXaxis()->SetBinLabel(1, "ECAL");
2717  EEP_triggerHist_->GetXaxis()->SetBinLabel(2, "HCAL");
2718  EEP_triggerHist_->GetXaxis()->SetBinLabel(3, "DT");
2719  EEP_triggerHist_->GetXaxis()->SetBinLabel(4, "RPC");
2720  EEP_triggerHist_->GetXaxis()->SetBinLabel(5, "CSC");
2721 
2722  EEP_triggerExclusiveHist_ = new TH1F("triggerExclusiveHist", "Trigger Number (Mutually Exclusive) EEP", 5, 0, 5);
2723  EEP_triggerExclusiveHist_->GetXaxis()->SetBinLabel(1, "ECAL");
2724  EEP_triggerExclusiveHist_->GetXaxis()->SetBinLabel(2, "HCAL");
2725  EEP_triggerExclusiveHist_->GetXaxis()->SetBinLabel(3, "DT");
2726  EEP_triggerExclusiveHist_->GetXaxis()->SetBinLabel(4, "RPC");
2727  EEP_triggerExclusiveHist_->GetXaxis()->SetBinLabel(5, "CSC");
2728 
2730  new TH1F("NumXtalsInClusterAllHist", "Number of Xtals in Cluster EEP;NumXtals", 150, 0, 150);
2731  EEP_numxtalsVsEnergy_ = new TH2F("NumXtalsVsEnergy",
2732  "Number of Xtals in Cluster vs Energy EEP;Energy (GeV);Number of Xtals in Cluster",
2733  numBins,
2734  histRangeMin_,
2735  10.0,
2736  150,
2737  0,
2738  150);
2740  new TH2F("NumXtalsVsHighEnergy",
2741  "Number of Xtals in Cluster vs Energy EEP;Energy (GeV);Number of Xtals in Cluster",
2742  numBins,
2743  histRangeMin_,
2744  200.,
2745  150,
2746  0,
2747  150);
2748 
2750  new TH2F("OccupancyHighEnergyEvents", "Occupancy high energy events EEP;ix;iy", 100, 0, 100, 100, 0, 100);
2751  EEP_OccupancyHighEnergyCoarse_ = new TH2F(
2752  "OccupancyHighEnergyEventsCoarse", "Occupancy high energy events Coarse EEP;ix;iy", 20, 0, 100, 20, 0, 100);
2753 
2755  new TH1F("NumActiveXtalsInClusterAllHist", "Number of active Xtals in Cluster EEP;NumXtals", 100, 0, 100);
2756 }
2757 
2758 // ------------ method called once each job just after ending the event loop ------------
2760  using namespace std;
2761  if (runInFileName_) {
2762  fileName_ += "-" + intToString(runNum_) + ".graph.root";
2763  } else {
2764  fileName_ += ".root";
2765  }
2766 
2767  TFile root_file_(fileName_.c_str(), "RECREATE");
2768 
2769  for (map<int, TH1F*>::const_iterator itr = FEDsAndHists_.begin(); itr != FEDsAndHists_.end(); ++itr) {
2770  string dir = fedMap_->getSliceFromFed(itr->first);
2771  TDirectory* FEDdir = gDirectory->mkdir(dir.c_str());
2772  FEDdir->cd();
2773 
2774  TH1F* hist = itr->second;
2775  if (hist != nullptr)
2776  hist->Write();
2777  else {
2778  cerr << "EcalCosmicsHists: Error: This shouldn't happen!" << endl;
2779  }
2780  // Write out timing hist
2781  hist = FEDsAndTimingHists_[itr->first];
2782  if (hist != nullptr)
2783  hist->Write();
2784  else {
2785  cerr << "EcalCosmicsHists: Error: This shouldn't happen!" << endl;
2786  }
2787 
2788  hist = FEDsAndFrequencyHists_[itr->first];
2789  hist->Write();
2790 
2791  hist = FEDsAndiPhiProfileHists_[itr->first];
2792  hist->Write();
2793 
2794  hist = FEDsAndiEtaProfileHists_[itr->first];
2795  hist->Write();
2796 
2797  hist = FEDsAndE2Hists_[itr->first];
2798  hist->Write();
2799 
2800  hist = FEDsAndenergyHists_[itr->first];
2801  hist->Write();
2802 
2803  hist = FEDsAndNumXtalsInClusterHists_[itr->first];
2804  hist->Write();
2805 
2806  TH2F* hist2 = FEDsAndTimingVsAmpHists_[itr->first];
2807  hist2->Write();
2808 
2809  hist2 = FEDsAndTimingVsFreqHists_[itr->first];
2810  hist2->Write();
2811 
2812  hist2 = FEDsAndE2vsE1Hists_[itr->first];
2813  hist2->Write();
2814 
2815  hist2 = FEDsAndenergyvsE1Hists_[itr->first];
2816  hist2->Write();
2817 
2818  hist2 = FEDsAndOccupancyHists_[itr->first];
2819  hist2->Write();
2820 
2821  hist2 = FEDsAndTimingVsPhiHists_[itr->first];
2822  hist2->Write();
2823 
2824  hist2 = FEDsAndTimingVsModuleHists_[itr->first];
2825  hist2->Write();
2826 
2827  //2d hist
2828  map<int, TH2F*>::const_iterator itr2d;
2829  itr2d = FEDsAndDCCRuntypeVsBxHists_.find(itr->first);
2830  if (itr2d != FEDsAndDCCRuntypeVsBxHists_.end()) {
2831  TH2F* hist2 = itr2d->second;
2832  hist2->GetYaxis()->SetBinLabel(1, "COSMIC");
2833  hist2->GetYaxis()->SetBinLabel(2, "BEAMH4");
2834  hist2->GetYaxis()->SetBinLabel(3, "BEAMH2");
2835  hist2->GetYaxis()->SetBinLabel(4, "MTCC");
2836  hist2->GetYaxis()->SetBinLabel(5, "LASER_STD");
2837  hist2->GetYaxis()->SetBinLabel(6, "LASER_POWER_SCAN");
2838  hist2->GetYaxis()->SetBinLabel(7, "LASER_DELAY_SCAN");
2839  hist2->GetYaxis()->SetBinLabel(8, "TESTPULSE_SCAN_MEM");
2840  hist2->GetYaxis()->SetBinLabel(9, "TESTPULSE_MGPA");
2841  hist2->GetYaxis()->SetBinLabel(10, "PEDESTAL_STD");
2842  hist2->GetYaxis()->SetBinLabel(11, "PEDESTAL_OFFSET_SCAN");
2843  hist2->GetYaxis()->SetBinLabel(12, "PEDESTAL_25NS_SCAN");
2844  hist2->GetYaxis()->SetBinLabel(13, "LED_STD");
2845  hist2->GetYaxis()->SetBinLabel(14, "PHYSICS_GLOBAL");
2846  hist2->GetYaxis()->SetBinLabel(15, "COSMICS_GLOBAL");
2847  hist2->GetYaxis()->SetBinLabel(16, "HALO_GLOBAL");
2848  hist2->GetYaxis()->SetBinLabel(17, "LASER_GAP");
2849  hist2->GetYaxis()->SetBinLabel(18, "TESTPULSE_GAP");
2850  hist2->GetYaxis()->SetBinLabel(19, "PEDESTAL_GAP");
2851  hist2->GetYaxis()->SetBinLabel(20, "LED_GAP");
2852  hist2->GetYaxis()->SetBinLabel(21, "PHYSICS_LOCAL");
2853  hist2->GetYaxis()->SetBinLabel(22, "COSMICS_LOCAL");
2854  hist2->GetYaxis()->SetBinLabel(23, "HALO_LOCAL");
2855  hist2->GetYaxis()->SetBinLabel(24, "CALIB_LOCAL");
2856  hist2->Write();
2857  }
2858 
2859  root_file_.cd();
2860  }
2861  allFedsHist_->Write();
2862  allFedsE2Hist_->Write();
2863  allFedsenergyHist_->Write();
2864  allFedsenergyHighHist_->Write();
2865  allFedsenergyOnlyHighHist_->Write();
2866  allFedsE2vsE1Hist_->Write();
2867  allFedsenergyvsE1Hist_->Write();
2868  allFedsTimingHist_->Write();
2869  allFedsTimingVsAmpHist_->Write();
2870  allFedsFrequencyHist_->Write();
2871  allFedsTimingVsFreqHist_->Write();
2872  allFedsiEtaProfileHist_->Write();
2873  allFedsiPhiProfileHist_->Write();
2874  allOccupancy_->Write();
2875  TrueOccupancy_->Write();
2876  allOccupancyCoarse_->Write();
2877  TrueOccupancyCoarse_->Write();
2878  allOccupancyHighEnergy_->Write();
2880  allOccupancySingleXtal_->Write();
2881  energySingleXtalHist_->Write();
2883  allFedsTimingPhiHist_->Write();
2884  allFedsTimingPhiEbpHist_->Write();
2885  allFedsTimingPhiEbmHist_->Write();
2886  allFedsTimingEbpHist_->Write();
2887  allFedsTimingEbmHist_->Write();
2888  allFedsTimingEbpTopHist_->Write();
2889  allFedsTimingEbmTopHist_->Write();
2890  allFedsTimingEbpBottomHist_->Write();
2891  allFedsTimingEbmBottomHist_->Write();
2892  allFedsTimingPhiEtaHist_->Write();
2893  allFedsTimingTTHist_->Write();
2894  allFedsTimingLMHist_->Write();
2896 
2897  numberofBCinSC_->Write(); //SC
2898  numberofBCinSCphi_->Write(); //SC
2899  TrueBCOccupancyCoarse_->Write(); //BC
2900  TrueBCOccupancy_->Write(); //BC
2901 
2902  numxtalsVsEnergy_->Write();
2903  numxtalsVsHighEnergy_->Write();
2904 
2905  allOccupancyExclusiveECAL_->Write();
2907  allOccupancyECAL_->Write();
2908  allOccupancyCoarseECAL_->Write();
2910  allFedsTimingHistECAL_->Write();
2911  allFedsTimingTTHistECAL_->Write();
2912  allFedsTimingLMHistECAL_->Write();
2913 
2914  allOccupancyExclusiveHCAL_->Write();
2916  allOccupancyHCAL_->Write();
2917  allOccupancyCoarseHCAL_->Write();
2919  allFedsTimingHistHCAL_->Write();
2920  allFedsTimingTTHistHCAL_->Write();
2921  allFedsTimingLMHistHCAL_->Write();
2922 
2923  allOccupancyExclusiveDT_->Write();
2925  allOccupancyDT_->Write();
2926  allOccupancyCoarseDT_->Write();
2927  allFedsTimingPhiEtaHistDT_->Write();
2928  allFedsTimingHistDT_->Write();
2929  allFedsTimingTTHistDT_->Write();
2930  allFedsTimingLMHistDT_->Write();
2931 
2932  allOccupancyExclusiveRPC_->Write();
2934  allOccupancyRPC_->Write();
2935  allOccupancyCoarseRPC_->Write();
2936  allFedsTimingPhiEtaHistRPC_->Write();
2937  allFedsTimingHistRPC_->Write();
2938  allFedsTimingTTHistRPC_->Write();
2939  allFedsTimingLMHistRPC_->Write();
2940 
2941  allOccupancyExclusiveCSC_->Write();
2943  allOccupancyCSC_->Write();
2944  allOccupancyCoarseCSC_->Write();
2945  allFedsTimingPhiEtaHistCSC_->Write();
2946  allFedsTimingHistCSC_->Write();
2947  allFedsTimingTTHistCSC_->Write();
2948  allFedsTimingLMHistCSC_->Write();
2949 
2950  allFedsTimingHistEcalMuon_->Write();
2951 
2952  //EE
2953  TDirectory* EEMinusDir = gDirectory->mkdir("EEMinus");
2954  EEMinusDir->cd();
2955  EEM_FedsSeedEnergyHist_->Write();
2956  EEM_AllOccupancyCoarse_->Write();
2957  EEM_AllOccupancy_->Write();
2958  EEM_FedsenergyHist_->Write();
2959  EEM_FedsenergyHighHist_->Write();
2960  EEM_FedsenergyOnlyHighHist_->Write();
2961  EEM_FedsE2Hist_->Write();
2962  EEM_FedsE2vsE1Hist_->Write();
2963  EEM_FedsenergyvsE1Hist_->Write();
2964  EEM_FedsTimingHist_->Write();
2965  EEM_numberofCosmicsHist_->Write();
2966  EEM_FedsTimingVsAmpHist_->Write();
2967  EEM_FedsTimingTTHist_->Write();
2968  EEM_OccupancySingleXtal_->Write();
2969  EEM_energySingleXtalHist_->Write();
2970  EEM_OccupancyExclusiveECAL_->Write();
2972  EEM_OccupancyECAL_->Write();
2973  EEM_OccupancyCoarseECAL_->Write();
2974  EEM_FedsTimingHistECAL_->Write();
2975  EEM_FedsTimingTTHistECAL_->Write();
2976  EEM_OccupancyExclusiveDT_->Write();
2978  EEM_OccupancyDT_->Write();
2979  EEM_OccupancyCoarseDT_->Write();
2980  EEM_FedsTimingHistDT_->Write();
2981  EEM_FedsTimingTTHistDT_->Write();
2982  EEM_OccupancyExclusiveRPC_->Write();
2984  EEM_OccupancyRPC_->Write();
2985  EEM_OccupancyCoarseRPC_->Write();
2986  EEM_FedsTimingHistRPC_->Write();
2987  EEM_FedsTimingTTHistRPC_->Write();
2988  EEM_OccupancyExclusiveCSC_->Write();
2990  EEM_OccupancyCSC_->Write();
2991  EEM_OccupancyCoarseCSC_->Write();
2992  EEM_FedsTimingHistCSC_->Write();
2993  EEM_FedsTimingTTHistCSC_->Write();
2994  EEM_OccupancyExclusiveHCAL_->Write();
2996  EEM_OccupancyHCAL_->Write();
2997  EEM_OccupancyCoarseHCAL_->Write();
2998  EEM_FedsTimingHistHCAL_->Write();
2999  EEM_FedsTimingTTHistHCAL_->Write();
3000  EEM_numberofBCinSC_->Write();
3001  EEM_triggerHist_->Write();
3002  EEM_triggerExclusiveHist_->Write();
3003  EEM_NumXtalsInClusterHist_->Write();
3004  EEM_numxtalsVsEnergy_->Write();
3005  EEM_numxtalsVsHighEnergy_->Write();
3006  EEM_OccupancyHighEnergy_->Write();
3009  root_file_.cd();
3010 
3011  TDirectory* EEPlusDir = gDirectory->mkdir("EEPlus");
3012  EEPlusDir->cd();
3013  EEP_FedsSeedEnergyHist_->Write();
3014  EEP_AllOccupancyCoarse_->Write();
3015  EEP_AllOccupancy_->Write();
3016  EEP_FedsenergyHist_->Write();
3017  EEP_FedsenergyHighHist_->Write();
3018  EEP_FedsenergyOnlyHighHist_->Write();
3019  EEP_FedsE2Hist_->Write();
3020  EEP_FedsE2vsE1Hist_->Write();
3021  EEP_FedsenergyvsE1Hist_->Write();
3022  EEP_FedsTimingHist_->Write();
3023  EEP_numberofCosmicsHist_->Write();
3024  EEP_FedsTimingVsAmpHist_->Write();
3025  EEP_FedsTimingTTHist_->Write();
3026  EEP_OccupancySingleXtal_->Write();
3027  EEP_energySingleXtalHist_->Write();
3028  EEP_OccupancyExclusiveECAL_->Write();
3030  EEP_OccupancyECAL_->Write();
3031  EEP_OccupancyCoarseECAL_->Write();
3032  EEP_FedsTimingHistECAL_->Write();
3033  EEP_FedsTimingTTHistECAL_->Write();
3034  EEP_OccupancyExclusiveDT_->Write();
3036  EEP_OccupancyDT_->Write();
3037  EEP_OccupancyCoarseDT_->Write();
3038  EEP_FedsTimingHistDT_->Write();
3039  EEP_FedsTimingTTHistDT_->Write();
3040  EEP_OccupancyExclusiveRPC_->Write();
3042  EEP_OccupancyRPC_->Write();
3043  EEP_OccupancyCoarseRPC_->Write();
3044  EEP_FedsTimingHistRPC_->Write();
3045  EEP_FedsTimingTTHistRPC_->Write();
3046  EEP_OccupancyExclusiveCSC_->Write();
3048  EEP_OccupancyCSC_->Write();
3049  EEP_OccupancyCoarseCSC_->Write();
3050  EEP_FedsTimingHistCSC_->Write();
3051  EEP_FedsTimingTTHistCSC_->Write();
3052  EEP_OccupancyExclusiveHCAL_->Write();
3054  EEP_OccupancyHCAL_->Write();
3055  EEP_OccupancyCoarseHCAL_->Write();
3056  EEP_FedsTimingHistHCAL_->Write();
3057  EEP_FedsTimingTTHistHCAL_->Write();
3058  EEP_numberofBCinSC_->Write();
3059  EEP_triggerHist_->Write();
3060  EEP_triggerExclusiveHist_->Write();
3061  EEP_NumXtalsInClusterHist_->Write();
3062  EEP_numxtalsVsEnergy_->Write();
3063  EEP_numxtalsVsHighEnergy_->Write();
3064  EEP_OccupancyHighEnergy_->Write();
3067  root_file_.cd();
3068 
3069  triggerHist_->Write();
3070  triggerExclusiveHist_->Write();
3071 
3072  NumXtalsInClusterHist_->Write();
3073 
3074  numberofCosmicsHist_->Write();
3075  numberofCosmicsHistEB_->Write();
3076 
3077  numberofCosmicsWTrackHist_->Write();
3079  numberofGoodEvtFreq_->Write();
3080  numberofCrossedEcalIdsHist_->Write();
3081 
3082  runNumberHist_->SetBinContent(1, runNum_);
3083  runNumberHist_->Write();
3084 
3085  deltaRHist_->Write();
3086  deltaEtaHist_->Write();
3087  deltaPhiHist_->Write();
3088  ratioAssocClustersHist_->Write();
3089  ratioAssocTracksHist_->Write();
3090  deltaEtaDeltaPhiHist_->Write();
3091  seedTrackPhiHist_->Write();
3092  seedTrackEtaHist_->Write();
3093  dccEventVsBxHist_->Write();
3094  dccOrbitErrorByFEDHist_->Write();
3095  dccBXErrorByFEDHist_->Write();
3096  dccRuntypeErrorByFEDHist_->Write();
3097  dccErrorVsBxHist_->Write();
3098  dccRuntypeHist_->Write();
3099 
3100  trackAssoc_muonsEcal_->Write();
3101 
3102  hcalEnergy_HBHE_->Write();
3103  hcalEnergy_HF_->Write();
3104  hcalEnergy_HO_->Write();
3105  hcalHEHBecalEB_->Write();
3106 
3107  TDirectory* highEnergyDir = gDirectory->mkdir("HighEnergy");
3108  highEnergyDir->cd();
3109  HighEnergy_NumXtal->Write();
3110  HighEnergy_NumXtalFedId->Write();
3111  HighEnergy_NumXtaliphi->Write();
3112  HighEnergy_energy3D->Write();
3113  HighEnergy_energyNumXtal->Write();
3114  HighEnergy_bestSeed->Write();
3116  HighEnergy_numClusHighEn->Write();
3117  HighEnergy_ratioClusters->Write();
3119  HighEnergy_TracksAngle->Write();
3121  HighEnergy_2GeV_occuCoarse->Write();
3122  HighEnergy_2GeV_occu3D->Write();
3124  HighEnergy_100GeV_occu3D->Write();
3125  HighEnergy_0tracks_occu3D->Write();
3126  HighEnergy_1tracks_occu3D->Write();
3127  HighEnergy_2tracks_occu3D->Write();
3131 
3132  root_file_.cd();
3133 
3134  TDirectory* TimeStampdir = gDirectory->mkdir("EventTiming");
3135  TimeStampdir->cd();
3136  allFedsFreqTimeHist_->Write();
3137  allFedsFreqTimeVsPhiHist_->Write();
3138  allFedsFreqTimeVsPhiTTHist_->Write();
3139  allFedsFreqTimeVsEtaHist_->Write();
3140  allFedsFreqTimeVsEtaTTHist_->Write();
3141 
3142  root_file_.cd();
3143 
3144  root_file_.Close();
3145 
3146  LogWarning("EcalCosmicsHists") << "---> Number of cosmic events: " << cosmicCounter_ << " in " << naiveEvtNum_
3147  << " events.";
3148  LogWarning("EcalCosmicsHists") << "---> Number of EB cosmic events: " << cosmicCounterEB_ << " in " << naiveEvtNum_
3149  << " events.";
3150  LogWarning("EcalCosmicsHists") << "---> Number of EE- cosmic events: " << cosmicCounterEEM_ << " in " << naiveEvtNum_
3151  << " events.";
3152  LogWarning("EcalCosmicsHists") << "---> Number of EE+ cosmic events: " << cosmicCounterEEP_ << " in " << naiveEvtNum_
3153  << " events.";
3154 
3155  // LogWarning("EcalCosmicsHists") << "---> Number of top+bottom cosmic events: " << cosmicCounterTopBottom_ << " in " << cosmicCounter_ << " cosmics in " << naiveEvtNum_ << " events.";
3156 }
3157 
3159  using namespace std;
3160  ostringstream myStream;
3161  myStream << num << flush;
3162  return (myStream.str()); //returns the string form of the stringstream object
3163 }
EcalCosmicsHists::NumXtalsInClusterHist_
TH1F * NumXtalsInClusterHist_
Definition: EcalCosmicsHists.h:135
EcalCosmicsHists::allFedsTimingHistEcalMuon_
TH1F * allFedsTimingHistEcalMuon_
Definition: EcalCosmicsHists.h:225
EcalCosmicsHists::EEM_FedsenergyHighHist_
TH1F * EEM_FedsenergyHighHist_
Definition: EcalCosmicsHists.h:375
EcalCosmicsHists::HighEnergy_bestSeed
TH1F * HighEnergy_bestSeed
Definition: EcalCosmicsHists.h:278
EcalCosmicsHists::EEP_OccupancyCSC_
TH2F * EEP_OccupancyCSC_
Definition: EcalCosmicsHists.h:351
EcalCosmicsHists::HighEnergy_numClusHighEn
TH1F * HighEnergy_numClusHighEn
Definition: EcalCosmicsHists.h:275
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalCosmicsHists::allFedsTimingTTHistECAL_
TH3F * allFedsTimingTTHistECAL_
Definition: EcalCosmicsHists.h:186
EcalCosmicsHists::EEM_AllOccupancy_
TH2F * EEM_AllOccupancy_
Definition: EcalCosmicsHists.h:373
L1GtTriggerMenu.h
EcalRecHit
Definition: EcalRecHit.h:15
EcalCosmicsHists::EEM_FedsTimingHistHCAL_
TH1F * EEM_FedsTimingHistHCAL_
Definition: EcalCosmicsHists.h:429
EcalCosmicsHists::HighEnergy_energyNumXtal
TH2F * HighEnergy_energyNumXtal
Definition: EcalCosmicsHists.h:273
EcalCosmicsHists::allFedsTimingTTHistHCAL_
TH3F * allFedsTimingTTHistHCAL_
Definition: EcalCosmicsHists.h:222
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
electrons_cff.bool
bool
Definition: electrons_cff.py:366
EcalCosmicsHists::EEP_OccupancyExclusiveRPC_
TH2F * EEP_OccupancyExclusiveRPC_
Definition: EcalCosmicsHists.h:346
EcalCosmicsHists::allFedsenergyHighHist_
TH1F * allFedsenergyHighHist_
Definition: EcalCosmicsHists.h:128
mps_fire.i
i
Definition: mps_fire.py:428
EcalCosmicsHists::minTimingAmpEE_
double minTimingAmpEE_
Definition: EcalCosmicsHists.h:94
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
EcalCosmicsHists::EEM_OccupancyCoarseExclusiveHCAL_
TH2F * EEM_OccupancyCoarseExclusiveHCAL_
Definition: EcalCosmicsHists.h:428
EcalCosmicsHists::EEM_OccupancySingleXtal_
TH2F * EEM_OccupancySingleXtal_
Definition: EcalCosmicsHists.h:390
L1GtPsbWord::aData
const cms_uint16_t aData(int iA) const
get/set A_DATA_CH_IA
Definition: L1GtPsbWord.cc:181
EcalCosmicsHists::allFedsFreqTimeHist_
TH1F * allFedsFreqTimeHist_
Definition: EcalCosmicsHists.h:298
EcalCosmicsHists::allFedsTimingEbmHist_
TH1F * allFedsTimingEbmHist_
Definition: EcalCosmicsHists.h:174
EcalCosmicsHists::FEDsAndFrequencyHists_
std::map< int, TH1F * > FEDsAndFrequencyHists_
Definition: EcalCosmicsHists.h:111
EcalCosmicsHists::EEP_OccupancyCoarseCSC_
TH2F * EEP_OccupancyCoarseCSC_
Definition: EcalCosmicsHists.h:352
EcalCosmicsHists::FEDsAndiPhiProfileHists_
std::map< int, TH1F * > FEDsAndiPhiProfileHists_
Definition: EcalCosmicsHists.h:112
EcalCosmicsHists::EEP_OccupancyCoarseRPC_
TH2F * EEP_OccupancyCoarseRPC_
Definition: EcalCosmicsHists.h:345
edm::Handle::product
T const * product() const
Definition: Handle.h:70
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
EcalCosmicsHists::deltaEtaDeltaPhiHist_
TH2F * deltaEtaDeltaPhiHist_
Definition: EcalCosmicsHists.h:240
EcalCosmicsHists::allFedsTimingHistRPC_
TH1F * allFedsTimingHistRPC_
Definition: EcalCosmicsHists.h:202
EcalCosmicsHists::EEP_OccupancyHighEnergyCoarse_
TH2F * EEP_OccupancyHighEnergyCoarse_
Definition: EcalCosmicsHists.h:369
EcalCosmicsHists::EEP_FedsenergyOnlyHighHist_
TH1F * EEP_FedsenergyOnlyHighHist_
Definition: EcalCosmicsHists.h:309
EcalCosmicsHists::allFedsE2vsE1Hist_
TH2F * allFedsE2vsE1Hist_
Definition: EcalCosmicsHists.h:152
EcalCosmicsHists::EEM_triggerExclusiveHist_
TH1F * EEM_triggerExclusiveHist_
Definition: EcalCosmicsHists.h:433
EcalCosmicsHists::allOccupancyCoarseHCAL_
TH2F * allOccupancyCoarseHCAL_
Definition: EcalCosmicsHists.h:217
EcalCosmicsHists::deltaPhiHist_
TH1F * deltaPhiHist_
Definition: EcalCosmicsHists.h:237
EcalCosmicsHists::FEDsAndTimingVsAmpHists_
std::map< int, TH2F * > FEDsAndTimingVsAmpHists_
Definition: EcalCosmicsHists.h:116
EcalCosmicsHists::HighEnergy_bestSeedOccupancy
TH2F * HighEnergy_bestSeedOccupancy
Definition: EcalCosmicsHists.h:279
patZpeak.handle
handle
Definition: patZpeak.py:23
L1GlobalTriggerReadoutSetupFwd.h
EcalCosmicsHists::ecalRecHitCollectionEB_
edm::InputTag ecalRecHitCollectionEB_
Definition: EcalCosmicsHists.h:84
edm::Run
Definition: Run.h:45
EcalCosmicsHists::analyze
void analyze(edm::Event const &, edm::EventSetup const &) override
Definition: EcalCosmicsHists.cc:105
BasicCluster.h
EcalCosmicsHists.h
EcalCosmicsHists::HighEnergy_NumXtaliphi
TH2F * HighEnergy_NumXtaliphi
Definition: EcalCosmicsHists.h:271
EcalCosmicsHists::barrelClusterCollection_
edm::InputTag barrelClusterCollection_
Definition: EcalCosmicsHists.h:86
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
EcalCosmicsHists::FEDsAndTimingVsModuleHists_
std::map< int, TH2F * > FEDsAndTimingVsModuleHists_
Definition: EcalCosmicsHists.h:122
TrackDetectorAssociator::useDefaultPropagator
void useDefaultPropagator()
use the default propagator
Definition: TrackDetectorAssociator.cc:81
EcalCosmicsHists::numxtalsVsEnergy_
TH2F * numxtalsVsEnergy_
Definition: EcalCosmicsHists.h:149
L1GtTriggerMenuRcd.h
EcalCosmicsHists::TrueOccupancyCoarse_
TH2F * TrueOccupancyCoarse_
Definition: EcalCosmicsHists.h:157
EcalCosmicsHists::energySingleXtalHist_
TH1F * energySingleXtalHist_
Definition: EcalCosmicsHists.h:161
EcalCosmicsHists::EEP_FedsE2vsE1Hist_
TH2F * EEP_FedsE2vsE1Hist_
Definition: EcalCosmicsHists.h:311
EcalCosmicsHists::ecalRecHitCollectionEE_
edm::InputTag ecalRecHitCollectionEE_
Definition: EcalCosmicsHists.h:85
EcalCosmicsHists::HighEnergy_NumXtalFedId
TH2F * HighEnergy_NumXtalFedId
Definition: EcalCosmicsHists.h:270
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EcalCosmicsHists::hcalEnergy_HBHE_
TH1F * hcalEnergy_HBHE_
Definition: EcalCosmicsHists.h:263
EcalElectronicsMapping::getLMNumber
int getLMNumber(const DetId &id) const
Definition: EcalElectronicsMapping.cc:1133
EcalCosmicsHists::EEM_FedsTimingTTHistCSC_
TH3F * EEM_FedsTimingTTHistCSC_
Definition: EcalCosmicsHists.h:423
EcalCosmicsHists::histRangeMax_
double histRangeMax_
Definition: EcalCosmicsHists.h:92
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
EcalCosmicsHists::runTimeLength_
double runTimeLength_
Definition: EcalCosmicsHists.h:104
EcalCosmicsHists::EEP_OccupancyExclusiveCSC_
TH2F * EEP_OccupancyExclusiveCSC_
Definition: EcalCosmicsHists.h:353
EcalCosmicsHists::EEM_OccupancyCoarseECAL_
TH2F * EEM_OccupancyCoarseECAL_
Definition: EcalCosmicsHists.h:398
EcalCosmicsHists::ecalRawDataColl_
edm::InputTag ecalRawDataColl_
Definition: EcalCosmicsHists.h:83
EcalCosmicsHists::allOccupancyExclusiveHCAL_
TH2F * allOccupancyExclusiveHCAL_
Definition: EcalCosmicsHists.h:218
EcalCosmicsHists::seedTrackEtaHist_
TH2F * seedTrackEtaHist_
Definition: EcalCosmicsHists.h:242
EcalCosmicsHists::EEP_FedsTimingHistCSC_
TH1F * EEP_FedsTimingHistCSC_
Definition: EcalCosmicsHists.h:355
EcalCosmicsHists::EEP_OccupancyECAL_
TH2F * EEP_OccupancyECAL_
Definition: EcalCosmicsHists.h:330
edm::PtrVectorItr
Definition: PtrVector.h:51
EcalCosmicsHists::EEP_OccupancyCoarseECAL_
TH2F * EEP_OccupancyCoarseECAL_
Definition: EcalCosmicsHists.h:331
protons_cff.time
time
Definition: protons_cff.py:39
edm::SortedCollection
Definition: SortedCollection.h:49
EcalCosmicsHists::EEM_FedsenergyHist_
TH1F * EEM_FedsenergyHist_
Definition: EcalCosmicsHists.h:374
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:47
EcalCosmicsHists::allOccupancyCoarseExclusiveECAL_
TH2F * allOccupancyCoarseExclusiveECAL_
Definition: EcalCosmicsHists.h:183
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
EcalCosmicsHists::allFedsOccupancyHighEnergyHist_
TH3F * allFedsOccupancyHighEnergyHist_
Definition: EcalCosmicsHists.h:232
EcalCosmicsHists::EEP_FedsenergyvsE1Hist_
TH2F * EEP_FedsenergyvsE1Hist_
Definition: EcalCosmicsHists.h:312
EcalCosmicsHists::EEM_OccupancyECAL_
TH2F * EEM_OccupancyECAL_
Definition: EcalCosmicsHists.h:397
EcalCosmicsHists::EEM_OccupancyExclusiveECAL_
TH2F * EEM_OccupancyExclusiveECAL_
Definition: EcalCosmicsHists.h:399
EcalCosmicsHists::FEDsAndenergyvsE1Hists_
std::map< int, TH2F * > FEDsAndenergyvsE1Hists_
Definition: EcalCosmicsHists.h:118
EcalCosmicsHists::cosmicCounter_
int cosmicCounter_
Definition: EcalCosmicsHists.h:443
EcalCosmicsHists::EEP_FedsTimingTTHistECAL_
TH3F * EEP_FedsTimingTTHistECAL_
Definition: EcalCosmicsHists.h:335
EcalADCToGeVConstant
Definition: EcalADCToGeVConstant.h:13
EcalCosmicsHists::allFedsFreqTimeVsPhiHist_
TH2F * allFedsFreqTimeVsPhiHist_
Definition: EcalCosmicsHists.h:299
EcalCosmicsHists::allOccupancyCoarseRPC_
TH2F * allOccupancyCoarseRPC_
Definition: EcalCosmicsHists.h:199
EcalCosmicsHists::EEM_OccupancyCoarseHCAL_
TH2F * EEM_OccupancyCoarseHCAL_
Definition: EcalCosmicsHists.h:426
EcalCosmicsHists::initHists
void initHists(int)
Definition: EcalCosmicsHists.cc:1450
L1GlobalTriggerReadoutRecord::gtPsbWord
const L1GtPsbWord gtPsbWord(cms_uint16_t boardIdValue, int bxInEventValue) const
get / set PSB word (record) in the GT readout record
Definition: L1GlobalTriggerReadoutRecord.cc:421
EcalRecHit::energy
float energy() const
Definition: EcalRecHit.h:68
EcalCosmicsHists::allFedsTimingPhiEtaHistDT_
TH3F * allFedsTimingPhiEtaHistDT_
Definition: EcalCosmicsHists.h:194
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
EcalCosmicsHists::numTimingBins_
int numTimingBins_
Definition: EcalCosmicsHists.h:105
EcalElectronicsId::dccId
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
Definition: EcalElectronicsId.h:31
EcalCosmicsHists::HighEnergy_100GeV_occuCoarse
TH2F * HighEnergy_100GeV_occuCoarse
Definition: EcalCosmicsHists.h:283
EcalCosmicsHists::HighEnergy_100GeV_occu3D
TH3F * HighEnergy_100GeV_occu3D
Definition: EcalCosmicsHists.h:284
EcalCosmicsHists::FEDsAndNumXtalsInClusterHists_
std::map< int, TH1F * > FEDsAndNumXtalsInClusterHists_
Definition: EcalCosmicsHists.h:113
EcalCosmicsHists::EEP_OccupancyExclusiveHCAL_
TH2F * EEP_OccupancyExclusiveHCAL_
Definition: EcalCosmicsHists.h:360
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
L1GtPsbWord
Definition: L1GtPsbWord.h:29
EcalCosmicsHists::HighEnergy_2GeV_occuCoarse
TH2F * HighEnergy_2GeV_occuCoarse
Definition: EcalCosmicsHists.h:281
EEDetId::ix
int ix() const
Definition: EEDetId.h:77
edm::Handle
Definition: AssociativeIterator.h:50
EcalCosmicsHists::allFedsFreqTimeVsPhiTTHist_
TH2F * allFedsFreqTimeVsPhiTTHist_
Definition: EcalCosmicsHists.h:300
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
EcalCosmicsHists::allFedsTimingEbpTopHist_
TH1F * allFedsTimingEbpTopHist_
Definition: EcalCosmicsHists.h:175
EcalCosmicsHists::TrueBCOccupancyCoarse_
TH2F * TrueBCOccupancyCoarse_
Definition: EcalCosmicsHists.h:147
EcalCosmicsHists::allFedsTimingLMHistHCAL_
TH2F * allFedsTimingLMHistHCAL_
Definition: EcalCosmicsHists.h:223
L1GlobalTriggerReadoutRecord
Definition: L1GlobalTriggerReadoutRecord.h:46
EcalBarrel
Definition: EcalSubdetector.h:10
L1GtPsbWord::bData
const cms_uint16_t bData(int iB) const
get/set B_DATA_CH_IB
Definition: L1GtPsbWord.cc:253
EcalCosmicsHists::EEM_FedsE2vsE1Hist_
TH2F * EEM_FedsE2vsE1Hist_
Definition: EcalCosmicsHists.h:378
EcalCosmicsHists::allFedsTimingPhiEtaHistCSC_
TH3F * allFedsTimingPhiEtaHistCSC_
Definition: EcalCosmicsHists.h:212
BasicClusterFwd.h
EcalCosmicsHists::intToString
std::string intToString(int num)
Definition: EcalCosmicsHists.cc:3158
EcalCosmicsHists::EEM_numberofCosmicsHist_
TH1F * EEM_numberofCosmicsHist_
Definition: EcalCosmicsHists.h:388
EcalCosmicsHists::EEM_OccupancyCoarseRPC_
TH2F * EEM_OccupancyCoarseRPC_
Definition: EcalCosmicsHists.h:412
EcalCosmicsHists::allFedsTimingVsFreqHist_
TH2F * allFedsTimingVsFreqHist_
Definition: EcalCosmicsHists.h:163
EcalCosmicsHists::EEP_OccupancyHCAL_
TH2F * EEP_OccupancyHCAL_
Definition: EcalCosmicsHists.h:358
EcalCosmicsHists::trackAssoc_muonsEcal_
TH2F * trackAssoc_muonsEcal_
Definition: EcalCosmicsHists.h:253
EcalCosmicsHists::EEM_OccupancyHCAL_
TH2F * EEM_OccupancyHCAL_
Definition: EcalCosmicsHists.h:425
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
EcalCosmicsHists::EEM_OccupancyCSC_
TH2F * EEM_OccupancyCSC_
Definition: EcalCosmicsHists.h:418
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
EcalCosmicsHists::EEP_triggerExclusiveHist_
TH1F * EEP_triggerExclusiveHist_
Definition: EcalCosmicsHists.h:366
reco::SuperClusterCollection
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
Definition: SuperClusterFwd.h:9
EcalCosmicsHists::numberofGoodEvtFreq_
TH1F * numberofGoodEvtFreq_
Definition: EcalCosmicsHists.h:138
EcalCosmicsHists::minTimingAmpEB_
double minTimingAmpEB_
Definition: EcalCosmicsHists.h:93
EcalCosmicsHists::runNum_
int runNum_
Definition: EcalCosmicsHists.h:91
EcalCosmicsHists::EEM_FedsTimingTTHist_
TH3F * EEM_FedsTimingTTHist_
Definition: EcalCosmicsHists.h:395
EcalCosmicsHists::EEM_triggerHist_
TH1F * EEM_triggerHist_
Definition: EcalCosmicsHists.h:432
EcalCosmicsHists::HighEnergy_1tracks_occu3DXtal
TH3F * HighEnergy_1tracks_occu3DXtal
Definition: EcalCosmicsHists.h:294
EcalCosmicsHists::HighEnergy_2tracks_occu3D
TH3F * HighEnergy_2tracks_occu3D
Definition: EcalCosmicsHists.h:291
EcalCosmicsHists::EcalCosmicsHists
EcalCosmicsHists(const edm::ParameterSet &)
Definition: EcalCosmicsHists.cc:56
EcalCosmicsHists::allFedsTimingEbpBottomHist_
TH1F * allFedsTimingEbpBottomHist_
Definition: EcalCosmicsHists.h:177
EcalCosmicsHists::modEtaBins
double * modEtaBins
Definition: EcalCosmicsHists.h:100
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
EcalCosmicsHists::~EcalCosmicsHists
~EcalCosmicsHists() override
Definition: EcalCosmicsHists.cc:98
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
EcalCosmicsHists::EEP_FedsTimingTTHistRPC_
TH3F * EEP_FedsTimingTTHistRPC_
Definition: EcalCosmicsHists.h:349
EcalCosmicsHists::EEP_energySingleXtalHist_
TH1F * EEP_energySingleXtalHist_
Definition: EcalCosmicsHists.h:324
EcalCosmicsHists::allOccupancyDT_
TH2F * allOccupancyDT_
Definition: EcalCosmicsHists.h:189
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
EcalCosmicsHists::EEM_OccupancyHighEnergy_
TH2F * EEM_OccupancyHighEnergy_
Definition: EcalCosmicsHists.h:435
EcalCosmicsHists::cosmicCounterEEP_
int cosmicCounterEEP_
Definition: EcalCosmicsHists.h:445
EcalCosmicsHists::allOccupancyHighEnergyCoarse_
TH2F * allOccupancyHighEnergyCoarse_
Definition: EcalCosmicsHists.h:231
EcalCosmicsHists::FEDsAndTimingVsPhiHists_
std::map< int, TH2F * > FEDsAndTimingVsPhiHists_
Definition: EcalCosmicsHists.h:120
EcalRecHit::time
float time() const
Definition: EcalRecHit.h:70
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
EcalCosmicsHists::allFedsTimingPhiEbmHist_
TH2F * allFedsTimingPhiEbmHist_
Definition: EcalCosmicsHists.h:168
PVValHelper::eta
Definition: PVValidationHelpers.h:70
EcalCosmicsHists::determineTriggers
std::vector< bool > determineTriggers(const edm::Event &, const edm::EventSetup &eventSetup)
Definition: EcalCosmicsHists.cc:1307
EcalCosmicsHists::allFedsTimingPhiHist_
TH2F * allFedsTimingPhiHist_
Definition: EcalCosmicsHists.h:165
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
EcalCosmicsHists::EEM_OccupancyCoarseExclusiveECAL_
TH2F * EEM_OccupancyCoarseExclusiveECAL_
Definition: EcalCosmicsHists.h:400
L1GtTriggerMenuRcd
Definition: L1GtTriggerMenuRcd.h:32
EcalCosmicsHists::allFedsTimingHist_
TH1F * allFedsTimingHist_
Definition: EcalCosmicsHists.h:130
EcalCosmicsHists::allOccupancyECAL_
TH2F * allOccupancyECAL_
Definition: EcalCosmicsHists.h:180
EcalMappingRcd.h
EcalCosmicsHists::triggerExclusiveHist_
TH1F * triggerExclusiveHist_
Definition: EcalCosmicsHists.h:228
EcalCosmicsHists::EEM_energySingleXtalHist_
TH1F * EEM_energySingleXtalHist_
Definition: EcalCosmicsHists.h:391
EcalCosmicsHists::dccOrbitErrorByFEDHist_
TH1F * dccOrbitErrorByFEDHist_
Definition: EcalCosmicsHists.h:247
EcalCosmicsHists::EEM_OccupancyCoarseDT_
TH2F * EEM_OccupancyCoarseDT_
Definition: EcalCosmicsHists.h:405
EcalCosmicsHists::EEP_numberofCosmicsHist_
TH1F * EEP_numberofCosmicsHist_
Definition: EcalCosmicsHists.h:321
EcalCosmicsHists::FEDsAndE2vsE1Hists_
std::map< int, TH2F * > FEDsAndE2vsE1Hists_
Definition: EcalCosmicsHists.h:117
edm::ESHandle< EcalADCToGeVConstant >
EcalCosmicsHists::FEDsAndTimingVsFreqHists_
std::map< int, TH2F * > FEDsAndTimingVsFreqHists_
Definition: EcalCosmicsHists.h:115
EcalElectronicsMapping::getElectronicsId
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
Definition: EcalElectronicsMapping.cc:324
EcalCosmicsHists::allFedsTimingPhiEtaHistHCAL_
TH3F * allFedsTimingPhiEtaHistHCAL_
Definition: EcalCosmicsHists.h:221
EcalCosmicsHists::allFedsTimingTTHistDT_
TH3F * allFedsTimingTTHistDT_
Definition: EcalCosmicsHists.h:195
EcalCosmicsHists::EEP_AllOccupancyCoarse_
TH2F * EEP_AllOccupancyCoarse_
Definition: EcalCosmicsHists.h:305
EcalCosmicsHists::EEP_FedsTimingHistRPC_
TH1F * EEP_FedsTimingHistRPC_
Definition: EcalCosmicsHists.h:348
EcalCosmicsHists::allOccupancyExclusiveDT_
TH2F * allOccupancyExclusiveDT_
Definition: EcalCosmicsHists.h:191
EcalCosmicsHists::allFedsTimingPhiEbpHist_
TH2F * allFedsTimingPhiEbpHist_
Definition: EcalCosmicsHists.h:167
EcalCosmicsHists::allOccupancyHCAL_
TH2F * allOccupancyHCAL_
Definition: EcalCosmicsHists.h:216
CaloClusterFwd.h
EcalCosmicsHists::allFedsFreqTimeVsEtaHist_
TH2F * allFedsFreqTimeVsEtaHist_
Definition: EcalCosmicsHists.h:301
EcalCosmicsHists::EEP_FedsTimingTTHistHCAL_
TH3F * EEP_FedsTimingTTHistHCAL_
Definition: EcalCosmicsHists.h:363
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
EcalCosmicsHists::HighEnergy_energy3D
TH3F * HighEnergy_energy3D
Definition: EcalCosmicsHists.h:272
EcalCosmicsHists::allFedsTimingEbpHist_
TH1F * allFedsTimingEbpHist_
Definition: EcalCosmicsHists.h:173
EcalCosmicsHists::allFedsTimingVsAmpHist_
TH2F * allFedsTimingVsAmpHist_
Definition: EcalCosmicsHists.h:164
EEDetId::zside
int zside() const
Definition: EEDetId.h:71
EcalCosmicsHists::EEP_OccupancyDT_
TH2F * EEP_OccupancyDT_
Definition: EcalCosmicsHists.h:337
EcalCosmicsHists::allFedsiEtaProfileHist_
TH1F * allFedsiEtaProfileHist_
Definition: EcalCosmicsHists.h:133
EcalCosmicsHists::allFedsTimingPhiEtaHistECAL_
TH3F * allFedsTimingPhiEtaHistECAL_
Definition: EcalCosmicsHists.h:185
EcalCosmicsHists::FEDsAndE2Hists_
std::map< int, TH1F * > FEDsAndE2Hists_
Definition: EcalCosmicsHists.h:108
TrackAssociatorParameters::loadParameters
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
Definition: TrackAssociatorParameters.cc:18
EcalCosmicsHists::allFedsTimingLMHistDT_
TH2F * allFedsTimingLMHistDT_
Definition: EcalCosmicsHists.h:196
EcalCosmicsHists::allOccupancyExclusiveECAL_
TH2F * allOccupancyExclusiveECAL_
Definition: EcalCosmicsHists.h:182
EcalCosmicsHists::EEP_FedsE2Hist_
TH1F * EEP_FedsE2Hist_
Definition: EcalCosmicsHists.h:310
EcalCosmicsHists::allOccupancyCoarseExclusiveCSC_
TH2F * allOccupancyCoarseExclusiveCSC_
Definition: EcalCosmicsHists.h:210
EcalElectronicsId
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
Definition: EcalElectronicsId.h:18
EcalCosmicsHists::allFedsFreqTimeVsEtaTTHist_
TH2F * allFedsFreqTimeVsEtaTTHist_
Definition: EcalCosmicsHists.h:302
EcalCosmicsHists::EEM_FedsenergyvsE1Hist_
TH2F * EEM_FedsenergyvsE1Hist_
Definition: EcalCosmicsHists.h:379
EcalCosmicsHists::allFedsTimingHistDT_
TH1F * allFedsTimingHistDT_
Definition: EcalCosmicsHists.h:193
EcalCosmicsHists::HighEnergy_2GeV_occu3D
TH3F * HighEnergy_2GeV_occu3D
Definition: EcalCosmicsHists.h:282
EcalCosmicsHists::EEM_OccupancyExclusiveRPC_
TH2F * EEM_OccupancyExclusiveRPC_
Definition: EcalCosmicsHists.h:413
EEDetId
Definition: EEDetId.h:14
EcalCosmicsHists::hcalEnergy_HO_
TH1F * hcalEnergy_HO_
Definition: EcalCosmicsHists.h:265
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalCosmicsHists::EEM_OccupancyCoarseExclusiveRPC_
TH2F * EEM_OccupancyCoarseExclusiveRPC_
Definition: EcalCosmicsHists.h:414
EcalCosmicsHists::HighEnergy_1tracks_occu3D
TH3F * HighEnergy_1tracks_occu3D
Definition: EcalCosmicsHists.h:290
EcalCosmicsHists::EEP_numberofBCinSC_
TH1F * EEP_numberofBCinSC_
Definition: EcalCosmicsHists.h:319
EcalEndcap
Definition: EcalSubdetector.h:10
EcalADCToGeVConstant.h
EcalCosmicsHists::ecalElectronicsMap_
const EcalElectronicsMapping * ecalElectronicsMap_
Definition: EcalCosmicsHists.h:451
EcalCosmicsHists::HighEnergy_TracksAngle
TH1F * HighEnergy_TracksAngle
Definition: EcalCosmicsHists.h:287
EcalCosmicsHists::EEP_FedsTimingTTHistDT_
TH3F * EEP_FedsTimingTTHistDT_
Definition: EcalCosmicsHists.h:342
InitialStep_cff.seeds
seeds
Definition: InitialStep_cff.py:231
EcalCosmicsHists::numberofCosmicsHistEB_
TH1F * numberofCosmicsHistEB_
Definition: EcalCosmicsHists.h:140
EcalCosmicsHists::EEM_FedsTimingHistECAL_
TH1F * EEM_FedsTimingHistECAL_
Definition: EcalCosmicsHists.h:401
funct::true
true
Definition: Factorize.h:173
EcalCosmicsHists::EEM_FedsTimingTTHistDT_
TH3F * EEM_FedsTimingTTHistDT_
Definition: EcalCosmicsHists.h:409
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
EcalCosmicsHists::EEM_numxtalsVsHighEnergy_
TH2F * EEM_numxtalsVsHighEnergy_
Definition: EcalCosmicsHists.h:385
EcalCosmicsHists::EEM_FedsTimingTTHistECAL_
TH3F * EEM_FedsTimingTTHistECAL_
Definition: EcalCosmicsHists.h:402
optionsL1T.menu
menu
Definition: optionsL1T.py:29
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
EcalADCToGeVConstant::getEEValue
float getEEValue() const
Definition: EcalADCToGeVConstant.h:21
EcalCosmicsHists::EEP_numxtalsVsEnergy_
TH2F * EEP_numxtalsVsEnergy_
Definition: EcalCosmicsHists.h:317
EcalCosmicsHists::FEDsAndenergyHists_
std::map< int, TH1F * > FEDsAndenergyHists_
Definition: EcalCosmicsHists.h:109
L1GtTriggerMenu
Definition: L1GtTriggerMenu.h:48
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
L1GlobalTriggerReadoutSetup.h
EcalCosmicsHists::EEP_FedsSeedEnergyHist_
TH1F * EEP_FedsSeedEnergyHist_
Definition: EcalCosmicsHists.h:313
EcalCosmicsHists::EEM_numxtalsVsEnergy_
TH2F * EEM_numxtalsVsEnergy_
Definition: EcalCosmicsHists.h:384
L1MuGMTReadoutCollection::getRecords
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
Definition: L1MuGMTReadoutCollection.h:52
EcalCosmicsHists::l1GMTReadoutRecTag_
edm::InputTag l1GMTReadoutRecTag_
Definition: EcalCosmicsHists.h:89
gpuVertexFinder::hist
__shared__ Hist hist
Definition: gpuClusterTracksDBSCAN.h:48
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EcalCosmicsHists::allOccupancy_
TH2F * allOccupancy_
Definition: EcalCosmicsHists.h:154
EcalCosmicsHists::EEM_FedsenergyOnlyHighHist_
TH1F * EEM_FedsenergyOnlyHighHist_
Definition: EcalCosmicsHists.h:376
EcalCosmicsHists::allOccupancyCoarseExclusiveDT_
TH2F * allOccupancyCoarseExclusiveDT_
Definition: EcalCosmicsHists.h:192
L1GlobalTriggerReadoutRecord::decisionWord
const DecisionWord & decisionWord(int bxInEventValue) const
Definition: L1GlobalTriggerReadoutRecord.cc:186
EcalCosmicsHists::runInFileName_
bool runInFileName_
Definition: EcalCosmicsHists.h:102
EcalCosmicsHists::allOccupancyCoarseDT_
TH2F * allOccupancyCoarseDT_
Definition: EcalCosmicsHists.h:190
EcalCosmicsHists::EEP_OccupancyCoarseHCAL_
TH2F * EEP_OccupancyCoarseHCAL_
Definition: EcalCosmicsHists.h:359
EcalCosmicsHists::allFedsenergyOnlyHighHist_
TH1F * allFedsenergyOnlyHighHist_
Definition: EcalCosmicsHists.h:129
EcalCosmicsHists::endJob
void endJob() override
Definition: EcalCosmicsHists.cc:2759
EcalElectronicsMapping.h
CaloTopologyRecord.h
EcalCosmicsHists::numberofBCinSC_
TH1F * numberofBCinSC_
Definition: EcalCosmicsHists.h:143
EcalCosmicsHists::deltaEtaHist_
TH1F * deltaEtaHist_
Definition: EcalCosmicsHists.h:236
EcalADCToGeVConstantRcd.h
EcalCosmicsHists::dccEventVsBxHist_
TH2F * dccEventVsBxHist_
Definition: EcalCosmicsHists.h:245
EcalCosmicsHists::HighEnergy_TracksAngleTopBottom
TH1F * HighEnergy_TracksAngleTopBottom
Definition: EcalCosmicsHists.h:288
EcalCosmicsHists::runNumberHist_
TH1F * runNumberHist_
Definition: EcalCosmicsHists.h:234
EcalCosmicsHists::numxtalsVsHighEnergy_
TH2F * numxtalsVsHighEnergy_
Definition: EcalCosmicsHists.h:150
EcalCosmicsHists::EEP_FedsTimingHistECAL_
TH1F * EEP_FedsTimingHistECAL_
Definition: EcalCosmicsHists.h:334
EcalCosmicsHists::EEP_OccupancyExclusiveDT_
TH2F * EEP_OccupancyExclusiveDT_
Definition: EcalCosmicsHists.h:339
createfilelist.int
int
Definition: createfilelist.py:10
EcalCosmicsHists::allFedsE2Hist_
TH1F * allFedsE2Hist_
Definition: EcalCosmicsHists.h:126
iEvent
int iEvent
Definition: GenABIO.cc:224
EcalFedMap::getSliceFromFed
std::string getSliceFromFed(int)
Definition: EcalFedMap.cc:86
EcalCosmicsHists::EEP_OccupancyCoarseExclusiveECAL_
TH2F * EEP_OccupancyCoarseExclusiveECAL_
Definition: EcalCosmicsHists.h:333
EcalCosmicsHists::allFedsTimingEbmTopHist_
TH1F * allFedsTimingEbmTopHist_
Definition: EcalCosmicsHists.h:176
EcalCosmicsHists::allOccupancyCoarseCSC_
TH2F * allOccupancyCoarseCSC_
Definition: EcalCosmicsHists.h:208
EcalCosmicsHists::allFedsFrequencyHist_
TH1F * allFedsFrequencyHist_
Definition: EcalCosmicsHists.h:131
EcalCosmicsHists::naiveEvtNum_
int naiveEvtNum_
Definition: EcalCosmicsHists.h:442
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
EcalCosmicsHists::allOccupancyExclusiveCSC_
TH2F * allOccupancyExclusiveCSC_
Definition: EcalCosmicsHists.h:209
EcalCosmicsHists::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: EcalCosmicsHists.cc:1570
EcalCosmicsHists::fedMap_
EcalFedMap * fedMap_
Definition: EcalCosmicsHists.h:438
EcalCosmicsHists::numberofCosmicsTopBottomHist_
TH1F * numberofCosmicsTopBottomHist_
Definition: EcalCosmicsHists.h:259
EcalCosmicsHists::EEM_FedsSeedEnergyHist_
TH1F * EEM_FedsSeedEnergyHist_
Definition: EcalCosmicsHists.h:380
EcalCosmicsHists::EEP_FedsenergyHist_
TH1F * EEP_FedsenergyHist_
Definition: EcalCosmicsHists.h:307
EcalCosmicsHists::minRecHitAmpEB_
double minRecHitAmpEB_
Definition: EcalCosmicsHists.h:95
EcalCosmicsHists::EEM_FedsNumXtalsInClusterHist_
TH1F * EEM_FedsNumXtalsInClusterHist_
Definition: EcalCosmicsHists.h:382
EcalCosmicsHists::HighEnergy_ratioClusters
TH1F * HighEnergy_ratioClusters
Definition: EcalCosmicsHists.h:276
edm::EventSetup
Definition: EventSetup.h:58
EcalCosmicsHists::allOccupancyRPC_
TH2F * allOccupancyRPC_
Definition: EcalCosmicsHists.h:198
HcalSubdetector.h
EcalCosmicsHists::EEP_FedsTimingHistHCAL_
TH1F * EEP_FedsTimingHistHCAL_
Definition: EcalCosmicsHists.h:362
EcalCosmicsHists::EEP_AllOccupancy_
TH2F * EEP_AllOccupancy_
Definition: EcalCosmicsHists.h:306
EcalCosmicsHists::allFedsTimingLMHistCSC_
TH2F * allFedsTimingLMHistCSC_
Definition: EcalCosmicsHists.h:214
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
EcalCosmicsHists::numberofCosmicsHist_
TH1F * numberofCosmicsHist_
Definition: EcalCosmicsHists.h:136
DetId::Ecal
Definition: DetId.h:27
get
#define get
EcalCosmicsHists::EEP_NumXtalsInClusterHist_
TH1F * EEP_NumXtalsInClusterHist_
Definition: EcalCosmicsHists.h:316
EcalCosmicsHists::allFedsTimingLMHist_
TH2F * allFedsTimingLMHist_
Definition: EcalCosmicsHists.h:171
EcalCosmicsHists::EEM_FedsTimingTTHistHCAL_
TH3F * EEM_FedsTimingTTHistHCAL_
Definition: EcalCosmicsHists.h:430
EcalCosmicsHists::allOccupancySingleXtal_
TH2F * allOccupancySingleXtal_
Definition: EcalCosmicsHists.h:160
EcalCosmicsHists::EEP_FedsNumXtalsInClusterHist_
TH1F * EEP_FedsNumXtalsInClusterHist_
Definition: EcalCosmicsHists.h:315
EEDetId::iy
int iy() const
Definition: EEDetId.h:83
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
EcalCosmicsHists::minHighEnergy_
double minHighEnergy_
Definition: EcalCosmicsHists.h:97
EcalCosmicsHists::TrueBCOccupancy_
TH2F * TrueBCOccupancy_
Definition: EcalCosmicsHists.h:146
EcalCosmicsHists::numberofCrossedEcalIdsHist_
TH1F * numberofCrossedEcalIdsHist_
Definition: EcalCosmicsHists.h:256
EcalCosmicsHists::FEDsAndiEtaProfileHists_
std::map< int, TH1F * > FEDsAndiEtaProfileHists_
Definition: EcalCosmicsHists.h:114
EcalCosmicsHists::EEM_OccupancyCoarseExclusiveDT_
TH2F * EEM_OccupancyCoarseExclusiveDT_
Definition: EcalCosmicsHists.h:407
CaloTopology.h
EcalCosmicsHists::EEM_NumXtalsInClusterHist_
TH1F * EEM_NumXtalsInClusterHist_
Definition: EcalCosmicsHists.h:383
DecisionWord
std::vector< bool > DecisionWord
typedefs
Definition: L1GlobalTriggerReadoutSetupFwd.h:34
EcalCosmicsHists::FEDsAndOccupancyHists_
std::map< int, TH2F * > FEDsAndOccupancyHists_
Definition: EcalCosmicsHists.h:119
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
EcalCosmicsHists::allOccupancyCoarse_
TH2F * allOccupancyCoarse_
Definition: EcalCosmicsHists.h:156
EcalCosmicsHists::trackParameters_
TrackAssociatorParameters trackParameters_
Definition: EcalCosmicsHists.h:255
EcalCosmicsHists::FEDsAndDCCRuntypeVsBxHists_
std::map< int, TH2F * > FEDsAndDCCRuntypeVsBxHists_
Definition: EcalCosmicsHists.h:123
EcalCosmicsHists::cosmicCounterEEM_
int cosmicCounterEEM_
Definition: EcalCosmicsHists.h:446
EcalCosmicsHists::EEM_OccupancyHighEnergyCoarse_
TH2F * EEM_OccupancyHighEnergyCoarse_
Definition: EcalCosmicsHists.h:436
EcalCosmicsHists::TrueOccupancy_
TH2F * TrueOccupancy_
Definition: EcalCosmicsHists.h:155
DDAxes::phi
EcalCosmicsHists::HighEnergy_NumXtal
TH1F * HighEnergy_NumXtal
Definition: EcalCosmicsHists.h:269
EcalCosmicsHists::EEM_FedsTimingHistCSC_
TH1F * EEM_FedsTimingHistCSC_
Definition: EcalCosmicsHists.h:422
EcalCosmicsHists::EEP_FedsTimingHist_
TH1F * EEP_FedsTimingHist_
Definition: EcalCosmicsHists.h:326
L1MuGMTReadoutCollection
Definition: L1MuGMTReadoutCollection.h:39
EcalCosmicsHists::EEP_FedsTimingTTHistCSC_
TH3F * EEP_FedsTimingTTHistCSC_
Definition: EcalCosmicsHists.h:356
EcalCosmicsHists::dccErrorVsBxHist_
TH2F * dccErrorVsBxHist_
Definition: EcalCosmicsHists.h:250
TrackDetMatchInfo
Definition: TrackDetMatchInfo.h:13
EcalCosmicsHists::EEM_FedsTimingVsAmpHist_
TH2F * EEM_FedsTimingVsAmpHist_
Definition: EcalCosmicsHists.h:394
edm::SortedCollection::find
iterator find(key_type k)
Definition: SortedCollection.h:240
EcalCosmicsHists::minRecHitAmpEE_
double minRecHitAmpEE_
Definition: EcalCosmicsHists.h:96
std
Definition: JetResolutionObject.h:76
EcalCosmicsHists::EEM_FedsTimingHistRPC_
TH1F * EEM_FedsTimingHistRPC_
Definition: EcalCosmicsHists.h:415
EcalMappingRcd
Definition: EcalMappingRcd.h:15
EcalFedMap
Definition: EcalFedMap.h:7
SuperClusterFwd.h
EcalCosmicsHists::dccRuntypeHist_
TH1F * dccRuntypeHist_
Definition: EcalCosmicsHists.h:249
EcalCosmicsHists::EEM_FedsTimingTTHistRPC_
TH3F * EEM_FedsTimingTTHistRPC_
Definition: EcalCosmicsHists.h:416
EcalCosmicsHists::EEP_FedsTimingTTHist_
TH3F * EEP_FedsTimingTTHist_
Definition: EcalCosmicsHists.h:328
DetId.h
EcalCosmicsHists::cosmicCounterEB_
int cosmicCounterEB_
Definition: EcalCosmicsHists.h:444
EcalCosmicsHists::EEP_FedsTimingHistDT_
TH1F * EEP_FedsTimingHistDT_
Definition: EcalCosmicsHists.h:341
EcalCosmicsHists::startTime_
double startTime_
Definition: EcalCosmicsHists.h:104
EcalCosmicsHists::trackAssociator_
TrackDetectorAssociator trackAssociator_
Definition: EcalCosmicsHists.h:254
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
EcalCosmicsHists::EEP_OccupancyCoarseExclusiveCSC_
TH2F * EEP_OccupancyCoarseExclusiveCSC_
Definition: EcalCosmicsHists.h:354
EcalCosmicsHists::allFedsenergyHist_
TH1F * allFedsenergyHist_
Definition: EcalCosmicsHists.h:127
EcalCosmicsHists::EEM_OccupancyExclusiveHCAL_
TH2F * EEM_OccupancyExclusiveHCAL_
Definition: EcalCosmicsHists.h:427
EcalCosmicsHists::allFedsTimingPhiEtaHist_
TH3F * allFedsTimingPhiEtaHist_
Definition: EcalCosmicsHists.h:169
EcalCosmicsHists::ratioAssocClustersHist_
TH1F * ratioAssocClustersHist_
Definition: EcalCosmicsHists.h:239
EcalCosmicsHists::allOccupancyCSC_
TH2F * allOccupancyCSC_
Definition: EcalCosmicsHists.h:207
EcalCosmicsHists::EEM_OccupancyRPC_
TH2F * EEM_OccupancyRPC_
Definition: EcalCosmicsHists.h:411
EcalCosmicsHists::EEP_OccupancyCoarseExclusiveRPC_
TH2F * EEP_OccupancyCoarseExclusiveRPC_
Definition: EcalCosmicsHists.h:347
SuperCluster.h
EcalCosmicsHists::ratioAssocTracksHist_
TH1F * ratioAssocTracksHist_
Definition: EcalCosmicsHists.h:238
EcalCosmicsHists::EEM_OccupancyCoarseCSC_
TH2F * EEM_OccupancyCoarseCSC_
Definition: EcalCosmicsHists.h:419
EcalCosmicsHists::allOccupancyHighEnergy_
TH2F * allOccupancyHighEnergy_
Definition: EcalCosmicsHists.h:230
EBDetId::iphiSM
int iphiSM() const
get the crystal iphi (1-20)
Definition: EBDetId.h:73
EcalCosmicsHists::EEM_OccupancyDT_
TH2F * EEM_OccupancyDT_
Definition: EcalCosmicsHists.h:404
EcalCosmicsHists::EEM_OccupancyCoarseExclusiveCSC_
TH2F * EEM_OccupancyCoarseExclusiveCSC_
Definition: EcalCosmicsHists.h:421
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
EcalCosmicsHists::EEM_FedsTimingHistDT_
TH1F * EEM_FedsTimingHistDT_
Definition: EcalCosmicsHists.h:408
EcalCosmicsHists::EEP_FedsenergyHighHist_
TH1F * EEP_FedsenergyHighHist_
Definition: EcalCosmicsHists.h:308
EcalCosmicsHists::EEP_OccupancyCoarseExclusiveDT_
TH2F * EEP_OccupancyCoarseExclusiveDT_
Definition: EcalCosmicsHists.h:340
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalCosmicsHists::HighEnergy_numRecoTrackBarrel
TH1F * HighEnergy_numRecoTrackBarrel
Definition: EcalCosmicsHists.h:286
HcalRecHitCollections.h
EcalCosmicsHists::allFedsenergyvsE1Hist_
TH2F * allFedsenergyvsE1Hist_
Definition: EcalCosmicsHists.h:153
EcalCosmicsHists::hcalEnergy_HF_
TH1F * hcalEnergy_HF_
Definition: EcalCosmicsHists.h:264
EcalCosmicsHists::allFedsTimingLMHistECAL_
TH2F * allFedsTimingLMHistECAL_
Definition: EcalCosmicsHists.h:187
EcalCosmicsHists::seedTrackPhiHist_
TH2F * seedTrackPhiHist_
Definition: EcalCosmicsHists.h:241
EcalCosmicsHists::allFedsTimingHistCSC_
TH1F * allFedsTimingHistCSC_
Definition: EcalCosmicsHists.h:211
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EcalCosmicsHists::EEP_FedsTimingVsAmpHist_
TH2F * EEP_FedsTimingVsAmpHist_
Definition: EcalCosmicsHists.h:327
EcalCosmicsHists::EEP_OccupancyHighEnergy_
TH2F * EEP_OccupancyHighEnergy_
Definition: EcalCosmicsHists.h:368
EcalCosmicsHists::histRangeMin_
double histRangeMin_
Definition: EcalCosmicsHists.h:92
EcalCosmicsHists::EEM_FedsE2Hist_
TH1F * EEM_FedsE2Hist_
Definition: EcalCosmicsHists.h:377
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
EcalCosmicsHists::allOccupancyCoarseExclusiveHCAL_
TH2F * allOccupancyCoarseExclusiveHCAL_
Definition: EcalCosmicsHists.h:219
EcalCosmicsHists::EEP_triggerHist_
TH1F * EEP_triggerHist_
Definition: EcalCosmicsHists.h:365
EcalCosmicsHists::allFedsTimingEbmBottomHist_
TH1F * allFedsTimingEbmBottomHist_
Definition: EcalCosmicsHists.h:178
EcalCosmicsHists::allFedsTimingLMHistRPC_
TH2F * allFedsTimingLMHistRPC_
Definition: EcalCosmicsHists.h:205
EcalCosmicsHists::ttEtaBins
double * ttEtaBins
Definition: EcalCosmicsHists.h:99
EcalCosmicsHists::allOccupancyCoarseECAL_
TH2F * allOccupancyCoarseECAL_
Definition: EcalCosmicsHists.h:181
EcalCosmicsHists::EEP_OccupancyCoarseExclusiveHCAL_
TH2F * EEP_OccupancyCoarseExclusiveHCAL_
Definition: EcalCosmicsHists.h:361
EcalCosmicsHists::EEM_AllOccupancyCoarse_
TH2F * EEM_AllOccupancyCoarse_
Definition: EcalCosmicsHists.h:372
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TrackDetectorAssociator::associate
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
Definition: TrackDetectorAssociator.cc:110
genParticles_cff.map
map
Definition: genParticles_cff.py:11
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
EcalCosmicsHists::hcalHEHBecalEB_
TH2F * hcalHEHBecalEB_
Definition: EcalCosmicsHists.h:266
EcalCosmicsHists::dccRuntypeErrorByFEDHist_
TH1F * dccRuntypeErrorByFEDHist_
Definition: EcalCosmicsHists.h:248
EcalCosmicsHists::HighEnergy_0tracks_occu3D
TH3F * HighEnergy_0tracks_occu3D
Definition: EcalCosmicsHists.h:289
EcalCosmicsHists::EEP_OccupancySingleXtal_
TH2F * EEP_OccupancySingleXtal_
Definition: EcalCosmicsHists.h:323
EcalCosmicsHists::allOccupancyCoarseExclusiveRPC_
TH2F * allOccupancyCoarseExclusiveRPC_
Definition: EcalCosmicsHists.h:201
EcalCosmicsHists::allFedsTimingPhiEtaHistRPC_
TH3F * allFedsTimingPhiEtaHistRPC_
Definition: EcalCosmicsHists.h:203
EcalCosmicsHists::EEM_OccupancyExclusiveDT_
TH2F * EEM_OccupancyExclusiveDT_
Definition: EcalCosmicsHists.h:406
EcalCondDBWriter_cfi.runType
runType
Definition: EcalCondDBWriter_cfi.py:64
EcalCosmicsHists::deltaRHist_
TH1F * deltaRHist_
Definition: EcalCosmicsHists.h:235
EcalCosmicsHists::EEM_numberofBCinSC_
TH1F * EEM_numberofBCinSC_
Definition: EcalCosmicsHists.h:386
EcalCosmicsHists::allFedsTimingTTHistCSC_
TH3F * allFedsTimingTTHistCSC_
Definition: EcalCosmicsHists.h:213
EcalCosmicsHists::allFedsTimingHistECAL_
TH1F * allFedsTimingHistECAL_
Definition: EcalCosmicsHists.h:184
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
EcalCosmicsHists::numberofBCinSCphi_
TH2F * numberofBCinSCphi_
Definition: EcalCosmicsHists.h:144
EcalCosmicsHists::allFedsiPhiProfileHist_
TH1F * allFedsiPhiProfileHist_
Definition: EcalCosmicsHists.h:132
EcalCosmicsHists::EEM_FedsTimingHist_
TH1F * EEM_FedsTimingHist_
Definition: EcalCosmicsHists.h:393
edm::Event
Definition: Event.h:73
EcalCosmicsHists::EEP_OccupancyExclusiveECAL_
TH2F * EEP_OccupancyExclusiveECAL_
Definition: EcalCosmicsHists.h:332
EcalCosmicsHists::FEDsAndHists_
std::map< int, TH1F * > FEDsAndHists_
Definition: EcalCosmicsHists.h:107
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
EBDetId::ietaSM
int ietaSM() const
get the crystal ieta in the SM convention (1-85)
Definition: EBDetId.h:71
EcalADCToGeVConstant::getEBValue
float getEBValue() const
Definition: EcalADCToGeVConstant.h:20
EcalCosmicsHists::allFedsNumXtalsInClusterHist_
TH1F * allFedsNumXtalsInClusterHist_
Definition: EcalCosmicsHists.h:134
EcalCosmicsHists::l1GTReadoutRecTag_
edm::InputTag l1GTReadoutRecTag_
Definition: EcalCosmicsHists.h:88
EcalADCToGeVConstantRcd
Definition: EcalADCToGeVConstantRcd.h:5
edm::InputTag
Definition: InputTag.h:15
L1GlobalTriggerReadoutRecord.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
EcalCosmicsHists::allFedsTimingHistHCAL_
TH1F * allFedsTimingHistHCAL_
Definition: EcalCosmicsHists.h:220
EcalCosmicsHists::HighEnergy_0tracks_occu3DXtal
TH3F * HighEnergy_0tracks_occu3DXtal
Definition: EcalCosmicsHists.h:293
EcalCosmicsHists::EEP_numxtalsVsHighEnergy_
TH2F * EEP_numxtalsVsHighEnergy_
Definition: EcalCosmicsHists.h:318
EcalCosmicsHists::allFedsHist_
TH1F * allFedsHist_
Definition: EcalCosmicsHists.h:125
EcalCosmicsHists::cosmicCounterTopBottom_
int cosmicCounterTopBottom_
Definition: EcalCosmicsHists.h:260
EcalCosmicsHists::allOccupancyExclusiveRPC_
TH2F * allOccupancyExclusiveRPC_
Definition: EcalCosmicsHists.h:200
EcalCosmicsHists::EEM_OccupancyExclusiveCSC_
TH2F * EEM_OccupancyExclusiveCSC_
Definition: EcalCosmicsHists.h:420
EcalCosmicsHists::triggerHist_
TH1F * triggerHist_
Definition: EcalCosmicsHists.h:227
EcalCosmicsHists::dccBXErrorByFEDHist_
TH1F * dccBXErrorByFEDHist_
Definition: EcalCosmicsHists.h:246
EcalCosmicsHists::endcapClusterCollection_
edm::InputTag endcapClusterCollection_
Definition: EcalCosmicsHists.h:87
EcalCosmicsHists::fileName_
std::string fileName_
Definition: EcalCosmicsHists.h:101
EcalCosmicsHists::allFedsTimingTTHist_
TH3F * allFedsTimingTTHist_
Definition: EcalCosmicsHists.h:170
EcalCosmicsHists::FEDsAndTimingHists_
std::map< int, TH1F * > FEDsAndTimingHists_
Definition: EcalCosmicsHists.h:110
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21
EcalCosmicsHists::allFedsTimingTTHistRPC_
TH3F * allFedsTimingTTHistRPC_
Definition: EcalCosmicsHists.h:204
EcalCosmicsHists::EEP_OccupancyRPC_
TH2F * EEP_OccupancyRPC_
Definition: EcalCosmicsHists.h:344
EcalCosmicsHists::numberofCosmicsWTrackHist_
TH1F * numberofCosmicsWTrackHist_
Definition: EcalCosmicsHists.h:137
EcalCosmicsHists::EEP_OccupancyCoarseDT_
TH2F * EEP_OccupancyCoarseDT_
Definition: EcalCosmicsHists.h:338
EcalCosmicsHists::HighEnergy_2tracks_occu3DXtal
TH3F * HighEnergy_2tracks_occu3DXtal
Definition: EcalCosmicsHists.h:295