ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Atlas
G4AtlasTools
G4AtlasTools
G4AtlasDetectorConstructionTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef G4AtlasDetectorConstructionTool_H
6
#define G4AtlasDetectorConstructionTool_H
7
8
// Include files
9
// Gaudi headers
10
#include "GaudiKernel/ToolHandle.h"
// For tool handle array
11
// Athena headers
12
#include "
AthenaBaseComps/AthAlgTool.h
"
13
#include "
AthenaBaseComps/AthMessaging.h
"
14
#include "
G4AtlasInterfaces/IDetectorConstructionTool.h
"
15
#include "
G4AtlasInterfaces/IDetectorGeometryTool.h
"
16
#include "
G4AtlasInterfaces/IRegionCreator.h
"
17
#include "
G4AtlasInterfaces/IParallelWorldTool.h
"
18
#include "
G4AtlasInterfaces/IFastSimulationMasterTool.h
"
19
#include "
G4AtlasInterfaces/IFieldManagerTool.h
"
20
#include "
G4AtlasInterfaces/IG4GeometryConfigurationTool.h
"
21
#include "
G4AtlasInterfaces/ISensitiveDetectorMasterTool.h
"
22
#include "
G4AtlasInterfaces/IG4CaloTransportTool.h
"
23
24
// Geant4 headers
25
#include "G4VUserDetectorConstruction.hh"
26
#include "G4VPhysicalVolume.hh"
27
35
class
G4AtlasDetectorConstructionTool
final :
public
extends<AthAlgTool, IDetectorConstructionTool> {
36
37
public
:
40
class
G4AtlasDetectorConstruction
:
public
G4VUserDetectorConstruction,
41
public
AthMessaging
{
42
public
:
43
G4AtlasDetectorConstruction
(
44
G4AtlasDetectorConstructionTool
* detConstructionTool)
45
:
AthMessaging
(
"G4AtlasDetectorConstruction"
),
46
m_detConstructionTool
(detConstructionTool) {}
47
48
virtual
G4VPhysicalVolume*
Construct
() override final;
49
virtual
void
ConstructSDandField
() override final;
50
51
private
:
52
G4AtlasDetectorConstructionTool
*
m_detConstructionTool
{
53
nullptr
};
// Pointer to the G4 Atlas detector construction tool
54
};
55
57
G4AtlasDetectorConstructionTool
(
const
std::string&
type
,
const
std::string& name,
58
const
IInterface* parent ) ;
59
61
~G4AtlasDetectorConstructionTool
( ) =
default
;
62
64
virtual
StatusCode
initialize
( ) override final;
65
67
virtual UPDetectorConstruction
GetDetectorConstruction
() override final;
68
virtual
std
::
vector
<
std
::
string
>&
GetParallelWorldNames
() override final;
// Called by DetectorGeometrySvc
69
70
private
:
71
ToolHandle<
IDetectorGeometryTool
>
m_detTool
{
this
,
"World"
,
""
,
"Tool handle of the top-of-the-tree detector geometry tool"
};
72
ToolHandleArray<IRegionCreator>
m_regionCreators
{
this
,
"RegionCreators"
, {},
"Tools to define G4 physics regions"
};
73
ToolHandleArray<IParallelWorldTool>
m_parallelWorlds
{
this
,
"ParallelWorlds"
, {} ,
"Tools to define G4 parallel worlds"
};
74
ToolHandleArray<IG4GeometryConfigurationTool>
m_configurationTools
{
this
,
"GeometryConfigurationTools"
, {},
"Tools for geometry configuration"
};
75
PublicToolHandle<ISensitiveDetectorMasterTool>
m_senDetTool
{
this
,
"SenDetMasterTool"
,
"SensitiveDetectorMasterTool"
,
""
};
76
PublicToolHandle<IFastSimulationMasterTool>
m_fastSimTool
{
this
,
"FastSimMasterTool"
,
"FastSimulationMasterTool"
,
""
};
77
ToolHandleArray<IFieldManagerTool>
m_fieldManagers
{
this
,
"FieldManagers"
, {},
"field managers used"
};
78
PublicToolHandle<IG4CaloTransportTool>
m_G4CaloTransportTool
{
this
,
"G4CaloTransportTool"
,
""
,
"Tool handle of the Geant4 transport tool for the FastCaloSim in Geant4 implementation"
};
79
Gaudi::Property<bool>
m_activateParallelWorlds
{
this
,
"ActivateParallelWorlds"
,
false
,
"Toggle on/off the G4 parallel geometry system"
};
80
std::vector<std::string>
m_parallelWorldNames
{};
81
82
};
83
84
#endif
AthAlgTool.h
AthMessaging.h
IDetectorConstructionTool.h
IDetectorGeometryTool.h
IFastSimulationMasterTool.h
IFieldManagerTool.h
IG4CaloTransportTool.h
IG4GeometryConfigurationTool.h
IParallelWorldTool.h
IRegionCreator.h
ISensitiveDetectorMasterTool.h
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstruction::G4AtlasDetectorConstruction
G4AtlasDetectorConstruction(G4AtlasDetectorConstructionTool *detConstructionTool)
Definition
G4AtlasDetectorConstructionTool.h:43
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstruction::m_detConstructionTool
G4AtlasDetectorConstructionTool * m_detConstructionTool
Definition
G4AtlasDetectorConstructionTool.h:52
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstruction::Construct
virtual G4VPhysicalVolume * Construct() override final
Definition
G4AtlasDetectorConstructionTool.cxx:93
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstruction::ConstructSDandField
virtual void ConstructSDandField() override final
Definition
G4AtlasDetectorConstructionTool.cxx:136
G4AtlasDetectorConstructionTool::m_regionCreators
ToolHandleArray< IRegionCreator > m_regionCreators
Definition
G4AtlasDetectorConstructionTool.h:72
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstructionTool
G4AtlasDetectorConstructionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition
G4AtlasDetectorConstructionTool.cxx:25
G4AtlasDetectorConstructionTool::m_parallelWorldNames
std::vector< std::string > m_parallelWorldNames
Definition
G4AtlasDetectorConstructionTool.h:80
G4AtlasDetectorConstructionTool::GetDetectorConstruction
virtual UPDetectorConstruction GetDetectorConstruction() override final
implements the following IDetectorConstructionTool methods
Definition
G4AtlasDetectorConstructionTool.cxx:80
G4AtlasDetectorConstructionTool::GetParallelWorldNames
virtual std::vector< std::string > & GetParallelWorldNames() override final
Definition
G4AtlasDetectorConstructionTool.cxx:75
G4AtlasDetectorConstructionTool::m_configurationTools
ToolHandleArray< IG4GeometryConfigurationTool > m_configurationTools
Definition
G4AtlasDetectorConstructionTool.h:74
G4AtlasDetectorConstructionTool::m_fieldManagers
ToolHandleArray< IFieldManagerTool > m_fieldManagers
Definition
G4AtlasDetectorConstructionTool.h:77
G4AtlasDetectorConstructionTool::m_activateParallelWorlds
Gaudi::Property< bool > m_activateParallelWorlds
Definition
G4AtlasDetectorConstructionTool.h:79
G4AtlasDetectorConstructionTool::initialize
virtual StatusCode initialize() override final
Initialize method.
Definition
G4AtlasDetectorConstructionTool.cxx:34
G4AtlasDetectorConstructionTool::m_G4CaloTransportTool
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
Definition
G4AtlasDetectorConstructionTool.h:78
G4AtlasDetectorConstructionTool::m_parallelWorlds
ToolHandleArray< IParallelWorldTool > m_parallelWorlds
Definition
G4AtlasDetectorConstructionTool.h:73
G4AtlasDetectorConstructionTool::m_senDetTool
PublicToolHandle< ISensitiveDetectorMasterTool > m_senDetTool
Definition
G4AtlasDetectorConstructionTool.h:75
G4AtlasDetectorConstructionTool::m_detTool
ToolHandle< IDetectorGeometryTool > m_detTool
Definition
G4AtlasDetectorConstructionTool.h:71
G4AtlasDetectorConstructionTool::~G4AtlasDetectorConstructionTool
~G4AtlasDetectorConstructionTool()=default
Destructor.
G4AtlasDetectorConstructionTool::m_fastSimTool
PublicToolHandle< IFastSimulationMasterTool > m_fastSimTool
Definition
G4AtlasDetectorConstructionTool.h:76
IDetectorGeometryTool
Abstract interface to service for Geant4 detector geometry classes.
Definition
IDetectorGeometryTool.h:34
vector
Definition
MultiHisto.h:13
std
STL namespace.
type
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0