![]() |
![]() |
00001 #ifndef DTNoiseCalibration_H 00002 #define DTNoiseCalibration_H 00003 00004 /* 00005 * \file DTNoiseCalibration.h 00006 * 00007 * $Date: 2010/07/19 22:17:25 $ 00008 * $Revision: 1.9 $ 00009 * \author G. Mila - INFN Torino 00010 * 00011 */ 00012 00013 #include "FWCore/Framework/interface/EDAnalyzer.h" 00014 #include "DataFormats/MuonDetId/interface/DTLayerId.h" 00015 #include "FWCore/Framework/interface/ESHandle.h" 00016 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00017 00018 #include <string> 00019 #include <map> 00020 #include <vector> 00021 00022 namespace edm { 00023 class Event; 00024 class EventSetup; 00025 } 00026 00027 class DTGeometry; 00028 class DTTtrig; 00029 class TFile; 00030 class TH2F; 00031 class TH1F; 00032 00033 class DTNoiseCalibration: public edm::EDAnalyzer{ 00034 00035 public: 00036 00038 DTNoiseCalibration(const edm::ParameterSet& ps); 00039 00041 virtual ~DTNoiseCalibration(); 00042 00043 virtual void beginRun(const edm::Run& run, const edm::EventSetup& setup ); 00044 00046 void analyze(const edm::Event& e, const edm::EventSetup& c); 00047 00049 void endJob(); 00050 00051 00052 protected: 00053 00054 private: 00055 00056 bool debug; 00057 int nevents; 00058 int counter; 00059 00061 int TriggerWidth; 00062 float upperLimit; 00063 bool cosmicRun; 00064 bool fastAnalysis; 00065 int wh; 00066 int sect; 00067 00069 float tTrig; 00070 float tTrigRMS; 00071 float kFactor; 00072 00073 double theOffset; 00074 00075 std::string dbLabel; 00076 00077 // The label used to retrieve digis from the event 00078 std::string digiLabel; 00079 00080 edm::ParameterSet parameters; 00081 00082 // TDC digi distribution 00083 TH1F *hTDCTriggerWidth; 00084 00085 // Get the DT Geometry 00086 edm::ESHandle<DTGeometry> dtGeom; 00087 00088 // Get the tTrigMap 00089 edm::ESHandle<DTTtrig> tTrigMap; 00090 00091 // The file which will contain the occupancy plot and the digi event plot 00092 TFile *theFile; 00093 00094 // Map of the histograms with the number of events per evt per wire 00095 std::map<DTLayerId, TH2F*> theHistoEvtPerWireMap; 00096 00097 // Map of the occupancy histograms by layer 00098 std::map<DTLayerId, TH1F*> theHistoOccupancyMap; 00099 00100 // Map of skipped histograms 00101 std::map<DTLayerId, int> skippedPlot; 00102 00104 std::string getLayerName(const DTLayerId& lId) const; 00105 00107 std::string getSuperLayerName(const DTSuperLayerId& dtSLId) const; 00108 }; 00109 #endif