#include <G4ErrorCylSurfaceTarget.hh>
Definition at line 52 of file G4ErrorCylSurfaceTarget.hh.
Definition at line 47 of file G4ErrorCylSurfaceTarget.cc.
57 Dump(
" $$$ creating G4ErrorCylSurfaceTarget ");
HepRotation inverse() const
G4ErrorTargetType theType
virtual void Dump(const G4String &msg) const
Definition at line 65 of file G4ErrorCylSurfaceTarget.cc.
67 : fradius(radius), ftransform(trans.
Inverse())
74 Dump(
" $$$ creating G4ErrorCylSurfaceTarget ");
G4ErrorTargetType theType
virtual void Dump(const G4String &msg) const
G4ErrorCylSurfaceTarget::~G4ErrorCylSurfaceTarget |
( |
| ) |
|
void G4ErrorCylSurfaceTarget::Dump |
( |
const G4String & |
msg | ) |
const |
|
virtual |
Implements G4ErrorSurfaceTarget.
Definition at line 88 of file G4ErrorCylSurfaceTarget.cc.
93 G4Exception(
"G4ErrorCylSurfaceTarget::GetDistanceFromPoint()",
102 G4double dist = (localPoint-inters).mag();
107 G4cout <<
" G4ErrorCylSurfaceTarget::GetDistanceFromPoint():" <<
G4endl
108 <<
" Global point " << point <<
" dir " << dir <<
G4endl
109 <<
" Intersection " << inters <<
G4endl
110 <<
" Distance " << dist <<
G4endl;
111 Dump(
" CylSurface: " );
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4ThreeVector IntersectLocal(const G4ThreeVector &point, const G4ThreeVector &direc) const
virtual void Dump(const G4String &msg) const
Implements G4ErrorSurfaceTarget.
Definition at line 195 of file G4ErrorCylSurfaceTarget.cc.
201 if( std::fabs( localPoint.
perp() - fradius )
204 std::ostringstream message;
205 message <<
"Local point not at surface !" <<
G4endl
206 <<
" Point: " << point <<
", local: " << localPoint
208 <<
" is not at surface, but far away by: "
209 << localPoint.
perp() - fradius <<
" !";
210 G4Exception(
"G4ErrorCylSurfaceTarget::GetTangentPlane()",
G4double GetSurfaceTolerance() const
static double normal(HepRandomEngine *eptr)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
HepGeom::Plane3D< G4double > G4Plane3D
static G4GeometryTolerance * GetInstance()
Definition at line 142 of file G4ErrorCylSurfaceTarget.cc.
145 G4double eqa = localDir.x()*localDir.x()+localDir.y()*localDir.y();
146 G4double eqb = 2*(localPoint.x()*localDir.x()+localPoint.y()*localDir.y());
147 G4double eqc = -fradius*fradius+localPoint.x()*localPoint.x()
148 +localPoint.y()*localPoint.y();
149 G4int inside = (localPoint.perp() > fradius) ? -1 : 1;
152 if( eqa*inside > 0. )
154 lambda = (-eqb + std::sqrt(eqb*eqb-4*eqa*eqc) ) / (2.*eqa);
156 else if( eqa*inside < 0. )
158 lambda = (-eqb - std::sqrt(eqb*eqb-4*eqa*eqc) ) / (2.*eqa);
168 std::ostringstream message;
169 message <<
"Intersection not possible !" <<
G4endl
170 <<
" Point: " << localPoint <<
", direction: "
172 Dump(
" CylSurface: " );
173 G4Exception(
"G4ErrorCylSurfaceTarget::IntersectLocal()",
183 G4cout <<
" G4ErrorCylSurfaceTarget::IntersectLocal " << inters <<
" "
184 << inters.
perp() <<
" localPoint " << localPoint <<
" localDir "
static const G4double kInfinity
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual void Dump(const G4String &msg) const
The documentation for this class was generated from the following files: