529 if(calcNorm) { *validNorm =
false; }
545 if ( rho2 < paraRho2 &&
sqr(rho2 - paraRho2 - 0.25 * tol2) > tol2 * paraRho2
546 && std::fabs(p.
z()) < dz - kCarTolerance)
557 intersection = (dz - p.
z()) / v.
z();
560 if(ip.
perp2() <
sqr(r2 + kCarTolerance))
565 if(r2 < tolh || ip.
perp2() >
sqr(r2 - tolh))
582 intersection = (-dz - p.
z()) / v.
z();
590 if(r1 < tolh || ip.
perp2() >
sqr(r1 - tolh))
605 intersection = ((rho2 - k2)/k1 - p.
z())/v.
z();
616 else if( ((A <= 0) && (B >=
sqr(A) * (
sqr(vRho2) - 1))) || (A >= 0))
623 B = (k1 * p.
z() + k2 - rho2)/vRho2;
624 intersection = B/(-A + std::sqrt(B +
sqr(A)));
634 std::ostringstream message;
635 message <<
"There is no intersection between given line and solid!"
639 G4Exception(
"G4Paraboloid::DistanceToOut(p,v,...)",
"GeomSolids1002",
644 else if ( (rho2 < paraRho2 + kCarTolerance
645 ||
sqr(rho2 - paraRho2 - 0.25 * tol2) < tol2 * paraRho2 )
646 && std::fabs(p.
z()) < dz + tolh)
652 if(std::fabs(p.
z()) > dz - tolh)
656 if( ((v.z() > 0) && (p.
z() > 0)) || ((v.z() < 0) && (p.
z() < 0)) )
678 intersection = (-pDotV + std::sqrt(A +
sqr(pDotV))) / vRho2;
686 * intersection, -k1/2).unit()).unit();
716 intersection = (dz - p.
z()) / v.
z();
728 else if(ip.
perp2() <
sqr(r2 + tolh))
744 intersection = (-dz - p.
z()) / v.
z();
756 else if(ip.
perp2() <
sqr(r1 + tolh))
771 if(std::fabs(vRho2) > tol2)
774 B = (k1 * p.
z() + k2 - rho2);
778 intersection = B/(-A + std::sqrt(B +
sqr(A)));
782 if(normal.
dot(v) >= 0)
796 intersection = ((rho2 - k2) / k1 - p.
z()) / v.z();
803 + intersection * v.y(), - k1 / 2);
813 G4Exception(
"G4Paraboloid::DistanceToOut(p,v,...)",
"GeomSolids1002",
817 G4Exception(
"G4Paraboloid::DistanceToOut(p,v,...)",
"GeomSolids1002",
818 JustWarning,
"There's an error in this functions code.");
static const G4double kInfinity
CLHEP::Hep3Vector G4ThreeVector
double dot(const Hep3Vector &) const
double B(double temperature)
static double normal(HepRandomEngine *eptr)
double A(double temperature)
EInside Inside(const G4ThreeVector &p) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)