ATLAS Offline Software
Loading...
Searching...
No Matches
G4AtlasDetectorConstructionTool Class Referencefinal

Tool for the concrete implementation of a G4Atlas-based detector construction. More...

#include "G4AtlasTools/G4AtlasDetectorConstructionTool.h"

Inheritance diagram for G4AtlasDetectorConstructionTool:
Collaboration diagram for G4AtlasDetectorConstructionTool:

Classes

class  G4AtlasDetectorConstruction
 G4VUserDetectorConstruction object passed to the G4 run manager Thid shouldn't live longer than the parent tool. More...

Public Member Functions

 G4AtlasDetectorConstructionTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor.
 ~G4AtlasDetectorConstructionTool ()=default
 Destructor.
virtual StatusCode initialize () override final
 Initialize method.
virtual UPDetectorConstruction GetDetectorConstruction () override final
 implements the following IDetectorConstructionTool methods
virtual std::vector< std::string > & GetParallelWorldNames () override final

Private Attributes

ToolHandle< IDetectorGeometryToolm_detTool {this, "World", "", "Tool handle of the top-of-the-tree detector geometry tool"}
ToolHandleArray< IRegionCreatorm_regionCreators {this, "RegionCreators", {}, "Tools to define G4 physics regions"}
ToolHandleArray< IParallelWorldToolm_parallelWorlds {this, "ParallelWorlds", {} , "Tools to define G4 parallel worlds"}
ToolHandleArray< IG4GeometryConfigurationToolm_configurationTools {this, "GeometryConfigurationTools", {}, "Tools for geometry configuration"}
PublicToolHandle< ISensitiveDetectorMasterToolm_senDetTool {this, "SenDetMasterTool", "SensitiveDetectorMasterTool", ""}
PublicToolHandle< IFastSimulationMasterToolm_fastSimTool {this, "FastSimMasterTool", "FastSimulationMasterTool", ""}
ToolHandleArray< IFieldManagerToolm_fieldManagers {this, "FieldManagers", {}, "field managers used"}
PublicToolHandle< IG4CaloTransportToolm_G4CaloTransportTool {this, "G4CaloTransportTool", "", "Tool handle of the Geant4 transport tool for the FastCaloSim in Geant4 implementation"}
Gaudi::Property< bool > m_activateParallelWorlds {this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"}
std::vector< std::string > m_parallelWorldNames {}

Detailed Description

Tool for the concrete implementation of a G4Atlas-based detector construction.

Author
Andrea Dell'Acqua
Date
2015-03-06

Definition at line 35 of file G4AtlasDetectorConstructionTool.h.

Constructor & Destructor Documentation

◆ G4AtlasDetectorConstructionTool()

G4AtlasDetectorConstructionTool::G4AtlasDetectorConstructionTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Standard constructor.

Definition at line 26 of file G4AtlasDetectorConstructionTool.cxx.

28 : base_class( type, nam , parent )
29{
30}

◆ ~G4AtlasDetectorConstructionTool()

G4AtlasDetectorConstructionTool::~G4AtlasDetectorConstructionTool ( )
default

Destructor.

Member Function Documentation

◆ GetDetectorConstruction()

auto G4AtlasDetectorConstructionTool::GetDetectorConstruction ( )
finaloverridevirtual

implements the following IDetectorConstructionTool methods

Definition at line 81 of file G4AtlasDetectorConstructionTool.cxx.

82 {
83 static_assert(std::has_virtual_destructor_v<G4VUserDetectorConstruction>,
84 "G4VUserDetectorConstruction must have a virtual destructor");
85 return {
87 [](G4VUserDetectorConstruction* ptr) { delete ptr; }};
88}
G4VUserDetectorConstruction object passed to the G4 run manager Thid shouldn't live longer than the p...
void * ptr(T *p)
Definition SGImplSvc.cxx:74

◆ GetParallelWorldNames()

std::vector< std::string > & G4AtlasDetectorConstructionTool::GetParallelWorldNames ( )
finaloverridevirtual

Definition at line 76 of file G4AtlasDetectorConstructionTool.cxx.

77{
79}

◆ initialize()

StatusCode G4AtlasDetectorConstructionTool::initialize ( )
finaloverridevirtual

Initialize method.

Definition at line 35 of file G4AtlasDetectorConstructionTool.cxx.

36{
37 ATH_MSG_DEBUG( "Initializing Geometry configuration tools " );
38 for (auto it: m_configurationTools)
39 {
40 ATH_CHECK( it.retrieve() );
41 ATH_CHECK( it->preGeometryConfigure() );
42 }
43
44 ATH_MSG_DEBUG( "Initializing World detectors in " << name() );
45 ATH_CHECK( m_detTool.retrieve() );
46
47 ATH_MSG_DEBUG( "Initializing sensitive detectors in " << name() );
48 ATH_CHECK( m_senDetTool.retrieve() );
49
50 ATH_MSG_DEBUG( "Initializing fastsim in " << name() );
51 ATH_CHECK( m_fastSimTool.retrieve() );
52
53 ATH_MSG_DEBUG( "Setting up G4 physics regions" );
54 for (auto& it: m_regionCreators)
55 {
56 ATH_CHECK( it.retrieve() );
57 }
58
60 {
61 ATH_MSG_DEBUG( "Setting up G4 parallel worlds" );
62 for (auto& it: m_parallelWorlds)
63 {
64 ATH_CHECK( it.retrieve() );
65 }
66 }
67
68 ATH_MSG_DEBUG( "Setting up field managers" );
69 ATH_CHECK( m_fieldManagers.retrieve() );
70
71 ATH_CHECK( m_G4CaloTransportTool.retrieve( DisableTool{ m_G4CaloTransportTool.empty() } ) );
72
73 return StatusCode::SUCCESS;
74}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
ToolHandleArray< IRegionCreator > m_regionCreators
ToolHandleArray< IG4GeometryConfigurationTool > m_configurationTools
ToolHandleArray< IFieldManagerTool > m_fieldManagers
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
ToolHandleArray< IParallelWorldTool > m_parallelWorlds
PublicToolHandle< ISensitiveDetectorMasterTool > m_senDetTool
ToolHandle< IDetectorGeometryTool > m_detTool
PublicToolHandle< IFastSimulationMasterTool > m_fastSimTool

Member Data Documentation

◆ m_activateParallelWorlds

Gaudi::Property<bool> G4AtlasDetectorConstructionTool::m_activateParallelWorlds {this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"}
private

Definition at line 81 of file G4AtlasDetectorConstructionTool.h.

81{this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"};

◆ m_configurationTools

ToolHandleArray<IG4GeometryConfigurationTool> G4AtlasDetectorConstructionTool::m_configurationTools {this, "GeometryConfigurationTools", {}, "Tools for geometry configuration"}
private

Definition at line 76 of file G4AtlasDetectorConstructionTool.h.

76{this, "GeometryConfigurationTools", {}, "Tools for geometry configuration"};

◆ m_detTool

ToolHandle<IDetectorGeometryTool> G4AtlasDetectorConstructionTool::m_detTool {this, "World", "", "Tool handle of the top-of-the-tree detector geometry tool"}
private

Definition at line 73 of file G4AtlasDetectorConstructionTool.h.

73{this, "World", "", "Tool handle of the top-of-the-tree detector geometry tool"};

◆ m_fastSimTool

PublicToolHandle<IFastSimulationMasterTool> G4AtlasDetectorConstructionTool::m_fastSimTool {this, "FastSimMasterTool", "FastSimulationMasterTool", ""}
private

Definition at line 78 of file G4AtlasDetectorConstructionTool.h.

78{this, "FastSimMasterTool", "FastSimulationMasterTool", ""};

◆ m_fieldManagers

ToolHandleArray<IFieldManagerTool> G4AtlasDetectorConstructionTool::m_fieldManagers {this, "FieldManagers", {}, "field managers used"}
private

Definition at line 79 of file G4AtlasDetectorConstructionTool.h.

79{this, "FieldManagers", {}, "field managers used"};

◆ m_G4CaloTransportTool

PublicToolHandle<IG4CaloTransportTool> G4AtlasDetectorConstructionTool::m_G4CaloTransportTool {this, "G4CaloTransportTool", "", "Tool handle of the Geant4 transport tool for the FastCaloSim in Geant4 implementation"}
private

Definition at line 80 of file G4AtlasDetectorConstructionTool.h.

80{this, "G4CaloTransportTool", "", "Tool handle of the Geant4 transport tool for the FastCaloSim in Geant4 implementation"};

◆ m_parallelWorldNames

std::vector<std::string> G4AtlasDetectorConstructionTool::m_parallelWorldNames {}
private

Definition at line 82 of file G4AtlasDetectorConstructionTool.h.

82{};

◆ m_parallelWorlds

ToolHandleArray<IParallelWorldTool> G4AtlasDetectorConstructionTool::m_parallelWorlds {this, "ParallelWorlds", {} , "Tools to define G4 parallel worlds"}
private

Definition at line 75 of file G4AtlasDetectorConstructionTool.h.

75{this, "ParallelWorlds", {} , "Tools to define G4 parallel worlds"};

◆ m_regionCreators

ToolHandleArray<IRegionCreator> G4AtlasDetectorConstructionTool::m_regionCreators {this, "RegionCreators", {}, "Tools to define G4 physics regions"}
private

Definition at line 74 of file G4AtlasDetectorConstructionTool.h.

74{this, "RegionCreators", {}, "Tools to define G4 physics regions"};

◆ m_senDetTool

PublicToolHandle<ISensitiveDetectorMasterTool> G4AtlasDetectorConstructionTool::m_senDetTool {this, "SenDetMasterTool", "SensitiveDetectorMasterTool", ""}
private

Definition at line 77 of file G4AtlasDetectorConstructionTool.h.

77{this, "SenDetMasterTool", "SensitiveDetectorMasterTool", ""};

The documentation for this class was generated from the following files: