ATLAS Offline Software
Loading...
Searching...
No Matches
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
23
24// Geant4 headers
25#include "G4VUserDetectorConstruction.hh"
26#include "G4VPhysicalVolume.hh"
27
35class G4AtlasDetectorConstructionTool final : public extends<AthAlgTool, IDetectorConstructionTool> {
36
37 public:
40 class G4AtlasDetectorConstruction : public G4VUserDetectorConstruction,
41 public AthMessaging {
42 public:
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:
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
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
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
G4AtlasDetectorConstruction(G4AtlasDetectorConstructionTool *detConstructionTool)
ToolHandleArray< IRegionCreator > m_regionCreators
G4AtlasDetectorConstructionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
virtual UPDetectorConstruction GetDetectorConstruction() override final
implements the following IDetectorConstructionTool methods
virtual std::vector< std::string > & GetParallelWorldNames() override final
ToolHandleArray< IG4GeometryConfigurationTool > m_configurationTools
ToolHandleArray< IFieldManagerTool > m_fieldManagers
virtual StatusCode initialize() override final
Initialize method.
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
ToolHandleArray< IParallelWorldTool > m_parallelWorlds
PublicToolHandle< ISensitiveDetectorMasterTool > m_senDetTool
ToolHandle< IDetectorGeometryTool > m_detTool
~G4AtlasDetectorConstructionTool()=default
Destructor.
PublicToolHandle< IFastSimulationMasterTool > m_fastSimTool
Abstract interface to service for Geant4 detector geometry classes.
STL namespace.
#define private