CMS 3D CMS Logo

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 
18 
19 #include <string>
20 #include <vector>
21 #include <map>
22 #include <ctime>
23 
24 class DTGeometry;
25 class DTChamberId;
26 class DTSuperLayerId;
27 class DTLayerId;
28 class DTWireId;
29 class DTTtrig;
30 class TFile;
31 class TH2F;
32 class TH1F;
33 
34 class DTNoiseCalibration : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
35 public:
39  ~DTNoiseCalibration() override;
40 
41  void beginJob() override;
42  void beginRun(const edm::Run& run, const edm::EventSetup& setup) override;
43  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
44  void endRun(const edm::Run& run, const edm::EventSetup& setup) override{};
45  void endJob() override;
46 
47 private:
48  std::string getChannelName(const DTWireId&) const;
49  // Get the name of the layer
50  std::string getLayerName(const DTLayerId&) const;
51  // Get the name of the superLayer
53  // Get the name of the chamber
55 
57  const bool useTimeWindow_;
58  const double triggerWidth_;
59  const int timeWindowOffset_;
60  const double maximumNoiseRate_;
61  const bool useAbsoluteRate_;
62 
63  bool readDB_;
65 
66  std::vector<DTWireId> wireIdWithHisto_;
67  unsigned int lumiMax_;
68 
69  int nevents_;
70  //int counter;
71  time_t runBeginTime_;
72  time_t runEndTime_;
73 
74  // Get the DT Geometry
77 
78  // tTrig map
81 
82  TFile* rootFile_;
83  // TDC digi distribution
85  // Map of the occupancy histograms by layer
86  std::map<DTLayerId, TH1F*> theHistoOccupancyMap_;
87  // Map of occupancy by lumi by wire
88  std::map<DTWireId, TH1F*> theHistoOccupancyVsLumiMap_;
89  // Map of occupancy by lumi by chamber
90  std::map<DTChamberId, TH1F*> chamberOccupancyVsLumiMap_;
91  // Map of occupancy by time by chamber
92  std::map<DTChamberId, TH1F*> chamberOccupancyVsTimeMap_;
93 };
94 #endif
const double triggerWidth_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
edm::ESHandle< DTGeometry > dtGeom_
std::vector< DTWireId > wireIdWithHisto_
std::map< DTLayerId, TH1F * > theHistoOccupancyMap_
void beginJob() override
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
std::map< DTChamberId, TH1F * > chamberOccupancyVsTimeMap_
std::map< DTChamberId, TH1F * > chamberOccupancyVsLumiMap_
~DTNoiseCalibration() override
Destructor.
std::string getChamberName(const DTChamberId &) const
std::map< DTWireId, TH1F * > theHistoOccupancyVsLumiMap_
DTNoiseCalibration(const edm::ParameterSet &ps)
Constructor.
std::string getSuperLayerName(const DTSuperLayerId &) const
const double maximumNoiseRate_
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
const edm::EDGetTokenT< DTDigiCollection > digiToken_
edm::ESHandle< DTTtrig > tTrigMap_
Definition: Run.h:45
std::string getChannelName(const DTWireId &) const
std::string getLayerName(const DTLayerId &) const