ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::StaticNavigationEngine Class Reference

#include <StaticNavigationEngine.h>

Inheritance diagram for Trk::StaticNavigationEngine:
Collaboration diagram for Trk::StaticNavigationEngine:

Public Member Functions

 StaticNavigationEngine (const std::string &, const std::string &, const IInterface *)
 Constructor.
 ~StaticNavigationEngine ()
 Destructor.
StatusCode initialize ()
 AlgTool initialize method.
StatusCode finalize ()
 AlgTool finalize method.
virtual ExtrapolationCode resolveBoundary (Trk::ExCellCharged &eCell, PropDirection dir=alongMomentum) const
 resolve the boundary situation - for charged particles
virtual ExtrapolationCode resolveBoundary (Trk::ExCellNeutral &eCelll, PropDirection dir=alongMomentum) const
 resolve the boundary situation - for neutral particles
virtual ExtrapolationCode resolvePosition (Trk::ExCellCharged &eCell, PropDirection dir=alongMomentum, bool noLoop=false) const
 resolve the boundary situation - for charged particles
virtual ExtrapolationCode resolvePosition (Trk::ExCellNeutral &eCelll, PropDirection dir=alongMomentum, bool noLoop=false) const
 resolve the boundary situation - for neutral particles
virtual const TrackingGeometrytrackingGeometry () const
 acces to tracking geometry
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool interface methods.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

std::string m_sopPrefix
 < SCREEN output formatting (SOP) - unify amongst extrapolation engines
std::string m_sopPostfix
 prefix for screen output

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

template<class T>
ExtrapolationCode resolveBoundaryT (ExtrapolationCell< T > &eCell, PropDirection dir=alongMomentum) const
 resolve the boundary situation
template<class T>
ExtrapolationCode resolvePositionT (ExtrapolationCell< T > &eCell, PropDirection dir=alongMomentum, bool noLoop=false) const
 resolve position
template<class T>
ExtrapolationCode handleBoundaryT (ExtrapolationCell< T > &eCell, const BoundarySurface< TrackingVolume > &bSurfaceTV, PropDirection dir=alongMomentum, bool stepout=false) const
 deal with the boundary Surface - called by resolveBoundary
void throwFailedToGetTrackingGeomtry () const
const TrackingGeometryretrieveTrackingGeometry (const EventContext &ctx) const
StatusCode updateTrackingGeometry () const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

StringProperty m_sopPrefix_prop {this, "OutputPrefix", ""}
StringProperty m_sopPostfix_prop {this, "OutputPostfix", ""}
SG::ReadCondHandleKey< TrackingGeometrym_trackingGeometryReadKey {this, "TrackingGeometryReadKey", "", "Key of the TrackingGeometry conditions data."}
 retrieve TrackingGeometry
ToolHandle< IPropagationEnginem_propagationEngine {this, "PropagationEngine", "Trk::PropagationEngine/AtlasStaticPropagation"}
 the used propagation engine
ToolHandle< IMaterialEffectsEnginem_materialEffectsEngine {this, "MaterialEffectsEngine", "Trk::MaterialEffectsEngine/AtlasStaticNavigationMaterialEffects"}
 the material effects updated
std::string m_trackingGeometryName
 Name of the TrackingGeometry as given in Detector Store.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 43 of file StaticNavigationEngine.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ StaticNavigationEngine()

Trk::StaticNavigationEngine::StaticNavigationEngine ( const std::string & t,
const std::string & n,
const IInterface * p )

Constructor.

Definition at line 15 of file StaticNavigationEngine.cxx.

16: AthAlgTool(t,n,p)
17{
18 declareInterface<Trk::INavigationEngine>(this);
19}
AthAlgTool()
Default constructor:

◆ ~StaticNavigationEngine()

Trk::StaticNavigationEngine::~StaticNavigationEngine ( )
default

Destructor.

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode Trk::StaticNavigationEngine::finalize ( )

AlgTool finalize method.

Definition at line 40 of file StaticNavigationEngine.cxx.

41{
42 EX_MSG_DEBUG("", "finalize", "", "successful" );
43 return StatusCode::SUCCESS;
44}
#define EX_MSG_DEBUG(navstep, step, idx, x)

