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.";
HepGeom::Point3D< G4double > G4Point3D
const G4Point3D PINFINITY(kInfinity, kInfinity, kInfinity)
HepGeom::Vector3D< G4double > G4Vector3D
void Init(const G4Vector3D &refDirection0, const G4Vector3D &axis0, const G4Point3D &location0)
G4Point3D GetLocation() const
G4Vector3D GetAxis() const
void Init(const G4Point3D &)
void Extend(const G4Point3D &)
virtual G4double Area() const
virtual void PrintOn(std::ostream &os=G4cout) const
virtual G4double Scale() const
G4int Intersect(const G4Ray &)
virtual const char * NameOf() const
virtual void resize(G4double r, G4double l)
virtual ~G4FCylindricalSurface()
virtual G4Vector3D SurfaceNormal(const G4Point3D &p) const
virtual G4int WithinBoundary(const G4Vector3D &x) const
G4Axis2Placement3D Position
virtual G4double HowNear(const G4Vector3D &x) const
virtual G4int Inside(const G4Vector3D &x) const
const G4Vector3D & GetDir() const
const G4Point3D & GetStart() const
G4BoundingBox3D * GetBBox()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)