CMS 3D CMS Logo

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