ATLAS Offline Software
IVertexFinder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  IVertexFinder.h - Description
7  -------------------
8  begin : 14-02-2006
9  authors : Andreas Wildauer (CERN PH-ATC)
10  : Giacinto Piacquadio (Freiburg University), Kirill Prokofiev
11  (Sheffield University) email : andreas.wildauer@cern.ch
12  giacinto.piacquadio@physik.uni-freiburg.de
13  changes : David Shope <david.richard.shope@cern.ch> (2016-04-26)
14 
15  EDM Migration to xAOD - from Trk::VxCandidate to xAOD::Vertex
16 
17  findVertex will now always return an xAOD::VertexContainer,
18  even when using a TrackCollection or a
19  TrackParticleBaseCollection as input.
20 
21  : Christos Anastopoulos Athena MT
22  ***************************************************************************/
23 
34 #ifndef InDetRecToolInterfaces_IVertexFinder_H
35 #define InDetRecToolInterfaces_IVertexFinder_H
36 #include "GaudiKernel/AlgTool.h"
37 #include "GaudiKernel/EventContext.h"
38 #include "GaudiKernel/ThreadLocalContext.h"
41 
42 // xAOD includes
48 #include "xAODTracking/VertexFwd.h"
49 
50 namespace InDet {
51 static const InterfaceID IID_IVertexFinder("IVertexFinder", 1, 0);
52 class IVertexFinder : virtual public IAlgTool
53 {
54 public:
55  virtual ~IVertexFinder(){};
56  static const InterfaceID& interfaceID() { return IID_IVertexFinder; }
57 
63  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
64  findVertex(const EventContext& ctx,
65  const TrackCollection* trackTES) const = 0;
66 
72  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
73  findVertex(const EventContext& ctx,
74  const xAOD::TrackParticleContainer* trackParticles) const = 0;
75 
76  /*
77  * Non Event context aware methods.
78  * Can be remove when all clients move to EventContext
79  * aware calls
80  */
81 
82  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
83  findVertex(const TrackCollection* trackTES) const
84  {
85  return findVertex(Gaudi::Hive::currentContext(), trackTES);
86  }
87 
88  virtual std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer*>
89  findVertex(const xAOD::TrackParticleContainer* trackParticles) const
90  {
91  return findVertex(Gaudi::Hive::currentContext(), trackParticles);
92  }
93 };
94 }
95 #endif
TrackParticleBaseCollection.h
VertexContainerFwd.h
InDet::IVertexFinder::findVertex
virtual std::pair< xAOD::VertexContainer *, xAOD::VertexAuxContainer * > findVertex(const EventContext &ctx, const TrackCollection *trackTES) const =0
Find vertex from Trk::TrackCollection.
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
TrackParticleAuxContainer.h
TrackCollection.h
DataVector< Trk::Track >
VertexFwd.h
TrackParticleFwd.h
InDet::IVertexFinder::interfaceID
static const InterfaceID & interfaceID()
Definition: IVertexFinder.h:73
InDet::IVertexFinder::~IVertexFinder
virtual ~IVertexFinder()
Definition: IVertexFinder.h:72
TrackParticleContainerFwd.h
VertexAuxContainer.h