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 // system include files
20 #include <memory>
21 #include <vector>
22 #include <map>
23 #include <set>
24 
25 // user include files
36 
43 
47 
49 
50 #include "TFile.h"
51 #include "TH1F.h"
52 #include "TH2F.h"
53 #include "TH3F.h"
54 #include "TGraph.h"
55 #include "TTree.h"
56 #include "TCanvas.h"
57 
58 //
59 // class declaration
60 //
61 
63 public:
64  explicit EcalDisplaysByEvent(const edm::ParameterSet&);
65  ~EcalDisplaysByEvent() override;
66 
67 private:
68  void beginRun(edm::Run const&, edm::EventSetup const&) override;
69  void analyze(edm::Event const&, edm::EventSetup const&) override;
70  void endJob() override;
72  std::string floatToString(float num);
73  void initHists(int);
74  void initEvtByEvtHists(int naiveEvtNum_, int ievt);
75  void deleteEvtByEvtHists();
76  void initAllEventHistos();
78  TH2F* init2DEcalHist(std::string histTypeName, int subDet);
79  TH3F* init3DEcalHist(std::string histTypeName, int dubDet);
80  TCanvas* init2DEcalCanvas(std::string canvasName);
82  TGraph* selectDigi(DetId det, int ievt);
83  int getEEIndex(EcalElectronicsId elecId);
87  void drawHistos();
88  void drawCanvas(TCanvas* canvas, TH1F* hist1, TH1F* hist2, TH1F* hist3);
89  void drawCanvas(TCanvas* canvas, TH2F* hist1, TH2F* hist2, TH2F* hist3);
90  void drawCanvas(TCanvas* canvas, TH3F* hist1, TH3F* hist2, TH3F* hist3);
91  void drawTimingErrors(TProfile2D* profile);
92  void drawEELines();
93 
94  // ----------member data ---------------------------
95 
101 
104 
105  int runNum_;
106  int side_;
107  double threshold_;
117 
118  std::set<EBDetId> listEBChannels;
119  std::set<EEDetId> listEEChannels;
120 
121  int abscissa[10];
122  int ordinate[10];
123 
124  static float gainRatio[3];
126 
127  std::vector<std::string>* names;
128  std::vector<std::string>* histoCanvasNamesVector;
129  std::vector<int> maskedChannels_;
130  std::vector<int> maskedFEDs_;
131  std::vector<int> seedCrys_;
132  std::vector<std::string> maskedEBs_;
133  std::map<int, TH1F*> FEDsAndTimingHists_;
134  std::map<int, float> crysAndAmplitudesMap_;
135  std::map<int, EcalDCCHeaderBlock> FEDsAndDCCHeaders_;
136  std::map<std::string, int> seedFrequencyMap_;
137 
139  // For event-by-evet histos
140  TH1F* timingEB_;
141  TH1F* timingEEM_;
142  TH1F* timingEEP_;
143  TH1F* energyEB_;
144  TH1F* energyEEM_;
145  TH1F* energyEEP_;
170  TCanvas* timingCanvas_;
171  TCanvas* energyCanvas_;
180 
181  // For all-event hitos
222 
223  TTree* canvasNames_;
227 
229 };
std::vector< std::string > maskedEBs_
std::set< EBDetId > listEBChannels
edm::Handle< EEDigiCollection > EEdigisHandle
TH2F * init2DEcalHist(std::string histTypeName, int subDet)
std::vector< int > maskedChannels_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::vector< std::string > * names
const EcalElectronicsMapping * ecalElectronicsMap_
int getEEIndex(EcalElectronicsId elecId)
edm::InputTag headerProducer_
void analyze(edm::Event const &, edm::EventSetup const &) override
std::map< int, EcalDCCHeaderBlock > FEDsAndDCCHeaders_
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, TH1F * > FEDsAndTimingHists_
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:482
edm::InputTag EBRecHitCollection_
TGraph * selectDigi(DetId det, int ievt)
TH3F * init3DEcalHist(std::string histTypeName, int dubDet)
TCanvas * init2DEcalCanvas(std::string canvasName)
void beginRun(edm::Run const &, edm::EventSetup const &) override
TCanvas * recHitOccupancyCoarseCanvas_
EcalDisplaysByEvent(const edm::ParameterSet &)
Definition: Run.h:45
std::map< int, float > crysAndAmplitudesMap_