00001 #ifndef TAUREC_TAUIDPILEUPCORRECTION_H 00002 #define TAUREC_TAUIDPILEUPCORRECTION_H 00003 00004 #include "tauRecTools/TauRecToolBase.h" 00005 #include "xAODTau/TauDefs.h" 00006 00007 class TH1; 00008 class TF1; 00009 00025 struct TauConversion { 00026 std::string detailName; 00027 xAOD::TauJetParameters::Detail detailUncorr; 00028 xAOD::TauJetParameters::Detail detailCorr; 00029 00030 TauConversion(){} 00031 TauConversion(std::string name, xAOD::TauJetParameters::Detail detail1, xAOD::TauJetParameters::Detail detail2) 00032 : detailName(name), detailUncorr(detail1), detailCorr(detail2) 00033 { } 00034 }; 00035 00036 00037 class TauIDPileupCorrection : virtual public TauRecToolBase { 00038 public: 00039 00040 TauIDPileupCorrection(const std::string& name="TauIDPileupCorrection") ; 00041 ASG_TOOL_CLASS2(TauIDPileupCorrection, TauRecToolBase, ITauToolBase) 00042 ~TauIDPileupCorrection(); 00043 00044 virtual StatusCode initialize(); 00045 virtual StatusCode finalize(); 00046 virtual StatusCode execute(xAOD::TauJet& pTau); 00047 00048 virtual void print() const { } 00049 virtual StatusCode eventInitialize() { return StatusCode::SUCCESS; } 00050 virtual StatusCode eventFinalize() { return StatusCode::SUCCESS; } 00051 virtual void cleanup(xAOD::TauJet* ) { } 00052 00053 00054 private: 00055 std::string m_configPath; 00056 std::string m_tauContainerKey; 00057 std::string m_vertexContainerKey; 00058 std::string m_file1P; 00059 std::string m_file3P; 00060 00061 std::map<std::string, TF1*> m_calibFunctions1P; 00062 std::map<std::string, TF1*> m_calibFunctions3P; 00063 00064 00065 StatusCode fillCalibMap( const std::string& file_name, std::map<std::string, TF1*> &calib_map); 00066 00067 std::vector<TauConversion> m_conversion; 00068 00069 double m_averageEstimator; 00070 unsigned int m_minNTrackAtVertex; 00071 bool m_printMissingContainerINFO; 00072 bool m_useMu; 00073 00074 }; 00075 00076 #endif