#include <G4FConicalSurface.hh>
Definition at line 63 of file G4FConicalSurface.hh.
◆ G4FConicalSurface() [1/2]
G4FConicalSurface::G4FConicalSurface |
( |
| ) |
|
◆ ~G4FConicalSurface()
G4FConicalSurface::~G4FConicalSurface |
( |
| ) |
|
|
virtual |
◆ G4FConicalSurface() [2/2]
Definition at line 54 of file G4FConicalSurface.cc.
60{
61
62
63
64
65
66
67
71
72
73 if (l >=0)
75 else
76 {
77 std::ostringstream message;
78 message <<
"Negative length." <<
G4endl
79 << "Default length of 0.0 is used.";
80 G4Exception(
"G4FConicalSurface::G4FConicalSurface()",
82
84 }
85
86
87 if ( srad >= 0.0 )
89 else
90 {
91 std::ostringstream message;
92 message <<
"Negative small radius." <<
G4endl
93 << "Default value of 0.0 is used.";
94 G4Exception(
"G4FConicalSurface::G4FConicalSurface()",
96
98 }
99
100
103 else
104 {
105 std::ostringstream message;
106 message <<
"Large radius must exceed small radius" <<
G4endl
107 << "Default value of small radius +1 is used.";
108 G4Exception(
"G4FConicalSurface::G4FConicalSurface()",
110
112 }
113
114
116}
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)
◆ Area()
G4double G4FConicalSurface::Area |
( |
| ) |
const |
|
virtual |
◆ CalcBBox()
void G4FConicalSurface::CalcBBox |
( |
| ) |
|
|
virtual |
Reimplemented from G4Surface.
Definition at line 125 of file G4FConicalSurface.cc.
126{
130
133
136
137
141
144
145 Tmp = (Origin - Radius);
147
148 Tmp = Origin + Radius;
150
151 Tmp = EndOrigin - Radius;
153
154 Tmp = EndOrigin + Radius;
156}
HepGeom::Point3D< G4double > G4Point3D
const G4Point3D PINFINITY(kInfinity, kInfinity, kInfinity)
G4Point3D GetLocation() const
G4Vector3D GetAxis() const
void Init(const G4Point3D &)
void Extend(const G4Point3D &)
◆ GetEntityType()
G4String G4FConicalSurface::GetEntityType |
( |
| ) |
const |
|
inlinevirtual |
◆ GetLargeRadius()
G4double G4FConicalSurface::GetLargeRadius |
( |
| ) |
const |
|
inline |
◆ GetLength()
G4double G4FConicalSurface::GetLength |
( |
| ) |
const |
|
inline |
◆ GetSmallRadius()
G4double G4FConicalSurface::GetSmallRadius |
( |
| ) |
const |
|
inline |
◆ GetTan_Angle()
G4double G4FConicalSurface::GetTan_Angle |
( |
| ) |
const |
|
inline |
◆ HowNear()
Reimplemented from G4Surface.
Definition at line 360 of file G4FConicalSurface.cc.
361{
362
363
364
365
366
367
369
373
374 xd =
G4Vector3D ( std::sqrt ( x.
x()*x.
x() + x.
y()*x.
y() ) , 0 , x.
z() );
375
376 G4double r = (upcorner.
z() - downcorner.
z()) / (upcorner.
x() - downcorner.
x());
377 G4double q = (downcorner.
z()*upcorner.
x() - upcorner.
z()*downcorner.
x()) /
378 (upcorner.
x() - downcorner.
x());
379
380 G4double Zinter = (xd.
z()*r*r + xd.
x()*r +q)/(1+r*r) ;
381
382 if ( ((Zinter >= downcorner.
z()) && (Zinter <=upcorner.
z())) ||
383 ((Zinter >= upcorner.
z()) && (Zinter <=downcorner.
z())) ) {
384 hownear = std::fabs(r*xd.
x()-xd.
z()+q)/std::sqrt(1+r*r);
385 return hownear;
386 } else {
387 hownear = std::min ( (xd-upcorner).mag() , (xd-downcorner).mag() );
388 return hownear;
389 }
390}
HepGeom::Vector3D< G4double > G4Vector3D
Referenced by Inside().
◆ Inside()
Definition at line 414 of file G4FConicalSurface.cc.
415{
416
418 return 1;
419 else
420 return 0;
421}
virtual G4double HowNear(const G4Vector3D &x) const
Referenced by Intersect().
◆ Intersect()
Reimplemented from G4Surface.
Definition at line 274 of file G4FConicalSurface.cc.
275{
276
277
278
279
280
281
282
283
284
285
286
289
290
293
294
297
298
300 sol[0]=-1.0;
301 sol[1]=-1.0;
302
303
305
309
310 G4double A = t * da * da - dhat * dhat;
312 G4double C = ( -gamma * gamma + t * ga * ga
315
316 G4double radical = B * B - 4.0 * A * C;
317
318 if ( radical < 0.0 )
319
320 return 0;
321 else
322 {
323 G4double root = std::sqrt( radical );
324 sol[0] = ( - B + root ) / ( 2. * A );
325 sol[1] = ( - B - root ) / ( 2. * A );
326 }
327
328
329
332
334 sol[0] = kInfinity;
335
337 sol[1] = kInfinity;
338
339
340
343
344 for (
G4int i = 0; i < 2; i++ )
345 {
346 if(sol[i] < kInfinity) {
348 nbinter++;
351 }
352 }
353 }
354 }
355
356 return nbinter;
357}
G4int Inside(const G4Vector3D &x) const
const G4Vector3D & GetDir() const
const G4Point3D & GetStart() const
G4BoundingBox3D * GetBBox()
◆ Name()
const char * G4FConicalSurface::Name |
( |
| ) |
const |
|
virtual |
◆ operator==()
◆ PrintOn()
void G4FConicalSurface::PrintOn |
( |
std::ostream & |
os = G4cout | ) |
const |
|
virtual |
◆ resize()
Definition at line 221 of file G4FConicalSurface.cc.
222{
223
224
225
226
227
228
229 if ( l >= 0.0 )
231 else
232 {
233 std::ostringstream message;
234 message <<
"Negative length." <<
G4endl
235 <<
"Original value of " <<
length <<
" is retained.";
238 }
239
240
241 if ( srad >= 0.0 )
243 else
244 {
245 std::ostringstream message;
246 message <<
"Negative small radius." <<
G4endl
247 <<
"Original value of " <<
small_radius <<
" is retained.";
250 }
251
252
255 else
256 {
260
261 std::ostringstream message;
262 message <<
"Large radius must exceed small radius." <<
G4endl
266 }
267
268
270
271}
◆ Scale()
G4double G4FConicalSurface::Scale |
( |
| ) |
const |
|
virtual |
◆ SurfaceNormal()
◆ WithinBoundary()
Definition at line 181 of file G4FConicalSurface.cc.
182{
183
184
186
191
192 if ( ( qmag >= ls ) && ( qmag <= ll ) )
193 return 1;
194 else
195 return 0;
196}
◆ large_radius
G4double G4FConicalSurface::large_radius |
|
protected |
◆ length
◆ Position
◆ small_radius
G4double G4FConicalSurface::small_radius |
|
protected |
◆ tan_angle
The documentation for this class was generated from the following files: