ATLAS Offline Software
Navigator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Navigator.h, (c) ATLAS Detector software
8 
9 #ifndef TRKEXTOOLS_NAVIGATOR_H
10 #define TRKEXTOOLS_NAVIGATOR_H
11 
12 // Gaudi
14 #include "GaudiKernel/ServiceHandle.h"
15 // Trk
25 
26 #include <cstring>
27 #include <Gaudi/Accumulators.h>
28 
29 namespace Trk {
30 
31  class IGeometryBuilder;
32  class IPropagator;
33  class Surface;
34  class Track;
35  class TrackingVolume;
36  typedef std::pair<const NavigationCell*,const NavigationCell*> NavigationPair;
37 
48  class Navigator final : public AthAlgTool, virtual public INavigator {
49  public:
51  Navigator(const std::string&, const std::string&, const IInterface*);
53  virtual ~Navigator() = default;
54 
56  virtual StatusCode initialize() override;
57 
60  virtual const TrackingGeometry* trackingGeometry(
61  const EventContext& ctx) const override final;
62 
65  virtual const TrackingVolume* volume(
66  const EventContext& ctx, const Amg::Vector3D& gp) const override final;
67 
69  virtual const TrackingVolume* highestVolume(
70  const EventContext& ctx) const override final;
71 
74  virtual const TrackParameters* closestParameters(
75  const Track& trk, const Surface& sf) const override final;
76 
78  virtual bool atVolumeBoundary(const Trk::TrackParameters* parms,
79  const Trk::TrackingVolume* vol,
81  const Trk::TrackingVolume*& nextVol,
82  double tol) const override final;
83 
87  const EventContext& ctx, const IPropagator& prop,
88  const TrackParameters& parms, PropDirection dir) const override final;
89 
93  const EventContext& ctx, const IPropagator& prop,
94  const TrackParameters& parms, PropDirection dir,
95  const TrackingVolume& vol) const override final;
96 
100  const EventContext& ctx, const IPropagator& prop,
101  const TrackParameters& parms, PropDirection dir,
102  const TrackingVolume& vol) const override final;
103 
104  private:
106  this, "TrackingGeometryKey", "AtlasTrackingGeometry",
107  "Key of output of TrackingGeometry for ID"};
108 
111  this, "TrackingGeometrySvc", ""};
114  /******************************************************************/
125  //------------ Magnetic field properties
127  };
128 
129 } // end of namespace
130 
131 
132 #endif // TRKEXTOOLS_NAVIGATOR_H
133 
Trk::Navigator::atVolumeBoundary
virtual bool atVolumeBoundary(const Trk::TrackParameters *parms, const Trk::TrackingVolume *vol, Trk::PropDirection dir, const Trk::TrackingVolume *&nextVol, double tol) const override final
INavigator method to resolve navigation at boundary.
Definition: Navigator.cxx:267
Trk::BoundarySurface
Definition: BoundarySurface.h:50
Trk::Navigator::m_trackingGeometryName
std::string m_trackingGeometryName
Name of the TrackingGeometry as given in Detector Store.
Definition: Navigator.h:113
TrackParameters.h
Trk::Navigator::~Navigator
virtual ~Navigator()=default
Destructor.
Trk::MagneticFieldProperties
Definition: MagneticFieldProperties.h:31
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
PropDirection.h
Trk::Navigator::Navigator
Navigator(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition: Navigator.cxx:40
Trk::Navigator::initialize
virtual StatusCode initialize() override
AlgTool initialize method.
Definition: Navigator.cxx:63
Trk::Navigator::m_insideVolumeTolerance
double m_insideVolumeTolerance
Tolerance for inside() method of Volumes.
Definition: Navigator.h:116
MagneticFieldProperties.h
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
Trk::Navigator::highestVolume
virtual const TrackingVolume * highestVolume(const EventContext &ctx) const override final
INavigator interface method - forward hightes TrackingVolume.
Definition: Navigator.cxx:94
Trk::Navigator::nextBoundarySurface
virtual const BoundarySurface< TrackingVolume > * nextBoundarySurface(const EventContext &ctx, const IPropagator &prop, const TrackParameters &parms, PropDirection dir) const override final
INavigator interface methods - getting the next BoundarySurface not knowing the Volume.
Definition: Navigator.cxx:100
Trk::Navigator::nextTrackingVolume
virtual NavigationCell nextTrackingVolume(const EventContext &ctx, const IPropagator &prop, const TrackParameters &parms, PropDirection dir, const TrackingVolume &vol) const override final
INavigator interface method - getting the next Volume and the parameter for the next Navigation.
Definition: Navigator.cxx:169
Trk::IPropagator
Definition: IPropagator.h:55
Trk::TrackingGeometry
Definition: TrackingGeometry.h:67
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Trk::Navigator
Definition: Navigator.h:48
Trk::ParametersBase
Definition: ParametersBase.h:55
ParticleHypothesis.h
Trk::Navigator::m_isOnSurfaceTolerance
double m_isOnSurfaceTolerance
Tolerance for isOnSurface() method of BoundarySurfaces.
Definition: Navigator.h:118
beamspotman.dir
string dir
Definition: beamspotman.py:623
ReadCondHandleKey.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::Navigator::m_useConditions
bool m_useConditions
Definition: Navigator.h:119
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::Navigator::m_useStraightLineApproximation
bool m_useStraightLineApproximation
use the straight line approximation for the next boundary sf
Definition: Navigator.h:122
BoundarySurface.h
Trk::NavigationCell
useful struct for a single navigation cell
Definition: INavigator.h:38
Trk::NavigationPair
std::pair< const NavigationCell *, const NavigationCell * > NavigationPair
Definition: Navigator.h:35
Trk::Navigator::m_trackingGeometryReadKey
SG::ReadCondHandleKey< TrackingGeometry > m_trackingGeometryReadKey
Definition: Navigator.h:105
SG::ReadCondHandleKey
Definition: ReadCondHandleKey.h:20
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
Trk::Navigator::m_searchWithDistance
bool m_searchWithDistance
search with new distanceToSurface() method
Definition: Navigator.h:124
INavigator.h
ITrackingGeometrySvc.h
TrackingGeometry.h
Trk::INavigator
Definition: INavigator.h:68
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
Trk::Navigator::m_fastField
bool m_fastField
Definition: Navigator.h:126
Trk::Navigator::closestParameters
virtual const TrackParameters * closestParameters(const Track &trk, const Surface &sf) const override final
INavigator interface method - getting the closest TrackParameters from a Track to a Surface.
Definition: Navigator.cxx:330
AthAlgTool
Definition: AthAlgTool.h:26
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Trk::Navigator::m_trackingGeometrySvc
ServiceHandle< Trk::ITrackingGeometrySvc > m_trackingGeometrySvc
ToolHandle to the TrackingGeometrySvc.
Definition: Navigator.h:110
Trk::TrackingVolume
Definition: TrackingVolume.h:121
Trk::Navigator::trackingGeometry
virtual const TrackingGeometry * trackingGeometry(const EventContext &ctx) const override final
INavigator interface method - returns the TrackingGeometry used for navigation.
Definition: Navigator.cxx:410
Trk::Navigator::volume
virtual const TrackingVolume * volume(const EventContext &ctx, const Amg::Vector3D &gp) const override final
INavigator interface methods - global search for the Volume one is in.
Definition: Navigator.cxx:88
ServiceHandle< Trk::ITrackingGeometrySvc >
Trk::Navigator::m_fieldProperties
Trk::MagneticFieldProperties m_fieldProperties
Definition: Navigator.h:120