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 //
3 
4 #ifndef PhysicsTools_PatUtils_ObjectResolutionCalc_h
5 #define PhysicsTools_PatUtils_ObjectResolutionCalc_h
6 
20 
26 
27 #include "TF1.h"
28 #include "TH1.h"
29 #include "TFile.h"
30 #include "TKey.h"
31 #include "TString.h"
32 #include "TMultiLayerPerceptron.h"
33 
34 
35 namespace pat {
36 
37 
39 
40  public:
41 
43  ObjectResolutionCalc(const TString& resopath, bool useNN);
45 
46  float obsRes(int obs, int eta, float eT);
47  int etaBin(float eta);
48 
49 #ifdef OBSOLETE
50  void operator()(Electron & obj);
51  void operator()(Muon & obj);
52  void operator()(Tau & obj);
53  void operator()(Jet & obj);
54  void operator()(MET & obj);
55 #else
56  // WORKAROUND
57  template<typename T> void operator()(T &obj) { }
58 #endif
59 
60  private:
61 
62  TFile * resoFile_;
63  std::vector<float> etaBinVals_;
64  TF1 fResVsEt_[10][10];
65  TMultiLayerPerceptron * network_[10];
66  bool useNN_;
67 
68  };
69 
70 
71 }
72 
73 #endif
Analysis-level MET class.
Definition: MET.h:42
TMultiLayerPerceptron * network_[10]
T eta() const
Analysis-level tau class.
Definition: Tau.h:51
std::vector< float > etaBinVals_
Analysis-level electron class.
Definition: Electron.h:50
Analysis-level calorimeter jet class.
Definition: Jet.h:70
float obsRes(int obs, int eta, float eT)
long double T
Analysis-level muon class.
Definition: Muon.h:49
Class to calculate MC resolutions for pat objects.