CMS 3D CMS Logo

PFMETBenchmark.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_Benchmark_PFMETBenchmark_h
2 #define RecoParticleFlow_Benchmark_PFMETBenchmark_h
3 
5 
21 
22 //#include "FWCore/ServiceRegistry/interface/Service.h"
23 
24 #include "TH1F.h"
25 #include "TH2F.h"
27 #include <string>
28 #include <TFile.h>
29 
31 public:
34 
36  virtual ~PFMETBenchmark();
37 
38  void setup(std::string Filename,
39  bool debug,
40  bool plotAgainstReco = false,
41  std::string benchmarkLabel_ = "ParticleFlow",
42  DQMStore* dbe_store = nullptr);
43  void process(const reco::PFMETCollection&,
46  const reco::METCollection&);
50  const reco::METCollection&);
54  const reco::METCollection&,
55  const std::vector<reco::CaloJet>&,
56  const std::vector<reco::CaloJet>&);
57  float getTrueMET() { return true_met; }
58  float getTruePhi() { return true_phi; }
59  float getTrueSET() { return true_set; }
60  float getPFMET() { return rec_met; }
61  float getPFMEX() { return rec_mex - true_mex; }
62  float getPFMEY() { return rec_mey - true_mey; }
63  float getPFPhi() { return rec_phi; }
64  float getPFSET() { return rec_set; }
65  float getCaloMET() { return calo_met; }
66  float getCaloMEX() { return calo_mex - true_mex; }
67  float getCaloMEY() { return calo_mey - true_mey; }
68  float getCaloPhi() { return calo_phi; }
69  float getCaloSET() { return calo_set; }
70  float getTCMET() { return tc_met; }
71  float getTCMEX() { return tc_mex - true_mex; }
72  float getTCMEY() { return tc_mey - true_mey; }
73  float getTCPhi() { return tc_phi; }
74  float getTCSET() { return tc_set; }
75  float getDeltaPFMET() { return rec_met - true_met; }
76  float getDeltaPFPhi() { return mpi_pi(rec_phi - true_phi); }
77  float getDeltaPFSET() { return rec_set - true_set; }
78  float getDeltaCaloMET() { return calo_met - true_met; }
79  float getDeltaCaloPhi() { return mpi_pi(calo_phi - true_phi); }
80  float getDeltaCaloSET() { return calo_set - true_set; }
81  float getDeltaTCMET() { return tc_met - true_met; }
82  float getDeltaTCPhi() { return mpi_pi(tc_phi - true_phi); }
83  float getDeltaTCSET() { return tc_set - true_set; }
84  double mpi_pi(double angle);
85  void analyse();
86  //void FitSlicesInY(TH2F*, TH1F*, TH1F*, bool, int);
87  void write();
88 
89 private:
90  TFile* file_;
91 
92  // histograms
93  // delta Pt or E quantities for Barrel
98  TH1F* hMEX;
99  TH1F* hDeltaMEX;
100  TH1F* hDeltaMET;
101  TH1F* hDeltaPhi;
102  TH1F* hDeltaSET;
103 
112  TH1F* hTrueMET;
113  TH1F* hCaloMET;
114  TH1F* hPFMET;
115  TH1F* hTCMET;
118 
123  TH1F* hCaloMEX;
128 
133  TH1F* hTCMEX;
134  TH1F* hDeltaTCMEX;
135  TH1F* hDeltaTCMET;
136  TH1F* hDeltaTCPhi;
137  TH1F* hDeltaTCSET;
138 
141 
142  //TH1F *hmeanPF;
143  //TH1F *hmeanCalo;
144  //TH1F *hsigmaPF;
145  //TH1F *hsigmaCalo;
146  //TH1F *hrmsPF;
147  //TH1F *hrmsCalo;
148 
150 
151  double true_set;
152  double true_met;
153  double true_mex;
154  double true_mey;
155  double true_phi;
156  double rec_met;
157  double rec_mex;
158  double rec_mey;
159  double rec_phi;
160  double rec_set;
161  double calo_met;
162  double calo_mex;
163  double calo_mey;
164  double calo_phi;
165  double calo_set;
166  double tc_met;
167  double tc_mex;
168  double tc_mey;
169  double tc_phi;
170  double tc_set;
171 
172 protected:
174  bool debug_;
177 };
178 
179 #endif // RecoParticleFlow_Benchmark_PFMETBenchmark_h
PFMETBenchmark::profileTCMETvsTCMETresp
TProfile * profileTCMETvsTCMETresp
Definition: PFMETBenchmark.h:130
PFMETBenchmark::debug_
bool debug_
Definition: PFMETBenchmark.h:174
PFMETBenchmark::rec_mey
double rec_mey
Definition: PFMETBenchmark.h:158
reco::PFMETCollection
std::vector< reco::PFMET > PFMETCollection
collection of PFMET objects
Definition: PFMETCollection.h:20
CaloJetCollection.h
PFMETBenchmark::hDeltaMET
TH1F * hDeltaMET
Definition: PFMETBenchmark.h:100
PFMETBenchmark::hTCMETvstrueMET
TH2F * hTCMETvstrueMET
Definition: PFMETBenchmark.h:140
PFMETBenchmark::getTCSET
float getTCSET()
Definition: PFMETBenchmark.h:74
PFMETBenchmark::hSETvsDeltaMET
TH2F * hSETvsDeltaMET
Definition: PFMETBenchmark.h:97
PFMETBenchmark::hDeltaMEX
TH1F * hDeltaMEX
Definition: PFMETBenchmark.h:99
PFMETBenchmark::calculateQuantities
void calculateQuantities(const reco::PFMETCollection &, const reco::GenParticleCollection &, const reco::CaloMETCollection &, const reco::METCollection &)
Definition: PFMETBenchmark.cc:276
PFMETBenchmark::hCaloMEX
TH1F * hCaloMEX
Definition: PFMETBenchmark.h:123
PFMETBenchmark::getTCMEY
float getTCMEY()
Definition: PFMETBenchmark.h:72
PFCandidate.h
GenMETCollection.h
PFMETBenchmark::hDeltaCaloMET
TH1F * hDeltaCaloMET
Definition: PFMETBenchmark.h:125
PFMETBenchmark::hDeltaSET
TH1F * hDeltaSET
Definition: PFMETBenchmark.h:102
PFMETBenchmark::tc_set
double tc_set
Definition: PFMETBenchmark.h:170
PFMETBenchmark::hDeltaCaloPhi
TH1F * hDeltaCaloPhi
Definition: PFMETBenchmark.h:126
PFMETBenchmark::getPFMEY
float getPFMEY()
Definition: PFMETBenchmark.h:62
PFMETBenchmark::dbe_
DQMStore * dbe_
Definition: PFMETBenchmark.h:176
reco::GenParticleCollection
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
Definition: GenParticleFwd.h:13
PFMETBenchmark::hDeltaPFPhivstrueMET
TH2F * hDeltaPFPhivstrueMET
Definition: PFMETBenchmark.h:106
PFMETBenchmark
Definition: PFMETBenchmark.h:30
PFMETBenchmark::profileCaloSETvsCaloSETresp
TProfile * profileCaloSETvsCaloSETresp
Definition: PFMETBenchmark.h:119
PFMETBenchmark::true_set
double true_set
Definition: PFMETBenchmark.h:151
DQMStore.h
PFMETBenchmark::profileTCSETvsTCSETresp
TProfile * profileTCSETvsTCSETresp
Definition: PFMETBenchmark.h:129
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
PFMETBenchmark::hCaloMET
TH1F * hCaloMET
Definition: PFMETBenchmark.h:113
PFMETBenchmark::hTCSETvsDeltaTCMET
TH2F * hTCSETvsDeltaTCMET
Definition: PFMETBenchmark.h:132
PFMETCollection.h
PFMETBenchmark::tc_phi
double tc_phi
Definition: PFMETBenchmark.h:169
PFMETBenchmark::getCaloMEY
float getCaloMEY()
Definition: PFMETBenchmark.h:67
PFMETBenchmark::hDeltaCaloPhivstrueMET
TH2F * hDeltaCaloPhivstrueMET
Definition: PFMETBenchmark.h:107
PFMETBenchmark::getPFPhi
float getPFPhi()
Definition: PFMETBenchmark.h:63
PFMETBenchmark::getTCPhi
float getTCPhi()
Definition: PFMETBenchmark.h:73
PFMETBenchmark::hDeltaCaloSET
TH1F * hDeltaCaloSET
Definition: PFMETBenchmark.h:127
PFMETBenchmark::true_met
double true_met
Definition: PFMETBenchmark.h:152
CaloMETCollection.h
PFMETBenchmark::rec_met
double rec_met
Definition: PFMETBenchmark.h:156
GenParticle.h
reco::METCollection
std::vector< reco::MET > METCollection
collection of MET objects
Definition: METCollection.h:22
CandidateFwd.h
PFMETBenchmark::hDeltaPFMEXvstrueSET
TH2F * hDeltaPFMEXvstrueSET
Definition: PFMETBenchmark.h:111
PFMETBenchmark::hCaloSETvsDeltaCaloSET
TH2F * hCaloSETvsDeltaCaloSET
Definition: PFMETBenchmark.h:121
PFMETBenchmark::hDeltaTCPhivstrueMET
TH2F * hDeltaTCPhivstrueMET
Definition: PFMETBenchmark.h:117
PFMETBenchmark::profileSETvsSETresp
TProfile * profileSETvsSETresp
Definition: PFMETBenchmark.h:94
PFMETBenchmark::file_
TFile * file_
Definition: PFMETBenchmark.h:90
debug
#define debug
Definition: HDRShower.cc:19
PFMETBenchmark::getDeltaTCMET
float getDeltaTCMET()
Definition: PFMETBenchmark.h:81
PFMETBenchmark::true_mey
double true_mey
Definition: PFMETBenchmark.h:154
dqm::legacy::DQMStore
Definition: DQMStore.h:727
PFMETBenchmark::process
void process(const reco::PFMETCollection &, const reco::GenParticleCollection &, const reco::CaloMETCollection &, const reco::METCollection &)
Definition: PFMETBenchmark.cc:187
PFMETBenchmark::getDeltaPFMET
float getDeltaPFMET()
Definition: PFMETBenchmark.h:75
PFMETBenchmark::getDeltaTCPhi
float getDeltaTCPhi()
Definition: PFMETBenchmark.h:82
PFMETBenchmark::hCaloSETvsDeltaCaloMET
TH2F * hCaloSETvsDeltaCaloMET
Definition: PFMETBenchmark.h:122
PFMETBenchmark::hDeltaCaloMEX
TH1F * hDeltaCaloMEX
Definition: PFMETBenchmark.h:124
CaloMET.h
PFMETBenchmark::hDeltaCaloMEXvstrueSET
TH2F * hDeltaCaloMEXvstrueSET
Definition: PFMETBenchmark.h:110
PFMETBenchmark::hDeltaTCSET
TH1F * hDeltaTCSET
Definition: PFMETBenchmark.h:137
PFMETBenchmark::outputFile_
std::string outputFile_
Definition: PFMETBenchmark.h:149
PFMETBenchmark::hTCSETvsDeltaTCSET
TH2F * hTCSETvsDeltaTCSET
Definition: PFMETBenchmark.h:131
GenParticleFwd.h
PFMETBenchmark::analyse
void analyse()
Definition: PFMETBenchmark.cc:427
PFMETBenchmark::mpi_pi
double mpi_pi(double angle)
Definition: PFMETBenchmark.cc:619
PFMETBenchmark::calo_mex
double calo_mex
Definition: PFMETBenchmark.h:162
PFMETBenchmark::setup
void setup(std::string Filename, bool debug, bool plotAgainstReco=false, std::string benchmarkLabel_="ParticleFlow", DQMStore *dbe_store=nullptr)
Definition: PFMETBenchmark.cc:50
PFMETBenchmark::getCaloMEX
float getCaloMEX()
Definition: PFMETBenchmark.h:66
PFMETBenchmark::getPFMET
float getPFMET()
Definition: PFMETBenchmark.h:60
PFMETBenchmark::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: PFMETBenchmark.h:32
PFMETBenchmark::hTCMEX
TH1F * hTCMEX
Definition: PFMETBenchmark.h:133
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PFMETBenchmark::calo_mey
double calo_mey
Definition: PFMETBenchmark.h:163
GenMET.h
PFMETBenchmark::hPFMET
TH1F * hPFMET
Definition: PFMETBenchmark.h:114
METCollection.h
PFMETBenchmark::rec_phi
double rec_phi
Definition: PFMETBenchmark.h:159
PFMETBenchmark::getTruePhi
float getTruePhi()
Definition: PFMETBenchmark.h:58
PFMETBenchmark::hCaloMETvstrueMET
TH2F * hCaloMETvstrueMET
Definition: PFMETBenchmark.h:108
PFMETBenchmark::hDeltaTCMET
TH1F * hDeltaTCMET
Definition: PFMETBenchmark.h:135
PFMET.h
PFMETBenchmark::getDeltaCaloSET
float getDeltaCaloSET()
Definition: PFMETBenchmark.h:80
PFMETBenchmark::getPFSET
float getPFSET()
Definition: PFMETBenchmark.h:64
PFMETBenchmark::getTCMEX
float getTCMEX()
Definition: PFMETBenchmark.h:71
PFMETBenchmark::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: PFMETBenchmark.h:33
PFMETBenchmark::hSETvsDeltaSET
TH2F * hSETvsDeltaSET
Definition: PFMETBenchmark.h:96
PFBenchmarkAlgo.h
PFMETBenchmark::getCaloSET
float getCaloSET()
Definition: PFMETBenchmark.h:69
plotAgainstReco
bool plotAgainstReco
Definition: PFJetBenchmarkAnalyzer.cc:71
PFMETBenchmark::rec_set
double rec_set
Definition: PFMETBenchmark.h:160
PFMETBenchmark::tc_mex
double tc_mex
Definition: PFMETBenchmark.h:167
PFMETBenchmark::true_phi
double true_phi
Definition: PFMETBenchmark.h:155
PFBenchmarkAlgo
Definition: PFBenchmarkAlgo.h:16
PFMETBenchmark::getTCMET
float getTCMET()
Definition: PFMETBenchmark.h:70
PFMETBenchmark::getCaloMET
float getCaloMET()
Definition: PFMETBenchmark.h:65
PFMETBenchmark::~PFMETBenchmark
virtual ~PFMETBenchmark()
Definition: PFMETBenchmark.cc:30
MET.h
PFMETBenchmark::getDeltaPFPhi
float getDeltaPFPhi()
Definition: PFMETBenchmark.h:76
PFMETBenchmark::getDeltaTCSET
float getDeltaTCSET()
Definition: PFMETBenchmark.h:83
PFMETBenchmark::calo_set
double calo_set
Definition: PFMETBenchmark.h:165
PFMETBenchmark::calo_met
double calo_met
Definition: PFMETBenchmark.h:161
PFMETBenchmark::true_mex
double true_mex
Definition: PFMETBenchmark.h:153
PFMETBenchmark::plotAgainstReco_
bool plotAgainstReco_
Definition: PFMETBenchmark.h:175
PFMETBenchmark::hDeltaPhi
TH1F * hDeltaPhi
Definition: PFMETBenchmark.h:101
PFMETBenchmark::calo_phi
double calo_phi
Definition: PFMETBenchmark.h:164
PFMETBenchmark::hTrueMET
TH1F * hTrueMET
Definition: PFMETBenchmark.h:112
PFMETBenchmark::getDeltaCaloPhi
float getDeltaCaloPhi()
Definition: PFMETBenchmark.h:79
PFMETBenchmark::tc_met
double tc_met
Definition: PFMETBenchmark.h:166
PFMETBenchmark::hDeltaTCPhi
TH1F * hDeltaTCPhi
Definition: PFMETBenchmark.h:136
PFMETBenchmark::profileCaloMETvsCaloMETresp
TProfile * profileCaloMETvsCaloMETresp
Definition: PFMETBenchmark.h:120
PFMETBenchmark::hDeltaTCMEXvstrueSET
TH2F * hDeltaTCMEXvstrueSET
Definition: PFMETBenchmark.h:139
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
PFMETBenchmark::rec_mex
double rec_mex
Definition: PFMETBenchmark.h:157
PFMETBenchmark::getDeltaCaloMET
float getDeltaCaloMET()
Definition: PFMETBenchmark.h:78
PFMETBenchmark::getCaloPhi
float getCaloPhi()
Definition: PFMETBenchmark.h:68
PFMETBenchmark::getPFMEX
float getPFMEX()
Definition: PFMETBenchmark.h:61
PFMETBenchmark::hMEX
TH1F * hMEX
Definition: PFMETBenchmark.h:98
PFMETBenchmark::write
void write()
Definition: PFMETBenchmark.cc:35
PFMETBenchmark::getDeltaPFSET
float getDeltaPFSET()
Definition: PFMETBenchmark.h:77
PFMETBenchmark::hDeltaTCMETvstrueMET
TH2F * hDeltaTCMETvstrueMET
Definition: PFMETBenchmark.h:116
PFMETBenchmark::hDeltaCaloMETvstrueMET
TH2F * hDeltaCaloMETvstrueMET
Definition: PFMETBenchmark.h:105
PFMETBenchmark::hDeltaPFMETvstrueMET
TH2F * hDeltaPFMETvstrueMET
Definition: PFMETBenchmark.h:104
Candidate.h
PFMETBenchmark::getTrueSET
float getTrueSET()
Definition: PFMETBenchmark.h:59
reco::CaloMETCollection
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
Definition: CaloMETCollection.h:20
PFMETBenchmark::getTrueMET
float getTrueMET()
Definition: PFMETBenchmark.h:57
PFMETBenchmark::algo_
PFBenchmarkAlgo * algo_
Definition: PFMETBenchmark.h:173
PFMETBenchmark::hPFMETvstrueMET
TH2F * hPFMETvstrueMET
Definition: PFMETBenchmark.h:109
PFMETBenchmark::profileMETvsMETresp
TProfile * profileMETvsMETresp
Definition: PFMETBenchmark.h:95
PFCandidateFwd.h
PFMETBenchmark::tc_mey
double tc_mey
Definition: PFMETBenchmark.h:168
PFMETBenchmark::hDeltaTCMEX
TH1F * hDeltaTCMEX
Definition: PFMETBenchmark.h:134
PFMETBenchmark::PFMETBenchmark
PFMETBenchmark()
Definition: PFMETBenchmark.cc:28
PFMETBenchmark::hTCMET
TH1F * hTCMET
Definition: PFMETBenchmark.h:115
benchmarkLabel_
string benchmarkLabel_
Definition: PFJetBenchmarkAnalyzer.cc:74