128 if (
this == &rhs) {
return *
this; }
152 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
155 message <<
"Bad bounding box (min >= max) for solid: "
157 <<
"\npMin = " << pMin
158 <<
"\npMax = " << pMax;
159 G4Exception(
"G4SubtractionSolid::BoundingLimits()",
"GeomMgt0001",
180 pTransform, pMin, pMax );
232 G4cout <<
"WARNING - Invalid call [1] in "
233 <<
"G4SubtractionSolid::SurfaceNormal(p)" <<
G4endl
234 <<
" Point p is outside !" <<
G4endl;
236 G4cerr <<
"WARNING - Invalid call [1] in "
237 <<
"G4SubtractionSolid::SurfaceNormal(p)" << G4endl
238 <<
" Point p is outside !" <<
G4endl;
266 G4cout <<
"WARNING - Invalid call [2] in "
267 <<
"G4SubtractionSolid::SurfaceNormal(p)" <<
G4endl
268 <<
" Point p is inside !" <<
G4endl;
270 G4cerr <<
"WARNING - Invalid call [2] in "
271 <<
"G4SubtractionSolid::SurfaceNormal(p)" << G4endl
272 <<
" Point p is inside !" <<
G4endl;
288 G4double dist = 0.0, dist2 = 0.0, disTmp = 0.0;
293 G4cout <<
"WARNING - Invalid call in "
294 <<
"G4SubtractionSolid::DistanceToIn(p,v)" <<
G4endl
295 <<
" Point p is inside !" <<
G4endl;
298 G4cerr <<
"WARNING - Invalid call in "
299 <<
"G4SubtractionSolid::DistanceToIn(p,v)" << G4endl
300 <<
" Point p is inside !" <<
G4endl;
328 if (dist == dist2) {
return dist; }
337 ->GetConstituentMovedSolid()->GetName();
340 message <<
"Illegal condition caused by solids: "
342 message.precision(16);
343 message <<
"Looping detected in point " << p+dist*v
344 <<
", from original point " << p
345 <<
" and direction " << v << G4endl
346 <<
"Computed candidate distance: " << dist <<
"*mm. ";
347 message.precision(6);
349 G4Exception(
"G4SubtractionSolid::DistanceToIn(p,v)",
351 "Returning candidate distance.");
384 if (dist == dist2) {
return dist; }
393 ->GetConstituentMovedSolid()->GetName();
396 message <<
"Illegal condition caused by solids: "
398 message.precision(16);
399 message <<
"Looping detected in point " << p+dist*v
400 <<
", from original point " << p
401 <<
" and direction " << v << G4endl
402 <<
"Computed candidate distance: " << dist <<
"*mm. ";
403 message.precision(6);
405 G4Exception(
"G4SubtractionSolid::DistanceToIn(p,v)",
407 "Returning candidate distance.");
432 G4cout <<
"WARNING - Invalid call in "
433 <<
"G4SubtractionSolid::DistanceToIn(p)" <<
G4endl
434 <<
" Point p is inside !" <<
G4endl;
436 G4cerr <<
"WARNING - Invalid call in "
437 <<
"G4SubtractionSolid::DistanceToIn(p)" << G4endl
438 <<
" Point p is inside !" <<
G4endl;
478 G4cout <<
"WARNING - Invalid call in "
479 <<
"G4SubtractionSolid::DistanceToOut(p,v)" << G4endl
480 <<
" Point p is outside !" <<
G4endl;
483 G4cerr <<
"WARNING - Invalid call in "
484 <<
"G4SubtractionSolid::DistanceToOut(p,v)" << G4endl
485 <<
" Point p is outside !" <<
G4endl;
522 G4cout <<
"WARNING - Invalid call in "
523 <<
"G4SubtractionSolid::DistanceToOut(p)" <<
G4endl
524 <<
" Point p is outside" <<
G4endl;
526 G4cerr <<
"WARNING - Invalid call in "
527 <<
"G4SubtractionSolid::DistanceToOut(p)" << G4endl
528 <<
" Point p is outside" <<
G4endl;
546 return G4String(
"G4SubtractionSolid");
std::vector< ExP01TrackerHit * > a
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
virtual void AddSolid(const G4Box &)=0
static const G4double kInfinity
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
G4Polyhedron * CreatePolyhedron() const
static constexpr double mm
EInside Inside(const G4ThreeVector &p) const
virtual void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
void message(RunManager *runmanager)
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4BooleanSolid & operator=(const G4BooleanSolid &rhs)
static double normal(HepRandomEngine *eptr)
G4double GetRadialTolerance() const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
G4SubtractionSolid & operator=(const G4SubtractionSolid &rhs)
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual ~G4SubtractionSolid()
G4SubtractionSolid(const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB)
bool execute(HepPolyhedron &)
G4GLOB_DLL std::ostream G4cerr
G4double G4ParticleHPJENDLHEData::G4double result
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4Polyhedron * StackPolyhedron(HepPolyhedronProcessor &, const G4VSolid *) const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
void DescribeYourselfTo(G4VGraphicsScene &scene) const
G4GeometryType GetEntityType() const
G4GLOB_DLL std::ostream G4cout
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
static G4GeometryTolerance * GetInstance()
virtual G4GeometryType GetEntityType() const =0
T min(const T t1, const T t2)
brief Return the smallest of the two arguments