ATLAS Offline Software
ActsVolumeMappingTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ACTSGEOMETRY_ACTSVOLUMEMAPPINGTOOL_H
6 #define ACTSGEOMETRY_ACTSVOLUMEMAPPINGTOOL_H
7 
8 // ATHENA
10 #include "GaudiKernel/IInterface.h"
11 #include "GaudiKernel/ServiceHandle.h"
12 #include "Gaudi/Property.h"
13 #include "GaudiKernel/EventContext.h"
14 
15 // PACKAGE
18 
19 // ACTS
20 #include "Acts/Material/VolumeMaterialMapper.hpp"
21 
22 // BOOST
23 
24 #include <cmath>
25 
26 class ActsVolumeMappingTool : public extends<AthAlgTool, IActsVolumeMappingTool>
27 {
28 
29 public:
30  virtual StatusCode initialize() override;
31 
32  ActsVolumeMappingTool(const std::string& type, const std::string& name,
33  const IInterface* parent);
34 
35  std::shared_ptr<Acts::VolumeMaterialMapper>
36  mapper() const override
37  {
38  return m_mapper;
39  };
40 
41  virtual
43  mappingState() const override;
44 
45  virtual
47  trackingGeometryTool() const override
48  {
49  return m_trackingGeometryTool.get();
50  }
51 
52 
53 private:
54  // Straight line stepper
55  Acts::MagneticFieldContext m_magFieldContext;
56  Acts::GeometryContext m_geoContext;
57  using SlStepper = Acts::StraightLineStepper;
58  using StraightLinePropagator = Acts::Propagator<SlStepper, Acts::Navigator>;
59  ToolHandle<IActsTrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", "ActsTrackingGeometryTool"};
60  std::shared_ptr<Acts::VolumeMaterialMapper> m_mapper;
61  std::shared_ptr<const Acts::TrackingGeometry> m_trackingGeometry;
62 };
63 
64 
65 
66 #endif
ActsVolumeMappingTool::initialize
virtual StatusCode initialize() override
Definition: ActsVolumeMappingTool.cxx:35
ActsVolumeMappingTool::m_geoContext
Acts::GeometryContext m_geoContext
Definition: ActsVolumeMappingTool.h:56
ActsVolumeMappingTool::m_magFieldContext
Acts::MagneticFieldContext m_magFieldContext
Definition: ActsVolumeMappingTool.h:55
ActsVolumeMappingTool::m_trackingGeometry
std::shared_ptr< const Acts::TrackingGeometry > m_trackingGeometry
Definition: ActsVolumeMappingTool.h:61
IActsVolumeMappingTool.h
ActsVolumeMappingTool
Definition: ActsVolumeMappingTool.h:27
ActsVolumeMappingTool::trackingGeometryTool
virtual const IActsTrackingGeometryTool * trackingGeometryTool() const override
Definition: ActsVolumeMappingTool.h:47
IActsTrackingGeometryTool
Definition: IActsTrackingGeometryTool.h:18
ActsVolumeMappingTool::ActsVolumeMappingTool
ActsVolumeMappingTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: ActsVolumeMappingTool.cxx:28
ActsVolumeMappingTool::StraightLinePropagator
Acts::Propagator< SlStepper, Acts::Navigator > StraightLinePropagator
Definition: ActsVolumeMappingTool.h:58
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonR4::State
CalibratedSpacePoint::State State
Definition: SpacePointCalibrator.cxx:24
ActsVolumeMappingTool::m_mapper
std::shared_ptr< Acts::VolumeMaterialMapper > m_mapper
Definition: ActsVolumeMappingTool.h:60
AthAlgTool.h
ActsVolumeMappingTool::mapper
std::shared_ptr< Acts::VolumeMaterialMapper > mapper() const override
Definition: ActsVolumeMappingTool.h:36
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ActsVolumeMappingTool::m_trackingGeometryTool
ToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool
Definition: ActsVolumeMappingTool.h:59
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsVolumeMappingTool::SlStepper
Acts::StraightLineStepper SlStepper
Definition: ActsVolumeMappingTool.h:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ActsVolumeMappingTool::mappingState
virtual Acts::VolumeMaterialMapper::State mappingState() const override
Definition: ActsVolumeMappingTool.cxx:63
IActsTrackingGeometryTool.h