42 : radius(0.), length(1.)
71 std::ostringstream message;
72 message <<
"Negative length." <<
G4endl
73 <<
"Default length of 0.0 is used.";
74 G4Exception(
"G4FCylindricalSurface::G4FCylindricalSurface()",
85 std::ostringstream message;
86 message <<
"Negative radius." <<
G4endl
87 <<
"Default value of 0.0 is used.";
88 G4Exception(
"G4FCylindricalSurface::G4FCylindricalSurface()",
98 return "G4FCylindricalSurface";
104 os <<
"G4FCylindricalSurface with origin: " <<
origin <<
"\t"
106 <<
"\t radius: " <<
radius <<
"\t and length: "
142 Tmp = (Origin - Radius);
145 Tmp = Origin + Radius;
148 Tmp = EndOrigin - Radius;
151 Tmp = EndOrigin + Radius;
192 G4double B = 2 * ( -gamma * dhat + ga * da );
195 G4double radical = B * B - 4.0 * A * C;
202 G4double root = std::sqrt( radical );
203 sol[0] = ( - B + root ) / ( 2. * A );
204 sol[1] = ( - B - root ) / ( 2. * A );
223 for (
G4int i = 0; i < 2; i++ )
225 if(sol[i] < kInfinity) {
252 xd =
G4Vector3D ( std::sqrt ( x.
x()*x.
x() + x.
y()*x.
y() ) , 0 , x.
z() );
257 if ( ((Zinter >= downcorner.z()) && (Zinter <=upcorner.
z())) ) {
258 hownear = std::fabs(
radius - xd.x() );
260 hownear = std::min ( (xd-upcorner).mag() , (xd-downcorner).mag() );
330 std::ostringstream message;
331 message <<
"Negative radius." <<
G4endl
332 <<
"Original value of " <<
radius <<
" is retained.";
342 std::ostringstream message;
343 message <<
"Negative or zero length." <<
G4endl
344 <<
"Original value of " <<
length <<
" is retained.";