ATLAS Offline Software
Tracking
Acts
ActsGeometry
src
ActsSurfaceMappingTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ActsGeometry/ActsSurfaceMappingTool.h
"
6
7
// ATHENA
8
#include "GaudiKernel/IInterface.h"
9
// PACKAGE
10
#include "
ActsInterop/Logger.h
"
11
#include "
ActsGeometryInterfaces/ActsGeometryContext.h
"
12
#include "
ActsGeometry/ActsTrackingGeometryTool.h
"
13
#include "
ActsGeometryInterfaces/IActsTrackingGeometryTool.h
"
14
15
// ActsSurfaceMappingTool
16
#include "Acts/Geometry/GeometryContext.hpp"
17
#include "Acts/Propagator/Navigator.hpp"
18
#include "Acts/Propagator/Propagator.hpp"
19
#include "Acts/Propagator/StraightLineStepper.hpp"
20
21
// STL
22
#include <iostream>
23
#include <memory>
24
25
26
ActsSurfaceMappingTool::ActsSurfaceMappingTool
(
const
std::string&
type
,
const
std::string&
name
,
27
const
IInterface*
parent
)
28
: base_class(
type
,
name
,
parent
)
29
{
30
}
31
32
StatusCode
33
ActsSurfaceMappingTool::initialize
()
34
{
35
ATH_MSG_INFO
(
"Initializing ACTS Surface Mapper"
);
36
37
ATH_CHECK
(
m_trackingGeometryTool
.retrieve() );
38
39
m_trackingGeometry
=
m_trackingGeometryTool
->trackingGeometry();
40
41
Acts::Navigator
navigator( Acts::Navigator::Config{
m_trackingGeometry
} );
42
43
// Make stepper and propagator
44
SlStepper
stepper;
45
StraightLinePropagator
propagator =
StraightLinePropagator
(std::move(stepper), std::move(navigator));
46
48
Acts::SurfaceMaterialMapper::Config smmConfig;
49
smmConfig.mapperDebugOutput =
false
;
50
m_mapper
= std::make_shared<Acts::SurfaceMaterialMapper>(
51
smmConfig,
52
std::move(propagator),
53
makeActsAthenaLogger
(
this
,
"SurfaceMaterialMapper"
));
54
55
m_geoContext
=
m_trackingGeometryTool
->getNominalGeometryContext();
56
57
ATH_MSG_INFO
(
"ACTS Surface Mapper successfully initialized"
);
58
return
StatusCode::SUCCESS;
59
}
60
61
Acts::SurfaceMaterialMapper::State
62
ActsSurfaceMappingTool::mappingState
()
const
63
{
64
auto
mappingState
=
m_mapper
->createState(
65
m_geoContext
.
context
(),
m_magFieldContext
, *
m_trackingGeometry
);
66
67
return
mappingState
;
68
}
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition:
AthMsgStreamMacros.h:31
ActsGeometryContext.h
ActsSurfaceMappingTool::SlStepper
Acts::StraightLineStepper SlStepper
Definition:
ActsSurfaceMappingTool.h:57
ActsTrk::detail::Navigator
Acts::Navigator Navigator
Definition:
Tracking/Acts/ActsTrackReconstruction/src/detail/Definitions.h:31
ActsSurfaceMappingTool::StraightLinePropagator
Acts::Propagator< SlStepper, Acts::Navigator > StraightLinePropagator
Definition:
ActsSurfaceMappingTool.h:58
ActsSurfaceMappingTool::m_magFieldContext
Acts::MagneticFieldContext m_magFieldContext
Definition:
ActsSurfaceMappingTool.h:55
ActsSurfaceMappingTool::m_mapper
std::shared_ptr< Acts::SurfaceMaterialMapper > m_mapper
Definition:
ActsSurfaceMappingTool.h:60
ActsSurfaceMappingTool::ActsSurfaceMappingTool
ActsSurfaceMappingTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition:
ActsSurfaceMappingTool.cxx:26
makeActsAthenaLogger
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Definition:
Tracking/Acts/ActsInterop/src/Logger.cxx:64
ActsGeometryContext::context
Acts::GeometryContext context() const
Definition:
ActsGeometryContext.h:45
ActsSurfaceMappingTool::m_trackingGeometryTool
ToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool
Definition:
ActsSurfaceMappingTool.h:59
ActsSurfaceMappingTool::m_trackingGeometry
std::shared_ptr< const Acts::TrackingGeometry > m_trackingGeometry
Definition:
ActsSurfaceMappingTool.h:61
ActsSurfaceMappingTool.h
ActsTrackingGeometryTool.h
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
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
ActsSurfaceMappingTool::mappingState
virtual Acts::SurfaceMaterialMapper::State mappingState() const override
Definition:
ActsSurfaceMappingTool.cxx:62
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
ActsSurfaceMappingTool::m_geoContext
ActsGeometryContext m_geoContext
Definition:
ActsSurfaceMappingTool.h:56
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
Logger.h
ActsSurfaceMappingTool::initialize
virtual StatusCode initialize() override
Definition:
ActsSurfaceMappingTool.cxx:33
IActsTrackingGeometryTool.h
Generated on Mon Dec 23 2024 21:06:36 for ATLAS Offline Software by
1.8.18