CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/MuonAnalysis/MomentumScaleCalibration/plugins/ErrorsPropagationAnalyzer.h

Go to the documentation of this file.
00001 #ifndef ERRORSANALYZER_HH
00002 #define ERRORSANALYZER_HH
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:    ErrorsPropagationAnalyzer
00007 // Class:      ErrorsPropagationAnalyzer
00008 // 
00016 //
00017 // Original Author:  Marco De Mattia
00018 //         Created:  Thu Sep 11 12:16:00 CEST 2008
00019 // $Id: ErrorsPropagationAnalyzer.h,v 1.2 2010/08/03 10:52:00 demattia 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 "MuonAnalysis/MomentumScaleCalibration/interface/MuScleFitUtils.h"
00044 #include "MuonAnalysis/MomentumScaleCalibration/interface/SigmaPtDiff.h"
00045 
00046 //
00047 // class declaration
00048 //
00049 
00050 class ErrorsPropagationAnalyzer : public edm::EDAnalyzer
00051 {
00052 public:
00053   explicit ErrorsPropagationAnalyzer(const edm::ParameterSet&);
00054   ~ErrorsPropagationAnalyzer();
00055 
00056 private:
00057   virtual void analyze(const edm::Event&, const edm::EventSetup&);
00058   void fillHistograms();
00059   void drawHistograms(const TProfile * histo, const TProfile * histoPlusErr, const TProfile * histoMinusErr, const TString & type);
00060   void fillValueError();
00061   virtual void endJob() {};
00062 
00063   TString treeFileName_;
00064   int resolFitType_;
00065   uint32_t maxEvents_;
00066   TString outputFileName_;
00067   int ptBins_;
00068   double ptMin_;
00069   double ptMax_;
00070   int etaBins_;
00071   double etaMin_;
00072   double etaMax_;
00073   bool debug_;
00074 
00075   double ptMinCut_, ptMaxCut_, etaMinCut_, etaMaxCut_;
00076 
00077   std::vector<double> parameters_;
00078   std::vector<double> errors_;
00079   std::vector<int> errorFactors_;
00080 
00081   std::vector<double> valuePlusError_;
00082   std::vector<double> valueMinusError_;
00083 
00084   TProfile * sigmaPtVsEta_;
00085   TProfile * sigmaPtVsEtaPlusErr_;
00086   TProfile * sigmaPtVsEtaMinusErr_;
00087 
00088   TProfile * sigmaPtVsPt_;
00089   TProfile * sigmaPtVsPtPlusErr_;
00090   TProfile * sigmaPtVsPtMinusErr_;
00091 
00092   TProfile * sigmaPtVsEtaDiff_;
00093   TProfile * sigmaPtVsPtDiff_;
00094 
00095   // Mass resolution
00096   TProfile * sigmaMassVsEta_;
00097   TProfile * sigmaMassVsEtaPlusErr_;
00098   TProfile * sigmaMassVsEtaMinusErr_;
00099 
00100   TProfile * sigmaMassVsPt_;
00101   TProfile * sigmaMassVsPtPlusErr_;
00102   TProfile * sigmaMassVsPtMinusErr_;
00103 };
00104 
00105 #endif // RESOLUTIONANALYZER_HH