CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/DQM/DTMonitorModule/src/DTNoiseTask.h

Go to the documentation of this file.
00001 #ifndef DTNoiseTask_H
00002 #define DTNoiseTask_H
00003 
00012 #include <FWCore/Framework/interface/EDAnalyzer.h>
00013 #include "DQMServices/Core/interface/DQMStore.h"
00014 #include "DQMServices/Core/interface/MonitorElement.h"
00015 
00016 #include <DataFormats/MuonDetId/interface/DTChamberId.h>
00017 #include <DataFormats/MuonDetId/interface/DTSuperLayerId.h>
00018 #include <FWCore/Framework/interface/ESHandle.h>
00019 #include "FWCore/Utilities/interface/InputTag.h"
00020 
00021 
00022 namespace edm {
00023   class ParameterSet;
00024   class EventSetup;
00025   class Event;
00026 }
00027 
00028 class DQMStore;
00029 class DTGeometry;
00030 
00031 
00032 class DTNoiseTask : public edm::EDAnalyzer {
00033 public:
00035   DTNoiseTask(const edm::ParameterSet& ps);
00036 
00038   virtual ~DTNoiseTask();
00039 
00040   // Operations
00041 
00042 protected:
00044   void beginJob();
00045 
00046   void beginRun(const edm::Run&, const edm::EventSetup&);
00047 
00048   void beginLuminosityBlock(const edm::LuminosityBlock&  lumiSeg, const edm::EventSetup& context);
00049   void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& setup);
00050   
00051 
00053   void analyze(const edm::Event& e, const edm::EventSetup& c);
00054   
00056   void endJob();
00057 
00058 private:
00059   
00060   void bookHistos(DTChamberId chId);
00061   void bookHistos(DTSuperLayerId slId);
00062 
00063   // The label to retrieve the digis 
00064   edm::InputTag dtDigiLabel;
00065   // counter of processed events
00066   int evtNumber;
00067   //switch for time boxes filling
00068   bool doTimeBoxHistos;
00069   // Lable of 4D segments in the event
00070   std::string theRecHits4DLabel;
00071   //switch for segment veto
00072   bool doSegmentVeto;
00073 
00074   DQMStore *dbe;
00075   edm::ESHandle<DTGeometry> dtGeom;
00076 
00077   //tTrig map per Station
00078   std::map<DTChamberId, double> tTrigStMap;
00079 
00080   //the noise histos (Hz)
00081   std::map<DTChamberId, MonitorElement*> noiseHistos;
00082 
00083   //map for histo normalization
00084   std::map<DTChamberId, int> mapEvt;
00085 
00086   //the time boxes
00087   std::map<DTSuperLayerId, MonitorElement*> tbHistos;
00088 
00089   MonitorElement* nEventMonitor;
00090 
00091   // safe margin (ns) between ttrig and beginning of counting area
00092   double safeMargin;
00093 
00094 };
00095 #endif
00096