CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DQM/DTMonitorModule/src/DTSegmentAnalysisTask.h

Go to the documentation of this file.
00001 
00002 #ifndef DTSegmentAnalysisTask_H
00003 #define DTSegmentAnalysisTask_H
00004 
00020 #include "FWCore/Framework/interface/Frameworkfwd.h"
00021 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 #include <FWCore/Framework/interface/EDAnalyzer.h>
00024 #include <FWCore/Framework/interface/ESHandle.h>
00025 
00026 #include <string>
00027 #include <map>
00028 #include <vector>
00029 
00030 
00031 class DTGeometry;
00032 class DQMStore;
00033 class MonitorElement;
00034 class DTTimeEvolutionHisto;
00035 
00036 class DTSegmentAnalysisTask: public edm::EDAnalyzer{
00037 
00038 
00039 public:
00041   DTSegmentAnalysisTask(const edm::ParameterSet& pset);
00042 
00044   virtual ~DTSegmentAnalysisTask();
00045 
00047   void beginRun(const edm::Run& , const edm::EventSetup&);
00048 
00050   void endJob();
00051 
00052   // Operations
00053   void analyze(const edm::Event& event, const edm::EventSetup& setup);
00054 
00056   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& eSetup);
00057   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& eSetup);
00058 
00059 
00060 protected:
00061 
00062 
00063 private:
00064 
00065   // The BE interface
00066   DQMStore* theDbe;
00067 
00068   // Switch for detailed analysis
00069   bool detailedAnalysis;
00070 
00071    // Get the DT Geometry
00072   edm::ESHandle<DTGeometry> dtGeom;
00073 
00074   // Lable of 4D segments in the event
00075   std::string theRecHits4DLabel;
00076 
00077   // Get the map of noisy channels
00078   bool checkNoisyChannels;
00079 
00080   edm::ParameterSet parameters;
00081  
00082   // book the histos
00083   void bookHistos(DTChamberId chamberId);
00084   // Fill a set of histograms for a given chamber 
00085   void fillHistos(DTChamberId chamberId,
00086                   int nHits,
00087                   float chi2);
00088   
00089   //  the histos
00090   std::map<DTChamberId, std::vector<MonitorElement*> > histosPerCh;
00091   std::map< int, MonitorElement* > summaryHistos;
00092   std::map<int, std::map<int, DTTimeEvolutionHisto*> > histoTimeEvol;
00093 
00094   int nevents;
00095   int nEventsInLS;
00096   DTTimeEvolutionHisto*hNevtPerLS;
00097 
00098   // # of bins in the time histos
00099   int nTimeBins;
00100   // # of LS per bin in the time histos
00101   int nLSTimeBin; 
00102   // switch on/off sliding bins in time histos
00103   bool slideTimeBins;
00104   // top folder for the histograms in DQMStore
00105   std::string topHistoFolder;
00106   // hlt DQM mode
00107   bool hltDQMMode;
00108   // max phi angle of reconstructed segments 
00109   double phiSegmCut;
00110   // min # hits of segment used to validate a segment in WB+-2/SecX/MB1 
00111   int nhitsCut; 
00112 
00113   MonitorElement* nEventMonitor;
00114 
00115 };
00116 #endif
00117