CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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"
26 #include <string>
27 #include <TFile.h>
28 
29 
30 class DQMStore;
31 
33 
34  public:
35 
37  virtual ~PFMETBenchmark();
38 
39  void setup(
40  std::string Filename,
41  bool debug,
42  bool plotAgainstReco=0,
43  std::string benchmarkLabel_ = "ParticleFlow",
44  DQMStore * dbe_store = NULL
45  );
46  void process(const reco::PFMETCollection& ,
49  const reco::METCollection& );
53  const reco::METCollection&);
57  const reco::METCollection&,
58  const std::vector<reco::CaloJet>&,
59  const std::vector<reco::CaloJet>&);
60  float getTrueMET(){return true_met;}
61  float getTruePhi(){return true_phi;}
62  float getTrueSET(){return true_set;}
63  float getPFMET(){return rec_met;}
64  float getPFMEX(){return rec_mex-true_mex;}
65  float getPFMEY(){return rec_mey-true_mey;}
66  float getPFPhi(){return rec_phi;}
67  float getPFSET(){return rec_set;}
68  float getCaloMET(){return calo_met;}
69  float getCaloMEX(){return calo_mex-true_mex;}
70  float getCaloMEY(){return calo_mey-true_mey;}
71  float getCaloPhi(){return calo_phi;}
72  float getCaloSET(){return calo_set;}
73  float getTCMET(){return tc_met;}
74  float getTCMEX(){return tc_mex-true_mex;}
75  float getTCMEY(){return tc_mey-true_mey;}
76  float getTCPhi(){return tc_phi;}
77  float getTCSET(){return tc_set;}
78  float getDeltaPFMET(){return rec_met - true_met;}
79  float getDeltaPFPhi(){return mpi_pi(rec_phi - true_phi);}
80  float getDeltaPFSET(){return rec_set - true_set;}
81  float getDeltaCaloMET(){return calo_met - true_met;}
83  float getDeltaCaloSET(){return calo_set - true_set;}
84  float getDeltaTCMET(){return tc_met - true_met;}
85  float getDeltaTCPhi(){return mpi_pi(tc_phi - true_phi);}
86  float getDeltaTCSET(){return tc_set - true_set;}
87  double mpi_pi(double angle);
88  void analyse();
89  //void FitSlicesInY(TH2F*, TH1F*, TH1F*, bool, int);
90  void write();
91 
92  private:
93 
94  TFile *file_;
95 
96  // histograms
97  // delta Pt or E quantities for Barrel
102  TH1F* hMEX;
103  TH1F* hDeltaMEX;
104  TH1F* hDeltaMET;
105  TH1F* hDeltaPhi;
106  TH1F* hDeltaSET;
107 
116  TH1F* hTrueMET;
117  TH1F* hCaloMET;
118  TH1F* hPFMET;
119  TH1F* hTCMET;
122 
127  TH1F* hCaloMEX;
132 
137  TH1F* hTCMEX;
138  TH1F* hDeltaTCMEX;
139  TH1F* hDeltaTCMET;
140  TH1F* hDeltaTCPhi;
141  TH1F* hDeltaTCSET;
142 
145 
146  //TH1F *hmeanPF;
147  //TH1F *hmeanCalo;
148  //TH1F *hsigmaPF;
149  //TH1F *hsigmaCalo;
150  //TH1F *hrmsPF;
151  //TH1F *hrmsCalo;
152 
154 
155  double true_set;
156  double true_met;
157  double true_mex;
158  double true_mey;
159  double true_phi;
160  double rec_met;
161  double rec_mex;
162  double rec_mey;
163  double rec_phi;
164  double rec_set;
165  double calo_met;
166  double calo_mex;
167  double calo_mey;
168  double calo_phi;
169  double calo_set;
170  double tc_met;
171  double tc_mex;
172  double tc_mey;
173  double tc_phi;
174  double tc_set;
175 
176  protected:
177 
179  bool debug_;
182 };
183 
184 #endif // RecoParticleFlow_Benchmark_PFMETBenchmark_h
TProfile * profileTCSETvsTCSETresp
float getTrueMET()
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
TProfile * profileTCMETvsTCMETresp
TH2F * hCaloSETvsDeltaCaloSET
TH2F * hDeltaPFPhivstrueMET
float getDeltaCaloPhi()
TH2F * hDeltaTCPhivstrueMET
TH2F * hDeltaTCMETvstrueMET
float getDeltaTCMET()
TProfile * profileMETvsMETresp
TH2F * hDeltaCaloMETvstrueMET
virtual ~PFMETBenchmark()
TH2F * hCaloMETvstrueMET
void calculateQuantities(const reco::PFMETCollection &, const reco::GenParticleCollection &, const reco::CaloMETCollection &, const reco::METCollection &)
TH2F * hDeltaCaloPhivstrueMET
float getDeltaTCPhi()
TProfile * profileSETvsSETresp
#define NULL
Definition: scimark2.h:8
TH2F * hCaloSETvsDeltaCaloMET
std::string outputFile_
std::vector< reco::MET > METCollection
collection of MET objects
Definition: METCollection.h:23
PFBenchmarkAlgo * algo_
double mpi_pi(double angle)
void process(const reco::PFMETCollection &, const reco::GenParticleCollection &, const reco::CaloMETCollection &, const reco::METCollection &)
float getDeltaCaloSET()
TH2F * hDeltaPFMETvstrueMET
float getCaloMEX()
float getTruePhi()
float getCaloPhi()
TH2F * hDeltaTCMEXvstrueSET
float getDeltaPFSET()
string benchmarkLabel_
float getDeltaPFMET()
TH2F * hDeltaCaloMEXvstrueSET
float getDeltaTCSET()
TH2F * hDeltaPFMEXvstrueSET
TProfile * profileCaloSETvsCaloSETresp
bool plotAgainstReco
float getDeltaCaloMET()
#define debug
Definition: HDRShower.cc:19
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
float getDeltaPFPhi()
std::vector< reco::PFMET > PFMETCollection
collection of PFMET objects
void setup(std::string Filename, bool debug, bool plotAgainstReco=0, std::string benchmarkLabel_="ParticleFlow", DQMStore *dbe_store=NULL)
TH2F * hTCSETvsDeltaTCSET
TH2F * hTCMETvstrueMET
float getCaloSET()
DQMStore * dbe_
TProfile * profileCaloMETvsCaloMETresp
float getCaloMET()
TH2F * hTCSETvsDeltaTCMET
TH2F * hPFMETvstrueMET
float getCaloMEY()
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
float getTrueSET()