65 std::ostringstream message;
66 message <<
"Axis has zero length." <<
G4endl
67 <<
"Default axis ( 1.0, 0.0, 0.0 ) is used.";
68 G4Exception(
"G4CylindricalSurface::G4CylindricalSurface()",
82 std::ostringstream message;
83 message <<
"Negative radius." <<
G4endl
84 <<
"Default radius of 1.0 is used.";
85 G4Exception(
"G4CylindricalSurface::G4CylindricalSurface()",
101 :
G4Surface(), axis(c.axis), radius(c.radius)
109 if (&c ==
this) {
return *
this; }
119 return "G4CylindricalSurface";
124 os <<
"G4CylindricalSurface surface with origin: " <<
origin <<
"\t"
125 <<
"radius: " <<
radius <<
"\tand axis " <<
axis <<
"\n";
154 G4Vector3D lv ( kInfinity, kInfinity, kInfinity );
188 if ( a <= 0.0 ) {
return 0; }
190 G4double b = 2. * ( d * dhat - da * dira );
194 if ( radical < 0.0 ) {
return 0; }
196 G4double root = std::sqrt( radical );
197 sol[0] = ( - b + root ) / ( 2. * a );
198 sol[1] = ( - b - root ) / ( 2. * a );
209 for ( isoln = 0; isoln < maxsoln; isoln++ )
213 if ( sol[isoln] >= kInfinity )
220 if ((tmp * which_way) >= 0.0 )
848 if ( nmag != 0.0 ) { n = n * (1/nmag); }
862 if ( nmag != 0.0 ) { n = n * (1/nmag); }
947 if ( r >= 0.0 ) {
radius =
r; }
950 std::ostringstream message;
951 message <<
"Negative radius." <<
G4endl
952 <<
"Default radius of " <<
radius <<
" is used.";