CMS 3D CMS Logo

ErrorsPropagationAnalyzer.h
Go to the documentation of this file.
1 #ifndef ERRORSANALYZER_HH
2 #define ERRORSANALYZER_HH
3 
4 // -*- C++ -*-
5 //
6 // Package: ErrorsPropagationAnalyzer
7 // Class: ErrorsPropagationAnalyzer
8 //
16 //
17 // Original Author: Marco De Mattia
18 // Created: Thu Sep 11 12:16:00 CEST 2008
19 //
20 //
21 
22 // system include files
23 #include <memory>
24 #include <string>
25 #include <vector>
26 
32 
33 #include <TH1D.h>
34 #include <TProfile.h>
35 #include <TString.h>
36 #include <TCanvas.h>
37 #include <TGraphAsymmErrors.h>
38 #include <TROOT.h>
39 
42 #include "MuScleFitUtils.h"
44 
45 //
46 // class declaration
47 //
48 
50 public:
52  ~ErrorsPropagationAnalyzer() override;
53 
54 private:
55  void analyze(const edm::Event&, const edm::EventSetup&) override;
56  void fillHistograms();
57  void drawHistograms(const TProfile* histo,
58  const TProfile* histoPlusErr,
59  const TProfile* histoMinusErr,
60  const TString& type,
61  const TString& yLabel);
62  void fillValueError();
63  void endJob() override{};
65  double massResolution(const lorentzVector& mu1,
66  const lorentzVector& mu2,
67  const std::vector<double>& parval,
68  const double& sigmaPt1,
69  const double& sigmaPt2);
70  double massResolution(const lorentzVector& mu1,
71  const lorentzVector& mu2,
72  double* parval,
73  const double& sigmaPt1,
74  const double& sigmaPt2);
75 
76  TString treeFileName_;
78  uint32_t maxEvents_;
79  TString outputFileName_;
80  int ptBins_;
81  double ptMin_;
82  double ptMax_;
83  int etaBins_;
84  double etaMin_;
85  double etaMax_;
86  bool debug_;
87 
89 
90  std::vector<double> parameters_;
91  std::vector<double> errors_;
92  std::vector<int> errorFactors_;
93 
94  std::vector<double> valuePlusError_;
95  std::vector<double> valueMinusError_;
96 
97  TProfile* sigmaPtVsEta_;
100 
101  TProfile* sigmaPtVsPt_;
104 
105  TProfile* sigmaPtVsEtaDiff_;
106  TProfile* sigmaPtVsPtDiff_;
107 
108  // Mass resolution
109  TProfile* sigmaMassVsEta_;
112 
113  TProfile* sigmaMassVsPt_;
116 
120 
124 };
125 
126 #endif // RESOLUTIONANALYZER_HH
MuScleFitUtils.h
ErrorsPropagationAnalyzer::sigmaMassVsEtaMinusErr_
TProfile * sigmaMassVsEtaMinusErr_
Definition: ErrorsPropagationAnalyzer.h:111
ErrorsPropagationAnalyzer::etaMax_
double etaMax_
Definition: ErrorsPropagationAnalyzer.h:85
ErrorsPropagationAnalyzer::sigmaPtVsPt_
TProfile * sigmaPtVsPt_
Definition: ErrorsPropagationAnalyzer.h:101
ErrorsPropagationAnalyzer::sigmaPtVsPtDiff_
TProfile * sigmaPtVsPtDiff_
Definition: ErrorsPropagationAnalyzer.h:106
ErrorsPropagationAnalyzer::sigmaPtVsPtPlusErr_
TProfile * sigmaPtVsPtPlusErr_
Definition: ErrorsPropagationAnalyzer.h:102
ErrorsPropagationAnalyzer::endJob
void endJob() override
Definition: ErrorsPropagationAnalyzer.h:63
ErrorsPropagationAnalyzer::errorFactors_
std::vector< int > errorFactors_
Definition: ErrorsPropagationAnalyzer.h:92
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
ErrorsPropagationAnalyzer::ErrorsPropagationAnalyzer
ErrorsPropagationAnalyzer(const edm::ParameterSet &)
Definition: ErrorsPropagationAnalyzer.cc:6
ErrorsPropagationAnalyzer::sigmaMassOverMassVsEtaPlusErr_
TProfile * sigmaMassOverMassVsEtaPlusErr_
Definition: ErrorsPropagationAnalyzer.h:118
ErrorsPropagationAnalyzer::sigmaPtVsEtaMinusErr_
TProfile * sigmaPtVsEtaMinusErr_
Definition: ErrorsPropagationAnalyzer.h:99
ErrorsPropagationAnalyzer::etaMinCut_
double etaMinCut_
Definition: ErrorsPropagationAnalyzer.h:88
EDAnalyzer.h
ErrorsPropagationAnalyzer::drawHistograms
void drawHistograms(const TProfile *histo, const TProfile *histoPlusErr, const TProfile *histoMinusErr, const TString &type, const TString &yLabel)
Definition: ErrorsPropagationAnalyzer.cc:116
ErrorsPropagationAnalyzer::sigmaMassOverMassVsPt_
TProfile * sigmaMassOverMassVsPt_
Definition: ErrorsPropagationAnalyzer.h:121
edm::EDAnalyzer
Definition: EDAnalyzer.h:29
MakerMacros.h
ErrorsPropagationAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: ErrorsPropagationAnalyzer.cc:251
ErrorsPropagationAnalyzer::sigmaPtVsEtaDiff_
TProfile * sigmaPtVsEtaDiff_
Definition: ErrorsPropagationAnalyzer.h:105
ErrorsPropagationAnalyzer::ptMinCut_
double ptMinCut_
Definition: ErrorsPropagationAnalyzer.h:88
ErrorsPropagationAnalyzer::parameters_
std::vector< double > parameters_
Definition: ErrorsPropagationAnalyzer.h:90
ErrorsPropagationAnalyzer
Definition: ErrorsPropagationAnalyzer.h:49
ErrorsPropagationAnalyzer::treeFileName_
TString treeFileName_
Definition: ErrorsPropagationAnalyzer.h:76
RootTreeHandler.h
ErrorsPropagationAnalyzer::sigmaMassVsPtMinusErr_
TProfile * sigmaMassVsPtMinusErr_
Definition: ErrorsPropagationAnalyzer.h:115
ErrorsPropagationAnalyzer::fillValueError
void fillValueError()
Definition: ErrorsPropagationAnalyzer.cc:71
ErrorsPropagationAnalyzer::valuePlusError_
std::vector< double > valuePlusError_
Definition: ErrorsPropagationAnalyzer.h:94
ErrorsPropagationAnalyzer::sigmaPtVsEtaPlusErr_
TProfile * sigmaPtVsEtaPlusErr_
Definition: ErrorsPropagationAnalyzer.h:98
edm::ParameterSet
Definition: ParameterSet.h:36
lorentzVector
reco::Particle::LorentzVector lorentzVector
Definition: GenMuonPair.h:9
Event.h
ErrorsPropagationAnalyzer::resolFitType_
int resolFitType_
Definition: ErrorsPropagationAnalyzer.h:77
ErrorsPropagationAnalyzer::sigmaMassOverMassVsPtPlusErr_
TProfile * sigmaMassOverMassVsPtPlusErr_
Definition: ErrorsPropagationAnalyzer.h:122
ErrorsPropagationAnalyzer::ptMaxCut_
double ptMaxCut_
Definition: ErrorsPropagationAnalyzer.h:88
ErrorsPropagationAnalyzer::sigmaPtVsPtMinusErr_
TProfile * sigmaPtVsPtMinusErr_
Definition: ErrorsPropagationAnalyzer.h:103
ErrorsPropagationAnalyzer::sigmaMassVsEtaPlusErr_
TProfile * sigmaMassVsEtaPlusErr_
Definition: ErrorsPropagationAnalyzer.h:110
SigmaPtDiff.h
edm::EventSetup
Definition: EventSetup.h:57
ErrorsPropagationAnalyzer::~ErrorsPropagationAnalyzer
~ErrorsPropagationAnalyzer() override
Definition: ErrorsPropagationAnalyzer.cc:85
ErrorsPropagationAnalyzer::sigmaMassOverMassVsPtMinusErr_
TProfile * sigmaMassOverMassVsPtMinusErr_
Definition: ErrorsPropagationAnalyzer.h:123
type
type
Definition: HCALResponse.h:21
ErrorsPropagationAnalyzer::fillHistograms
void fillHistograms()
Definition: ErrorsPropagationAnalyzer.cc:331
ErrorsPropagationAnalyzer::etaBins_
int etaBins_
Definition: ErrorsPropagationAnalyzer.h:83
Frameworkfwd.h
ErrorsPropagationAnalyzer::ptMax_
double ptMax_
Definition: ErrorsPropagationAnalyzer.h:82
ErrorsPropagationAnalyzer::etaMaxCut_
double etaMaxCut_
Definition: ErrorsPropagationAnalyzer.h:88
ErrorsPropagationAnalyzer::sigmaPtVsEta_
TProfile * sigmaPtVsEta_
Definition: ErrorsPropagationAnalyzer.h:97
ErrorsPropagationAnalyzer::sigmaMassOverMassVsEta_
TProfile * sigmaMassOverMassVsEta_
Definition: ErrorsPropagationAnalyzer.h:117
ErrorsPropagationAnalyzer::ptMin_
double ptMin_
Definition: ErrorsPropagationAnalyzer.h:81
ErrorsPropagationAnalyzer::sigmaMassOverMassVsEtaMinusErr_
TProfile * sigmaMassOverMassVsEtaMinusErr_
Definition: ErrorsPropagationAnalyzer.h:119
ErrorsPropagationAnalyzer::debug_
bool debug_
Definition: ErrorsPropagationAnalyzer.h:86
ErrorsPropagationAnalyzer::ptBins_
int ptBins_
Definition: ErrorsPropagationAnalyzer.h:80
Functions.h
ParameterSet.h
ErrorsPropagationAnalyzer::maxEvents_
uint32_t maxEvents_
Definition: ErrorsPropagationAnalyzer.h:78
ErrorsPropagationAnalyzer::sigmaMassVsPt_
TProfile * sigmaMassVsPt_
Definition: ErrorsPropagationAnalyzer.h:113
ErrorsPropagationAnalyzer::etaMin_
double etaMin_
Definition: ErrorsPropagationAnalyzer.h:84
edm::Event
Definition: Event.h:73
ErrorsPropagationAnalyzer::valueMinusError_
std::vector< double > valueMinusError_
Definition: ErrorsPropagationAnalyzer.h:95
ErrorsPropagationAnalyzer::sigmaMassVsPtPlusErr_
TProfile * sigmaMassVsPtPlusErr_
Definition: ErrorsPropagationAnalyzer.h:114
ErrorsPropagationAnalyzer::sigmaMassVsEta_
TProfile * sigmaMassVsEta_
Definition: ErrorsPropagationAnalyzer.h:109
ErrorsPropagationAnalyzer::errors_
std::vector< double > errors_
Definition: ErrorsPropagationAnalyzer.h:91
ErrorsPropagationAnalyzer::outputFileName_
TString outputFileName_
Definition: ErrorsPropagationAnalyzer.h:79
ErrorsPropagationAnalyzer::massResolution
double massResolution(const lorentzVector &mu1, const lorentzVector &mu2, const std::vector< double > &parval, const double &sigmaPt1, const double &sigmaPt2)
Modified method to take into account the error.
Definition: ErrorsPropagationAnalyzer.cc:253