ATLAS Offline Software
IDetectorGeometryTool.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 G4ATLASINTERFACES_IDETECTORGEOMETRYTOOL_H
6 #define G4ATLASINTERFACES_IDETECTORGEOMETRYTOOL_H
7 
8 #include "GaudiKernel/IAlgTool.h"
9 
10 // Geant4
11 #include "G4LogicalVolume.hh"
12 #include "G4VPhysicalVolume.hh"
13 #include "G4RotationMatrix.hh"
14 #include "G4ThreeVector.hh"
15 
16 struct Envelope
17 {
19  bool IsBuilt() {return theEnvelope!=0;}
20  G4LogicalVolume* theEnvelope;
21  G4VPhysicalVolume* thePositionedVolume;
22  G4RotationMatrix* theRotation;
23  G4ThreeVector thePosition;
24 };
25 
34 class IDetectorGeometryTool : virtual public IAlgTool {
35  public:
39 
40  virtual void Build() = 0;
41 
42  virtual void BuildGeometry() = 0;
43 
44  virtual void PositionInParent() = 0;
45 
46  virtual void BuildSubDetectors() =0;
47 
48  virtual void SetEnvelope() = 0;
49 
50  virtual void ResetEnvelope() = 0;
51 
52  virtual void SetAsWorld() = 0;
53 
54  virtual std::string GetDetectorName() const = 0;
55 
56  virtual void SetDetectorName(const std::string&) = 0;
57 
58  virtual void SetParent(IDetectorGeometryTool*) = 0;
59 
60  virtual Envelope& GetEnvelope() = 0;
61 
62  virtual G4VPhysicalVolume* GetWorldVolume() = 0;
63 
64 };
65 
66 #endif
Envelope
Definition: IDetectorGeometryTool.h:17
Envelope::thePositionedVolume
G4VPhysicalVolume * thePositionedVolume
Definition: IDetectorGeometryTool.h:21
Envelope::IsBuilt
bool IsBuilt()
Definition: IDetectorGeometryTool.h:19
Envelope::theEnvelope
G4LogicalVolume * theEnvelope
Definition: IDetectorGeometryTool.h:20
Envelope::Envelope
Envelope()
Definition: IDetectorGeometryTool.h:18
IDetectorGeometryTool::ResetEnvelope
virtual void ResetEnvelope()=0
IDetectorGeometryTool::SetDetectorName
virtual void SetDetectorName(const std::string &)=0
IDetectorGeometryTool::GetDetectorName
virtual std::string GetDetectorName() const =0
IDetectorGeometryTool::Build
virtual void Build()=0
IDetectorGeometryTool::PositionInParent
virtual void PositionInParent()=0
IDetectorGeometryTool::~IDetectorGeometryTool
virtual ~IDetectorGeometryTool()
Definition: IDetectorGeometryTool.h:36
IDetectorGeometryTool::BuildGeometry
virtual void BuildGeometry()=0
Envelope::thePosition
G4ThreeVector thePosition
Definition: IDetectorGeometryTool.h:23
IDetectorGeometryTool
Definition: IDetectorGeometryTool.h:34
IDetectorGeometryTool::GetEnvelope
virtual Envelope & GetEnvelope()=0
IDetectorGeometryTool::SetParent
virtual void SetParent(IDetectorGeometryTool *)=0
IDetectorGeometryTool::SetAsWorld
virtual void SetAsWorld()=0
IDetectorGeometryTool::BuildSubDetectors
virtual void BuildSubDetectors()=0
IDetectorGeometryTool::GetWorldVolume
virtual G4VPhysicalVolume * GetWorldVolume()=0
Envelope::theRotation
G4RotationMatrix * theRotation
Definition: IDetectorGeometryTool.h:22
IDetectorGeometryTool::SetEnvelope
virtual void SetEnvelope()=0
IDetectorGeometryTool::DeclareInterfaceID
DeclareInterfaceID(IDetectorGeometryTool, 1, 0)
Creates the InterfaceID and interfaceID() method.