ATLAS Offline Software
Loading...
Searching...
No Matches
StaticNavigationEngine.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// StaticNavigationEngine.h, (c) ATLAS Detector software
8
9#ifndef TRKEXENGINE_STATICNAVIGATIONENGINE_H
10#define TRKEXENGINE_STATICNAVIGATIONENGINE_H
11
12// Gaudi
14#include "GaudiKernel/ToolHandle.h"
15// Trk
22// throw GaudiExceptions where necessary
23#include "GaudiKernel/GaudiException.h"
24
27
29
30
31namespace Trk {
32
35
43 class StaticNavigationEngine : public AthAlgTool, virtual public INavigationEngine {
44
45 public:
47 StaticNavigationEngine(const std::string&,const std::string&,const IInterface*);
48
51
53 StatusCode initialize();
54
56 StatusCode finalize();
57
61
64
67
69 virtual ExtrapolationCode resolvePosition(Trk::ExCellCharged& eCell, PropDirection dir=alongMomentum, bool noLoop=false) const;
70
72 virtual ExtrapolationCode resolvePosition(Trk::ExCellNeutral& eCelll, PropDirection dir=alongMomentum, bool noLoop=false) const;
73
75 virtual const TrackingGeometry& trackingGeometry() const;
76
77 private:
78
79 StringProperty m_sopPrefix_prop{this, "OutputPrefix", ""};
80 StringProperty m_sopPostfix_prop{this, "OutputPostfix", ""};
81
85
89 bool noLoop=false) const;
90
93 const BoundarySurface<TrackingVolume>& bSurfaceTV,
95 bool stepout=false) const;
96
97
99 const TrackingGeometry* retrieveTrackingGeometry(const EventContext& ctx) const {
101 if (!handle.isValid()) {
102 EX_MSG_FATAL("", "updateGeo", "", "Could not load TrackingGeometry with name '" << m_trackingGeometryReadKey.key() << "'. Aborting." );
104 }
105 return handle.cptr();
106 }
107
109 {this, "TrackingGeometryReadKey", "", "Key of the TrackingGeometry conditions data."};
110
112 StatusCode updateTrackingGeometry() const;
113
114 ToolHandle<IPropagationEngine> m_propagationEngine{this, "PropagationEngine", "Trk::PropagationEngine/AtlasStaticPropagation"};
115 ToolHandle<IMaterialEffectsEngine> m_materialEffectsEngine{this, "MaterialEffectsEngine", "Trk::MaterialEffectsEngine/AtlasStaticNavigationMaterialEffects"};
116
118
119 };
120
122 const Trk::TrackingGeometry *tracking_geometry = retrieveTrackingGeometry(Gaudi::Hive::currentContext());
123 if (!tracking_geometry){
124 EX_MSG_FATAL("", "updateGeo", "", "Did not get valid TrackingGeometry. Aborting." );
125 throw GaudiException("ExtrapolationEngine", "Problem with TrackingGeometry loading.", StatusCode::FAILURE);
126 }
127 return *tracking_geometry;
128 }
129
130} // end of namespace
131
134
135#endif // TRKEXENGINE_STATICNAVIGATIONENGINE_H
136
#define EX_MSG_FATAL(navstep, step, idx, x)
Define macros for attributes used to control the static checker.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
const_pointer_type cptr()
Description of a BoundarySurface inside the tracking realm, it extends the Surface description to mak...
templated class as an input-output object of the extrapolation, only public members,...
Material effects engine interface for charged and neutral (fast track simulation) ,...
Extrapolation engine interface for Charged and Neutral parameters, it serves as the Master extrapolat...
virtual ExtrapolationCode resolvePosition(ExCellCharged &ecCell, PropDirection dir=alongMomentum, bool noLoop=false) const =0
resolve the position - for charged particles
virtual ExtrapolationCode resolveBoundary(ExCellCharged &ecCell, PropDirection dir=alongMomentum) const =0
resolve the boundary situation - for charged particles
A propagation engine wrapping the propagator algtool it respects the path limit to stop particles if ...
ExtrapolationCode handleBoundaryT(ExtrapolationCell< T > &eCell, const BoundarySurface< TrackingVolume > &bSurfaceTV, PropDirection dir=alongMomentum, bool stepout=false) const
deal with the boundary Surface - called by resolveBoundary
StatusCode updateTrackingGeometry() const
SG::ReadCondHandleKey< TrackingGeometry > m_trackingGeometryReadKey
retrieve TrackingGeometry
ExtrapolationCode resolveBoundaryT(ExtrapolationCell< T > &eCell, PropDirection dir=alongMomentum) const
resolve the boundary situation
virtual ExtrapolationCode resolvePosition(Trk::ExCellCharged &eCell, PropDirection dir=alongMomentum, bool noLoop=false) const
resolve the boundary situation - for charged particles
~StaticNavigationEngine()
Destructor.
std::string m_trackingGeometryName
Name of the TrackingGeometry as given in Detector Store.
StatusCode finalize()
AlgTool finalize method.
virtual ExtrapolationCode resolveBoundary(Trk::ExCellCharged &eCell, PropDirection dir=alongMomentum) const
resolve the boundary situation - for charged particles
StatusCode initialize()
AlgTool initialize method.
StaticNavigationEngine(const std::string &, const std::string &, const IInterface *)
Constructor.
const TrackingGeometry * retrieveTrackingGeometry(const EventContext &ctx) const
ToolHandle< IMaterialEffectsEngine > m_materialEffectsEngine
the material effects updated
ExtrapolationCode resolvePositionT(ExtrapolationCell< T > &eCell, PropDirection dir=alongMomentum, bool noLoop=false) const
resolve position
virtual const TrackingGeometry & trackingGeometry() const
acces to tracking geometry
ToolHandle< IPropagationEngine > m_propagationEngine
the used propagation engine
The TrackingGeometry class is the owner of the constructed TrackingVolumes.
Ensure that the ATLAS eigen extensions are properly loaded.
PropDirection
PropDirection, enum for direction of the propagation.
@ alongMomentum
ExtrapolationCell< TrackParameters > ExCellCharged
ExtrapolationCell< NeutralParameters > ExCellNeutral