00001 #ifndef TIGHTTRACKVERTEXASSOCIATIONTOOL_H
00002 #define TIGHTTRACKVERTEXASSOCIATIONTOOL_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 TightTrackVertexAssociationTool : virtual public asg::AsgTool, virtual public ITrackVertexAssociationTool
00023 {
00024 enum MatchStatus{UsedInFit=1, Matched=2, UnMatch=0};
00025
00026 ASG_TOOL_CLASS( TightTrackVertexAssociationTool, ITrackVertexAssociationTool)
00027 public:
00028 TightTrackVertexAssociationTool(std::string name);
00029
00030
00031 StatusCode initialize();
00032
00033 void print() const;
00034
00038 bool isCompatible( const xAOD::TrackParticle &trk, const xAOD::Vertex &vx ) const;
00039 xAOD::TrackVertexAssociationMap getMatchMap( std::vector< const xAOD::TrackParticle *> &trk_list, std::vector< const xAOD::Vertex *> &vx_list) const;
00040 xAOD::TrackVertexAssociationMap getMatchMap( const xAOD::TrackParticleContainer &trkCont, const xAOD::VertexContainer &vxCont ) const;
00041
00042
00046 ElementLink< xAOD::VertexContainer> getUniqueMatchVertexLink(const xAOD::TrackParticle &, const xAOD::VertexContainer &vxCont) const;
00047
00048 const xAOD::Vertex* getUniqueMatchVertex( const xAOD::TrackParticle &trk, std::vector< const xAOD::Vertex *> &vx_list) const;
00049
00052 xAOD::TrackVertexAssociationMap getUniqueMatchMap( std::vector< const xAOD::TrackParticle *> &trk_list , std::vector< const xAOD::Vertex *> &vx_list) const;
00053
00054 xAOD::TrackVertexAssociationMap getUniqueMatchMap( const xAOD::TrackParticleContainer &trkCont , const xAOD::VertexContainer &vxCont) const;
00055
00056 private:
00057
00061 MatchStatus doTightMatch(const xAOD::TrackParticle &trk, const xAOD::Vertex &vx, float & dz) const;
00062 const xAOD::Vertex* getUniqueMatchVx( const xAOD::TrackParticle &trk, const xAOD::VertexContainer &vxCont) const;
00063
00064 float m_dz_cut;
00065 float m_d0_cut;
00066 bool m_doPV;
00067 bool m_dod0sel;
00068 };
00069 }
00070
00071 #endif
00072