00001 #ifndef FSRUTILS_FsrPhotonTool_H
00002 #define FSRUTILS_FsrPhotonTool_H
00003
00004
00005 #include "AsgTools/AsgTool.h"
00006 #include "AsgTools/ToolHandle.h"
00007
00008
00009 #include "FsrUtils/IFsrPhotonTool.h"
00010
00011
00012 namespace CP
00013 {
00014 class IIsolationSelectionTool;
00015 }
00016
00017 namespace FSR {
00018
00024
00025 class FsrPhotonTool : public virtual IFsrPhotonTool,
00026 public asg::AsgTool {
00027
00029 ASG_TOOL_CLASS( FsrPhotonTool, FSR::IFsrPhotonTool )
00030
00031 public:
00033 FsrPhotonTool( const std::string& name );
00034
00037
00039 virtual StatusCode initialize();
00040
00042
00045
00047 virtual CP::CorrectionCode getFsrPhoton(const xAOD::IParticle* part, FsrCandidate& candidate,
00048 const xAOD::PhotonContainer* photons = 0,
00049 const xAOD::ElectronContainer* electrons = 0);
00050
00053 virtual std::vector<FsrCandidate>* getFsrCandidateList(const xAOD::IParticle* part,
00054 const xAOD::PhotonContainer* photons = 0,
00055 const xAOD::ElectronContainer* electrons = 0);
00056
00058 virtual std::vector<FsrCandidate>* getFarFsrCandidateList(const xAOD::IParticle* part,
00059 const xAOD::PhotonContainer* photons_cont);
00060
00062 virtual std::vector<FsrCandidate>* getNearFsrCandidateList(const xAOD::Muon* part,
00063 const xAOD::PhotonContainer* photons_cont,
00064 const xAOD::ElectronContainer* electrons_cont);
00065
00067 private:
00069 std::vector<FsrCandidate>* sortFsrCandidates( std::vector< std::pair <const xAOD::IParticle*, double> > FsrCandList,
00070 std::string option="ET");
00071 bool isOverlap(const xAOD::Electron_v1* electron, std::vector< std::pair <const xAOD::IParticle*, double> > phfsr,
00072 unsigned int nofPhFsr);
00073 double deltaR(float muonEta, float muonPhi, float phEta, float phPhi) const;
00074 double deltaPhi(float phi1, float phi2) const;
00075 static bool compareEt(FsrCandidate c1, FsrCandidate c2) { return (c1.Et > c2.Et); }
00076
00077
00078
00079
00080 double m_high_et_min;
00081 double m_overlap_el_ph;
00082 double m_overlap_el_mu;
00083
00084 double m_far_fsr_drcut;
00085 double m_far_fsr_etcut;
00086 std::string m_far_fsr_isoWorkingPoint;
00087
00088 double m_drcut;
00089 double m_etcut;
00090 double m_f1cut;
00091 double m_topo_drcut;
00092 double m_topo_f1cut;
00093
00094
00095 std::vector<FsrCandidate> m_fsrPhotons;
00096 FsrCandidate::FsrType m_fsr_type;
00097
00098 ToolHandle<CP::IIsolationSelectionTool> m_isoSelTool;
00099
00100 };
00101
00102 }
00103
00104 #endif // FSRUTILS_FsrPhotonTool_H