00001
00002
00003 #ifndef __EGammaAmbiguityTool__
00004 #define __EGammaAmbiguityTool__
00005
00014
00015 #include "AsgTools/AsgTool.h"
00016 #include "ElectronPhotonSelectorTools/IEGammaAmbiguityTool.h"
00017 #include "xAODEgamma/EgammaContainerFwd.h"
00018
00019 class EGammaAmbiguityTool : public asg::AsgTool,
00020 virtual public IEGammaAmbiguityTool
00021 {
00022 ASG_TOOL_CLASS2(EGammaAmbiguityTool, IEGammaAmbiguityTool, asg::IAsgTool)
00023
00024 public:
00026 EGammaAmbiguityTool(std::string myname);
00027
00028
00030 virtual ~EGammaAmbiguityTool();
00031
00032
00033 public:
00035 virtual StatusCode initialize();
00036
00038 virtual StatusCode finalize();
00039
00042 virtual unsigned int ambiguityResolve(const xAOD::CaloCluster* cluster,
00043 const xAOD::Vertex* vx,
00044 const xAOD::TrackParticle* tp, xAOD::AmbiguityTool::AmbiguityType& type) const;
00045
00050 virtual unsigned int ambiguityResolve(const xAOD::CaloCluster* cluster,
00051 const xAOD::Vertex* vx,
00052 const xAOD::TrackParticle* tp) const;
00053
00054
00058 unsigned int ambiguityResolve(const xAOD::Egamma& egamma) const;
00059
00063 bool accept( const xAOD::Egamma& egamma, bool acceptAmbiguous = true ) const;
00064
00066 const xAOD::Egamma* getOverlappingObject( const xAOD::Egamma& egamma,const xAOD::EgammaContainer* egammaContainer ) const;
00067
00072 bool hasInnermostPixelHit(const xAOD::TrackParticle& tp) const;
00073
00076 size_t nTrkWithInnermostPixelHits(const xAOD::Vertex& vx) const;
00077
00079 bool isInVertex(const xAOD::TrackParticle&, const xAOD::Vertex&) const;
00080
00082 bool passDeltaR_innermost(const xAOD::Vertex& vx) const;
00083
00084 private:
00085
00087 int m_MinNoSiHits;
00089 int m_MinNoPixHits;
00091 float m_maxEoverPCut;
00093 float m_minPtCut;
00095 float m_maxDeltaR_innermost;
00097 std::string m_electronContainerName;
00099 std::string m_photonContainerName;
00100
00103 const xAOD::EgammaContainer *getContainer(bool electronContainer) const;
00104
00105 };
00106
00107 #endif