![]() |
![]() |
00001 #ifndef DTNoiseCalibration_H 00002 #define DTNoiseCalibration_H 00003 00004 /* 00005 * \file DTNoiseCalibration.h 00006 * 00007 * $Date: 2011/05/25 21:03:56 $ 00008 * $Revision: 1.10 $ 00009 * \author G. Mila - INFN Torino 00010 * 00011 */ 00012 00013 #include "FWCore/Framework/interface/EDAnalyzer.h" 00014 #include "FWCore/Framework/interface/ESHandle.h" 00015 #include "FWCore/Utilities/interface/InputTag.h" 00016 00017 #include <string> 00018 #include <vector> 00019 #include <map> 00020 00021 class DTGeometry; 00022 class DTSuperLayerId; 00023 class DTLayerId; 00024 class DTWireId; 00025 class DTTtrig; 00026 class TFile; 00027 class TH2F; 00028 class TH1F; 00029 00030 class DTNoiseCalibration: public edm::EDAnalyzer{ 00031 00032 public: 00034 DTNoiseCalibration(const edm::ParameterSet& ps); 00036 virtual ~DTNoiseCalibration(); 00037 00038 void beginJob(); 00039 void beginRun(const edm::Run& run, const edm::EventSetup& setup ); 00040 void analyze(const edm::Event& e, const edm::EventSetup& c); 00041 void endJob(); 00042 00043 private: 00044 std::string getChannelName(const DTWireId& wId) const; 00045 // Get the name of the layer 00046 std::string getLayerName(const DTLayerId& lId) const; 00047 // Get the name of the superLayer 00048 std::string getSuperLayerName(const DTSuperLayerId& dtSLId) const; 00049 00050 edm::InputTag digiLabel_; 00051 bool useTimeWindow_; 00052 int triggerWidth_; 00053 int timeWindowOffset_; 00054 double maximumNoiseRate_; 00055 bool useAbsoluteRate_; 00056 00057 /*bool fastAnalysis; 00058 int wh; 00059 int sect;*/ 00060 00061 bool readDB_; 00062 int defaultTtrig_; 00063 std::string dbLabel_; 00064 00065 std::vector<DTWireId> wireIdWithHisto_; 00066 unsigned int lumiMax_; 00067 00068 int nevents_; 00069 //int counter; 00070 00071 // Get the DT Geometry 00072 edm::ESHandle<DTGeometry> dtGeom_; 00073 // tTrig map 00074 edm::ESHandle<DTTtrig> tTrigMap_; 00075 00076 TFile* rootFile_; 00077 // TDC digi distribution 00078 TH1F* hTDCTriggerWidth_; 00079 // Map of the occupancy histograms by layer 00080 std::map<DTLayerId, TH1F*> theHistoOccupancyMap_; 00081 // Map of occupancy by lumi by wire 00082 std::map<DTWireId, TH1F*> theHistoOccupancyVsLumiMap_; 00083 // Map of the histograms with the number of events per evt per wire 00084 //std::map<DTLayerId, TH2F*> theHistoEvtPerWireMap_; 00085 // Map of skipped histograms 00086 //std::map<DTLayerId, int> skippedPlot; 00087 }; 00088 #endif