CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
std::vector< double > valueMinusError_
std::vector< double > valuePlusError_
reco::Particle::LorentzVector lorentzVector
Definition: GenMuonPair.h:9
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.
void drawHistograms(const TProfile *histo, const TProfile *histoPlusErr, const TProfile *histoMinusErr, const TString &type, const TString &yLabel)
ErrorsPropagationAnalyzer(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override