CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 // $Id: EcalDisplaysByEvent.h,v 1.3 2010/01/16 14:46:16 hegner Exp $
17 //
18 //
19 
20 
21 // system include files
22 #include <memory>
23 #include <vector>
24 #include <map>
25 #include <set>
26 
27 // user include files
38 
45 
49 
51 
52 #include "TFile.h"
53 #include "TH1F.h"
54 #include "TH2F.h"
55 #include "TH3F.h"
56 #include "TGraph.h"
57 #include "TTree.h"
58 #include "TCanvas.h"
59 
60 
61 //
62 // class declaration
63 //
64 
66  public:
67  explicit EcalDisplaysByEvent(const edm::ParameterSet&);
69 
70 
71  private:
72  virtual void beginRun(edm::Run const &, edm::EventSetup const &) ;
73  virtual void analyze(edm::Event const &, edm::EventSetup const &);
74  virtual void endJob() ;
75  std::string intToString(int num);
76  std::string floatToString(float num);
77  void initHists(int);
78  void initEvtByEvtHists(int naiveEvtNum_, int ievt);
79  void deleteEvtByEvtHists();
80  void initAllEventHistos();
82  EB_FINE = 0,
83  EB_COARSE = 1,
84  EEM_FINE = 2,
86  EEP_FINE = 4,
88  };
89  TH2F* init2DEcalHist(std::string histTypeName, int subDet);
90  TH3F* init3DEcalHist(std::string histTypeName, int dubDet);
91  TCanvas* init2DEcalCanvas(std::string canvasName);
93  int ievt, edm::ESHandle<CaloTopology> caloTopo);
94  TGraph* selectDigi(DetId det, int ievt);
95  int getEEIndex(EcalElectronicsId elecId);
99  void drawHistos();
100  void drawCanvas(TCanvas* canvas, TH1F* hist1, TH1F* hist2, TH1F* hist3);
101  void drawCanvas(TCanvas* canvas, TH2F* hist1, TH2F* hist2, TH2F* hist3);
102  void drawCanvas(TCanvas* canvas, TH3F* hist1, TH3F* hist2, TH3F* hist3);
103  void drawTimingErrors(TProfile2D* profile);
104  void drawEELines();
105 
106  // ----------member data ---------------------------
107 
113 
116 
117  int runNum_;
118  int side_;
119  double threshold_;
129 
130  std::set<EBDetId> listEBChannels;
131  std::set<EEDetId> listEEChannels;
132 
133  int abscissa[10];
134  int ordinate[10];
135 
136  static float gainRatio[3];
138 
139  std::vector<std::string>* names;
140  std::vector<std::string>* histoCanvasNamesVector;
141  std::vector<int> maskedChannels_;
142  std::vector<int> maskedFEDs_;
143  std::vector<int> seedCrys_;
144  std::vector<std::string> maskedEBs_;
145  std::map<int,TH1F*> FEDsAndTimingHists_;
146  std::map<int,float> crysAndAmplitudesMap_;
147  std::map<int,EcalDCCHeaderBlock> FEDsAndDCCHeaders_;
148  std::map<std::string,int> seedFrequencyMap_;
149 
151  // For event-by-evet histos
152  TH1F* timingEB_;
153  TH1F* timingEEM_;
154  TH1F* timingEEP_;
155  TH1F* energyEB_;
156  TH1F* energyEEM_;
157  TH1F* energyEEP_;
182  TCanvas* timingCanvas_;
183  TCanvas* energyCanvas_;
192 
193  // For all-event hitos
234 
235  TTree* canvasNames_;
239 
241 };
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)
def canvas
Definition: svgfig.py:481
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:20
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_
long long int num
Definition: procUtils.cc:71
void initEvtByEvtHists(int naiveEvtNum_, int ievt)
TCanvas * digiOccupancyCoarseCanvas_
std::vector< int > seedCrys_
edm::InputTag EERecHitCollection_
std::string floatToString(float num)
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:33