00001 #ifndef LOOSETRACKVERTEXASSOCIATIONTOOL_H
00002 #define LOOSETRACKVERTEXASSOCIATIONTOOL_H
00003
00004 #include "AsgTools/AsgTool.h"
00005 #include "TrackVertexAssociationTool/ITrackVertexAssociationTool.h"
00006 #include "AthContainers/AuxElement.h"
00007 #include "AthLinks/ElementLink.h"
00008
00009 #include "xAODTracking/TrackParticleFwd.h"
00010 #include "xAODTracking/TrackParticleContainerFwd.h"
00011 #include "xAODTracking/VertexFwd.h"
00012 #include "xAODTracking/VertexContainerFwd.h"
00013 #include "TrackVertexAssociationTool/TrackVertexAssociationMap.h"
00014
00015 #include <string>
00016
00017 namespace CP
00018 {
00019
00022 class LooseTrackVertexAssociationTool : virtual public asg::AsgTool, virtual public ITrackVertexAssociationTool
00023 {
00024
00025 ASG_TOOL_CLASS( LooseTrackVertexAssociationTool, ITrackVertexAssociationTool)
00026 public:
00027 LooseTrackVertexAssociationTool(std::string name);
00028
00029
00030 StatusCode initialize();
00031
00032 void print() const;
00033
00037 bool isCompatible( const xAOD::TrackParticle &trk, const xAOD::Vertex &vx ) const;
00038 xAOD::TrackVertexAssociationMap getMatchMap( std::vector< const xAOD::TrackParticle *> &trk_list, std::vector< const xAOD::Vertex *> &vx_list) const;
00039 xAOD::TrackVertexAssociationMap getMatchMap( const xAOD::TrackParticleContainer &trkCont, const xAOD::VertexContainer &vxCont ) const;
00040
00041
00044 ElementLink< xAOD::VertexContainer> getUniqueMatchVertexLink(const xAOD::TrackParticle &, const xAOD::VertexContainer &vxCont) const;
00045
00046 const xAOD::Vertex* getUniqueMatchVertex( const xAOD::TrackParticle &trk, std::vector< const xAOD::Vertex *> &vx_list) const;
00047
00050 xAOD::TrackVertexAssociationMap getUniqueMatchMap( std::vector< const xAOD::TrackParticle *> &trk_list , std::vector< const xAOD::Vertex *> &vx_list) const;
00051
00052 xAOD::TrackVertexAssociationMap getUniqueMatchMap( const xAOD::TrackParticleContainer &trkCont , const xAOD::VertexContainer &vxCont) const;
00053
00054 private:
00055
00057 bool isMatch(const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, float & dz) const;
00058 const xAOD::Vertex* getUniqueMatchVx( const xAOD::TrackParticle &trk, const xAOD::VertexContainer &vxCont) const;
00059
00060 float m_dz_cut;
00061 float m_d0_cut;
00062 };
00063 }
00064
00065 #endif
00066