Go to the documentation of this file.00001 #ifndef DTNoiseComputation_H
00002 #define DTNoiseComputation_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include <FWCore/Framework/interface/EDAnalyzer.h>
00014 #include <FWCore/Framework/interface/EventSetup.h>
00015 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
00016 #include "DataFormats/MuonDetId/interface/DTWireId.h"
00017 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
00018 #include <FWCore/Framework/interface/ESHandle.h>
00019
00020
00021
00022 #include <string>
00023 #include <map>
00024 #include <vector>
00025
00026 namespace edm {
00027 class ParameterSet;
00028 class Event;
00029 class EventSetup;
00030 }
00031
00032 class DTGeometry;
00033 class TFile;
00034 class TH2F;
00035 class TH1F;
00036
00037 class DTNoiseComputation: public edm::EDAnalyzer{
00038
00039 public:
00040
00042 DTNoiseComputation(const edm::ParameterSet& ps);
00043
00045 virtual ~DTNoiseComputation();
00046
00048 void beginJob() {}
00049
00050 void beginRun(const edm::Run&, const edm::EventSetup& setup);
00051
00052 void analyze(const edm::Event& event, const edm::EventSetup& setup) {}
00053
00055 void endJob();
00056
00057
00058 protected:
00059
00060 private:
00061
00062 bool debug;
00063 int counter;
00064 int MaxEvents;
00065 bool fastAnalysis;
00066
00067
00068 edm::ESHandle<DTGeometry> dtGeom;
00069
00070
00071 TFile *theFile;
00072
00073
00074 TFile *theNewFile;
00075
00076
00077 std::map<DTLayerId , bool> toComputeNoiseAverage;
00078
00079
00080 std::map<DTWireId , double> theAverageNoise;
00081
00082
00083 std::map<DTLayerId, std::vector<TH2F*> > theEvtMap;
00084
00085
00086 std::map<DTWireId, TH1F*> theHistoEvtDistancePerWire;
00087
00088
00089 std::map<DTWireId , bool> toDel;
00090
00091
00092 std::map<DTWireId , double> theTimeConstant;
00093
00095 std::string getLayerName(const DTLayerId& lId) const;
00096
00098 std::string getSuperLayerName(const DTSuperLayerId& slId) const;
00099
00101 std::string getChamberName(const DTLayerId& lId) const;
00102
00103
00104 std::map<DTChamberId, TH1F*> AvNoisePerChamber;
00105
00106
00107 std::map<DTChamberId, TH1F*> AvNoiseIntegratedPerChamber;
00108
00109
00110 std::map<DTSuperLayerId, TH1F*> AvNoisePerSuperLayer;
00111
00112
00113 std::map<DTSuperLayerId, TH1F*> AvNoiseIntegratedPerSuperLayer;
00114
00115
00116 int getMaxNumBins(const DTChamberId& chId) const;
00117
00118
00119 double getYMaximum(const DTSuperLayerId& slId) const;
00120
00121
00122 std::map< std::pair<int,int> , TH1F*> noisyC;
00123
00124
00125 std::map< std::pair<int,int> , TH1F*> someHowNoisyC;
00126
00127 };
00128 #endif