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
23 
24 // Geant4 headers
25 #include "G4VUserDetectorConstruction.hh"
26 #include "G4VPhysicalVolume.hh"
27 
35 class 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
IFieldManagerTool.h
G4AtlasDetectorConstructionTool::m_fieldManagers
ToolHandleArray< IFieldManagerTool > m_fieldManagers
Definition: G4AtlasDetectorConstructionTool.h:77
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstructionTool
G4AtlasDetectorConstructionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition: G4AtlasDetectorConstructionTool.cxx:25
G4AtlasDetectorConstructionTool::GetDetectorConstruction
virtual UPDetectorConstruction GetDetectorConstruction() override final
implements the following IDetectorConstructionTool methods
Definition: G4AtlasDetectorConstructionTool.cxx:80
G4AtlasDetectorConstructionTool::m_detTool
ToolHandle< IDetectorGeometryTool > m_detTool
Definition: G4AtlasDetectorConstructionTool.h:71
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstruction::G4AtlasDetectorConstruction
G4AtlasDetectorConstruction(G4AtlasDetectorConstructionTool *detConstructionTool)
Definition: G4AtlasDetectorConstructionTool.h:43
ISensitiveDetectorMasterTool.h
IRegionCreator.h
IFastSimulationMasterTool.h
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
G4AtlasDetectorConstructionTool::m_senDetTool
PublicToolHandle< ISensitiveDetectorMasterTool > m_senDetTool
Definition: G4AtlasDetectorConstructionTool.h:75
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstruction
G4VUserDetectorConstruction object passed to the G4 run manager Thid shouldn't live longer than the p...
Definition: G4AtlasDetectorConstructionTool.h:41
IDetectorGeometryTool
Definition: IDetectorGeometryTool.h:34
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstruction::ConstructSDandField
virtual void ConstructSDandField() override final
Definition: G4AtlasDetectorConstructionTool.cxx:136
G4AtlasDetectorConstructionTool::m_fastSimTool
PublicToolHandle< IFastSimulationMasterTool > m_fastSimTool
Definition: G4AtlasDetectorConstructionTool.h:76
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
G4AtlasDetectorConstructionTool::m_parallelWorlds
ToolHandleArray< IParallelWorldTool > m_parallelWorlds
Definition: G4AtlasDetectorConstructionTool.h:73
columnar::final
CM final
Definition: ColumnAccessor.h:106
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstruction::Construct
virtual G4VPhysicalVolume * Construct() override final
Definition: G4AtlasDetectorConstructionTool.cxx:93
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
IG4CaloTransportTool.h
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
IDetectorConstructionTool.h
G4AtlasDetectorConstructionTool::initialize
virtual StatusCode initialize() override final
Initialize method.
Definition: G4AtlasDetectorConstructionTool.cxx:34
G4AtlasDetectorConstructionTool::m_parallelWorldNames
std::vector< std::string > m_parallelWorldNames
Definition: G4AtlasDetectorConstructionTool.h:80
AthMessaging.h
IG4GeometryConfigurationTool.h
G4AtlasDetectorConstructionTool::GetParallelWorldNames
virtual std::vector< std::string > & GetParallelWorldNames() override final
Definition: G4AtlasDetectorConstructionTool.cxx:75
G4AtlasDetectorConstructionTool::G4AtlasDetectorConstruction::m_detConstructionTool
G4AtlasDetectorConstructionTool * m_detConstructionTool
Definition: G4AtlasDetectorConstructionTool.h:52
private
#define private
Definition: xAODTruthCnvAlg.h:20
IDetectorGeometryTool.h
G4AtlasDetectorConstructionTool::~G4AtlasDetectorConstructionTool
~G4AtlasDetectorConstructionTool()=default
Destructor.
G4AtlasDetectorConstructionTool
Definition: G4AtlasDetectorConstructionTool.h:35
IParallelWorldTool.h
G4AtlasDetectorConstructionTool::m_G4CaloTransportTool
PublicToolHandle< IG4CaloTransportTool > m_G4CaloTransportTool
Definition: G4AtlasDetectorConstructionTool.h:78