ATLAS Offline Software
Loading...
Searching...
No Matches
DetectorGeometryBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef G4ATLASTOOLS_DETECTORGEOMETRYBASE_H
6#define G4ATLASTOOLS_DETECTORGEOMETRYBASE_H
7
8// Base classes
11
12// Athena headers
15
16// Gaudi headers
17#include "GaudiKernel/ServiceHandle.h" // For service handle
18#include "GaudiKernel/ToolHandle.h" // For tool handle array
19
20// STL library
21#include <string>
22#include <vector>
23
25class DetectorGeometryBase : public extends<AthAlgTool, IDetectorGeometryTool>
26{
27public:
28 // Basic constructor and destructor
29 DetectorGeometryBase(const std::string& type, const std::string& name, const IInterface *parent);
31
33 StatusCode initialize() override;
34
35
37 virtual void Build() override;
38
39 virtual void BuildGeometry() override;
40
41 virtual void PositionInParent() override;
42
43 virtual void SetRotationAndOffset(); //override; TODO add to IDetectorGeometryTool?
44
45 virtual void BuildSubDetectors() override;
46
47 virtual void SetEnvelope() override;
48
49 virtual void ResetEnvelope() override;
50
51 virtual void SetAsWorld() override;
52
53 std::string GetDetectorName() const override;
54
55 void SetDetectorName(const std::string&) override;
56
57 void SetParent(IDetectorGeometryTool*) override;
58
59 Envelope& GetEnvelope() override final;
60
61 G4VPhysicalVolume* GetWorldVolume() override final;
62
64 ToolHandleArray<IDetectorGeometryTool> m_subDetTools{this, "SubDetectors", {}, "Tool handle array of all subdetector tools"};
65
66 ServiceHandle<IG4GeometryNotifierSvc> m_notifierSvc{this, "GeometryNotifierSvc", "G4GeometryNotifierSvc", "Detector name (same as the Tool name if not set"};
67
69
71 Gaudi::Property<std::string> m_detectorName{this, "DetectorName", "", "Detector name (same as the Tool name if not set"};
72 bool m_isWorld{false};
73 Gaudi::Property<double> m_rotateX{this, "RotateX" , 0.0, "Rotation around the X-axis"};
74 Gaudi::Property<double> m_rotateY{this, "RotateY" , 0.0, "Rotation around the Y-axis"};
75 Gaudi::Property<double> m_rotateZ{this, "RotateZ" , 0.0, "Rotation around the Z-axis"};
76 Gaudi::Property<double> m_offsetX{this, "OffsetX" , 0.0, "Offset in the X-direction"};
77 Gaudi::Property<double> m_offsetY{this, "OffsetY" , 0.0, "Offset in the Y-direction"};
78 Gaudi::Property<double> m_offsetZ{this, "OffsetZ" , 0.0, "Offset in the Z-direction"};
79
80};
81
82#endif
#define protected
G4VPhysicalVolume * GetWorldVolume() override final
virtual void BuildGeometry() override
void SetParent(IDetectorGeometryTool *) override
Gaudi::Property< double > m_rotateY
DetectorGeometryBase(const std::string &type, const std::string &name, const IInterface *parent)
virtual void SetAsWorld() override
virtual void SetEnvelope() override
virtual void SetRotationAndOffset()
IDetectorGeometryTool * m_theParent
Gaudi::Property< double > m_rotateX
StatusCode initialize() override
Athena method.
Envelope & GetEnvelope() override final
Gaudi::Property< std::string > m_detectorName
Gaudi::Property< double > m_offsetX
virtual void ResetEnvelope() override
std::string GetDetectorName() const override
ServiceHandle< IG4GeometryNotifierSvc > m_notifierSvc
virtual void PositionInParent() override
Gaudi::Property< double > m_offsetY
void SetDetectorName(const std::string &) override
virtual void Build() override
purely virtual methods being implemented here
Gaudi::Property< double > m_rotateZ
Gaudi::Property< double > m_offsetZ
virtual void BuildSubDetectors() override
ToolHandleArray< IDetectorGeometryTool > m_subDetTools
Abstract interface to service for Geant4 detector geometry classes.