00001 #ifndef ERRORSANALYZER_HH 00002 #define ERRORSANALYZER_HH 00003 00004 // -*- C++ -*- 00005 // 00006 // Package: ErrorsAnalyzer 00007 // Class: ErrorsAnalyzer 00008 // 00016 // 00017 // Original Author: Marco De Mattia 00018 // Created: Thu Sep 11 12:16:00 CEST 2008 00019 // $Id: ErrorsAnalyzer.h,v 1.5 2012/12/20 16:09:21 emiglior Exp $ 00020 // 00021 // 00022 00023 // system include files 00024 #include <memory> 00025 #include <string> 00026 #include <vector> 00027 00028 #include "FWCore/Framework/interface/Frameworkfwd.h" 00029 #include "FWCore/Framework/interface/EDAnalyzer.h" 00030 #include "FWCore/Framework/interface/Event.h" 00031 #include "FWCore/Framework/interface/MakerMacros.h" 00032 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00033 00034 #include <TH1D.h> 00035 #include <TProfile.h> 00036 #include <TString.h> 00037 #include <TCanvas.h> 00038 #include <TGraphAsymmErrors.h> 00039 #include <TROOT.h> 00040 00041 #include "MuonAnalysis/MomentumScaleCalibration/interface/Functions.h" 00042 #include "MuonAnalysis/MomentumScaleCalibration/interface/RootTreeHandler.h" 00043 #include "MuScleFitUtils.h" 00044 00045 // 00046 // class declaration 00047 // 00048 00049 class ErrorsAnalyzer : public edm::EDAnalyzer 00050 { 00051 public: 00052 explicit ErrorsAnalyzer(const edm::ParameterSet&); 00053 ~ErrorsAnalyzer(); 00054 00055 private: 00056 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00057 void fillHistograms(); 00058 void drawHistograms(const TProfile * histo, const TProfile * histoPlusErr, const TProfile * histoMinusErr, const TString & type); 00059 void fillValueError(); 00060 virtual void endJob() {}; 00061 00062 TString treeFileName_; 00063 int resolFitType_; 00064 uint32_t maxEvents_; 00065 TString outputFileName_; 00066 int ptBins_; 00067 double ptMin_; 00068 double ptMax_; 00069 int etaBins_; 00070 double etaMin_; 00071 double etaMax_; 00072 bool debug_; 00073 00074 std::vector<double> parameters_; 00075 std::vector<double> errors_; 00076 std::vector<int> errorFactors_; 00077 00078 std::vector<double> valuePlusError_; 00079 std::vector<double> valueMinusError_; 00080 00081 TProfile * sigmaPtVsEta_; 00082 TProfile * sigmaPtVsEtaPlusErr_; 00083 TProfile * sigmaPtVsEtaMinusErr_; 00084 00085 TProfile * sigmaPtVsPt_; 00086 TProfile * sigmaPtVsPtPlusErr_; 00087 TProfile * sigmaPtVsPtMinusErr_; 00088 00089 // Mass resolution 00090 TProfile * sigmaMassVsEta_; 00091 TProfile * sigmaMassVsEtaPlusErr_; 00092 TProfile * sigmaMassVsEtaMinusErr_; 00093 00094 TProfile * sigmaMassVsPt_; 00095 TProfile * sigmaMassVsPtPlusErr_; 00096 TProfile * sigmaMassVsPtMinusErr_; 00097 }; 00098 00099 #endif // RESOLUTIONANALYZER_HH