CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
18 
19 #include <string>
20 #include <map>
21 #include <vector>
22 
23 namespace edm {
24  class ParameterSet;
25  class Event;
26  class EventSetup;
27 } // namespace edm
28 
29 class DTGeometry;
30 class TFile;
31 class TH2F;
32 class TH1F;
33 
35 public:
38 
40  ~DTNoiseComputation() override;
41 
43  void beginJob() override {}
44 
45  void beginRun(const edm::Run&, const edm::EventSetup& setup) override;
46 
47  void analyze(const edm::Event& event, const edm::EventSetup& setup) override {}
48 
50  void endJob() override;
51 
52 protected:
53 private:
54  bool debug;
55  int counter;
56  int MaxEvents;
58 
59  // Get the DT Geometry
62 
63  // The file which contain the occupancy plot and the digi event plot
64  TFile* theFile;
65 
66  // The file which will contain the occupancy plot and the digi event plot
67  TFile* theNewFile;
68 
69  // Map of label to compute the average noise per layer
70  std::map<DTLayerId, bool> toComputeNoiseAverage;
71 
72  // Map of the average noise per layer
73  std::map<DTWireId, double> theAverageNoise;
74 
75  // Map of the histograms with the number of events per evt per wire
76  std::map<DTLayerId, std::vector<TH2F*> > theEvtMap;
77 
78  // map of histos with the distance of event per wire
79  std::map<DTWireId, TH1F*> theHistoEvtDistancePerWire;
80 
81  // Map of label for analysis histos
82  std::map<DTWireId, bool> toDel;
83 
84  // Map of the Time Constants per wire
85  std::map<DTWireId, double> theTimeConstant;
86 
88  std::string getLayerName(const DTLayerId& lId) const;
89 
91  std::string getSuperLayerName(const DTSuperLayerId& slId) const;
92 
94  std::string getChamberName(const DTLayerId& lId) const;
95 
96  // map of histos with the average noise per chamber
97  std::map<DTChamberId, TH1F*> AvNoisePerChamber;
98 
99  // map of histos with the average integrated noise per chamber
100  std::map<DTChamberId, TH1F*> AvNoiseIntegratedPerChamber;
101 
102  // map of histos with the average noise per SuperLayer
103  std::map<DTSuperLayerId, TH1F*> AvNoisePerSuperLayer;
104 
105  // map of histos with the average integrated noise per SuperLayer
106  std::map<DTSuperLayerId, TH1F*> AvNoiseIntegratedPerSuperLayer;
107 
108  // get the maximum bin number
109  int getMaxNumBins(const DTChamberId& chId) const;
110 
111  // get the Y axis maximum
112  double getYMaximum(const DTSuperLayerId& slId) const;
113 
114  // map of noisy cell occupancy
115  std::map<std::pair<int, int>, TH1F*> noisyC;
116 
117  // map of somehow noisy cell occupancy
118  std::map<std::pair<int, int>, TH1F*> someHowNoisyC;
119 };
120 #endif
DTNoiseComputation(const edm::ParameterSet &ps)
Constructor.
int getMaxNumBins(const DTChamberId &chId) const
double getYMaximum(const DTSuperLayerId &slId) const
edm::ESHandle< DTGeometry > dtGeom
std::map< DTLayerId, std::vector< TH2F * > > theEvtMap
std::string getChamberName(const DTLayerId &lId) const
Get the name of the chamber.
std::map< DTWireId, TH1F * > theHistoEvtDistancePerWire
std::map< DTWireId, bool > toDel
void endJob() override
Endjob.
std::map< std::pair< int, int >, TH1F * > noisyC
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
std::map< DTWireId, double > theAverageNoise
~DTNoiseComputation() override
Destructor.
std::map< DTChamberId, TH1F * > AvNoisePerChamber
std::map< DTSuperLayerId, TH1F * > AvNoiseIntegratedPerSuperLayer
std::string getLayerName(const DTLayerId &lId) const
Get the name of the layer.
std::map< std::pair< int, int >, TH1F * > someHowNoisyC
void beginJob() override
BeginJob.
std::map< DTSuperLayerId, TH1F * > AvNoisePerSuperLayer
std::string getSuperLayerName(const DTSuperLayerId &slId) const
Get the name of the superLayer.
std::map< DTLayerId, bool > toComputeNoiseAverage
std::map< DTWireId, double > theTimeConstant
void beginRun(const edm::Run &, const edm::EventSetup &setup) override
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
Definition: Run.h:45
std::map< DTChamberId, TH1F * > AvNoiseIntegratedPerChamber