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 
24 
25 //#include "FWCore/ServiceRegistry/interface/Service.h"
27 #include "TH1F.h"
28 #include "TH2F.h"
29 #include <string>
30 #include <TFile.h>
31 
32 
33 class PFMETBenchmark;
34 
35 class TH1F;
36 class TH2F;
37 
38 //class DQMStore; // CMSSW_2_X_X not needed here?
39 
41 
42  public:
43 
45  virtual ~PFMETBenchmark();
46 
47  void setup(
48  std::string Filename,
49  bool debug,
50  bool plotAgainstReco=0,
51  std::string benchmarkLabel_ = "ParticleFlow",
52  DQMStore * dbe_store = NULL
53  );
54  void process(const reco::PFMETCollection& ,
57  const reco::METCollection& );
61  const reco::METCollection&);
65  const reco::METCollection&,
66  const std::vector<reco::CaloJet>&,
67  const std::vector<reco::CaloJet>&);
68  float getTrueMET(){return true_met;}
69  float getTruePhi(){return true_phi;}
70  float getTrueSET(){return true_set;}
71  float getPFMET(){return rec_met;}
72  float getPFMEX(){return rec_mex-true_mex;}
73  float getPFMEY(){return rec_mey-true_mey;}
74  float getPFPhi(){return rec_phi;}
75  float getPFSET(){return rec_set;}
76  float getCaloMET(){return calo_met;}
77  float getCaloMEX(){return calo_mex-true_mex;}
78  float getCaloMEY(){return calo_mey-true_mey;}
79  float getCaloPhi(){return calo_phi;}
80  float getCaloSET(){return calo_set;}
81  float getTCMET(){return tc_met;}
82  float getTCMEX(){return tc_mex-true_mex;}
83  float getTCMEY(){return tc_mey-true_mey;}
84  float getTCPhi(){return tc_phi;}
85  float getTCSET(){return tc_set;}
86  float getDeltaPFMET(){return rec_met - true_met;}
87  float getDeltaPFPhi(){return mpi_pi(rec_phi - true_phi);}
88  float getDeltaPFSET(){return rec_set - true_set;}
89  float getDeltaCaloMET(){return calo_met - true_met;}
91  float getDeltaCaloSET(){return calo_set - true_set;}
92  float getDeltaTCMET(){return tc_met - true_met;}
93  float getDeltaTCPhi(){return mpi_pi(tc_phi - true_phi);}
94  float getDeltaTCSET(){return tc_set - true_set;}
95  double mpi_pi(double angle);
96  void analyse();
97  //void FitSlicesInY(TH2F*, TH1F*, TH1F*, bool, int);
98  void write();
99 
100  private:
101 
102  TFile *file_;
103 
104  // histograms
105  // delta Pt or E quantities for Barrel
110  TH1F* hMEX;
111  TH1F* hDeltaMEX;
112  TH1F* hDeltaMET;
113  TH1F* hDeltaPhi;
114  TH1F* hDeltaSET;
115 
124  TH1F* hTrueMET;
125  TH1F* hCaloMET;
126  TH1F* hPFMET;
127  TH1F* hTCMET;
130 
135  TH1F* hCaloMEX;
140 
145  TH1F* hTCMEX;
146  TH1F* hDeltaTCMEX;
147  TH1F* hDeltaTCMET;
148  TH1F* hDeltaTCPhi;
149  TH1F* hDeltaTCSET;
150 
153 
154  //TH1F *hmeanPF;
155  //TH1F *hmeanCalo;
156  //TH1F *hsigmaPF;
157  //TH1F *hsigmaCalo;
158  //TH1F *hrmsPF;
159  //TH1F *hrmsCalo;
160 
162 
163  double true_set;
164  double true_met;
165  double true_mex;
166  double true_mey;
167  double true_phi;
168  double rec_met;
169  double rec_mex;
170  double rec_mey;
171  double rec_phi;
172  double rec_set;
173  double calo_met;
174  double calo_mex;
175  double calo_mey;
176  double calo_phi;
177  double calo_set;
178  double tc_met;
179  double tc_mex;
180  double tc_mey;
181  double tc_phi;
182  double tc_set;
183 
184  protected:
185 
187  bool debug_;
190 };
191 
192 #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()
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
#define debug
Definition: MEtoEDMFormat.h:34
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()