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
DTNoiseComputation::debug
bool debug
Definition: DTNoiseComputation.h:53
DTGeometry
Definition: DTGeometry.h:28
DTSuperLayerId
Definition: DTSuperLayerId.h:12
DTNoiseComputation::noisyC
std::map< std::pair< int, int >, TH1F * > noisyC
Definition: DTNoiseComputation.h:113
DTNoiseComputation::getYMaximum
double getYMaximum(const DTSuperLayerId &slId) const
Definition: DTNoiseComputation.cc:429
DTNoiseComputation::dtGeom
edm::ESHandle< DTGeometry > dtGeom
Definition: DTNoiseComputation.h:59
ESHandle.h
edm::Run
Definition: Run.h:45
DTLayerId.h
edm
HLT enums.
Definition: AlignableModifier.h:19
DTNoiseComputation::~DTNoiseComputation
~DTNoiseComputation() override
Destructor.
Definition: DTNoiseComputation.cc:376
EDAnalyzer.h
DTNoiseComputation::AvNoisePerChamber
std::map< DTChamberId, TH1F * > AvNoisePerChamber
Definition: DTNoiseComputation.h:95
DTNoiseComputation::getMaxNumBins
int getMaxNumBins(const DTChamberId &chId) const
Definition: DTNoiseComputation.cc:409
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
DTNoiseComputation::AvNoisePerSuperLayer
std::map< DTSuperLayerId, TH1F * > AvNoisePerSuperLayer
Definition: DTNoiseComputation.h:101
DTNoiseComputation::theTimeConstant
std::map< DTWireId, double > theTimeConstant
Definition: DTNoiseComputation.h:83
edm::ESHandle< DTGeometry >
Event
DTNoiseComputation::AvNoiseIntegratedPerChamber
std::map< DTChamberId, TH1F * > AvNoiseIntegratedPerChamber
Definition: DTNoiseComputation.h:98
DTChamberId.h
DTLayerId
Definition: DTLayerId.h:12
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTNoiseComputation::getChamberName
std::string getChamberName(const DTLayerId &lId) const
Get the name of the chamber.
Definition: DTNoiseComputation.cc:400
DTNoiseComputation::theNewFile
TFile * theNewFile
Definition: DTNoiseComputation.h:65
DTNoiseComputation::beginRun
void beginRun(const edm::Run &, const edm::EventSetup &setup) override
Definition: DTNoiseComputation.cc:62
DTNoiseComputation::endJob
void endJob() override
Endjob.
Definition: DTNoiseComputation.cc:214
DTNoiseComputation::counter
int counter
Definition: DTNoiseComputation.h:54
edm::ParameterSet
Definition: ParameterSet.h:47
DTNoiseComputation::MaxEvents
int MaxEvents
Definition: DTNoiseComputation.h:55
ParameterSet
Definition: Functions.h:16
DTNoiseComputation::theAverageNoise
std::map< DTWireId, double > theAverageNoise
Definition: DTNoiseComputation.h:71
DTNoiseComputation::DTNoiseComputation
DTNoiseComputation(const edm::ParameterSet &ps)
Constructor.
Definition: DTNoiseComputation.cc:41
DTNoiseComputation
Definition: DTNoiseComputation.h:33
DTNoiseComputation::someHowNoisyC
std::map< std::pair< int, int >, TH1F * > someHowNoisyC
Definition: DTNoiseComputation.h:116
edm::EventSetup
Definition: EventSetup.h:57
DTNoiseComputation::fastAnalysis
bool fastAnalysis
Definition: DTNoiseComputation.h:56
DTNoiseComputation::theEvtMap
std::map< DTLayerId, std::vector< TH2F * > > theEvtMap
Definition: DTNoiseComputation.h:74
DTNoiseComputation::analyze
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
Definition: DTNoiseComputation.h:46
DTWireId.h
DTNoiseComputation::AvNoiseIntegratedPerSuperLayer
std::map< DTSuperLayerId, TH1F * > AvNoiseIntegratedPerSuperLayer
Definition: DTNoiseComputation.h:104
EventSetup.h
DTNoiseComputation::beginJob
void beginJob() override
BeginJob.
Definition: DTNoiseComputation.h:42
DTNoiseComputation::getSuperLayerName
std::string getSuperLayerName(const DTSuperLayerId &slId) const
Get the name of the superLayer.
Definition: DTNoiseComputation.cc:391
DTChamberId
Definition: DTChamberId.h:14
EventSetup
DTNoiseComputation::theHistoEvtDistancePerWire
std::map< DTWireId, TH1F * > theHistoEvtDistancePerWire
Definition: DTNoiseComputation.h:77
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
DTNoiseComputation::toDel
std::map< DTWireId, bool > toDel
Definition: DTNoiseComputation.h:80
DTNoiseComputation::getLayerName
std::string getLayerName(const DTLayerId &lId) const
Get the name of the layer.
Definition: DTNoiseComputation.cc:381
DTNoiseComputation::toComputeNoiseAverage
std::map< DTLayerId, bool > toComputeNoiseAverage
Definition: DTNoiseComputation.h:68
DTNoiseComputation::theFile
TFile * theFile
Definition: DTNoiseComputation.h:62