Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ActsTrk::DetectorVolumeSvc Class Reference

#include <DetectorVolumeSvc.h>

Inheritance diagram for ActsTrk::DetectorVolumeSvc:
Collaboration diagram for ActsTrk::DetectorVolumeSvc:

Public Member Functions

 DetectorVolumeSvc (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize () override
 
DetectorPtr detector () const override
 
unsigned int populateAlignmentStore (AlignmentStore &store) const override
 
const ActsGeometryContextgetNominalContext () const override
 

Private Member Functions

std::shared_ptr< const Acts::Experimental::Detector > buildDetector () const
 

Private Attributes

ToolHandleArray< IDetectorVolumeBuilderToolm_builderTools {this, "DetectorBuilders", {}}
 
CxxUtils::CachedValue< DetectorPtr > m_detector {}
 
ActsGeometryContext m_nomContext {}
 

Detailed Description

Definition at line 24 of file DetectorVolumeSvc.h.

Constructor & Destructor Documentation

◆ DetectorVolumeSvc()

DetectorVolumeSvc::DetectorVolumeSvc ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 21 of file DetectorVolumeSvc.cxx.

23  : base_class(name, svc) {}

Member Function Documentation

◆ buildDetector()

std::shared_ptr< const Acts::Experimental::Detector > DetectorVolumeSvc::buildDetector ( ) const
private

Definition at line 50 of file DetectorVolumeSvc.cxx.

50  {
51  ActsGeometryContext gctx{};
52  std::vector<std::shared_ptr<const Acts::Experimental::IDetectorComponentBuilder> > builders;
53  for (const auto &builder : m_builderTools) {
55  }
56  using enum Acts::AxisDirection;
57 
58  //Define config for cylindrical container builder
59  Acts::Experimental::CylindricalContainerBuilder::Config cylindricalCfg;
60  cylindricalCfg.builders = builders;
61  cylindricalCfg.binning = std::vector<Acts::AxisDirection>{AxisZ, AxisR};
62  auto cylindricalBuilder = std::make_shared<Acts::Experimental::CylindricalContainerBuilder>(cylindricalCfg);
63 
64  //Define config for detector builder
65  Acts::Experimental::DetectorBuilder::Config detectorCfg;
66  detectorCfg.builder = cylindricalBuilder;
67  return Acts::Experimental::DetectorBuilder(detectorCfg).construct(gctx.context());
68 }

◆ detector()

std::shared_ptr< const Acts::Experimental::Detector > DetectorVolumeSvc::detector ( ) const
override

Definition at line 34 of file DetectorVolumeSvc.cxx.

34  {
35  if (!m_detector.isValid()) {
36  ATH_MSG_INFO("Build the Acts tracking detector");
38  }
39  return *m_detector.ptr();
40 }

◆ getNominalContext()

const ActsGeometryContext & DetectorVolumeSvc::getNominalContext ( ) const
override

Definition at line 46 of file DetectorVolumeSvc.cxx.

46  {
47  return m_nomContext;
48 }

◆ initialize()

StatusCode DetectorVolumeSvc::initialize ( )
override

Definition at line 25 of file DetectorVolumeSvc.cxx.

25  {
26  ATH_CHECK(m_builderTools.retrieve());
27  if (m_builderTools.empty()) {
28  ATH_MSG_FATAL("No subdetectors were defined ");
29  return StatusCode::FAILURE;
30  }
31  return StatusCode::SUCCESS;
32 }

◆ populateAlignmentStore()

unsigned int DetectorVolumeSvc::populateAlignmentStore ( AlignmentStore &  store) const
override

Definition at line 42 of file DetectorVolumeSvc.cxx.

42  {
43  return 0;
44 }

Member Data Documentation

◆ m_builderTools

ToolHandleArray<IDetectorVolumeBuilderTool> ActsTrk::DetectorVolumeSvc::m_builderTools {this, "DetectorBuilders", {}}
private

Definition at line 40 of file DetectorVolumeSvc.h.

◆ m_detector

CxxUtils::CachedValue<DetectorPtr> ActsTrk::DetectorVolumeSvc::m_detector {}
private

Definition at line 42 of file DetectorVolumeSvc.h.

◆ m_nomContext

ActsGeometryContext ActsTrk::DetectorVolumeSvc::m_nomContext {}
private

Definition at line 43 of file DetectorVolumeSvc.h.


The documentation for this class was generated from the following files:
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
ActsTrk::DetectorVolumeSvc::m_nomContext
ActsGeometryContext m_nomContext
Definition: DetectorVolumeSvc.h:43
ActsTrk::DetectorVolumeSvc::m_builderTools
ToolHandleArray< IDetectorVolumeBuilderTool > m_builderTools
Definition: DetectorVolumeSvc.h:40
ActsTrk::DetectorVolumeSvc::buildDetector
std::shared_ptr< const Acts::Experimental::Detector > buildDetector() const
Definition: DetectorVolumeSvc.cxx:50
createSimpleDistributions.builder
builder
Definition: createSimpleDistributions.py:52
ActsTrk::DetectorVolumeSvc::m_detector
CxxUtils::CachedValue< DetectorPtr > m_detector
Definition: DetectorVolumeSvc.h:42
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition: ActsGeometryContext.h:27
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
ActsTrk::NoDeletePtr
Definition: NoDeletePtr.h:17