ATLAS Offline Software
StaticNavigationEngine.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // StaticNavigationEngine.cxx, (c) ATLAS Detector software
8 
9 // STL
10 #include <sstream>
11 // Trk include
13 
14 // constructor
15 Trk::StaticNavigationEngine::StaticNavigationEngine(const std::string& t, const std::string& n, const IInterface* p)
16 : AthAlgTool(t,n,p)
17 {
18  declareInterface<Trk::INavigationEngine>(this);
19  // steering of the screen outoput (SOP)
20  declareProperty("OutputPrefix" , m_sopPrefix);
21  declareProperty("OutputPostfix" , m_sopPostfix);
22 }
23 
24 // destructor
26 = default;
27 
28 // the interface method initialize
30 {
31 
32  ATH_CHECK( m_trackingGeometryReadKey.initialize(!m_trackingGeometryReadKey.key().empty()) );
33  if (m_propagationEngine.retrieve().isFailure()){
34  EX_MSG_FATAL("", "initialize", "", "failed to retrieve propagation engine '"<< m_propagationEngine << "'. Aborting." );
35  return StatusCode::FAILURE;
36  } else
37  EX_MSG_DEBUG("", "initialize", "", "successfully retrieved '" << m_propagationEngine << "'." );
38 
39  if (m_materialEffectsEngine.retrieve().isFailure()){
40  EX_MSG_FATAL("", "initialize", "", "failed to retrieve material effect engine '"<< m_materialEffectsEngine << "'. Aborting." );
41  return StatusCode::FAILURE;
42  } else
43  EX_MSG_DEBUG("", "initialize", "", "successfully retrieved '" << m_materialEffectsEngine << "'." );
44  EX_MSG_DEBUG("", "initialize", "", "successful" );
45  return StatusCode::SUCCESS;
46 }
47 
48 // the interface method finalize
50 {
51  EX_MSG_DEBUG("", "finalize", "", "successful" );
52  return StatusCode::SUCCESS;
53 }
54 
57 { return resolveBoundaryT<Trk::TrackParameters>(ecCharged,dir); }
58 
61 { return resolveBoundaryT<Trk::NeutralParameters>(ecNeutral,dir); }
62 
65 { return resolvePositionT<Trk::TrackParameters>(ecCharged,dir, noLoop); }
66 
69 { return resolvePositionT<Trk::NeutralParameters>(ecNeutral,dir, noLoop); }
70 
72  std::stringstream msg;
73  msg << "Failed to get conditions data " << m_trackingGeometryReadKey.key() << ".";
74  throw std::runtime_error(msg.str());
75 }
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::INavigationEngine::m_sopPostfix
std::string m_sopPostfix
prefix for screen output
Definition: INavigationEngine.h:65
Trk::StaticNavigationEngine::throwFailedToGetTrackingGeomtry
void throwFailedToGetTrackingGeomtry() const
Definition: StaticNavigationEngine.cxx:71
Trk::StaticNavigationEngine::resolveBoundary
virtual ExtrapolationCode resolveBoundary(Trk::ExCellCharged &eCell, PropDirection dir=alongMomentum) const
resolve the boundary situation - for charged particles
Definition: StaticNavigationEngine.cxx:56
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
EX_MSG_FATAL
#define EX_MSG_FATAL(navstep, step, idx, x)
Definition: ExtrapolationMacros.h:16
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::StaticNavigationEngine::resolvePosition
virtual ExtrapolationCode resolvePosition(Trk::ExCellCharged &eCell, PropDirection dir=alongMomentum, bool noLoop=false) const
resolve the boundary situation - for charged particles
Definition: StaticNavigationEngine.cxx:64
Trk::ExtrapolationCode
Definition: ExtrapolationCell.h:105
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
beamspotman.dir
string dir
Definition: beamspotman.py:623
Trk::StaticNavigationEngine::finalize
StatusCode finalize()
AlgTool finalize method.
Definition: StaticNavigationEngine.cxx:49
Trk::StaticNavigationEngine::initialize
StatusCode initialize()
AlgTool initialize method.
Definition: StaticNavigationEngine.cxx:29
StaticNavigationEngine.h
EX_MSG_DEBUG
#define EX_MSG_DEBUG(navstep, step, idx, x)
Definition: ExtrapolationMacros.h:13
Trk::INavigationEngine::m_sopPrefix
std::string m_sopPrefix
< SCREEN output formatting (SOP) - unify amongst extrapolation engines
Definition: INavigationEngine.h:64
Trk::StaticNavigationEngine::~StaticNavigationEngine
~StaticNavigationEngine()
Destructor.
Trk::ExtrapolationCell
Definition: ExtrapolationCell.h:231
Trk::StaticNavigationEngine::StaticNavigationEngine
StaticNavigationEngine(const std::string &, const std::string &, const IInterface *)
Constructor.
Definition: StaticNavigationEngine.cxx:15
AthAlgTool
Definition: AthAlgTool.h:26
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7