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
00078 double maxGoodMeanValue;
00079 double minBadMeanValue;
00080 double maxGoodSigmaValue;
00081 double minBadSigmaValue;
00082
00083 bool doCalibAnalysis;
00084
00085 edm::ESHandle<DTGeometry> muonGeom;
00086
00087
00088 std::map< std::pair<int,int> , MonitorElement* > MeanHistos;
00089 std::map< std::pair<int,int> , MonitorElement* > SigmaHistos;
00090
00091 std::map< int, MonitorElement* > wheelMeanHistos;
00092 std::map< int, MonitorElement* > wheelSigmaHistos;
00093
00094 std::map< int, MonitorElement* > meanDistr;
00095 std::map< int, MonitorElement* > sigmaDistr;
00096
00097
00098
00099 int stationFromBin(int bin) const;
00100
00101 int slFromBin(int bin) const;
00102
00103 double meanInRange(double mean) const;
00104 double sigmaInRange(double sigma) const;
00105
00106 MonitorElement* globalResSummary;
00107
00108
00109 std::string topHistoFolder;
00110
00111 };
00112
00113 #endif