#include <G4FCylindricalSurface.hh>
Definition at line 64 of file G4FCylindricalSurface.hh.
◆ G4FCylindricalSurface() [1/2]
G4FCylindricalSurface::G4FCylindricalSurface |
( |
| ) |
|
◆ G4FCylindricalSurface() [2/2]
Definition at line 52 of file G4FCylindricalSurface.cc.
57{
58
59
62
65
66
67 if ( l >= 0.0 )
69 else
70 {
71 std::ostringstream message;
72 message <<
"Negative length." <<
G4endl
73 << "Default length of 0.0 is used.";
74 G4Exception(
"G4FCylindricalSurface::G4FCylindricalSurface()",
76
78 }
79
80
81 if ( r >= 0.0 )
83 else
84 {
85 std::ostringstream message;
86 message <<
"Negative radius." <<
G4endl
87 << "Default value of 0.0 is used.";
88 G4Exception(
"G4FCylindricalSurface::G4FCylindricalSurface()",
90
92 }
93}
void Init(const G4Vector3D &refDirection0, const G4Vector3D &axis0, const G4Point3D &location0)
G4Axis2Placement3D Position
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
◆ ~G4FCylindricalSurface()
G4FCylindricalSurface::~G4FCylindricalSurface |
( |
| ) |
|
|
virtual |
◆ Area()
G4double G4FCylindricalSurface::Area |
( |
| ) |
const |
|
virtual |
◆ CalcBBox()
void G4FCylindricalSurface::CalcBBox |
( |
| ) |
|
|
virtual |
Reimplemented from G4Surface.
Definition at line 119 of file G4FCylindricalSurface.cc.
120{
121
122
123
124
127
132
133
137
140
141
142 Tmp = (Origin - Radius);
144
145 Tmp = Origin + Radius;
147
148 Tmp = EndOrigin - Radius;
150
151 Tmp = EndOrigin + Radius;
153}
HepGeom::Point3D< G4double > G4Point3D
const G4Point3D PINFINITY(kInfinity, kInfinity, kInfinity)
G4Point3D GetLocation() const
G4Vector3D GetAxis() const
void Init(const G4Point3D &)
void Extend(const G4Point3D &)
◆ GetAxis()
G4Vector3D G4FCylindricalSurface::GetAxis |
( |
| ) |
const |
|
inline |
◆ GetEntityType()
G4String G4FCylindricalSurface::GetEntityType |
( |
| ) |
const |
|
inlinevirtual |
◆ GetLength()
G4double G4FCylindricalSurface::GetLength |
( |
| ) |
const |
|
inline |
◆ GetRadius()
G4double G4FCylindricalSurface::GetRadius |
( |
| ) |
const |
|
inline |
◆ HowNear()
Reimplemented from G4Surface.
Definition at line 241 of file G4FCylindricalSurface.cc.
242{
243
244
245
247
251
252 xd =
G4Vector3D ( std::sqrt ( x.
x()*x.
x() + x.
y()*x.
y() ) , 0 , x.
z() );
253
254
256
257 if ( ((Zinter >= downcorner.
z()) && (Zinter <=upcorner.
z())) ) {
258 hownear = std::fabs(
radius - xd.
x() );
259 } else {
260 hownear = std::min ( (xd-upcorner).mag() , (xd-downcorner).mag() );
261 }
262
263 return hownear;
264}
HepGeom::Vector3D< G4double > G4Vector3D
Referenced by Inside().
◆ InitValues()
void G4FCylindricalSurface::InitValues |
( |
| ) |
|
◆ Inside()
Definition at line 309 of file G4FCylindricalSurface.cc.
310{
311
312
313
314
316 return 1;
317 else
318 return 0;
319}
virtual G4double HowNear(const G4Vector3D &x) const
Referenced by Intersect().
◆ Intersect()
Reimplemented from G4Surface.
Definition at line 156 of file G4FCylindricalSurface.cc.
157{
158
159
160
161
162
163
164
165
166
167
168
169
172
173
176
177
179
180
182 sol[0]=-1.0;
183 sol[1]=-1.0;
184
185
187
190
192 G4double B = 2 * ( -gamma * dhat + ga * da );
194
195 G4double radical = B * B - 4.0 * A * C;
196
197 if ( radical < 0.0 )
198
199 return 0;
200 else
201 {
202 G4double root = std::sqrt( radical );
203 sol[0] = ( - B + root ) / ( 2. * A );
204 sol[1] = ( - B - root ) / ( 2. * A );
205 }
206
207
208
211
213 sol[0] = kInfinity;
214
216 sol[1] = kInfinity;
217
218
219
222
223 for (
G4int i = 0; i < 2; i++ )
224 {
225 if(sol[i] < kInfinity) {
227 nbinter ++;
228
229
232 }
233 }
234 }
235 }
236
237 return nbinter;
238}
virtual G4int Inside(const G4Vector3D &x) const
const G4Vector3D & GetDir() const
const G4Point3D & GetStart() const
G4BoundingBox3D * GetBBox()
◆ NameOf()
const char * G4FCylindricalSurface::NameOf |
( |
| ) |
const |
|
virtual |
◆ operator==()
◆ PrintOn()
void G4FCylindricalSurface::PrintOn |
( |
std::ostream & |
os = G4cout | ) |
const |
|
virtual |
◆ resize()
Definition at line 322 of file G4FCylindricalSurface.cc.
323{
324
325
326 if ( r >= 0.0 )
328 else
329 {
330 std::ostringstream message;
331 message <<
"Negative radius." <<
G4endl
332 <<
"Original value of " <<
radius <<
" is retained.";
335 }
336
337
338 if ( l > 0.0 )
340 else
341 {
342 std::ostringstream message;
343 message <<
"Negative or zero length." <<
G4endl
344 <<
"Original value of " <<
length <<
" is retained.";
347 }
348}
◆ Scale()
G4double G4FCylindricalSurface::Scale |
( |
| ) |
const |
|
virtual |
◆ SetRadius()
void G4FCylindricalSurface::SetRadius |
( |
G4double |
r | ) |
|
◆ SurfaceNormal()
◆ WithinBoundary()
◆ length
◆ Position
◆ radius
The documentation for this class was generated from the following files: