CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DQM/DTMonitorModule/src/DTChamberEfficiencyTask.h

Go to the documentation of this file.
00001 #ifndef DTChamberEfficiencyTask_H
00002 #define DTChamberEfficiencyTask_H
00003 
00004 
00020 #include "FWCore/Framework/interface/Frameworkfwd.h"
00021 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 #include <FWCore/Framework/interface/EDAnalyzer.h>
00024 #include <FWCore/Framework/interface/LuminosityBlock.h>
00025 
00026 #include "Geometry/DTGeometry/interface/DTGeometry.h"
00027 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
00028 #include "DataFormats/Common/interface/Handle.h"
00029 #include "FWCore/Framework/interface/ESHandle.h"
00030 
00031 #include <string>
00032 #include <map>
00033 #include <vector>
00034 
00035 class DQMStore;
00036 class MonitorElement;
00037 
00038 
00039 class DTChamberEfficiencyTask: public edm::EDAnalyzer{
00040 public:
00042   DTChamberEfficiencyTask(const edm::ParameterSet& pset);
00043 
00045   virtual ~DTChamberEfficiencyTask();
00046 
00048   void beginJob();
00049 
00051   void beginRun(const edm::Run& run, const edm::EventSetup& setup);
00052 
00054   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00055 
00057   void endJob();
00058 
00059   // Operations
00060   void analyze(const edm::Event& event, const edm::EventSetup& setup);
00061 
00062 protected:
00063 
00064 
00065 private:
00066 
00067   const DTRecSegment4D& getBestSegment(const DTRecSegment4DCollection::range& segs) const;
00068   const DTRecSegment4D* getBestSegment(const DTRecSegment4D* s1,
00069                                        const DTRecSegment4D* s2) const;
00070   bool isGoodSegment(const DTRecSegment4D& seg) const;
00071   LocalPoint interpolate(const DTRecSegment4D& seg1,
00072                          const DTRecSegment4D& seg3,
00073                          const DTChamberId& MB2) const;
00074   void bookHistos(DTChamberId chId); 
00075 
00076 
00077   DQMStore* theDbe;
00078   
00079   // Switch for verbosity
00080   bool debug;
00081   // The running mode
00082   bool onlineMonitor;
00083   // The analysis mode
00084   bool detailedAnalysis;
00085 
00086   // Lable of 4D segments in the event
00087   std::string theRecHits4DLabel;
00088 
00089   edm::ParameterSet parameters;
00090 
00091   std::map<DTChamberId, std::vector<MonitorElement*> > histosPerCh;
00092 
00093   unsigned int theMinHitsSegment;
00094   double theMinChi2NormSegment;
00095   double theMinCloseDist;
00096 
00097   edm::ESHandle<DTGeometry> dtGeom;
00098   edm::Handle<DTRecSegment4DCollection> segs;
00099 
00100 };
00101 #endif