Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Tracking
Acts
ActsGeometry
src
DetectorVolumeSvc.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ActsGeometry/DetectorVolumeSvc.h
"
6
#include <Acts/Utilities/AxisDefinitions.hpp>
7
8
#include "
ActsGeoUtils/NoDeletePtr.h
"
9
// ATHENA
10
#include "GaudiKernel/EventContext.h"
11
#include "
GeoPrimitives/GeoPrimitives.h
"
12
#include "
PathResolver/PathResolver.h
"
13
14
// ACTS
15
#include "Acts/Detector/Detector.hpp"
16
#include "Acts/Detector/DetectorVolume.hpp"
17
#include "Acts/Detector/CylindricalContainerBuilder.hpp"
18
#include "Acts/Detector/DetectorBuilder.hpp"
19
20
using namespace
ActsTrk
;
21
DetectorVolumeSvc::DetectorVolumeSvc
(
const
std::string &
name
,
22
ISvcLocator *
svc
)
23
: base_class(
name
,
svc
) {}
24
25
StatusCode
DetectorVolumeSvc::initialize
() {
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
}
33
34
std::shared_ptr<const Acts::Experimental::Detector>
DetectorVolumeSvc::detector
()
const
{
35
if
(!
m_detector
.
isValid
()) {
36
ATH_MSG_INFO
(
"Build the Acts tracking detector"
);
37
m_detector
.
set
(
buildDetector
());
38
}
39
return
*
m_detector
.
ptr
();
40
}
41
42
unsigned
int
DetectorVolumeSvc::populateAlignmentStore
(AlignmentStore&
/*store*/
)
const
{
43
return
0;
44
}
45
46
const
ActsGeometryContext
&
DetectorVolumeSvc::getNominalContext
()
const
{
47
return
m_nomContext
;
48
}
49
50
std::shared_ptr<const Acts::Experimental::Detector>
DetectorVolumeSvc::buildDetector
()
const
{
51
ActsGeometryContext
gctx{};
52
std::vector<std::shared_ptr<const Acts::Experimental::IDetectorComponentBuilder> > builders;
53
for
(
const
auto
&
builder
:
m_builderTools
) {
54
builders.push_back(
NoDeletePtr<const Acts::Experimental::IDetectorComponentBuilder>
(
builder
.get()));
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
}
ActsTrk::DetectorVolumeSvc::detector
DetectorPtr detector() const override
Definition:
DetectorVolumeSvc.cxx:34
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::populateAlignmentStore
unsigned int populateAlignmentStore(AlignmentStore &store) const override
Definition:
DetectorVolumeSvc.cxx:42
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
GeoPrimitives.h
DetectorVolumeSvc.h
ActsTrk::DetectorVolumeSvc::initialize
StatusCode initialize() override
Definition:
DetectorVolumeSvc.cxx:25
createSimpleDistributions.builder
builder
Definition:
createSimpleDistributions.py:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ActsTrk::DetectorVolumeSvc::m_detector
CxxUtils::CachedValue< DetectorPtr > m_detector
Definition:
DetectorVolumeSvc.h:42
NoDeletePtr.h
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
ActsTrk::DetectorVolumeSvc::DetectorVolumeSvc
DetectorVolumeSvc(const std::string &name, ISvcLocator *pSvcLocator)
Definition:
DetectorVolumeSvc.cxx:21
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition:
AthROOTErrorHandlerSvc.cxx:10
ActsGeometryContext
Include the GeoPrimitives which need to be put first.
Definition:
ActsGeometryContext.h:27
PathResolver.h
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::DetectorVolumeSvc::getNominalContext
const ActsGeometryContext & getNominalContext() const override
Definition:
DetectorVolumeSvc.cxx:46
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition:
MuonDetectorBuilderTool.cxx:55
ActsTrk::NoDeletePtr
Definition:
NoDeletePtr.h:17
Generated on Thu Mar 13 2025 21:09:36 for ATLAS Offline Software by
1.8.18