CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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  * $Date: 2010/01/19 09:51:31 $
8  * $Revision: 1.4 $
9  * \author G. Mila - INFN Torino
10  *
11 */
12 
19 
20 
21 
22 #include <string>
23 #include <map>
24 #include <vector>
25 
26 namespace edm {
27  class ParameterSet;
28  class Event;
29  class EventSetup;
30 }
31 
32 class DTGeometry;
33 class TFile;
34 class TH2F;
35 class TH1F;
36 
38 
39  public:
40 
43 
45  virtual ~DTNoiseComputation();
46 
48  void beginJob() {}
49 
50  void beginRun(const edm::Run&, const edm::EventSetup& setup);
51 
52  void analyze(const edm::Event& event, const edm::EventSetup& setup) {}
53 
55  void endJob();
56 
57 
58 protected:
59 
60 private:
61 
62  bool debug;
63  int counter;
64  int MaxEvents;
66 
67  // Get the DT Geometry
69 
70  // The file which contain the occupancy plot and the digi event plot
71  TFile *theFile;
72 
73  // The file which will contain the occupancy plot and the digi event plot
74  TFile *theNewFile;
75 
76  // Map of label to compute the average noise per layer
77  std::map<DTLayerId , bool> toComputeNoiseAverage;
78 
79  // Map of the average noise per layer
80  std::map<DTWireId , double> theAverageNoise;
81 
82  // Map of the histograms with the number of events per evt per wire
83  std::map<DTLayerId, std::vector<TH2F*> > theEvtMap;
84 
85  // map of histos with the distance of event per wire
86  std::map<DTWireId, TH1F*> theHistoEvtDistancePerWire;
87 
88  // Map of label for analysis histos
89  std::map<DTWireId , bool> toDel;
90 
91  // Map of the Time Constants per wire
92  std::map<DTWireId , double> theTimeConstant;
93 
95  std::string getLayerName(const DTLayerId& lId) const;
96 
98  std::string getSuperLayerName(const DTSuperLayerId& slId) const;
99 
101  std::string getChamberName(const DTLayerId& lId) const;
102 
103  // map of histos with the average noise per chamber
104  std::map<DTChamberId, TH1F*> AvNoisePerChamber;
105 
106  // map of histos with the average integrated noise per chamber
107  std::map<DTChamberId, TH1F*> AvNoiseIntegratedPerChamber;
108 
109  // map of histos with the average noise per SuperLayer
110  std::map<DTSuperLayerId, TH1F*> AvNoisePerSuperLayer;
111 
112  // map of histos with the average integrated noise per SuperLayer
113  std::map<DTSuperLayerId, TH1F*> AvNoiseIntegratedPerSuperLayer;
114 
115  // get the maximum bin number
116  int getMaxNumBins(const DTChamberId& chId) const;
117 
118  // get the Y axis maximum
119  double getYMaximum(const DTSuperLayerId& slId) const;
120 
121  // map of noisy cell occupancy
122  std::map< std::pair<int,int> , TH1F*> noisyC;
123 
124  // map of somehow noisy cell occupancy
125  std::map< std::pair<int,int> , TH1F*> someHowNoisyC;
126 
127 };
128 #endif
DTNoiseComputation(const edm::ParameterSet &ps)
Constructor.
int getMaxNumBins(const DTChamberId &chId) const
std::map< DTLayerId, bool > toComputeNoiseAverage
std::map< DTWireId, bool > toDel
std::map< std::pair< int, int >, TH1F * > someHowNoisyC
double getYMaximum(const DTSuperLayerId &slId) const
void beginRun(const edm::Run &, const edm::EventSetup &setup)
edm::ESHandle< DTGeometry > dtGeom
std::map< DTLayerId, std::vector< TH2F * > > theEvtMap
std::string getChamberName(const DTLayerId &lId) const
Get the name of the chamber.
void beginJob()
BeginJob.
std::map< std::pair< int, int >, TH1F * > noisyC
std::map< DTWireId, TH1F * > theHistoEvtDistancePerWire
void analyze(const edm::Event &event, const edm::EventSetup &setup)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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< DTSuperLayerId, TH1F * > AvNoisePerSuperLayer
std::string getSuperLayerName(const DTSuperLayerId &slId) const
Get the name of the superLayer.
virtual ~DTNoiseComputation()
Destructor.
std::map< DTWireId, double > theAverageNoise
std::map< DTWireId, double > theTimeConstant
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Definition: Run.h:33
std::map< DTChamberId, TH1F * > AvNoiseIntegratedPerChamber