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 
19 
20 #include <string>
21 #include <map>
22 #include <vector>
23 
24 namespace edm {
25  class ParameterSet;
26  class Event;
27  class EventSetup;
28 }
29 
30 class DTGeometry;
31 class TFile;
32 class TH2F;
33 class TH1F;
34 
36 
37  public:
38 
41 
43  ~DTNoiseComputation() override;
44 
46  void beginJob() override {}
47 
48  void beginRun(const edm::Run&, const edm::EventSetup& setup) override;
49 
50  void analyze(const edm::Event& event, const edm::EventSetup& setup) override {}
51 
53  void endJob() override;
54 
55 
56 protected:
57 
58 private:
59 
60  bool debug;
61  int counter;
62  int MaxEvents;
64 
65  // Get the DT Geometry
67 
68  // The file which contain the occupancy plot and the digi event plot
69  TFile *theFile;
70 
71  // The file which will contain the occupancy plot and the digi event plot
72  TFile *theNewFile;
73 
74  // Map of label to compute the average noise per layer
75  std::map<DTLayerId , bool> toComputeNoiseAverage;
76 
77  // Map of the average noise per layer
78  std::map<DTWireId , double> theAverageNoise;
79 
80  // Map of the histograms with the number of events per evt per wire
81  std::map<DTLayerId, std::vector<TH2F*> > theEvtMap;
82 
83  // map of histos with the distance of event per wire
84  std::map<DTWireId, TH1F*> theHistoEvtDistancePerWire;
85 
86  // Map of label for analysis histos
87  std::map<DTWireId , bool> toDel;
88 
89  // Map of the Time Constants per wire
90  std::map<DTWireId , double> theTimeConstant;
91 
93  std::string getLayerName(const DTLayerId& lId) const;
94 
96  std::string getSuperLayerName(const DTSuperLayerId& slId) const;
97 
99  std::string getChamberName(const DTLayerId& lId) const;
100 
101  // map of histos with the average noise per chamber
102  std::map<DTChamberId, TH1F*> AvNoisePerChamber;
103 
104  // map of histos with the average integrated noise per chamber
105  std::map<DTChamberId, TH1F*> AvNoiseIntegratedPerChamber;
106 
107  // map of histos with the average noise per SuperLayer
108  std::map<DTSuperLayerId, TH1F*> AvNoisePerSuperLayer;
109 
110  // map of histos with the average integrated noise per SuperLayer
111  std::map<DTSuperLayerId, TH1F*> AvNoiseIntegratedPerSuperLayer;
112 
113  // get the maximum bin number
114  int getMaxNumBins(const DTChamberId& chId) const;
115 
116  // get the Y axis maximum
117  double getYMaximum(const DTSuperLayerId& slId) const;
118 
119  // map of noisy cell occupancy
120  std::map< std::pair<int,int> , TH1F*> noisyC;
121 
122  // map of somehow noisy cell occupancy
123  std::map< std::pair<int,int> , TH1F*> someHowNoisyC;
124 
125 };
126 #endif
std::map< DTLayerId, bool > toComputeNoiseAverage
std::map< DTWireId, bool > toDel
std::map< std::pair< int, int >, TH1F * > someHowNoisyC
edm::ESHandle< DTGeometry > dtGeom
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
std::map< DTLayerId, std::vector< TH2F * > > theEvtMap
std::map< std::pair< int, int >, TH1F * > noisyC
std::map< DTWireId, TH1F * > theHistoEvtDistancePerWire
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
std::map< DTChamberId, TH1F * > AvNoisePerChamber
std::map< DTSuperLayerId, TH1F * > AvNoiseIntegratedPerSuperLayer
void beginJob() override
BeginJob.
HLT enums.
std::map< DTSuperLayerId, TH1F * > AvNoisePerSuperLayer
std::map< DTWireId, double > theAverageNoise
std::map< DTWireId, double > theTimeConstant
Definition: event.py:1
Definition: Run.h:43
std::map< DTChamberId, TH1F * > AvNoiseIntegratedPerChamber