00001 #ifndef ELECTRONPHOTONFOURMOMENTUMCORRECTION_GAINTOOL_H 00002 #define ELECTRONPHOTONFOURMOMENTUMCORRECTION_GAINTOOL_H 00003 00004 #include <string> 00005 #include <memory> 00006 #include <PATCore/PATCoreEnums.h> 00007 00008 class TFile; 00009 class TF1; 00010 00011 namespace egGain { 00012 00013 class GainTool { 00014 00015 public: 00016 GainTool(std::string filenameTO, std::string filenameVar); 00017 void Init(std::string filenameTO, std::string filenameVar); 00018 virtual ~GainTool(); 00019 00020 double CorrectionGainTool(double eta_input, double energy_input, double energy_layer2_input, 00021 PATCore::ParticleType::Type ptype=PATCore::ParticleType::Electron); 00022 00023 private: 00024 00025 static const int m_NUM_ETA_BINS=28; 00026 static const int m_NUM_ENERGY_BINS=3; 00027 static const int m_NUM_UNCONV_ENERGY_BINS=4; 00028 00029 std::unique_ptr <TFile> m_TOFile; 00030 std::unique_ptr <TFile> m_varFile; 00031 00032 TF1* m_funcTO[m_NUM_ETA_BINS]; 00033 TF1* m_funcG[m_NUM_ENERGY_BINS][m_NUM_ETA_BINS]; 00034 TF1* m_conv_funcG[m_NUM_ENERGY_BINS][m_NUM_ETA_BINS]; 00035 TF1* m_unconv_funcG[m_NUM_UNCONV_ENERGY_BINS][m_NUM_ETA_BINS]; 00036 00037 }; 00038 00039 00040 } 00041 #endif