CMS 3D CMS Logo

DTNoiseComputation.h
Go to the documentation of this file.
1 #ifndef DTNoiseComputation_H
2 #define DTNoiseComputation_H
3 
4 /*
5  * \file DTNoiseComputation.h
6  *
7  * \author G. Mila - INFN Torino
8  *
9 */
10 
17 
18 #include <string>
19 #include <map>
20 #include <vector>
21 
22 namespace edm {
23  class ParameterSet;
24  class Event;
25  class EventSetup;
26 } // namespace edm
27 
28 class DTGeometry;
29 class TFile;
30 class TH2F;
31 class TH1F;
32 
34 public:
37 
39  ~DTNoiseComputation() override;
40 
42  void beginJob() override {}
43 
44  void beginRun(const edm::Run&, const edm::EventSetup& setup) override;
45 
46  void analyze(const edm::Event& event, const edm::EventSetup& setup) override {}
47 
49  void endJob() override;
50 
51 protected:
52 private:
53  bool debug;
54  int counter;
55  int MaxEvents;
57 
58  // Get the DT Geometry
60 
61  // The file which contain the occupancy plot and the digi event plot
62  TFile* theFile;
63 
64  // The file which will contain the occupancy plot and the digi event plot
65  TFile* theNewFile;
66 
67  // Map of label to compute the average noise per layer
68  std::map<DTLayerId, bool> toComputeNoiseAverage;
69 
70  // Map of the average noise per layer
71  std::map<DTWireId, double> theAverageNoise;
72 
73  // Map of the histograms with the number of events per evt per wire
74  std::map<DTLayerId, std::vector<TH2F*> > theEvtMap;
75 
76  // map of histos with the distance of event per wire
77  std::map<DTWireId, TH1F*> theHistoEvtDistancePerWire;
78 
79  // Map of label for analysis histos
80  std::map<DTWireId, bool> toDel;
81 
82  // Map of the Time Constants per wire
83  std::map<DTWireId, double> theTimeConstant;
84 
86  std::string getLayerName(const DTLayerId& lId) const;
87 
89  std::string getSuperLayerName(const DTSuperLayerId& slId) const;
90 
92  std::string getChamberName(const DTLayerId& lId) const;
93 
94  // map of histos with the average noise per chamber
95  std::map<DTChamberId, TH1F*> AvNoisePerChamber;
96 
97  // map of histos with the average integrated noise per chamber
98  std::map<DTChamberId, TH1F*> AvNoiseIntegratedPerChamber;
99 
100  // map of histos with the average noise per SuperLayer
101  std::map<DTSuperLayerId, TH1F*> AvNoisePerSuperLayer;
102 
103  // map of histos with the average integrated noise per SuperLayer
104  std::map<DTSuperLayerId, TH1F*> AvNoiseIntegratedPerSuperLayer;
105 
106  // get the maximum bin number
107  int getMaxNumBins(const DTChamberId& chId) const;
108 
109  // get the Y axis maximum
110  double getYMaximum(const DTSuperLayerId& slId) const;
111 
112  // map of noisy cell occupancy
113  std::map<std::pair<int, int>, TH1F*> noisyC;
114 
115  // map of somehow noisy cell occupancy
116  std::map<std::pair<int, int>, TH1F*> someHowNoisyC;
117 };
118 #endif
edm::ESHandle< DTGeometry > dtGeom
std::map< DTLayerId, std::vector< TH2F * > > theEvtMap
std::map< DTWireId, TH1F * > theHistoEvtDistancePerWire
std::map< DTWireId, bool > toDel
std::map< std::pair< int, int >, TH1F * > noisyC
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
std::map< DTWireId, double > theAverageNoise
std::map< DTChamberId, TH1F * > AvNoisePerChamber
std::map< DTSuperLayerId, TH1F * > AvNoiseIntegratedPerSuperLayer
std::map< std::pair< int, int >, TH1F * > someHowNoisyC
void beginJob() override
BeginJob.
HLT enums.
std::map< DTSuperLayerId, TH1F * > AvNoisePerSuperLayer
std::map< DTLayerId, bool > toComputeNoiseAverage
std::map< DTWireId, double > theTimeConstant
Definition: event.py:1
Definition: Run.h:45
std::map< DTChamberId, TH1F * > AvNoiseIntegratedPerChamber