ATLAS Offline Software
Classes | Public Member Functions | Private Attributes | List of all members
G4AtlasDetectorConstructionTool Class Referencefinal

#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. More...
 
 ~G4AtlasDetectorConstructionTool ()=default
 Destructor. More...
 
virtual StatusCode initialize () override final
 Initialize method. More...
 
virtual UPDetectorConstruction GetDetectorConstruction () override final
 implements the following IDetectorConstructionTool methods More...
 
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 {
85  new G4AtlasDetectorConstruction(this),
86  [](G4VUserDetectorConstruction* ptr) { delete ptr; }};
87 }

◆ GetParallelWorldNames()

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

Definition at line 75 of file G4AtlasDetectorConstructionTool.cxx.

76 {
77  return m_parallelWorldNames;
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 }

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.

◆ m_configurationTools

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

Definition at line 74 of file G4AtlasDetectorConstructionTool.h.

◆ 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.

◆ m_fastSimTool

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

Definition at line 76 of file G4AtlasDetectorConstructionTool.h.

◆ m_fieldManagers

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

Definition at line 77 of file G4AtlasDetectorConstructionTool.h.

◆ 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.

◆ m_parallelWorldNames

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

Definition at line 80 of file G4AtlasDetectorConstructionTool.h.

◆ m_parallelWorlds

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

Definition at line 73 of file G4AtlasDetectorConstructionTool.h.

◆ m_regionCreators

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

Definition at line 72 of file G4AtlasDetectorConstructionTool.h.

◆ m_senDetTool

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

Definition at line 75 of file G4AtlasDetectorConstructionTool.h.


The documentation for this class was generated from the following files:
G4AtlasDetectorConstructionTool::m_fieldManagers
ToolHandleArray< IFieldManagerTool > m_fieldManagers
Definition: G4AtlasDetectorConstructionTool.h:77
G4AtlasDetectorConstructionTool::m_detTool
ToolHandle< IDetectorGeometryTool > m_detTool
Definition: G4AtlasDetectorConstructionTool.h:71
skel.it
it
Definition: skel.GENtoEVGEN.py:407
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
G4AtlasDetectorConstructionTool::m_senDetTool
PublicToolHandle< ISensitiveDetectorMasterTool > m_senDetTool
Definition: G4AtlasDetectorConstructionTool.h:75
G4AtlasDetectorConstructionTool::m_fastSimTool
PublicToolHandle< IFastSimulationMasterTool > m_fastSimTool
Definition: G4AtlasDetectorConstructionTool.h:76
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
G4AtlasDetectorConstructionTool::m_parallelWorlds
ToolHandleArray< IParallelWorldTool > m_parallelWorlds
Definition: G4AtlasDetectorConstructionTool.h:73
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
G4AtlasDetectorConstructionTool::m_activateParallelWorlds
Gaudi::Property< bool > m_activateParallelWorlds
Definition: G4AtlasDetectorConstructionTool.h:79
G4AtlasDetectorConstructionTool::m_regionCreators
ToolHandleArray< IRegionCreator > m_regionCreators
Definition: G4AtlasDetectorConstructionTool.h:72
G4AtlasDetectorConstructionTool::m_configurationTools
ToolHandleArray< IG4GeometryConfigurationTool > m_configurationTools
Definition: G4AtlasDetectorConstructionTool.h:74
G4AtlasDetectorConstructionTool::m_parallelWorldNames
std::vector< std::string > m_parallelWorldNames
Definition: G4AtlasDetectorConstructionTool.h:80
G4AtlasDetectorConstructionTool::m_G4CaloTransportTool
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
Definition: G4AtlasDetectorConstructionTool.h:78