File indexing completed on 2023-03-17 11:16:33
0001
0002
0003
0004 #ifndef PhysicsTools_PatUtils_ObjectResolutionCalc_h
0005 #define PhysicsTools_PatUtils_ObjectResolutionCalc_h
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "DataFormats/PatCandidates/interface/Electron.h"
0016 #include "DataFormats/PatCandidates/interface/Muon.h"
0017 #include "DataFormats/PatCandidates/interface/Tau.h"
0018 #include "DataFormats/PatCandidates/interface/MET.h"
0019 #include "DataFormats/PatCandidates/interface/Jet.h"
0020
0021 #include "TF1.h"
0022 #include "TFile.h"
0023 #include "TMultiLayerPerceptron.h"
0024 #include "TString.h"
0025
0026 namespace pat {
0027
0028 class ObjectResolutionCalc {
0029 public:
0030 ObjectResolutionCalc();
0031 ObjectResolutionCalc(const TString& resopath, bool useNN);
0032 ~ObjectResolutionCalc();
0033
0034 float obsRes(int obs, int eta, float eT);
0035 int etaBin(float eta);
0036
0037 #ifdef OBSOLETE
0038 void operator()(Electron& obj);
0039 void operator()(Muon& obj);
0040 void operator()(Tau& obj);
0041 void operator()(Jet& obj);
0042 void operator()(MET& obj);
0043 #else
0044
0045 template <typename T>
0046 void operator()(T& obj) {}
0047 #endif
0048
0049 private:
0050 TFile* resoFile_;
0051 std::vector<float> etaBinVals_;
0052 TF1 fResVsEt_[10][10];
0053 TMultiLayerPerceptron* network_[10];
0054 bool useNN_;
0055 };
0056
0057 }
0058
0059 #endif