00001 // Dear emacs, this is -*- c++ -*- 00002 // $Id: Vertex_v1.h 575751 2013-12-16 16:45:36Z krasznaa $ 00003 #ifndef XAODTRACKING_VERSIONS_VERTEX_V1_H 00004 #define XAODTRACKING_VERSIONS_VERTEX_V1_H 00005 00006 // System include(s): 00007 #include <vector> 00008 00009 // Core include(s): 00010 #include "AthContainers/AuxElement.h" 00011 #include "AthLinks/ElementLink.h" 00012 00013 // EDM include(s): 00014 #include "EventPrimitives/EventPrimitives.h" 00015 #include "GeoPrimitives/GeoPrimitives.h" 00016 #ifndef XAOD_STANDALONE 00017 #ifndef XAOD_MANACORE 00018 # include "VxVertex/VxTrackAtVertex.h" 00019 #endif // not XAOD_MANACORE 00020 #endif // not XAOD_STANDALONE 00021 00022 // xAOD include(s): 00023 #include "xAODTracking/TrackingPrimitives.h" 00024 #include "xAODTracking/TrackParticleContainerFwd.h" 00025 #include "xAODTracking/NeutralParticleContainer.h" 00026 #include "xAODBase/ObjectType.h" 00027 00028 // Local include(s): 00029 #include "xAODTracking/TrackingPrimitives.h" 00030 00031 namespace xAOD { 00032 00040 class Vertex_v1 : public SG::AuxElement { 00041 00042 public: 00044 Vertex_v1(); 00045 00047 Vertex_v1(const Vertex_v1& other); 00048 00050 Vertex_v1& operator=(const Vertex_v1& tp ); 00051 00053 Type::ObjectType type() const; 00054 00056 float x() const; 00058 void setX( float value ); 00060 float y() const; 00062 void setY( float value ); 00064 float z() const; 00066 void setZ( float value ); 00067 00069 const std::vector< float >& covariance() const; 00071 void setCovariance( const std::vector< float >& value ); 00072 00074 const Amg::Vector3D& position() const; 00076 void setPosition( const Amg::Vector3D& position ); 00077 00079 const AmgSymMatrix(3)& covariancePosition() const; 00081 void setCovariancePosition( const AmgSymMatrix(3)& covariancePosition ); 00082 00085 00087 float chiSquared() const; 00089 float numberDoF() const; 00091 void setFitQuality( float chiSquared, float numberDoF ); 00092 00094 00096 VxType::VertexType vertexType() const; 00098 void setVertexType( VxType::VertexType vType ); 00099 00100 #if ( ! defined(XAOD_STANDALONE) ) && ( ! defined(XAOD_MANACORE) ) 00102 std::vector< Trk::VxTrackAtVertex >& vxTrackAtVertex(); 00104 const std::vector< Trk::VxTrackAtVertex >& vxTrackAtVertex() const; 00106 bool vxTrackAtVertexAvailable() const; 00107 #endif // not XAOD_STANDALONE and not XAOD_MANACORE 00108 00111 00113 typedef std::vector< ElementLink< xAOD::TrackParticleContainer > > 00114 TrackParticleLinks_t; 00116 const TrackParticleLinks_t& trackParticleLinks() const; 00118 void setTrackParticleLinks( const TrackParticleLinks_t& trackParticles ); 00119 00121 const std::vector< float >& trackWeights() const; 00123 void setTrackWeights( const std::vector< float >& weights ); 00124 00125 00127 typedef std::vector< ElementLink< xAOD::NeutralParticleContainer > > NeutralParticleLinks_t; 00129 const NeutralParticleLinks_t& neutralParticleLinks() const; 00131 void setNeutralParticleLinks( const NeutralParticleLinks_t& neutralParticles ); 00132 00134 const std::vector< float >& neutralWeights() const; 00136 void setNeutralWeights( const std::vector< float >& weights ); 00137 00138 00140 const TrackParticle* trackParticle( size_t i ) const; 00142 float trackWeight( size_t i ) const; 00144 size_t nTrackParticles() const; 00145 00146 00148 const NeutralParticle* neutralParticle( size_t i ) const; 00150 float neutralWeight( size_t i ) const; 00152 size_t nNeutralParticles() const; 00153 00154 00156 void addTrackAtVertex( const ElementLink< TrackParticleContainer >& tr, 00157 float weight = 1.0 ); 00158 00160 void addNeutralAtVertex( const ElementLink< NeutralParticleContainer >& tr, 00161 float weight = 1.0 ); 00162 00164 void clearTracks(); 00165 00167 void clearNeutrals(); 00168 00169 00171 00173 void resetCache(); 00174 00175 private: 00177 mutable Amg::Vector3D m_position; 00179 mutable bool m_positionCached; 00181 mutable AmgSymMatrix(3) m_covariance; 00183 mutable bool m_covarianceCached; 00184 00185 }; // end of the Vertex_v1 class definitions 00186 00187 } // end of the xAOD namespace 00188 00189 #include "xAODCore/BaseInfo.h" 00190 SG_BASE (xAOD::Vertex_v1, SG::AuxElement); 00191 00192 #endif // XAODTRACKING_VERSIONS_VERTEX_V1_H