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  * \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  virtual ~DTNoiseComputation();
44 
46  void beginJob() {}
47 
48  void beginRun(const edm::Run&, const edm::EventSetup& setup);
49 
50  void analyze(const edm::Event& event, const edm::EventSetup& setup) {}
51 
53  void endJob();
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
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:43
std::map< DTChamberId, TH1F * > AvNoiseIntegratedPerChamber