CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DQM/DTMonitorClient/src/DTResolutionAnalysisTest.h

Go to the documentation of this file.
00001 #ifndef DTResolutionAnalysisTest_H
00002 #define DTResolutionAnalysisTest_H
00003 
00004 
00016 #include "FWCore/Framework/interface/Frameworkfwd.h"
00017 #include <FWCore/Framework/interface/LuminosityBlock.h>
00018 
00019 #include <FWCore/Framework/interface/EDAnalyzer.h>
00020 #include <FWCore/Framework/interface/ESHandle.h>
00021 
00022 #include <string>
00023 #include <map>
00024 
00025 class DTGeometry;
00026 class DTSuperLayerId;
00027 class DQMStore;
00028 class MonitorElement;
00029 
00030 
00031 class DTResolutionAnalysisTest: public edm::EDAnalyzer {
00032 
00033 public:
00034 
00036   DTResolutionAnalysisTest(const edm::ParameterSet& ps);
00037   
00039   virtual ~DTResolutionAnalysisTest();
00040 
00042   void beginJob();
00043 
00045   void beginRun(const edm::Run& r, const edm::EventSetup& c);
00046 
00048   void analyze(const edm::Event& e, const edm::EventSetup& c);
00049 
00051   void bookHistos();
00052   void bookHistos(int wh);
00053   void bookHistos(int wh, int sect);
00054 
00056   std::string getMEName(const DTSuperLayerId & slID);
00057 
00058   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00059 
00061   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
00062   void endRun(edm::Run const& run, edm::EventSetup const& c);
00063 
00064 
00065 
00066 private:
00067   void resetMEs();
00068 
00069   int nevents;
00070   unsigned int nLumiSegs;
00071   int prescaleFactor;
00072   int run;
00073   int percentual;
00074 
00075   DQMStore* dbe;
00076 
00077   // permitted test ranges
00078   double permittedMeanRange; 
00079   double permittedSigmaRange; 
00080 
00081   bool doCalibAnalysis;
00082 
00083   edm::ESHandle<DTGeometry> muonGeom;
00084 
00085   // Histograms for tests
00086   std::map< std::pair<int,int> , MonitorElement* > MeanHistos;
00087   std::map< std::pair<int,int> , MonitorElement* > SigmaHistos;
00088   // wheel summary histograms  
00089   std::map< int, MonitorElement* > wheelMeanHistos;
00090   std::map< int, MonitorElement* > wheelSigmaHistos;
00091   
00092   std::map< int, MonitorElement* > meanDistr;
00093   std::map< int, MonitorElement* > sigmaDistr;
00094 
00095 
00096   // Compute the station from the bin number of mean and sigma histos
00097   int stationFromBin(int bin) const;
00098   // Compute the sl from the bin number of mean and sigma histos
00099   int slFromBin(int bin) const;
00100 
00101   bool meanInRange(double mean) const;
00102   bool sigmaInRange(double sigma) const;
00103 
00104   MonitorElement* globalResSummary;
00105   
00106   // top folder for the histograms in DQMStore
00107   std::string topHistoFolder;
00108 
00109 };
00110 
00111 #endif