◆ handleBoundaryT()

template<class T>
ExtrapolationCode Trk::StaticNavigationEngine::handleBoundaryT ( ExtrapolationCell< T > & eCell,
const BoundarySurface< TrackingVolume > & bSurfaceTV,
PropDirection dir = alongMomentum,
bool stepout = false ) const
private

deal with the boundary Surface - called by resolveBoundary

◆ initialize()

StatusCode Trk::StaticNavigationEngine::initialize ( )

AlgTool initialize method.

Definition at line 26 of file StaticNavigationEngine.cxx.

27{
30
32 ATH_CHECK( m_propagationEngine.retrieve());
34
35 EX_MSG_DEBUG("", "initialize", "", "successful" );
36 return StatusCode::SUCCESS;
37}
#define ATH_CHECK
Evaluate an expression and check for errors.
std::string m_sopPrefix
< SCREEN output formatting (SOP) - unify amongst extrapolation engines
std::string m_sopPostfix
prefix for screen output
SG::ReadCondHandleKey< TrackingGeometry > m_trackingGeometryReadKey
retrieve TrackingGeometry
ToolHandle< IMaterialEffectsEngine > m_materialEffectsEngine
the material effects updated
ToolHandle< IPropagationEngine > m_propagationEngine
the used propagation engine

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & Trk::INavigationEngine::interfaceID ( )
inlinestaticinherited

AlgTool interface methods.

Definition at line 45 of file INavigationEngine.h.

