Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef PhysicsTools_PatUtils_ObjectResolutionCalc_h
00006 #define PhysicsTools_PatUtils_ObjectResolutionCalc_h
00007
00017 #include "FWCore/Framework/interface/EventSetup.h"
00018 #include "FWCore/Framework/interface/Event.h"
00019 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00020 #include "FWCore/Utilities/interface/Exception.h"
00021 #include "Utilities/General/interface/envUtil.h"
00022
00023 #include "DataFormats/PatCandidates/interface/Electron.h"
00024 #include "DataFormats/PatCandidates/interface/Muon.h"
00025 #include "DataFormats/PatCandidates/interface/Tau.h"
00026 #include "DataFormats/PatCandidates/interface/MET.h"
00027 #include "DataFormats/PatCandidates/interface/Jet.h"
00028
00029 #include "TF1.h"
00030 #include "TH1.h"
00031 #include "TFile.h"
00032 #include "TKey.h"
00033 #include "TString.h"
00034 #include "TMultiLayerPerceptron.h"
00035
00036
00037 namespace pat {
00038
00039
00040 class ObjectResolutionCalc {
00041
00042 public:
00043
00044 ObjectResolutionCalc();
00045 ObjectResolutionCalc(TString resopath, bool useNN);
00046 ~ObjectResolutionCalc();
00047
00048 float obsRes(int obs, int eta, float eT);
00049 int etaBin(float eta);
00050
00051 #ifdef OBSOLETE
00052 void operator()(Electron & obj);
00053 void operator()(Muon & obj);
00054 void operator()(Tau & obj);
00055 void operator()(Jet & obj);
00056 void operator()(MET & obj);
00057 #else
00058
00059 template<typename T> void operator()(T &obj) { }
00060 #endif
00061
00062 private:
00063
00064 TFile * resoFile_;
00065 std::vector<float> etaBinVals_;
00066 TF1 fResVsEt_[10][10];
00067 TMultiLayerPerceptron * network_[10];
00068 bool useNN_;
00069
00070 };
00071
00072
00073 }
00074
00075 #endif