77 std::ostringstream message;
78 message <<
"Negative length." <<
G4endl
79 <<
"Default length of 0.0 is used.";
80 G4Exception(
"G4FConicalSurface::G4FConicalSurface()",
91 std::ostringstream message;
92 message <<
"Negative small radius." <<
G4endl
93 <<
"Default value of 0.0 is used.";
94 G4Exception(
"G4FConicalSurface::G4FConicalSurface()",
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()",
121 return "G4FConicalSurface";
145 Tmp = (Origin - Radius);
148 Tmp = Origin + Radius;
151 Tmp = EndOrigin - Radius;
154 Tmp = EndOrigin + Radius;
162 os <<
"G4FConicalSurface with origin: " <<
origin <<
"\t"
166 <<
"\t and length: " <<
length <<
"\n";
192 if ( ( qmag >= ls ) && ( qmag <= ll ) )
233 std::ostringstream message;
234 message <<
"Negative length." <<
G4endl
235 <<
"Original value of " <<
length <<
" is retained.";
245 std::ostringstream message;
246 message <<
"Negative small radius." <<
G4endl
247 <<
"Original value of " <<
small_radius <<
" is retained.";
261 std::ostringstream message;
262 message <<
"Large radius must exceed small radius." <<
G4endl
310 G4double A = t * da * da - dhat * dhat;
312 G4double C = ( -gamma * gamma + t * ga * ga
316 G4double radical = B * B - 4.0 * A * C;
323 G4double root = std::sqrt( radical );
324 sol[0] = ( - B + root ) / ( 2. * A );
325 sol[1] = ( - B - root ) / ( 2. * A );
344 for (
G4int i = 0; i < 2; i++ )
346 if(sol[i] < kInfinity) {
374 xd =
G4Vector3D ( std::sqrt ( x.
x()*x.
x() + x.
y()*x.
y() ) , 0 , x.
z() );
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());
380 G4double Zinter = (xd.z()*r*r + xd.x()*r +q)/(1+r*r) ;
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);
387 hownear = std::min ( (xd-upcorner).mag() , (xd-downcorner).mag() );