ATLAS Offline Software
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
21 
22 // Geant4 headers
23 #include "G4VUserDetectorConstruction.hh"
24 #include "G4VPhysicalVolume.hh"
25 
33 class G4AtlasDetectorConstructionTool final : public extends<AthAlgTool, IDetectorConstructionTool> {
34 
35  public:
37  G4AtlasDetectorConstructionTool( const std::string& type , const std::string& name,
38  const IInterface* parent ) ;
39 
42 
44  virtual StatusCode initialize( ) override final;
45 
47  virtual G4VUserDetectorConstruction* GetDetectorConstruction() override final {return this;}
48  virtual std::vector<std::string>& GetParallelWorldNames() override final; // Called by DetectorGeometrySvc
49 
51  virtual G4VPhysicalVolume* Construct() override final;
52  virtual void ConstructSDandField() override final;
53 
54  private:
55  ToolHandle<IDetectorGeometryTool> m_detTool{this, "World", "", "Tool handle of the top-of-the-tree detector geometry tool"};
56  ToolHandleArray<IRegionCreator> m_regionCreators{this, "RegionCreators", {}, "Tools to define G4 physics regions"};
57  ToolHandleArray<IParallelWorldTool> m_parallelWorlds{this, "ParallelWorlds", {} , "Tools to define G4 parallel worlds"};
58  ToolHandleArray<IG4GeometryConfigurationTool> m_configurationTools{this, "GeometryConfigurationTools", {}, "Tools for geometry configuration"};
59  PublicToolHandle<ISensitiveDetectorMasterTool> m_senDetTool{this, "SenDetMasterTool", "SensitiveDetectorMasterTool", ""};
60  ToolHandleArray<IFieldManagerTool> m_fieldManagers{this, "FieldManagers", {}, "field managers used"};
61  PublicToolHandle<IG4CaloTransportTool> m_G4CaloTransportTool{this, "G4CaloTransportTool", "", "Tool handle of the Geant4 transport tool for the FastCaloSim in Geant4 implementation"};
62  Gaudi::Property<bool> m_activateParallelWorlds{this, "ActivateParallelWorlds", false, "Toggle on/off the G4 parallel geometry system"};
63  std::vector<std::string> m_parallelWorldNames{};
64 
65 };
66 
67 #endif
G4AtlasDetectorConstructionTool::Construct
virtual G4VPhysicalVolume * Construct() override final
Implements the following G4VUserDetectorConstruction methods.
Definition: G4AtlasDetectorConstructionTool.cxx:75
IFieldManagerTool.h
G4AtlasDetectorConstructionTool::m_fieldManagers
ToolHandleArray< IFieldManagerTool > m_fieldManagers
Definition: G4AtlasDetectorConstructionTool.h:60
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstructionTool
G4AtlasDetectorConstructionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition: G4AtlasDetectorConstructionTool.cxx:20
G4AtlasDetectorConstructionTool::m_detTool
ToolHandle< IDetectorGeometryTool > m_detTool
Definition: G4AtlasDetectorConstructionTool.h:55
ISensitiveDetectorMasterTool.h
IRegionCreator.h
G4AtlasDetectorConstructionTool::m_senDetTool
PublicToolHandle< ISensitiveDetectorMasterTool > m_senDetTool
Definition: G4AtlasDetectorConstructionTool.h:59
IDetectorGeometryTool
Definition: IDetectorGeometryTool.h:34
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
G4AtlasDetectorConstructionTool::m_parallelWorlds
ToolHandleArray< IParallelWorldTool > m_parallelWorlds
Definition: G4AtlasDetectorConstructionTool.h:57
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IG4CaloTransportTool.h
G4AtlasDetectorConstructionTool::m_activateParallelWorlds
Gaudi::Property< bool > m_activateParallelWorlds
Definition: G4AtlasDetectorConstructionTool.h:62
G4AtlasDetectorConstructionTool::ConstructSDandField
virtual void ConstructSDandField() override final
Definition: G4AtlasDetectorConstructionTool.cxx:110
G4AtlasDetectorConstructionTool::m_regionCreators
ToolHandleArray< IRegionCreator > m_regionCreators
Definition: G4AtlasDetectorConstructionTool.h:56
G4AtlasDetectorConstructionTool::m_configurationTools
ToolHandleArray< IG4GeometryConfigurationTool > m_configurationTools
Definition: G4AtlasDetectorConstructionTool.h:58
IDetectorConstructionTool.h
G4AtlasDetectorConstructionTool::initialize
virtual StatusCode initialize() override final
Initialize method.
Definition: G4AtlasDetectorConstructionTool.cxx:29
G4AtlasDetectorConstructionTool::m_parallelWorldNames
std::vector< std::string > m_parallelWorldNames
Definition: G4AtlasDetectorConstructionTool.h:63
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IG4GeometryConfigurationTool.h
G4AtlasDetectorConstructionTool::GetParallelWorldNames
virtual std::vector< std::string > & GetParallelWorldNames() override final
Definition: G4AtlasDetectorConstructionTool.cxx:67
IDetectorGeometryTool.h
G4AtlasDetectorConstructionTool::GetDetectorConstruction
virtual G4VUserDetectorConstruction * GetDetectorConstruction() override final
implements the following IDetectorConstructionTool methods
Definition: G4AtlasDetectorConstructionTool.h:47
G4AtlasDetectorConstructionTool::~G4AtlasDetectorConstructionTool
~G4AtlasDetectorConstructionTool()=default
Destructor.
G4AtlasDetectorConstructionTool
Definition: G4AtlasDetectorConstructionTool.h:33
IParallelWorldTool.h
G4AtlasDetectorConstructionTool::m_G4CaloTransportTool
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
Definition: G4AtlasDetectorConstructionTool.h:61