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