ATLAS Offline Software
Loading...
Searching...
No Matches
ActsVolumeMappingTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7// ATHENA
8#include "GaudiKernel/IInterface.h"
9
10// PACKAGE
12#include "ActsInterop/Logger.h"
16
17// ACTS
18#include "Acts/Propagator/Navigator.hpp"
19#include "Acts/Propagator/Propagator.hpp"
20#include "Acts/Propagator/StraightLineStepper.hpp"
21#include "Acts/Geometry/GeometryContext.hpp"
22
23// STL
24#include <iostream>
25#include <memory>
26
27
28ActsVolumeMappingTool::ActsVolumeMappingTool(const std::string& type, const std::string& name,
29 const IInterface* parent)
30 : base_class(type, name, parent)
31{
32}
33
34StatusCode
36{
37 ATH_MSG_INFO("Initializing ACTS Volume Mapper");
38
40
41 m_trackingGeometry = m_trackingGeometryTool->trackingGeometry();
42
43 Acts::Navigator navigator( Acts::Navigator::Config{ m_trackingGeometry } );
44 // Make stepper and propagator
45 SlStepper stepper;
46 StraightLinePropagator propagator = StraightLinePropagator(std::move(stepper), std::move(navigator));
47
49 Acts::VolumeMaterialMapper::Config smmConfig;
50 smmConfig.mappingStep = 10;
51 m_mapper = std::make_shared<Acts::VolumeMaterialMapper>(
52 smmConfig,
53 std::move(propagator),
54 makeActsAthenaLogger(this, "VolumeMaterialMapper"));
55
56 m_geoContext = m_trackingGeometryTool->getNominalGeometryContext().context();
57
58 ATH_MSG_INFO("ACTS Surface Mapper successfully initialized");
59 return StatusCode::SUCCESS;
60}
61
62Acts::VolumeMaterialMapper::State
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
ActsVolumeMappingTool(const std::string &type, const std::string &name, const IInterface *parent)
std::shared_ptr< const Acts::TrackingGeometry > m_trackingGeometry
Acts::Propagator< SlStepper, Acts::Navigator > StraightLinePropagator
virtual Acts::VolumeMaterialMapper::State mappingState() const override
Acts::MagneticFieldContext m_magFieldContext
Acts::StraightLineStepper SlStepper
std::shared_ptr< Acts::VolumeMaterialMapper > m_mapper
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Acts::GeometryContext m_geoContext
virtual StatusCode initialize() override