CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ObjectResolutionCalc.h
Go to the documentation of this file.
1 //
2 // $Id: ObjectResolutionCalc.h,v 1.5 2008/10/08 19:19:25 gpetrucc Exp $
3 //
4 
5 #ifndef PhysicsTools_PatUtils_ObjectResolutionCalc_h
6 #define PhysicsTools_PatUtils_ObjectResolutionCalc_h
7 
22 
28 
29 #include "TF1.h"
30 #include "TH1.h"
31 #include "TFile.h"
32 #include "TKey.h"
33 #include "TString.h"
34 #include "TMultiLayerPerceptron.h"
35 
36 
37 namespace pat {
38 
39 
41 
42  public:
43 
45  ObjectResolutionCalc(TString resopath, bool useNN);
47 
48  float obsRes(int obs, int eta, float eT);
49  int etaBin(float eta);
50 
51 #ifdef OBSOLETE
52  void operator()(Electron & obj);
53  void operator()(Muon & obj);
54  void operator()(Tau & obj);
55  void operator()(Jet & obj);
56  void operator()(MET & obj);
57 #else
58  // WORKAROUND
59  template<typename T> void operator()(T &obj) { }
60 #endif
61 
62  private:
63 
64  TFile * resoFile_;
65  std::vector<float> etaBinVals_;
66  TF1 fResVsEt_[10][10];
67  TMultiLayerPerceptron * network_[10];
68  bool useNN_;
69 
70  };
71 
72 
73 }
74 
75 #endif
Analysis-level MET class.
Definition: MET.h:42
TMultiLayerPerceptron * network_[10]
T eta() const
Analysis-level tau class.
Definition: Tau.h:50
std::vector< float > etaBinVals_
Analysis-level electron class.
Definition: Electron.h:52
Analysis-level calorimeter jet class.
Definition: Jet.h:72
float obsRes(int obs, int eta, float eT)
long double T
Analysis-level muon class.
Definition: Muon.h:51
Class to calculate MC resolutions for pat objects.