ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Atlas
G4AtlasTools
G4AtlasTools
DetectorGeometryBase.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 G4ATLASTOOLS_DETECTORGEOMETRYBASE_H
6
#define G4ATLASTOOLS_DETECTORGEOMETRYBASE_H
7
8
// Base classes
9
#include "
AthenaBaseComps/AthAlgTool.h
"
10
#include "
G4AtlasInterfaces/IDetectorGeometryTool.h
"
11
12
// Athena headers
13
#include "
G4AtlasInterfaces/IG4GeometryNotifierSvc.h
"
14
#include "
SubDetectorEnvelopes/IEnvelopeDefSvc.h
"
15
16
// Gaudi headers
17
#include "GaudiKernel/ServiceHandle.h"
// For service handle
18
#include "GaudiKernel/ToolHandle.h"
// For tool handle array
19
20
// STL library
21
#include <string>
22
#include <vector>
23
25
class
DetectorGeometryBase
:
public
extends<AthAlgTool, IDetectorGeometryTool>
26
{
27
public
:
28
// Basic constructor and destructor
29
DetectorGeometryBase
(
const
std::string&
type
,
const
std::string& name,
const
IInterface *parent);
30
virtual
~DetectorGeometryBase
() {}
31
33
StatusCode
initialize
()
override
;
34
35
37
virtual
void
Build
()
override
;
38
39
virtual
void
BuildGeometry
()
override
;
40
41
virtual
void
PositionInParent
()
override
;
42
43
virtual
void
SetRotationAndOffset
();
//override; TODO add to IDetectorGeometryTool?
44
45
virtual
void
BuildSubDetectors
()
override
;
46
47
virtual
void
SetEnvelope
()
override
;
48
49
virtual
void
ResetEnvelope
()
override
;
50
51
virtual
void
SetAsWorld
()
override
;
52
53
std::string
GetDetectorName
()
const override
;
54
55
void
SetDetectorName
(
const
std::string&)
override
;
56
57
void
SetParent
(
IDetectorGeometryTool
*)
override
;
58
59
Envelope
&
GetEnvelope
() override final;
60
61
G4VPhysicalVolume*
GetWorldVolume
() override final;
62
63
protected
:
64
ToolHandleArray<
IDetectorGeometryTool
>
m_subDetTools
{
this
,
"SubDetectors"
, {},
"Tool handle array of all subdetector tools"
};
65
66
ServiceHandle<IG4GeometryNotifierSvc>
m_notifierSvc
{
this
,
"GeometryNotifierSvc"
,
"G4GeometryNotifierSvc"
,
"Detector name (same as the Tool name if not set"
};
67
68
IDetectorGeometryTool
*
m_theParent
{};
69
70
Envelope
m_envelope
;
71
Gaudi::Property<std::string>
m_detectorName
{
this
,
"DetectorName"
,
""
,
"Detector name (same as the Tool name if not set"
};
72
bool
m_isWorld
{
false
};
73
Gaudi::Property<double>
m_rotateX
{
this
,
"RotateX"
, 0.0,
"Rotation around the X-axis"
};
74
Gaudi::Property<double>
m_rotateY
{
this
,
"RotateY"
, 0.0,
"Rotation around the Y-axis"
};
75
Gaudi::Property<double>
m_rotateZ
{
this
,
"RotateZ"
, 0.0,
"Rotation around the Z-axis"
};
76
Gaudi::Property<double>
m_offsetX
{
this
,
"OffsetX"
, 0.0,
"Offset in the X-direction"
};
77
Gaudi::Property<double>
m_offsetY
{
this
,
"OffsetY"
, 0.0,
"Offset in the Y-direction"
};
78
Gaudi::Property<double>
m_offsetZ
{
this
,
"OffsetZ"
, 0.0,
"Offset in the Z-direction"
};
79
80
};
81
82
#endif
AthAlgTool.h
IDetectorGeometryTool.h
IEnvelopeDefSvc.h
IG4GeometryNotifierSvc.h
DetectorGeometryBase::GetWorldVolume
G4VPhysicalVolume * GetWorldVolume() override final
Definition
DetectorGeometryBase.cxx:200
DetectorGeometryBase::BuildGeometry
virtual void BuildGeometry() override
Definition
DetectorGeometryBase.cxx:75
DetectorGeometryBase::SetParent
void SetParent(IDetectorGeometryTool *) override
Definition
DetectorGeometryBase.cxx:190
DetectorGeometryBase::m_rotateY
Gaudi::Property< double > m_rotateY
Definition
DetectorGeometryBase.h:74
DetectorGeometryBase::DetectorGeometryBase
DetectorGeometryBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition
DetectorGeometryBase.cxx:13
DetectorGeometryBase::m_envelope
Envelope m_envelope
Definition
DetectorGeometryBase.h:70
DetectorGeometryBase::SetAsWorld
virtual void SetAsWorld() override
Definition
DetectorGeometryBase.cxx:185
DetectorGeometryBase::~DetectorGeometryBase
virtual ~DetectorGeometryBase()
Definition
DetectorGeometryBase.h:30
DetectorGeometryBase::SetEnvelope
virtual void SetEnvelope() override
Definition
DetectorGeometryBase.cxx:167
DetectorGeometryBase::SetRotationAndOffset
virtual void SetRotationAndOffset()
Definition
DetectorGeometryBase.cxx:80
DetectorGeometryBase::m_theParent
IDetectorGeometryTool * m_theParent
Definition
DetectorGeometryBase.h:68
DetectorGeometryBase::m_isWorld
bool m_isWorld
Definition
DetectorGeometryBase.h:72
DetectorGeometryBase::m_rotateX
Gaudi::Property< double > m_rotateX
Definition
DetectorGeometryBase.h:73
DetectorGeometryBase::initialize
StatusCode initialize() override
Athena method.
Definition
DetectorGeometryBase.cxx:19
DetectorGeometryBase::GetEnvelope
Envelope & GetEnvelope() override final
Definition
DetectorGeometryBase.cxx:195
DetectorGeometryBase::m_detectorName
Gaudi::Property< std::string > m_detectorName
Definition
DetectorGeometryBase.h:71
DetectorGeometryBase::m_offsetX
Gaudi::Property< double > m_offsetX
Definition
DetectorGeometryBase.h:76
DetectorGeometryBase::ResetEnvelope
virtual void ResetEnvelope() override
Definition
DetectorGeometryBase.cxx:171
DetectorGeometryBase::GetDetectorName
std::string GetDetectorName() const override
Definition
DetectorGeometryBase.cxx:180
DetectorGeometryBase::m_notifierSvc
ServiceHandle< IG4GeometryNotifierSvc > m_notifierSvc
Definition
DetectorGeometryBase.h:66
DetectorGeometryBase::PositionInParent
virtual void PositionInParent() override
Definition
DetectorGeometryBase.cxx:120
DetectorGeometryBase::m_offsetY
Gaudi::Property< double > m_offsetY
Definition
DetectorGeometryBase.h:77
DetectorGeometryBase::SetDetectorName
void SetDetectorName(const std::string &) override
Definition
DetectorGeometryBase.cxx:175
DetectorGeometryBase::Build
virtual void Build() override
purely virtual methods being implemented here
Definition
DetectorGeometryBase.cxx:53
DetectorGeometryBase::m_rotateZ
Gaudi::Property< double > m_rotateZ
Definition
DetectorGeometryBase.h:75
DetectorGeometryBase::m_offsetZ
Gaudi::Property< double > m_offsetZ
Definition
DetectorGeometryBase.h:78
DetectorGeometryBase::BuildSubDetectors
virtual void BuildSubDetectors() override
Definition
DetectorGeometryBase.cxx:155
DetectorGeometryBase::m_subDetTools
ToolHandleArray< IDetectorGeometryTool > m_subDetTools
Definition
DetectorGeometryBase.h:64
IDetectorGeometryTool
Abstract interface to service for Geant4 detector geometry classes.
Definition
IDetectorGeometryTool.h:34
ServiceHandle
Definition
ClusterMakerTool.h:36
Envelope
Definition
IDetectorGeometryTool.h:17
type
protected
#define protected
Definition
testRead.cxx:26
Generated on
for ATLAS Offline Software by
1.17.0