68 fPMin = pmin - pdelta;
69 fPMax = pmax + pdelta;
87 fPMin = pmin - pdelta;
88 fPMax = pmax + pdelta;
104 fPMin = pmin - pdelta;
105 fPMax = pmax + pdelta;
145 if (
this == &rhs) {
return *
this; }
177 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
180 message <<
"Bad bounding box (min >= max) for solid: "
182 <<
"\npMin = " << pMin
183 <<
"\npMax = " << pMax;
184 G4Exception(
"G4UnionSolid::BoundingLimits()",
"GeomMgt0001",
201 G4bool touchesA, touchesB, out ;
206 pTransform, minA, maxA);
208 pTransform, minB, maxB);
209 if( touchesA || touchesB )
234 if (positionA ==
kInside) {
return positionA; }
236 if (positionA ==
kOutside) {
return positionB; }
238 if (positionB ==
kInside) {
return positionB; }
239 if (positionB ==
kOutside) {
return positionA; }
273 return (normalA + normalB).
unit();
277 G4String surf[3] = {
"OUTSIDE",
"SURFACE",
"INSIDE" };
279 G4int oldprc = message.precision(16);
280 message <<
"Invalid call of SurfaceNormal(p) for union solid: "
282 <<
"\nPoint p" << p <<
" is " << surf[
Inside(p)] <<
" !!!";
283 message.precision(oldprc);
284 G4Exception(
"G4UnionSolid::SurfaceNormal()",
"GeomMgt0001",
301 G4cout <<
"WARNING - Invalid call in "
302 <<
"G4UnionSolid::DistanceToIn(p,v)" <<
G4endl
303 <<
" Point p is inside !" <<
G4endl;
306 G4cerr <<
"WARNING - Invalid call in "
307 <<
"G4UnionSolid::DistanceToIn(p,v)" << G4endl
308 <<
" Point p is inside !" <<
G4endl;
329 G4cout <<
"WARNING - Invalid call in "
330 <<
"G4UnionSolid::DistanceToIn(p)" <<
G4endl
331 <<
" Point p is inside !" <<
G4endl;
333 G4cerr <<
"WARNING - Invalid call in "
334 <<
"G4UnionSolid::DistanceToIn(p)" << G4endl
335 <<
" Point p is inside !" <<
G4endl;
342 if(safety < 0.0) safety = 0.0 ;
372 G4cout <<
"WARNING - Invalid call in "
373 <<
"G4UnionSolid::DistanceToOut(p,v)" << G4endl
374 <<
" Point p is outside !" <<
G4endl;
377 G4cerr <<
"WARNING - Invalid call in "
378 <<
"G4UnionSolid::DistanceToOut(p,v)" << G4endl
379 <<
" Point p is outside !" <<
G4endl;
445 G4cout <<
"WARNING - Invalid call in "
446 <<
"G4UnionSolid::DistanceToOut(p)" <<
G4endl
447 <<
" Point p is outside !" <<
G4endl;
449 G4cerr <<
"WARNING - Invalid call in "
450 <<
"G4UnionSolid::DistanceToOut(p)" << G4endl
451 <<
" Point p is outside !" <<
G4endl;
void set(double x, double y, double z)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4UnionSolid & operator=(const G4UnionSolid &rhs)
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
std::vector< ExP01TrackerHit * > a
virtual void AddSolid(const G4Box &)=0
G4Polyhedron * CreatePolyhedron() const
static const G4double kInfinity
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
static constexpr double mm
virtual void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4UnionSolid(const G4String &pName, G4VSolid *pSolidA, G4VSolid *pSolidB)
void message(RunManager *runmanager)
G4BooleanSolid & operator=(const G4BooleanSolid &rhs)
G4double GetRadialTolerance() const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
virtual EInside Inside(const G4ThreeVector &p) const =0
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
bool execute(HepPolyhedron &)
G4GLOB_DLL std::ostream G4cerr
G4double G4ParticleHPJENDLHEData::G4double result
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4Polyhedron * StackPolyhedron(HepPolyhedronProcessor &, const G4VSolid *) const
G4GeometryType GetEntityType() const
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
void DescribeYourselfTo(G4VGraphicsScene &scene) 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()
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
EInside Inside(const G4ThreeVector &p) const