ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Utilities
Geo2G4
src
Geo2G4AssemblyTriplet.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef GEO2G4_ASSEMBLYTRIPLET_H
6
#define GEO2G4_ASSEMBLYTRIPLET_H
7
8
#include "G4ThreeVector.hh"
9
#include "G4RotationMatrix.hh"
10
11
class
G4LogicalVolume;
12
class
Geo2G4AssemblyVolume
;
13
14
class
Geo2G4AssemblyTriplet
15
{
16
public
:
// with description
17
18
Geo2G4AssemblyTriplet
();
19
// Default constructor
20
21
Geo2G4AssemblyTriplet
( G4LogicalVolume* pVolume,
22
G4ThreeVector& translation,
23
G4RotationMatrix* pRotation,
24
G4bool isReflection =
false
);
25
// An explicit constructor for a logical volume
26
27
Geo2G4AssemblyTriplet
(
Geo2G4AssemblyVolume
* pAssembly,
28
G4ThreeVector& translation,
29
G4RotationMatrix* pRotation,
30
G4bool isReflection =
false
);
31
// An explicit constructor for an assembly volume
32
33
Geo2G4AssemblyTriplet
(
const
Geo2G4AssemblyTriplet
& second ) =
default
;
34
// Copy constructor
35
36
~Geo2G4AssemblyTriplet
();
37
// Destructor
38
39
Geo2G4AssemblyTriplet
&
operator=
(
const
Geo2G4AssemblyTriplet
& second ) =
default
;
40
// Assignment operator
41
42
const
G4LogicalVolume*
GetVolume
()
const
{
return
m_volume
; }
43
G4LogicalVolume*
GetVolume
() {
return
m_volume
; }
44
// Retrieve the logical volume reference
45
46
void
SetVolume
( G4LogicalVolume* pVolume );
47
// Update the logical volume reference
48
49
const
Geo2G4AssemblyVolume
*
GetAssembly
()
const
{
return
m_assembly
; }
50
Geo2G4AssemblyVolume
*
GetAssembly
() {
return
m_assembly
; }
51
// Retrieve the assembly volume reference
52
53
void
SetAssembly
(
Geo2G4AssemblyVolume
* pAssembly );
54
// Update the assembly volume reference
55
56
const
G4ThreeVector
GetTranslation
()
const
{
return
m_translation
; }
57
G4ThreeVector
GetTranslation
() {
return
m_translation
; }
58
// Retrieve the logical volume translation
59
60
void
SetTranslation
( G4ThreeVector& pVolume );
61
// Update the logical volume translation
62
63
const
G4RotationMatrix*
GetRotation
()
const
{
return
m_rotation
; }
64
G4RotationMatrix*
GetRotation
() {
return
m_rotation
; }
65
// Retrieve the logical volume rotation
66
67
void
SetRotation
( G4RotationMatrix* pVolume );
68
// Update the logical volume rotation
69
70
G4bool
IsReflection
()
const
;
71
// Return true if the logical or assembly volume has reflection
72
73
private
:
74
75
G4LogicalVolume*
m_volume
;
76
// A logical volume
77
78
G4ThreeVector
m_translation
;
79
// A logical volume translation
80
81
G4RotationMatrix*
m_rotation
;
82
// A logical volume rotation
83
84
private
:
85
86
// Member data for handling assemblies of assemblies and reflections
87
88
Geo2G4AssemblyVolume
*
m_assembly
;
89
// An assembly volume
90
91
G4bool
m_isReflection
;
92
// True if the logical or assembly volume has reflection
93
};
94
95
inline
96
Geo2G4AssemblyTriplet::Geo2G4AssemblyTriplet
()
97
:
m_volume
( 0 ),
m_rotation
( 0 ),
m_assembly
(0),
m_isReflection
(false)
98
{
99
G4ThreeVector v(0.,0.,0.);
100
m_translation
= v;
101
}
102
103
inline
104
Geo2G4AssemblyTriplet::Geo2G4AssemblyTriplet
( G4LogicalVolume* pVolume,
105
G4ThreeVector& translation,
106
G4RotationMatrix* pRotation,
107
G4bool isReflection )
108
:
m_volume
( pVolume ),
m_translation
( translation ),
m_rotation
( pRotation ),
109
m_assembly
( 0 ),
m_isReflection
(isReflection)
110
{
111
}
112
113
inline
114
Geo2G4AssemblyTriplet::Geo2G4AssemblyTriplet
(
Geo2G4AssemblyVolume
* pAssembly,
115
G4ThreeVector& translation,
116
G4RotationMatrix* pRotation,
117
G4bool isReflection )
118
:
m_volume
( 0 ),
m_translation
( translation ),
m_rotation
( pRotation ),
119
m_assembly
( pAssembly ),
m_isReflection
(isReflection)
120
{
121
}
122
123
inline
124
Geo2G4AssemblyTriplet::~Geo2G4AssemblyTriplet
()
125
{
126
}
127
128
inline
129
void
Geo2G4AssemblyTriplet::SetVolume
( G4LogicalVolume* pVolume )
130
{
131
if
(
m_assembly
)
132
{
133
G4Exception(
"Geo2G4AssemblyTriplet::SetVolume()"
,
134
"IllegalCall"
, JustWarning,
135
"There is an assembly already set, it will be ignored."
);
136
}
137
m_volume
= pVolume;
138
m_assembly
= 0;
139
}
140
141
inline
142
void
Geo2G4AssemblyTriplet::SetAssembly
(
Geo2G4AssemblyVolume
* pAssembly )
143
{
144
if
(
m_volume
)
145
{
146
G4Exception(
"Geo2G4AssemblyTriplet::SetAssembly()"
,
147
"IllegalCall"
, JustWarning,
148
"There is a volume already set, it will be ignored."
);
149
}
150
m_assembly
= pAssembly;
151
m_volume
= 0;
152
}
153
154
inline
155
void
Geo2G4AssemblyTriplet::SetTranslation
( G4ThreeVector& translation )
156
{
157
m_translation
= translation;
158
}
159
160
inline
161
void
Geo2G4AssemblyTriplet::SetRotation
( G4RotationMatrix* pRotation )
162
{
163
m_rotation
= pRotation;
164
}
165
166
inline
167
G4bool
Geo2G4AssemblyTriplet::IsReflection
()
const
168
{
169
return
m_isReflection
;
170
}
171
172
#endif
Geo2G4AssemblyTriplet::GetAssembly
const Geo2G4AssemblyVolume * GetAssembly() const
Definition
Geo2G4AssemblyTriplet.h:49
Geo2G4AssemblyTriplet::GetVolume
const G4LogicalVolume * GetVolume() const
Definition
Geo2G4AssemblyTriplet.h:42
Geo2G4AssemblyTriplet::SetTranslation
void SetTranslation(G4ThreeVector &pVolume)
Definition
Geo2G4AssemblyTriplet.h:155
Geo2G4AssemblyTriplet::GetAssembly
Geo2G4AssemblyVolume * GetAssembly()
Definition
Geo2G4AssemblyTriplet.h:50
Geo2G4AssemblyTriplet::~Geo2G4AssemblyTriplet
~Geo2G4AssemblyTriplet()
Definition
Geo2G4AssemblyTriplet.h:124
Geo2G4AssemblyTriplet::Geo2G4AssemblyTriplet
Geo2G4AssemblyTriplet()
Definition
Geo2G4AssemblyTriplet.h:96
Geo2G4AssemblyTriplet::SetRotation
void SetRotation(G4RotationMatrix *pVolume)
Definition
Geo2G4AssemblyTriplet.h:161
Geo2G4AssemblyTriplet::m_assembly
Geo2G4AssemblyVolume * m_assembly
Definition
Geo2G4AssemblyTriplet.h:88
Geo2G4AssemblyTriplet::IsReflection
G4bool IsReflection() const
Definition
Geo2G4AssemblyTriplet.h:167
Geo2G4AssemblyTriplet::m_volume
G4LogicalVolume * m_volume
Definition
Geo2G4AssemblyTriplet.h:75
Geo2G4AssemblyTriplet::GetRotation
const G4RotationMatrix * GetRotation() const
Definition
Geo2G4AssemblyTriplet.h:63
Geo2G4AssemblyTriplet::SetVolume
void SetVolume(G4LogicalVolume *pVolume)
Definition
Geo2G4AssemblyTriplet.h:129
Geo2G4AssemblyTriplet::Geo2G4AssemblyTriplet
Geo2G4AssemblyTriplet(const Geo2G4AssemblyTriplet &second)=default
Geo2G4AssemblyTriplet::operator=
Geo2G4AssemblyTriplet & operator=(const Geo2G4AssemblyTriplet &second)=default
Geo2G4AssemblyTriplet::GetTranslation
G4ThreeVector GetTranslation()
Definition
Geo2G4AssemblyTriplet.h:57
Geo2G4AssemblyTriplet::GetRotation
G4RotationMatrix * GetRotation()
Definition
Geo2G4AssemblyTriplet.h:64
Geo2G4AssemblyTriplet::m_rotation
G4RotationMatrix * m_rotation
Definition
Geo2G4AssemblyTriplet.h:81
Geo2G4AssemblyTriplet::GetVolume
G4LogicalVolume * GetVolume()
Definition
Geo2G4AssemblyTriplet.h:43
Geo2G4AssemblyTriplet::GetTranslation
const G4ThreeVector GetTranslation() const
Definition
Geo2G4AssemblyTriplet.h:56
Geo2G4AssemblyTriplet::m_isReflection
G4bool m_isReflection
Definition
Geo2G4AssemblyTriplet.h:91
Geo2G4AssemblyTriplet::m_translation
G4ThreeVector m_translation
Definition
Geo2G4AssemblyTriplet.h:78
Geo2G4AssemblyTriplet::SetAssembly
void SetAssembly(Geo2G4AssemblyVolume *pAssembly)
Definition
Geo2G4AssemblyTriplet.h:142
Geo2G4AssemblyVolume
Definition
Geo2G4AssemblyVolume.h:16
Generated on
for ATLAS Offline Software by
1.17.0