128 if (
this == &rhs) {
return *
this; }
159 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
162 message <<
"Bad bounding box (min >= max) for solid: "
164 <<
"\npMin = " << pMin
165 <<
"\npMax = " << pMax;
166 G4Exception(
"G4IntersectionSolid::BoundingLimits()",
"GeomMgt0001",
251 G4cout <<
"WARNING - Invalid call in "
252 <<
"G4IntersectionSolid::SurfaceNormal(p)" <<
G4endl
253 <<
" Point p is outside !" <<
G4endl;
255 G4cerr <<
"WARNING - Invalid call in "
256 <<
"G4IntersectionSolid::SurfaceNormal(p)" << G4endl
257 <<
" Point p is outside !" <<
G4endl;
279 G4cout <<
"WARNING - Invalid call in "
280 <<
"G4IntersectionSolid::SurfaceNormal(p)" <<
G4endl
281 <<
" Point p is out of surface !" <<
G4endl;
283 G4cerr <<
"WARNING - Invalid call in "
284 <<
"G4IntersectionSolid::SurfaceNormal(p)" << G4endl
285 <<
" Point p is out of surface !" <<
G4endl;
305 G4cout <<
"WARNING - Invalid call in "
306 <<
"G4IntersectionSolid::DistanceToIn(p,v)" <<
G4endl
307 <<
" Point p is inside !" <<
G4endl;
310 G4cerr <<
"WARNING - Invalid call in "
311 <<
"G4IntersectionSolid::DistanceToIn(p,v)" << G4endl
312 <<
" Point p is inside !" <<
G4endl;
325 G4bool doA =
true, doB =
true;
327 static const size_t max_trials=10000;
328 for (
size_t trial=0; trial<max_trials; ++trial)
371 if( dB1 < dA2 )
return dB1;
381 if( dA1 < dB2 )
return dA1;
392 G4Exception(
"G4IntersectionSolid::DistanceToIn(p,v)",
394 "Reached maximum number of iterations! Returning zero.");
410 G4cout <<
"WARNING - Invalid call in "
411 <<
"G4IntersectionSolid::DistanceToIn(p)" <<
G4endl
412 <<
" Point p is inside !" <<
G4endl;
414 G4cerr <<
"WARNING - Invalid call in "
415 <<
"G4IntersectionSolid::DistanceToIn(p)" << G4endl
416 <<
" Point p is inside !" <<
G4endl;
454 G4bool validNormA, validNormB;
468 G4cout <<
"WARNING - Invalid call in "
469 <<
"G4IntersectionSolid::DistanceToOut(p,v)" << G4endl
470 <<
" Point p is outside !" <<
G4endl;
473 G4cerr <<
"WARNING - Invalid call in "
474 <<
"G4IntersectionSolid::DistanceToOut(p,v)" << G4endl
475 <<
" Point p is outside !" <<
G4endl;
489 *validNorm = validNormA;
494 *validNorm = validNormB;
512 G4cout <<
"WARNING - Invalid call in "
513 <<
"G4IntersectionSolid::DistanceToOut(p)" <<
G4endl
514 <<
" Point p is outside !" <<
G4endl;
516 G4cerr <<
"WARNING - Invalid call in "
517 <<
"G4IntersectionSolid::DistanceToOut(p)" << G4endl
518 <<
" Point p is outside !" <<
G4endl;
545 return G4String(
"G4IntersectionSolid");
void set(double x, double y, double z)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
std::vector< ExP01TrackerHit * > a
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
G4IntersectionSolid(const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB)
static constexpr double mm
virtual void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4GeometryType GetEntityType() const
void message(RunManager *runmanager)
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
G4BooleanSolid & operator=(const G4BooleanSolid &rhs)
static double normal(HepRandomEngine *eptr)
G4Polyhedron * CreatePolyhedron() const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
virtual EInside Inside(const G4ThreeVector &p) const =0
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
bool execute(HepPolyhedron &)
G4GLOB_DLL std::ostream G4cerr
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4double G4ParticleHPJENDLHEData::G4double result
virtual ~G4IntersectionSolid()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
EInside Inside(const G4ThreeVector &p) const
G4Polyhedron * StackPolyhedron(HepPolyhedronProcessor &, const G4VSolid *) const
void DescribeYourselfTo(G4VGraphicsScene &scene) const
G4GLOB_DLL std::ostream G4cout
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
G4IntersectionSolid & operator=(const G4IntersectionSolid &rhs)
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments