Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Box Class Reference

#include <G4Box.hh>

+ Inheritance diagram for G4Box:

Public Member Functions

 G4Box (const G4String &pName, G4double pX, G4double pY, G4double pZ)
 
virtual ~G4Box ()
 
void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
void BoundingLimits (G4ThreeVector &pMin, G4ThreeVector &pMax) const
 
G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
 
G4double GetXHalfLength () const
 
G4double GetYHalfLength () const
 
G4double GetZHalfLength () const
 
void SetXHalfLength (G4double dx)
 
void SetYHalfLength (G4double dy)
 
void SetZHalfLength (G4double dz)
 
G4double GetCubicVolume ()
 
G4double GetSurfaceArea ()
 
EInside Inside (const G4ThreeVector &p) const
 
G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const
 
G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const
 
G4double DistanceToIn (const G4ThreeVector &p) const
 
G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const
 
G4double DistanceToOut (const G4ThreeVector &p) const
 
G4GeometryType GetEntityType () const
 
G4ThreeVector GetPointOnSurface () const
 
G4VSolidClone () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
G4VisExtent GetExtent () const
 
G4PolyhedronCreatePolyhedron () const
 
 G4Box (__void__ &)
 
 G4Box (const G4Box &rhs)
 
G4Boxoperator= (const G4Box &rhs)
 
- Public Member Functions inherited from G4CSGSolid
 G4CSGSolid (const G4String &pName)
 
virtual ~G4CSGSolid ()
 
virtual std::ostream & StreamInfo (std::ostream &os) const
 
virtual G4PolyhedronGetPolyhedron () const
 
 G4CSGSolid (__void__ &)
 
 G4CSGSolid (const G4CSGSolid &rhs)
 
G4CSGSolidoperator= (const G4CSGSolid &rhs)
 
- Public Member Functions inherited from G4VSolid
 G4VSolid (const G4String &name)
 
virtual ~G4VSolid ()
 
G4bool operator== (const G4VSolid &s) const
 
G4String GetName () const
 
void SetName (const G4String &name)
 
G4double GetTolerance () const
 
virtual void BoundingLimits (G4ThreeVector &pMin, G4ThreeVector &pMax) const
 
virtual G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
 
virtual EInside Inside (const G4ThreeVector &p) const =0
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p) const =0
 
virtual void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
virtual G4double GetCubicVolume ()
 
virtual G4double GetSurfaceArea ()
 
virtual G4GeometryType GetEntityType () const =0
 
virtual G4ThreeVector GetPointOnSurface () const
 
virtual G4VSolidClone () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const =0
 
void DumpInfo () const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const =0
 
virtual G4VisExtent GetExtent () const
 
virtual G4PolyhedronCreatePolyhedron () const
 
virtual G4PolyhedronGetPolyhedron () const
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
virtual const G4DisplacedSolidGetDisplacedSolidPtr () const
 
virtual G4DisplacedSolidGetDisplacedSolidPtr ()
 
 G4VSolid (__void__ &)
 
 G4VSolid (const G4VSolid &rhs)
 
G4VSolidoperator= (const G4VSolid &rhs)
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4CSGSolid
G4double GetRadiusInRing (G4double rmin, G4double rmax) const
 