45{ return IID_INavigationEngine; }
static const InterfaceID IID_INavigationEngine("INavigationEngine", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ resolveBoundary() [1/2]

Trk::ExtrapolationCode Trk::StaticNavigationEngine::resolveBoundary ( Trk::ExCellCharged & eCell,
PropDirection dir = alongMomentum ) const
virtual

resolve the boundary situation - for charged particles

charged situation

Implements Trk::INavigationEngine.

Definition at line 47 of file StaticNavigationEngine.cxx.

48{ return resolveBoundaryT<Trk::TrackParameters>(ecCharged,dir); }
ExtrapolationCode resolveBoundaryT(ExtrapolationCell< T > &eCell, PropDirection dir=alongMomentum) const
resolve the boundary situation

◆ resolveBoundary() [2/2]

Trk::ExtrapolationCode Trk::StaticNavigationEngine::resolveBoundary ( Trk::ExCellNeutral & eCelll,
PropDirection dir = alongMomentum ) const
virtual

resolve the boundary situation - for neutral particles

charged situation

Implements Trk::INavigationEngine.

Definition at line 51 of file StaticNavigationEngine.cxx.

52{ return resolveBoundaryT<Trk::NeutralParameters>(ecNeutral,dir); }

◆ resolveBoundaryT()

template<class T>
ExtrapolationCode Trk::StaticNavigationEngine::resolveBoundaryT ( ExtrapolationCell< T > & eCell,
PropDirection dir = alongMomentum ) const
private

resolve the boundary situation

◆ resolvePosition() [1/2]

Trk::ExtrapolationCode Trk::StaticNavigationEngine::resolvePosition ( Trk::ExCellCharged & eCell,
PropDirection dir = alongMomentum,
bool noLoop = false ) const
virtual

resolve the boundary situation - for charged particles

charged

Implements Trk::INavigationEngine.

Definition at line 55 of file StaticNavigationEngine.cxx.

56{ return resolvePositionT<Trk::TrackParameters>(ecCharged,dir, noLoop); }
ExtrapolationCode resolvePositionT(ExtrapolationCell< T > &eCell, PropDirection dir=alongMomentum, bool noLoop=false) const
resolve position

◆ resolvePosition() [2/2]

Trk::ExtrapolationCode Trk::StaticNavigationEngine::resolvePosition ( Trk::ExCellNeutral & eCelll,
PropDirection dir = alongMomentum,
bool noLoop = false ) const
virtual

resolve the boundary situation - for neutral particles

neutral

Implements Trk::INavigationEngine.

Definition at line 59 of file StaticNavigationEngine.cxx.

60{ return resolvePositionT<Trk::NeutralParameters>(ecNeutral,dir, noLoop); }

◆ resolvePositionT()

template<class T>
ExtrapolationCode Trk::StaticNavigationEngine::resolvePositionT ( ExtrapolationCell< T > & eCell,
PropDirection dir = alongMomentum,
bool noLoop = false ) const
private

resolve position

◆ retrieveTrackingGeometry()

const TrackingGeometry * Trk::StaticNavigationEngine::retrieveTrackingGeometry ( const EventContext & ctx) const
inlineprivate

Definition at line 99 of file StaticNavigationEngine.h.

99 {
100 SG::ReadCondHandle<TrackingGeometry> handle(m_trackingGeometryReadKey,ctx);
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 }
#define EX_MSG_FATAL(navstep, step, idx, x)

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ throwFailedToGetTrackingGeomtry()

void Trk::StaticNavigationEngine::throwFailedToGetTrackingGeomtry ( ) const
private

Definition at line 62 of file StaticNavigationEngine.cxx.

62 {
63 std::stringstream msg;
64 msg << "Failed to get conditions data " << m_trackingGeometryReadKey.key() << ".";
65 throw std::runtime_error(msg.str());
66}
MsgStream & msg() const

◆ trackingGeometry()

const Trk::TrackingGeometry & Trk::StaticNavigationEngine::trackingGeometry ( ) const
inlinevirtual

acces to tracking geometry

Implements Trk::INavigationEngine.

Definition at line 121 of file StaticNavigationEngine.h.

121 {
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 }
const TrackingGeometry * retrieveTrackingGeometry(const EventContext &ctx) const

◆ updateTrackingGeometry()

StatusCode Trk::StaticNavigationEngine::updateTrackingGeometry ( ) const
private

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_materialEffectsEngine

ToolHandle<IMaterialEffectsEngine> Trk::StaticNavigationEngine::m_materialEffectsEngine {this, "MaterialEffectsEngine", "Trk::MaterialEffectsEngine/AtlasStaticNavigationMaterialEffects"}
private

the material effects updated

Definition at line 115 of file StaticNavigationEngine.h.

115{this, "MaterialEffectsEngine", "Trk::MaterialEffectsEngine/AtlasStaticNavigationMaterialEffects"};

◆ m_propagationEngine

ToolHandle<IPropagationEngine> Trk::StaticNavigationEngine::m_propagationEngine {this, "PropagationEngine", "Trk::PropagationEngine/AtlasStaticPropagation"}
private

the used propagation engine

Definition at line 114 of file StaticNavigationEngine.h.

114{this, "PropagationEngine", "Trk::PropagationEngine/AtlasStaticPropagation"};

◆ m_sopPostfix

std::string Trk::INavigationEngine::m_sopPostfix
protectedinherited

prefix for screen output

Definition at line 65 of file INavigationEngine.h.

◆ m_sopPostfix_prop

StringProperty Trk::StaticNavigationEngine::m_sopPostfix_prop {this, "OutputPostfix", ""}
private

Definition at line 80 of file StaticNavigationEngine.h.

80{this, "OutputPostfix", ""};

◆ m_sopPrefix

std::string Trk::INavigationEngine::m_sopPrefix
protectedinherited

< SCREEN output formatting (SOP) - unify amongst extrapolation engines

prefix for screen output

Definition at line 64 of file INavigationEngine.h.

◆ m_sopPrefix_prop

StringProperty Trk::StaticNavigationEngine::m_sopPrefix_prop {this, "OutputPrefix", ""}
private

Definition at line 79 of file StaticNavigationEngine.h.

79{this, "OutputPrefix", ""};

◆ m_trackingGeometryName

std::string Trk::StaticNavigationEngine::m_trackingGeometryName
private

Name of the TrackingGeometry as given in Detector Store.

Definition at line 117 of file StaticNavigationEngine.h.

◆ m_trackingGeometryReadKey

SG::ReadCondHandleKey<TrackingGeometry> Trk::StaticNavigationEngine::m_trackingGeometryReadKey {this, "TrackingGeometryReadKey", "", "Key of the TrackingGeometry conditions data."}
private

retrieve TrackingGeometry

Definition at line 108 of file StaticNavigationEngine.h.

109{this, "TrackingGeometryReadKey", "", "Key of the TrackingGeometry conditions data."};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: