63 std::ostringstream message;
64 message <<
"Axis has zero length." <<
G4endl
65 <<
"Default axis ( 1.0, 0.0, 0.0 ) is used.";
66 G4Exception(
"G4ConicalSurface::G4ConicalSurface()",
"GeomSolids1001",
74 if ( ( e > 0.0 ) && ( e < ( 0.5 * pi ) ) )
80 std::ostringstream message;
81 message <<
"Angle out of range." <<
G4endl
82 <<
"Asked for angle out of allowed range of 0 to "
83 << 0.5*pi <<
" (PI/2): " << e <<
G4endl
84 <<
"Default angle of 1.0 is used.";
85 G4Exception(
"G4ConicalSurface::G4ConicalSurface()",
"GeomSolids1001",
98 :
G4Surface(), axis(c.axis), angle(c.angle)
106 if (&c ==
this) {
return *
this; }
116 return "G4ConicalSurface";
129 os <<
"G4ConicalSurface surface with origin: " <<
origin <<
"\t"
130 <<
"angle: " << angle <<
" radians \tand axis " << axis <<
"\n";
147 G4double Dist = ( l*std::tan(angle) - v.
mag2() ) * std::cos(angle);
174 G4int which_way = -1;
178 G4Vector3D lv ( kInfinity, kInfinity, kInfinity );
207 G4double B = 2.0 * ( gamma * dhat - T * ga * da );
208 G4double C = gamma * gamma - T * ga * ga;
224 G4double radical = B * B - 4.0 * A * C;
231 G4double root = std::sqrt( radical );
232 sol[0] = ( - B + root ) / ( 2. * A );
233 sol[1] = ( - B - root ) / ( 2. * A );
246 for ( isoln = 0; isoln < maxsoln; isoln++ )
248 if ( sol[isoln] >= 0.0 )
250 if ( sol[isoln] >= kInfinity )
512 G4double ap = std::sqrt( ax * ax + ay * ay );
517 {
return G4Vector3D( ay / ap, -ax / ap, 0.0 ); }
572 if ( (e > 0.0) && (e <= ( 0.5 * pi )) )
578 std::ostringstream message;
579 message <<
"Angle out of range." <<
G4endl
580 <<
"Asked for angle out of allowed range of 0 to "
581 << 0.5*pi <<
" (PI/2): " << e <<
G4endl
582 <<
"Default angle of " << angle <<
" is used.";
583 G4Exception(
"G4ConicalSurface::SetAngle()",
"GeomSolids1001",
#define SURFACE_PRECISION
void sort_double(G4double[], G4int, G4int)
HepGeom::Vector3D< G4double > G4Vector3D
G4Point3D GetBoxMin() const
G4Point3D GetBoxMax() const
virtual void PrintOn(std::ostream &os=G4cout) const
G4int Intersect(const G4Ray &ry)
virtual G4Vector3D SurfaceNormal(const G4Point3D &p) const
virtual G4int WithinBoundary(const G4Vector3D &x) const
virtual G4int Inside(const G4Vector3D &x) const
virtual G4double HowNear(const G4Vector3D &x) const
G4Vector3D GetAxis() const
G4double GetAngle() const
virtual ~G4ConicalSurface()
void SetAngle(G4double e)
virtual G4double Scale() const
virtual const char * NameOf() const
G4Point3D GetPoint(G4double i) const
const G4Vector3D & GetDir() const
const G4Point3D & GetStart() const
const G4BoundingBox3D & BBox() const
G4Vector3D GetOrigin() const
G4SurfaceBoundary surfaceBoundary
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)