ATLAS Offline Software
Navigator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 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", ""};
113  std::string m_trackingGeometryName = "AtlasTrackingGeometry";
114 
115  /******************************************************************/
116  DoubleProperty m_insideVolumeTolerance{
117  this, "InsideVolumeTolerance", 1. * Gaudi::Units::mm,
118  "Tolerance for inside() method of Volumes"};
119  DoubleProperty m_isOnSurfaceTolerance{
120  this, "IsOnSurfaceTolerance", 0.005 * Gaudi::Units::mm,
121  "Tolerance for isOnSurface() method of BoundarySurfaces"};
125  this, "UseStraightLineApproximation", false,
126  "use the straight line approximation for the next boundary sf"};
128  BooleanProperty m_searchWithDistance{
129  this, "SearchWithDistanceToSurface", true,
130  "search with new distanceToSurface() method"};
131  BooleanProperty m_fastField{this, "MagneticFieldProperties", false};
132  };
133 
134 } // end of namespace
135 
136 
137 #endif // TRKEXTOOLS_NAVIGATOR_H
138 
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:253
Trk::BoundarySurface
Definition: BoundarySurface.h:43
python.SystemOfUnits.mm
float mm
Definition: SystemOfUnits.py:98
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:49
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:80
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:86
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:155
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::Navigator::m_useStraightLineApproximation
BooleanProperty m_useStraightLineApproximation
Definition: Navigator.h:124
Trk::ParametersBase
Definition: ParametersBase.h:55
ParticleHypothesis.h
columnar::final
CM final
Definition: ColumnAccessor.h:106
beamspotman.dir
string dir
Definition: beamspotman.py:621
ReadCondHandleKey.h
Trk::Navigator::m_searchWithDistance
BooleanProperty m_searchWithDistance
search with new distanceToSurface() method
Definition: Navigator.h:128
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::Navigator::m_useConditions
bool m_useConditions
Definition: Navigator.h:122
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
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
Trk::Navigator::m_insideVolumeTolerance
DoubleProperty m_insideVolumeTolerance
Definition: Navigator.h:116
mapkey::sf
@ sf
Definition: TElectronEfficiencyCorrectionTool.cxx:38
INavigator.h
ITrackingGeometrySvc.h
TrackingGeometry.h
Trk::INavigator
Definition: INavigator.h:68
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
Trk::Navigator::m_isOnSurfaceTolerance
DoubleProperty m_isOnSurfaceTolerance
Definition: Navigator.h:119
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:316
AthAlgTool
Definition: AthAlgTool.h:26
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:79
Trk::Navigator::m_trackingGeometrySvc
ServiceHandle< Trk::ITrackingGeometrySvc > m_trackingGeometrySvc
ToolHandle to the TrackingGeometrySvc.
Definition: Navigator.h:110
Trk::TrackingVolume
Definition: TrackingVolume.h:119
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:396
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:74
ServiceHandle< Trk::ITrackingGeometrySvc >
Trk::Navigator::m_fieldProperties
Trk::MagneticFieldProperties m_fieldProperties
Definition: Navigator.h:123
Trk::Navigator::m_fastField
BooleanProperty m_fastField
Definition: Navigator.h:131