- Protected Member Functions inherited from G4VSolid
void CalculateClippedPolygonExtent (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipCrossSection (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipBetweenSections (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipPolygon (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
 
- Protected Attributes inherited from G4CSGSolid
G4double fCubicVolume = 0.0
 
G4double fSurfaceArea = 0.0
 
G4bool fRebuildPolyhedron = false
 
G4PolyhedronfpPolyhedron = nullptr
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 

Detailed Description

Definition at line 55 of file G4Box.hh.

Constructor & Destructor Documentation

◆ G4Box() [1/3]

G4Box::G4Box ( const G4String pName,
G4double  pX,
G4double  pY,
G4double  pZ 
)

Definition at line 52 of file G4Box.cc.

56 : G4CSGSolid(pName), fDx(pX), fDy(pY), fDz(pZ)
57{
58 delta = 0.5*kCarTolerance;
59 if (pX < 2*kCarTolerance ||
60 pY < 2*kCarTolerance ||
61 pZ < 2*kCarTolerance) // limit to thickness of surfaces
62 {
63 std::ostringstream message;
64 message << "Dimensions too small for Solid: " << GetName() << "!" << G4endl
65 << " hX, hY, hZ = " << pX << ", " << pY << ", " << pZ;
66 G4Exception("G4Box::G4Box()", "GeomSolids0002", FatalException, message);
67 }
68}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
#define G4endl
Definition: G4ios.hh:57
G4String GetName() const
G4double kCarTolerance
Definition: G4VSolid.hh:302

◆ ~G4Box()

G4Box::~G4Box ( )
virtual

Definition at line 84 of file G4Box.cc.

85{
86}

◆ G4Box() [2/3]

G4Box::G4Box ( __void__ &  a)

Definition at line 75 of file G4Box.cc.

76 : G4CSGSolid(a), delta(0.)
77{
78}

◆ G4Box() [3/3]

G4Box::G4Box ( const G4Box rhs)

Definition at line 92 of file G4Box.cc.

93 : G4CSGSolid(rhs), fDx(rhs.fDx), fDy(rhs.fDy), fDz(rhs.fDz), delta(rhs.delta)
94{
95}

Member Function Documentation

◆ BoundingLimits()

void G4Box::BoundingLimits ( G4ThreeVector pMin,
G4ThreeVector pMax 
) const
virtual

Reimplemented from G4VSolid.

Definition at line 207 of file G4Box.cc.

208{
209 pMin.set(-fDx,-fDy,-fDz);
210 pMax.set( fDx, fDy, fDz);
211
212 // Check correctness of the bounding box
213 //
214 if (pMin.x() >= pMax.x() || pMin.y() >= pMax.y() || pMin.z() >= pMax.z())
215 {
216 std::ostringstream message;
217 message << "Bad bounding box (min >= max) for solid: "
218 << GetName() << " !"
219 << "\npMin = " << pMin
220 << "\npMax = " << pMax;
221 G4Exception("G4Box::BoundingLimits()", "GeomMgt0001", JustWarning, message);
222 DumpInfo();
223 }
224}
@ JustWarning
double z() const
double x() const
double y() const
void set(double x, double y, double z)
void DumpInfo() const

Referenced by CalculateExtent().

◆ CalculateExtent()

G4bool G4Box::CalculateExtent ( const EAxis  pAxis,
const G4VoxelLimits pVoxelLimit,
const G4AffineTransform pTransform,
G4double pMin,
G4double pMax 
) const
virtual

Implements G4VSolid.

Definition at line 230 of file G4Box.cc.

234{
235 G4ThreeVector bmin, bmax;
236
237 // Get bounding box
238 BoundingLimits(bmin,bmax);
239
240 // Find extent
241 G4BoundingEnvelope bbox(bmin,bmax);
242 return bbox.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
243}
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
Definition: G4Box.cc:207

◆ Clone()

G4VSolid * G4Box::Clone ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 525 of file G4Box.cc.

526{
527 return new G4Box(*this);
528}
Definition: G4Box.hh:56

◆ ComputeDimensions()

void G4Box::ComputeDimensions ( G4VPVParameterisation p,
const G4int  n,
const G4VPhysicalVolume pRep 
)
virtual

Reimplemented from G4VSolid.

Definition at line 196 of file G4Box.cc.

199{
200 p->ComputeDimensions(*this,n,pRep);
201}
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const

◆ CreatePolyhedron()

G4Polyhedron * G4Box::CreatePolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 544 of file G4Box.cc.

545{
546 return new G4PolyhedronBox (fDx, fDy, fDz);
547}

Referenced by G4GMocrenFileSceneHandler::AddSolid().

◆ DescribeYourselfTo()

void G4Box::DescribeYourselfTo ( G4VGraphicsScene scene) const
virtual

Implements G4VSolid.

Definition at line 534 of file G4Box.cc.

535{
536 scene.AddSolid (*this);
537}
virtual void AddSolid(const G4Box &)=0

◆ DistanceToIn() [1/2]

G4double G4Box::DistanceToIn ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 362 of file G4Box.cc.

363{
364 G4double dist = std::max(std::max(
365 std::abs(p.x())-fDx,
366 std::abs(p.y())-fDy),
367 std::abs(p.z())-fDz);
368 return (dist > 0) ? dist : 0.;
369}
double G4double
Definition: G4Types.hh:83

◆ DistanceToIn() [2/2]

G4double G4Box::DistanceToIn ( const G4ThreeVector p,
const G4ThreeVector v 
) const
virtual

Implements G4VSolid.

Definition at line 325 of file G4Box.cc.

327{
328 // Check if point is on the surface and traveling away
329 //
330 if ((std::abs(p.x()) - fDx) >= -delta && p.x()*v.x() >= 0) return kInfinity;
331 if ((std::abs(p.y()) - fDy) >= -delta && p.y()*v.y() >= 0) return kInfinity;
332 if ((std::abs(p.z()) - fDz) >= -delta && p.z()*v.z() >= 0) return kInfinity;
333
334 // Find intersection
335 //
336 G4double invx = (v.x() == 0) ? DBL_MAX : -1./v.x();
337 G4double dx = std::copysign(fDx,invx);
338 G4double txmin = (p.x() - dx)*invx;
339 G4double txmax = (p.x() + dx)*invx;
340
341 G4double invy = (v.y() == 0) ? DBL_MAX : -1./v.y();
342 G4double dy = std::copysign(fDy,invy);
343 G4double tymin = std::max(txmin,(p.y() - dy)*invy);
344 G4double tymax = std::min(txmax,(p.y() + dy)*invy);
345
346 G4double invz = (v.z() == 0) ? DBL_MAX : -1./v.z();
347 G4double dz = std::copysign(fDz,invz);
348 G4double tmin = std::max(tymin,(p.z() - dz)*invz);
349 G4double tmax = std::min(tymax,(p.z() + dz)*invz);
350
351 if (tmax <= tmin + delta) return kInfinity; // touch or no hit
352 return (tmin < delta) ? 0. : tmin;
353}
#define DBL_MAX
Definition: templates.hh:62

Referenced by G4Voxelizer::DistanceToFirst().

◆ DistanceToOut() [1/2]

G4double G4Box::DistanceToOut ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 442 of file G4Box.cc.

443{
444#ifdef G4CSGDEBUG
445 if( Inside(p) == kOutside )
446 {
447 std::ostringstream message;
448 G4int oldprc = message.precision(16);
449 message << "Point p is outside (!?) of solid: " << GetName() << G4endl;
450 message << "Position:\n";
451 message << " p.x() = " << p.x()/mm << " mm\n";
452 message << " p.y() = " << p.y()/mm << " mm\n";
453 message << " p.z() = " << p.z()/mm << " mm";
454 G4cout.precision(oldprc);
455 G4Exception("G4Box::DistanceToOut(p)", "GeomSolids1002",
456 JustWarning, message );
457 DumpInfo();
458 }
459#endif
460 G4double dist = std::min(std::min(
461 fDx-std::abs(p.x()),
462 fDy-std::abs(p.y())),
463 fDz-std::abs(p.z()));
464 return (dist > 0) ? dist : 0.;
465}
int G4int
Definition: G4Types.hh:85
G4GLOB_DLL std::ostream G4cout
EInside Inside(const G4ThreeVector &p) const
Definition: G4Box.cc:249
@ kOutside
Definition: geomdefs.hh:68

◆ DistanceToOut() [2/2]

G4double G4Box::DistanceToOut ( const G4ThreeVector p,
const G4ThreeVector v,
const G4bool  calcNorm = false,
G4bool validNorm = nullptr,
G4ThreeVector n = nullptr 
) const
virtual

Implements G4VSolid.

Definition at line 377 of file G4Box.cc.

381{
382 // Check if point is on the surface and traveling away
383 //
384 if ((std::abs(p.x()) - fDx) >= -delta && p.x()*v.x() > 0)
385 {
386 if (calcNorm)
387 {
388 *validNorm = true;
389 n->set((p.x() < 0) ? -1. : 1., 0., 0.);
390 }
391 return 0.;
392 }
393 if ((std::abs(p.y()) - fDy) >= -delta && p.y()*v.y() > 0)
394 {
395 if (calcNorm)
396 {
397 *validNorm = true;
398 n->set(0., (p.y() < 0) ? -1. : 1., 0.);
399 }
400 return 0.;
401 }
402 if ((std::abs(p.z()) - fDz) >= -delta && p.z()*v.z() > 0)
403 {
404 if (calcNorm)
405 {
406 *validNorm = true;
407 n->set(0., 0., (p.z() < 0) ? -1. : 1.);
408 }
409 return 0.;
410 }
411
412 // Find intersection
413 //
414 G4double vx = v.x();
415 G4double tx = (vx == 0) ? DBL_MAX : (std::copysign(fDx,vx) - p.x())/vx;
416
417 G4double vy = v.y();
418 G4double ty = (vy == 0) ? tx : (std::copysign(fDy,vy) - p.y())/vy;
419 G4double txy = std::min(tx,ty);
420
421 G4double vz = v.z();
422 G4double tz = (vz == 0) ? txy : (std::copysign(fDz,vz) - p.z())/vz;
423 G4double tmax = std::min(txy,tz);
424
425 // Set normal, if required, and return distance
426 //
427 if (calcNorm)
428 {
429 *validNorm = true;
430 if (tmax == tx) n->set((v.x() < 0) ? -1. : 1., 0., 0.);
431 else if (tmax == ty) n->set(0., (v.y() < 0) ? -1. : 1., 0.);
432 else n->set(0., 0., (v.z() < 0) ? -1. : 1.);
433 }
434 return tmax;
435}

◆ GetCubicVolume()

G4double G4Box::GetCubicVolume ( )
inlinevirtual

Reimplemented from G4VSolid.

◆ GetEntityType()

G4GeometryType G4Box::GetEntityType ( ) const
virtual

Implements G4VSolid.

Definition at line 471 of file G4Box.cc.

472{
473 return G4String("G4Box");
474}

◆ GetExtent()

G4VisExtent G4Box::GetExtent ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 539 of file G4Box.cc.

540{
541 return G4VisExtent (-fDx, fDx, -fDy, fDy, -fDz, fDz);
542}

◆ GetPointOnSurface()

G4ThreeVector G4Box::GetPointOnSurface ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 500 of file G4Box.cc.

501{
502 G4double sxy = fDx*fDy, sxz = fDx*fDz, syz = fDy*fDz;
503 G4double select = (sxy + sxz + syz)*G4QuickRand();
504 G4double u = 2.*G4QuickRand() - 1.;
505 G4double v = 2.*G4QuickRand() - 1.;
506
507 if (select < sxy)
508 return G4ThreeVector(u*fDx,
509 v*fDy,
510 ((select < 0.5*sxy) ? -fDz : fDz));
511 else if (select < sxy + sxz)
512 return G4ThreeVector(u*fDx,
513 ((select < sxy + 0.5*sxz) ? -fDy : fDy),
514 v*fDz);
515 else
516 return G4ThreeVector(((select < sxy + sxz + 0.5*syz) ? -fDx : fDx),
517 u*fDy,
518 v*fDz);
519}
G4double G4QuickRand()
Definition: G4QuickRand.hh:34
CLHEP::Hep3Vector G4ThreeVector

◆ GetSurfaceArea()

G4double G4Box::GetSurfaceArea ( )
inlinevirtual

Reimplemented from G4VSolid.

◆ GetXHalfLength()

◆ GetYHalfLength()

◆ GetZHalfLength()

◆ Inside()

EInside G4Box::Inside ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 249 of file G4Box.cc.

250{
251 G4double dist = std::max(std::max(
252 std::abs(p.x())-fDx,
253 std::abs(p.y())-fDy),
254 std::abs(p.z())-fDz);
255 return (dist > delta) ? kOutside :
256 ((dist > -delta) ? kSurface : kInside);
257}
@ kInside
Definition: geomdefs.hh:70
@ kSurface
Definition: geomdefs.hh:69

Referenced by DistanceToOut().

◆ operator=()

G4Box & G4Box::operator= ( const G4Box rhs)

Definition at line 101 of file G4Box.cc.

102{
103 // Check assignment to self
104 //
105 if (this == &rhs) { return *this; }
106
107 // Copy base class data
108 //
110
111 // Copy data
112 //
113 fDx = rhs.fDx;
114 fDy = rhs.fDy;
115 fDz = rhs.fDz;
116 delta = rhs.delta;
117
118 return *this;
119}
G4CSGSolid & operator=(const G4CSGSolid &rhs)
Definition: G4CSGSolid.cc:89

◆ SetXHalfLength()

void G4Box::SetXHalfLength ( G4double  dx)

Definition at line 125 of file G4Box.cc.

126{
127 if(dx > 2*kCarTolerance) // limit to thickness of surfaces
128 {
129 fDx = dx;
130 }
131 else
132 {
133 std::ostringstream message;
134 message << "Dimension X too small for solid: " << GetName() << "!"
135 << G4endl
136 << " hX = " << dx;
137 G4Exception("G4Box::SetXHalfLength()", "GeomSolids0002",
138 FatalException, message);
139 }
140 fCubicVolume = 0.;
141 fSurfaceArea = 0.;
142 fRebuildPolyhedron = true;
143}
G4double fSurfaceArea
Definition: G4CSGSolid.hh:71
G4double fCubicVolume
Definition: G4CSGSolid.hh:70
G4bool fRebuildPolyhedron
Definition: G4CSGSolid.hh:72

Referenced by G4ParameterisationBoxX::ComputeDimensions(), G4ParameterisationBoxY::ComputeDimensions(), G4ParameterisationBoxZ::ComputeDimensions(), and G4STRead::Read().

◆ SetYHalfLength()

void G4Box::SetYHalfLength ( G4double  dy)

Definition at line 149 of file G4Box.cc.

150{
151 if(dy > 2*kCarTolerance) // limit to thickness of surfaces
152 {
153 fDy = dy;
154 }
155 else
156 {
157 std::ostringstream message;
158 message << "Dimension Y too small for solid: " << GetName() << "!\n"
159 << " hY = " << dy;
160 G4Exception("G4Box::SetYHalfLength()", "GeomSolids0002",
161 FatalException, message);
162 }
163 fCubicVolume = 0.;
164 fSurfaceArea = 0.;
165 fRebuildPolyhedron = true;
166}

Referenced by G4ParameterisationBoxX::ComputeDimensions(), G4ParameterisationBoxY::ComputeDimensions(), G4ParameterisationBoxZ::ComputeDimensions(), and G4STRead::Read().

◆ SetZHalfLength()

void G4Box::SetZHalfLength ( G4double  dz)

Definition at line 172 of file G4Box.cc.

173{
174 if(dz > 2*kCarTolerance) // limit to thickness of surfaces
175 {
176 fDz = dz;
177 }
178 else
179 {
180 std::ostringstream message;
181 message << "Dimension Z too small for solid: " << GetName() << "!\n"
182 << " hZ = " << dz;
183 G4Exception("G4Box::SetZHalfLength()", "GeomSolids0002",
184 FatalException, message);
185 }
186 fCubicVolume = 0.;
187 fSurfaceArea = 0.;
188 fRebuildPolyhedron = true;
189}

Referenced by G4ParameterisationBoxX::ComputeDimensions(), G4ParameterisationBoxY::ComputeDimensions(), G4ParameterisationBoxZ::ComputeDimensions(), and G4STRead::Read().

◆ StreamInfo()

std::ostream & G4Box::StreamInfo ( std::ostream &  os) const
virtual

Reimplemented from G4CSGSolid.

Definition at line 480 of file G4Box.cc.

481{
482 G4int oldprc = os.precision(16);
483 os << "-----------------------------------------------------------\n"
484 << " *** Dump for solid - " << GetName() << " ***\n"
485 << " ===================================================\n"
486 << "Solid type: G4Box\n"
487 << "Parameters: \n"
488 << " half length X: " << fDx/mm << " mm \n"
489 << " half length Y: " << fDy/mm << " mm \n"
490 << " half length Z: " << fDz/mm << " mm \n"
491 << "-----------------------------------------------------------\n";
492 os.precision(oldprc);
493 return os;
494}

◆ SurfaceNormal()

G4ThreeVector G4Box::SurfaceNormal ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 263 of file G4Box.cc.

264{
265 G4ThreeVector norm(0,0,0);
266 G4double px = p.x();
267 if (std::abs(std::abs(px) - fDx) <= delta) norm.setX(px < 0 ? -1. : 1.);
268 G4double py = p.y();
269 if (std::abs(std::abs(py) - fDy) <= delta) norm.setY(py < 0 ? -1. : 1.);
270 G4double pz = p.z();
271 if (std::abs(std::abs(pz) - fDz) <= delta) norm.setZ(pz < 0 ? -1. : 1.);
272
273 G4double nside = norm.mag2(); // number of sides = magnitude squared
274 if (nside == 1)
275 return norm;
276 else if (nside > 1)
277 return norm.unit(); // edge or corner
278 else
279 {
280 // Point is not on the surface
281 //
282#ifdef G4CSGDEBUG
283 std::ostringstream message;
284 G4int oldprc = message.precision(16);
285 message << "Point p is not on surface (!?) of solid: "
286 << GetName() << G4endl;
287 message << "Position:\n";
288 message << " p.x() = " << p.x()/mm << " mm\n";
289 message << " p.y() = " << p.y()/mm << " mm\n";
290 message << " p.z() = " << p.z()/mm << " mm";
291 G4cout.precision(oldprc);
292 G4Exception("G4Box::SurfaceNormal(p)", "GeomSolids1002",
293 JustWarning, message );
294 DumpInfo();
295#endif
296 return ApproxSurfaceNormal(p);
297 }
298}

The documentation for this class was generated from the following files: