CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/DQMOffline/Muon/src/MuonTestSummary.h

Go to the documentation of this file.
00001 #ifndef MuonTestSummary_H
00002 #define MuonTestSummary_H
00003 
00004 
00017 #include "FWCore/Framework/interface/Frameworkfwd.h"
00018 #include <FWCore/Framework/interface/EDAnalyzer.h>
00019 #include "DataFormats/Common/interface/Handle.h"
00020 #include <FWCore/Framework/interface/ESHandle.h>
00021 #include <FWCore/Framework/interface/Event.h>
00022 #include <FWCore/Framework/interface/MakerMacros.h>
00023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00024 #include <FWCore/Framework/interface/LuminosityBlock.h>
00025 
00026 #include "DQMServices/Core/interface/DQMStore.h"
00027 #include "DQMServices/Core/interface/MonitorElement.h"
00028 #include "FWCore/ServiceRegistry/interface/Service.h"
00029 #include "FWCore/Framework/interface/Run.h"
00030 
00031 #include <memory>
00032 #include <string>
00033 
00034 class MuonTestSummary: public edm::EDAnalyzer{
00035 
00036 public:
00037 
00039   MuonTestSummary(const edm::ParameterSet& ps);
00040   
00042   virtual ~MuonTestSummary();
00043 
00044 protected:
00045 
00047   void beginJob(void);
00048 
00050   void analyze(const edm::Event& e, const edm::EventSetup& c){}
00051 
00053   void beginRun(edm::Run const& run, edm::EventSetup const& eSetup);
00054   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
00055 
00057   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
00058   void endRun(edm::Run const& run, edm::EventSetup const& eSetup);
00059 
00061   void doKinematicsTests(std::string muonType, int bin);
00062   void doResidualsTests(std::string type, std::string parameter, int bin);
00063   void doMuonIDTests();
00064   void doEnergyTests(std::string nameHisto, std::string muonType, int bin);
00065   void doMultiplicityTests();
00066   void ResidualCheck(std::string muType, std::vector<std::string> resHistos, int &numPlot, double &Mean, double &Mean_err, double &Sigma, double &Sigma_err);
00067   void GaussFit(std::string type, std::string parameter, MonitorElement *  Histo, float &mean, float &mean_err, float &sigma, float &sigma_err);
00068 
00069 
00070 private:
00071 
00072   DQMStore* dbe;
00073   // Switch for verbosity
00074   std::string metname;
00075 
00076   // test ranges
00077   double etaExpected;
00078   double phiExpected;
00079   double chi2Fraction;
00080   double chi2Spread;
00081   double resEtaSpread_tkGlb;
00082   double resEtaSpread_glbSta;
00083   double resPhiSpread_tkGlb;
00084   double resPhiSpread_glbSta;
00085   double resOneOvPSpread_tkGlb;
00086   double resOneOvPSpread_glbSta;
00087   double pullEtaSpread;
00088   double pullPhiSpread;
00089   double pullOneOvPSpread;
00090   double resChargeLimit_tkGlb;
00091   double resChargeLimit_glbSta;
00092   double resChargeLimit_tkSta;
00093   double numMatchedExpected_min;
00094   double numMatchedExpected_max;
00095   double matchesFractionDt_min;
00096   double matchesFractionDt_max;
00097   double matchesFractionCsc_min;
00098   double matchesFractionCsc_max;
00099   double resSegmTrack_rms_min;
00100   double resSegmTrack_rms_max;
00101   double resSegmTrack_mean_min;
00102   double resSegmTrack_mean_max;
00103   double sigmaResSegmTrackExp;
00104   double expPeakEcalS9_min;
00105   double expPeakEcalS9_max;
00106   double expPeakHadS9_min;
00107   double expPeakHadS9_max;
00108   double expMultiplicityGlb_min;
00109   double expMultiplicityTk_min;
00110   double expMultiplicitySta_min;
00111   double expMultiplicityGlb_max;
00112   double expMultiplicityTk_max;
00113   double expMultiplicitySta_max;
00114 
00115   // the report MEs
00116 //------
00117   MonitorElement* KolmogorovTestSummaryMap;
00118   MonitorElement* chi2TestSummaryMap;
00119 //-----
00120   MonitorElement* kinematicsSummaryMap;
00121   MonitorElement* residualsSummaryMap;
00122   MonitorElement* muonIdSummaryMap;
00123   MonitorElement* energySummaryMap;
00124   MonitorElement* multiplicitySummaryMap;
00125   MonitorElement* summaryReport;
00126   MonitorElement*  summaryReportMap;
00127   std::vector<MonitorElement*>  theSummaryContents;
00128   MonitorElement* summaryCertification;
00129   MonitorElement*  summaryCertificationMap;
00130   std::vector<MonitorElement*>  theCertificationContents;
00131 
00132 };
00133 
00134 #endif