00001 #ifndef _ELECTRONPHOTONSHOWERSHAPEFUDGETOOL_H 00002 #define _ELECTRONPHOTONSHOWERSHAPEFUDGETOOL_H 00003 00013 // Framework include(s): 00014 #include "AsgTools/AsgTool.h" 00015 #ifdef USE_NEW_TOOL 00016 #include "ElectronPhotonShowerShapeFudgeTool/TPhotonMCShifterTool.h" 00017 #else 00018 #include "ElectronPhotonShowerShapeFudgeTool/FudgeMCTool.h" 00019 #endif 00020 #include "ElectronPhotonShowerShapeFudgeTool/TElectronMCShifterTool.h" 00021 #include "ElectronPhotonShowerShapeFudgeTool/IElectronPhotonShowerShapeFudgeTool.h" 00022 #include "TEnv.h" 00023 00024 class ElectronPhotonShowerShapeFudgeTool : public asg::AsgTool, virtual public IElectronPhotonShowerShapeFudgeTool 00025 { 00027 ASG_TOOL_CLASS(ElectronPhotonShowerShapeFudgeTool, IElectronPhotonShowerShapeFudgeTool) 00028 00029 public: 00031 ElectronPhotonShowerShapeFudgeTool( const std::string myname); 00032 00033 00035 virtual ~ElectronPhotonShowerShapeFudgeTool(); 00036 00037 public: 00039 virtual StatusCode initialize(); 00040 00042 virtual StatusCode finalize(); 00043 00044 public: 00045 00046 virtual const CP::CorrectionCode applyCorrection(xAOD::Photon& ph ) const; 00047 00048 virtual const CP::CorrectionCode applyCorrection(xAOD::Electron& el ) const; 00049 00050 virtual const CP::CorrectionCode correctedCopy( const xAOD::Photon& ph, xAOD::Photon*& output ) const ; 00051 00052 virtual const CP::CorrectionCode correctedCopy( const xAOD::Electron& el, xAOD::Electron*& output) const; 00053 00054 private: 00055 00056 #ifdef USE_NEW_TOOL 00057 TPhotonMCShifterTool* m_ph_rootTool; 00058 #else 00059 FudgeMCTool* m_ph_rootTool; 00060 #endif 00061 TElectronMCShifterTool* m_el_rootTool; 00062 00063 int m_preselection; 00064 00065 std::string m_configFile; 00066 00068 std::vector<float> GetFloatVector(const std::string& input, TEnv& env); 00069 00070 bool strtof(const std::string& input, float& f); 00071 }; // class ElectronPhotonShowerShapeFudgeTool 00072 00073 00074 00075 00076 #endif // _IFUDGEMCTOOL_H