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 25 of file G4AtlasDetectorConstructionTool.cxx.

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

◆ ~G4AtlasDetectorConstructionTool()

G4AtlasDetectorConstructionTool::~G4AtlasDetectorConstructionTool ( )
default

Destructor.

Member Function Documentation

◆ GetDetectorConstruction()

auto G4AtlasDetectorConstructionTool::GetDetectorConstruction ( )
finaloverridevirtual

implements the following IDetectorConstructionTool methods

Definition at line 80 of file G4AtlasDetectorConstructionTool.cxx.

81 {
82 static_assert(std::has_virtual_destructor_v<G4VUserDetectorConstruction>,
83 "G4VUserDetectorConstruction must have a virtual destructor");
84 return {
86 [](G4VUserDetectorConstruction* ptr) { delete ptr; }};
87}
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 75 of file G4AtlasDetectorConstructionTool.cxx.

76{
78}

◆ initialize()

StatusCode G4AtlasDetectorConstructionTool::initialize ( )
finaloverridevirtual

Initialize method.

Definition at line 34 of file G4AtlasDetectorConstructionTool.cxx.

35{
36 ATH_MSG_DEBUG( "Initializing Geometry configuration tools " );
37 for (auto it: m_configurationTools)
38 {
39 ATH_CHECK( it.retrieve() );
40 ATH_CHECK( it->preGeometryConfigure() );
41 }
42
43 ATH_MSG_DEBUG( "Initializing World detectors in " << name() );
44 ATH_CHECK( m_detTool.retrieve() );
45
46 ATH_MSG_DEBUG( "Initializing sensitive detectors in " << name() );
47 ATH_CHECK( m_senDetTool.retrieve() );
48
49 ATH_MSG_DEBUG( "Initializing fastsim in " << name() );
50 ATH_CHECK( m_fastSimTool.retrieve() );
51
52 ATH_MSG_DEBUG( "Setting up G4 physics regions" );
53 for (auto& it: m_regionCreators)
54 {
55 ATH_CHECK( it.retrieve() );
56 }
57
59 {
60 ATH_MSG_DEBUG( "Setting up G4 parallel worlds" );
61 for (auto& it: m_parallelWorlds)
62 {
63 ATH_CHECK( it.retrieve() );
64 }
65 }
66
67 ATH_MSG_DEBUG( "Setting up field managers" );
68 ATH_CHECK( m_fieldManagers.retrieve() );
69
70 ATH_CHECK( m_G4CaloTransportTool.retrieve( DisableTool{ m_G4CaloTransportTool.empty() } ) );
71
72 return StatusCode::SUCCESS;
73}
#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 79 of file G4AtlasDetectorConstructionTool.h.

79{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 74 of file G4AtlasDetectorConstructionTool.h.

74{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 71 of file G4AtlasDetectorConstructionTool.h.

71{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 76 of file G4AtlasDetectorConstructionTool.h.

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

◆ m_fieldManagers

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

Definition at line 77 of file G4AtlasDetectorConstructionTool.h.

77{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 78 of file G4AtlasDetectorConstructionTool.h.

78{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 80 of file G4AtlasDetectorConstructionTool.h.

80{};

◆ m_parallelWorlds

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

Definition at line 73 of file G4AtlasDetectorConstructionTool.h.

73{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 72 of file G4AtlasDetectorConstructionTool.h.

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

◆ m_senDetTool

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

Definition at line 75 of file G4AtlasDetectorConstructionTool.h.

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

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