CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/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(int wh);
00052   void bookHistos(int wh, int sect);
00053 
00055   std::string getMEName(const DTSuperLayerId & slID);
00056 
00057   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00058 
00060   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
00061   void endRun(edm::Run const& run, edm::EventSetup const& c);
00062 
00063 
00064 
00065 private:
00066   void resetMEs();
00067 
00068   int nevents;
00069   unsigned int nLumiSegs;
00070   int prescaleFactor;
00071   int run;
00072   int percentual;
00073 
00074   DQMStore* dbe;
00075 
00076   // permitted test ranges
00077   double permittedMeanRange; 
00078   double permittedSigmaRange; 
00079 
00080   bool doCalibAnalysis;
00081 
00082   edm::ESHandle<DTGeometry> muonGeom;
00083 
00084   // Histograms for tests
00085   std::map< std::pair<int,int> , MonitorElement* > MeanHistos;
00086   std::map< std::pair<int,int> , MonitorElement* > SigmaHistos;
00087   // wheel summary histograms  
00088   std::map< int, MonitorElement* > wheelMeanHistos;
00089   std::map< int, MonitorElement* > wheelSigmaHistos;
00090   
00091   std::map< int, MonitorElement* > meanDistr;
00092   std::map< int, MonitorElement* > sigmaDistr;
00093 
00094 
00095   // Compute the station from the bin number of mean and sigma histos
00096   int stationFromBin(int bin) const;
00097   // Compute the sl from the bin number of mean and sigma histos
00098   int slFromBin(int bin) const;
00099 
00100   bool meanInRange(double mean) const;
00101   bool sigmaInRange(double sigma) const;
00102 
00103   MonitorElement* globalResSummary;
00104   
00105   // top folder for the histograms in DQMStore
00106   std::string topHistoFolder;
00107 
00108 };
00109 
00110 #endif