00001 #ifndef EG_RESOLUTION_H
00002 #define EG_RESOLUTION_H
00003
00004 #include <stdlib.h>
00005 #include <math.h>
00006
00007 #include "AsgTools/AsgMessaging.h"
00008
00009 #include "xAODEgamma/Egamma.h"
00010 #include <memory>
00011 #include "TAxis.h"
00012 #include "Riostream.h"
00013 #include "TH1.h"
00014 #include "TFile.h"
00015 #include "TArrayD.h"
00016
00028 class eg_resolution : public asg::AsgMessaging{
00029
00030 public:
00032 eg_resolution(const std::string& configuration);
00033 ~eg_resolution();
00034
00039 double getResolution(int particle_type, double energy, double eta, int resol_type=2) const;
00043 double getResolution(const xAOD::Egamma& particle, int resol_type=2) const;
00044
00045 private:
00046
00047
00048 TH1* m_hSampling[4][3];
00049 TH1* m_hNoise[4][3];
00050 TH1* m_hConst[4][3];
00051 std::unique_ptr <TFile> m_file0;
00052 std::unique_ptr <TFile> m_file1;
00053 std::unique_ptr <TFile> m_file2;
00054 std::unique_ptr <TFile> m_file3;
00055 const TArrayD* m_etaBins;
00056
00057 };
00058
00059 #endif