CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTNoiseCalibration.h
Go to the documentation of this file.
1 #ifndef DTNoiseCalibration_H
2 #define DTNoiseCalibration_H
3 
4 /*
5  * \file DTNoiseCalibration.h
6  *
7  * \author G. Mila - INFN Torino
8  * A. Vilela Pereira - INFN Torino
9  *
10 */
11 
17 
18 #include <string>
19 #include <vector>
20 #include <map>
21 #include <ctime>
22 
23 class DTGeometry;
24 class DTChamberId;
25 class DTSuperLayerId;
26 class DTLayerId;
27 class DTWireId;
28 class DTTtrig;
29 class TFile;
30 class TH2F;
31 class TH1F;
32 
33 class DTNoiseCalibration : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
34 public:
38  ~DTNoiseCalibration() override;
39 
40  void beginJob() override;
41  void beginRun(const edm::Run& run, const edm::EventSetup& setup) override;
42  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
43  void endRun(const edm::Run& run, const edm::EventSetup& setup) override{};
44  void endJob() override;
45 
46 private:
47  std::string getChannelName(const DTWireId&) const;
48  // Get the name of the layer
49  std::string getLayerName(const DTLayerId&) const;
50  // Get the name of the superLayer
52  // Get the name of the chamber
54 
57  double triggerWidth_;
61 
62  /*bool fastAnalysis;
63  int wh;
64  int sect;*/
65 
66  bool readDB_;
68 
69  std::vector<DTWireId> wireIdWithHisto_;
70  unsigned int lumiMax_;
71 
72  int nevents_;
73  //int counter;
74  time_t runBeginTime_;
75  time_t runEndTime_;
76 
77  // Get the DT Geometry
80 
81  // tTrig map
84 
85  TFile* rootFile_;
86  // TDC digi distribution
88  // Map of the occupancy histograms by layer
89  std::map<DTLayerId, TH1F*> theHistoOccupancyMap_;
90  // Map of occupancy by lumi by wire
91  std::map<DTWireId, TH1F*> theHistoOccupancyVsLumiMap_;
92  // Map of occupancy by lumi by chamber
93  std::map<DTChamberId, TH1F*> chamberOccupancyVsLumiMap_;
94  // Map of occupancy by time by chamber
95  std::map<DTChamberId, TH1F*> chamberOccupancyVsTimeMap_;
96  // Map of the histograms with the number of events per evt per wire
97  //std::map<DTLayerId, TH2F*> theHistoEvtPerWireMap_;
98  // Map of skipped histograms
99  //std::map<DTLayerId, int> skippedPlot;
100 };
101 #endif
const edm::EventSetup & c
void analyze(const edm::Event &e, const edm::EventSetup &c) override
edm::ESHandle< DTGeometry > dtGeom_
edm::InputTag digiLabel_
std::vector< DTWireId > wireIdWithHisto_
std::map< DTLayerId, TH1F * > theHistoOccupancyMap_
void beginJob() override
std::string getChannelName(const DTWireId &) const
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
std::map< DTChamberId, TH1F * > chamberOccupancyVsTimeMap_
std::string getChamberName(const DTChamberId &) const
std::map< DTChamberId, TH1F * > chamberOccupancyVsLumiMap_
~DTNoiseCalibration() override
Destructor.
std::string getLayerName(const DTLayerId &) const
std::map< DTWireId, TH1F * > theHistoOccupancyVsLumiMap_
DTNoiseCalibration(const edm::ParameterSet &ps)
Constructor.
void endRun(const edm::Run &run, const edm::EventSetup &setup) override
const edm::ESGetToken< DTTtrig, DTTtrigRcd > ttrigToken_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
void endJob() override
std::string getSuperLayerName(const DTSuperLayerId &) const
edm::ESHandle< DTTtrig > tTrigMap_
Definition: Run.h:45