CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/DQM/DTMonitorClient/src/DTResolutionTest.h

Go to the documentation of this file.
00001 #ifndef DTResolutionTest_H
00002 #define DTResolutionTest_H
00003 
00004 
00016 #include "FWCore/Framework/interface/Frameworkfwd.h"
00017 #include <FWCore/Framework/interface/EDAnalyzer.h>
00018 #include "DataFormats/Common/interface/Handle.h"
00019 #include <FWCore/Framework/interface/ESHandle.h>
00020 #include <FWCore/Framework/interface/Event.h>
00021 #include <FWCore/Framework/interface/MakerMacros.h>
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 #include <FWCore/Framework/interface/LuminosityBlock.h>
00024 
00025 #include "DQMServices/Core/interface/DQMStore.h"
00026 #include "DQMServices/Core/interface/MonitorElement.h"
00027 #include "FWCore/ServiceRegistry/interface/Service.h"
00028 
00029 
00030 #include <memory>
00031 #include <iostream>
00032 #include <fstream>
00033 #include <string>
00034 #include <vector>
00035 #include <map>
00036 
00037 class DTGeometry;
00038 class DTChamberId;
00039 class DTSuperLayerId;
00040 
00041 class DTResolutionTest: public edm::EDAnalyzer{
00042 
00043 public:
00044 
00046   DTResolutionTest(const edm::ParameterSet& ps);
00047   
00049   virtual ~DTResolutionTest();
00050 
00051 protected:
00052 
00054   void beginRun(const edm::Run& r, const edm::EventSetup& c);
00055 
00057   void analyze(const edm::Event& e, const edm::EventSetup& c);
00058 
00060   void endJob();
00061 
00063   void bookHistos(const DTChamberId & ch);
00064 
00066   void bookHistos(int wh);
00067 
00069   std::string getMEName(const DTSuperLayerId & slID);
00070   std::string getMEName2D(const DTSuperLayerId & slID);
00071 
00072   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00073 
00075   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
00076 
00077 
00078 
00079 private:
00080 
00081   int nevents;
00082   unsigned int nLumiSegs;
00083   int prescaleFactor;
00084   int run;
00085   int percentual;
00086 
00087   DQMStore* dbe;
00088 
00089   edm::ParameterSet parameters;
00090   edm::ESHandle<DTGeometry> muonGeom;
00091 
00092   // histograms: < detRawID, Histogram >
00093   std::map< std::pair<int,int> , MonitorElement* > MeanHistos;
00094   std::map< std::pair<int,int> , MonitorElement* > SigmaHistos;
00095   std::map< std::pair<int,int> , MonitorElement* > SlopeHistos;
00096   std::map< std::string , MonitorElement* > MeanHistosSetRange;
00097   std::map< std::string , MonitorElement* > SigmaHistosSetRange;
00098   std::map< std::string , MonitorElement* > SlopeHistosSetRange;
00099   std::map< std::string , MonitorElement* > MeanHistosSetRange2D;
00100   std::map< std::string , MonitorElement* > SigmaHistosSetRange2D;
00101   std::map< std::string , MonitorElement* > SlopeHistosSetRange2D;
00102 
00103   // wheel summary histograms  
00104   std::map< int, MonitorElement* > wheelMeanHistos;
00105   std::map< int, MonitorElement* > wheelSigmaHistos;
00106   std::map< int, MonitorElement* > wheelSlopeHistos;
00107 
00108   // cms summary histograms
00109   std::map <std::pair<int,int>, int> cmsMeanHistos;
00110   std::map <std::pair<int,int>, bool> MeanFilled;
00111   std::map <std::pair<int,int>, int> cmsSigmaHistos;
00112   std::map <std::pair<int,int>, bool> SigmaFilled;
00113   std::map <std::pair<int,int>, int> cmsSlopeHistos;
00114   std::map <std::pair<int,int>, bool> SlopeFilled;
00115 
00116   // Compute the station from the bin number of mean and sigma histos
00117   int stationFromBin(int bin) const;
00118   // Compute the sl from the bin number of mean and sigma histos
00119   int slFromBin(int bin) const;
00120 
00121 
00122 };
00123 
00124 #endif