CMS 3D CMS Logo

EcalDisplaysByEvent.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: EcalDisplaysByEvent
4 // Class: EcalDisplaysByEvent
5 //
13 //
14 // Original Author: Seth COOPER
15 // Created: Th Aug 28 5:46:22 CEST 2007
16 //
17 //
18 
19 
20 // system include files
21 #include <memory>
22 #include <vector>
23 #include <map>
24 #include <set>
25 
26 // user include files
37 
44 
48 
50 
51 #include "TFile.h"
52 #include "TH1F.h"
53 #include "TH2F.h"
54 #include "TH3F.h"
55 #include "TGraph.h"
56 #include "TTree.h"
57 #include "TCanvas.h"
58 
59 
60 //
61 // class declaration
62 //
63 
65  public:
66  explicit EcalDisplaysByEvent(const edm::ParameterSet&);
68 
69 
70  private:
71  virtual void beginRun(edm::Run const &, edm::EventSetup const &) ;
72  virtual void analyze(edm::Event const &, edm::EventSetup const &);
73  virtual void endJob() ;
75  std::string floatToString(float num);
76  void initHists(int);
77  void initEvtByEvtHists(int naiveEvtNum_, int ievt);
78  void deleteEvtByEvtHists();
79  void initAllEventHistos();
81  EB_FINE = 0,
82  EB_COARSE = 1,
83  EEM_FINE = 2,
85  EEP_FINE = 4,
87  };
88  TH2F* init2DEcalHist(std::string histTypeName, int subDet);
89  TH3F* init3DEcalHist(std::string histTypeName, int dubDet);
90  TCanvas* init2DEcalCanvas(std::string canvasName);
92  int ievt, edm::ESHandle<CaloTopology> caloTopo);
93  TGraph* selectDigi(DetId det, int ievt);
94  int getEEIndex(EcalElectronicsId elecId);
98  void drawHistos();
99  void drawCanvas(TCanvas* canvas, TH1F* hist1, TH1F* hist2, TH1F* hist3);
100  void drawCanvas(TCanvas* canvas, TH2F* hist1, TH2F* hist2, TH2F* hist3);
101  void drawCanvas(TCanvas* canvas, TH3F* hist1, TH3F* hist2, TH3F* hist3);
102  void drawTimingErrors(TProfile2D* profile);
103  void drawEELines();
104 
105  // ----------member data ---------------------------
106 
112 
115 
116  int runNum_;
117  int side_;
118  double threshold_;
128 
129  std::set<EBDetId> listEBChannels;
130  std::set<EEDetId> listEEChannels;
131 
132  int abscissa[10];
133  int ordinate[10];
134 
135  static float gainRatio[3];
137 
138  std::vector<std::string>* names;
139  std::vector<std::string>* histoCanvasNamesVector;
140  std::vector<int> maskedChannels_;
141  std::vector<int> maskedFEDs_;
142  std::vector<int> seedCrys_;
143  std::vector<std::string> maskedEBs_;
144  std::map<int,TH1F*> FEDsAndTimingHists_;
145  std::map<int,float> crysAndAmplitudesMap_;
146  std::map<int,EcalDCCHeaderBlock> FEDsAndDCCHeaders_;
147  std::map<std::string,int> seedFrequencyMap_;
148 
150  // For event-by-evet histos
151  TH1F* timingEB_;
152  TH1F* timingEEM_;
153  TH1F* timingEEP_;
154  TH1F* energyEB_;
155  TH1F* energyEEM_;
156  TH1F* energyEEP_;
181  TCanvas* timingCanvas_;
182  TCanvas* energyCanvas_;
191 
192  // For all-event hitos
233 
234  TTree* canvasNames_;
238 
240 };
std::map< int, TH1F * > FEDsAndTimingHists_
std::vector< std::string > maskedEBs_
std::set< EBDetId > listEBChannels
edm::Handle< EEDigiCollection > EEdigisHandle
TH2F * init2DEcalHist(std::string histTypeName, int subDet)
std::vector< int > maskedChannels_
std::map< int, float > crysAndAmplitudesMap_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::vector< std::string > * names
const EcalElectronicsMapping * ecalElectronicsMap_
int getEEIndex(EcalElectronicsId elecId)
edm::InputTag headerProducer_
void drawTimingErrors(TProfile2D *profile)
TCanvas * digiOccupancyCoarseCanvasAll_
std::set< EEDetId > listEEChannels
void drawCanvas(TCanvas *canvas, TH1F *hist1, TH1F *hist2, TH1F *hist3)
std::vector< std::string > * histoCanvasNamesVector
std::vector< int > maskedFEDs_
TCanvas * recHitOccupancyCoarseCanvasAll_
std::map< int, EcalDCCHeaderBlock > FEDsAndDCCHeaders_
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
static edm::Service< TFileService > fileService
std::string intToString(int num)
Definition: DetId.h:18
static float gainRatio[3]
void makeHistos(edm::Handle< EBDigiCollection > ebDigis)
void selectHits(edm::Handle< EcalRecHitCollection > hits, int ievt, edm::ESHandle< CaloTopology > caloTopo)
edm::Handle< EBDigiCollection > EBdigisHandle
std::map< std::string, int > seedFrequencyMap_
void initEvtByEvtHists(int naiveEvtNum_, int ievt)
TCanvas * digiOccupancyCoarseCanvas_
std::vector< int > seedCrys_
edm::InputTag EERecHitCollection_
std::string floatToString(float num)
def canvas(sub, attr)
Definition: svgfig.py:481
edm::InputTag EBRecHitCollection_
TGraph * selectDigi(DetId det, int ievt)
TH3F * init3DEcalHist(std::string histTypeName, int dubDet)
virtual void analyze(edm::Event const &, edm::EventSetup const &)
TCanvas * init2DEcalCanvas(std::string canvasName)
TCanvas * recHitOccupancyCoarseCanvas_
EcalDisplaysByEvent(const edm::ParameterSet &)
Definition: Run.h:42