|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   13     , m_transDistMax(10e6)
 
   15     , m_maxZ0SinTheta(10e6)
 
   38     ATH_MSG_INFO(
"Intialized using ITrackVertexAssociationTool");
 
   42   ATH_MSG_INFO(
"Intialized using custom track-vertex association");
 
   43   return StatusCode::SUCCESS;
 
   51   if(!handle_tracks.isValid()){
 
   52     ATH_MSG_ERROR(
"Error retrieving TrackParticleContainer from evtStore: "  
   62     bool oneOwningContainer(
true);
 
   65     oneOwningContainer=
false;
 
   69     if(!oneOwningContainer) {
 
   70       ATH_MSG_ERROR(
"Track view container holds track from multiple owning containers.");
 
   79   if(!handle_vert.isValid()){
 
   80     ATH_MSG_ERROR(
"Error retrieving VertexContainer from evtStore: "  
   85   const auto *vertexContainer = handle_vert.cptr();
 
  101   if(!handle_tva.record(std::move(tva))){
 
  102     ATH_MSG_ERROR(
"Unable to write new TrackVertexAssociation to evtStore: " 
  108   ATH_MSG_DEBUG(
"Wrote new TrackVertexAssociation to evtStore: "  
  118 std::unique_ptr<jet::TrackVertexAssociation> 
 
  123                 << 
"  vtx size="<< vertexContainer->
size());
 
  125   auto tva = std::make_unique<jet::TrackVertexAssociation>(
trackContainer);
 
  127   std::vector<const xAOD::Vertex*> vecVert;
 
  128   vecVert.assign(vertexContainer->
begin(), vertexContainer->
end());
 
  133     tva->associate( 
track, 
v );
 
  140 std::unique_ptr<jet::TrackVertexAssociation> 
 
  144                 << 
"  vtx size="<< vertexContainer->
size());
 
  146   auto tva = std::make_unique<jet::TrackVertexAssociation>(
trackContainer);
 
  148   for (
size_t iTrack = 0; iTrack < 
trackContainer->size(); ++iTrack)
 
  153       const float transverseDistance = 
track->d0();
 
  158       const float longitudinalDistance = 
track->z0()+
track->vz();
 
  163       size_t matchedIndex = 0;
 
  164       bool foundMatch = 
false;
 
  165       for (
size_t iVertex = 0; iVertex < vertexContainer->
size(); ++iVertex)
 
  169           double deltaz = longitudinalDistance - 
vertex->z();
 
  182           matchedIndex = iVertex;
 
  188         tva->associate(
trackContainer->at(iTrack),vertexContainer->
at(matchedIndex));
 
  198 std::unique_ptr<jet::TrackVertexAssociation> 
 
  201                                                        bool useCustom)
 const {
 
  
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
@ OWN_ELEMENTS
this data object owns its elements
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Class describing a Vertex.
Class describing a TrackParticle.
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.