71 numFace(0), faces(0), fCubicVolume(0.), fSurfaceArea(0.),
72 fRebuildPolyhedron(false), fpPolyhedron(0),
73 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
84 numFace(0), faces(0), fCubicVolume(0.), fSurfaceArea(0.),
85 fRebuildPolyhedron(false), fpPolyhedron(0),
86 fStatistics(1000000), fCubVolEpsilon(0.001), fAreaAccuracy(-1.)
119 if (&source ==
this) {
return *
this; }
151 **sourceFace = source.
faces;
154 *face = (*sourceFace)->
Clone();
280 faceDistance, faceDistFromSurface,
281 faceNormal, faceAllBehind ) )
286 if (faceDistance < distance)
288 distance = faceDistance;
289 distFromSurface = faceDistFromSurface;
291 if (distFromSurface <= 0) {
return 0; }
337 faceDistance, faceDistFromSurface,
338 faceNormal, faceAllBehind ) )
343 if ( (distance <
kInfinity) || (!faceAllBehind) ) { allBehind =
false; }
344 if (faceDistance < distance)
346 distance = faceDistance;
347 distFromSurface = faceDistFromSurface;
350 if (distFromSurface <= 0) {
break; }
357 if (distFromSurface <= 0)
368 *validNorm = allBehind;
375 if (calcNorm) { *validNorm =
false; }
397 const G4bool outgoing )
const
403 G4double distance = (*face)->Distance( p, outgoing );
404 if (distance < best) { best = distance; }
428 yMax(0,1,0), yMin(0,-1,0),
429 zMax(0,0,1), zMin(0,0,-1);
431 { &xMin, &xMax, &yMin, &yMax, &zMin, &zMax };
443 G4double testFace = (*face)->Extent( **axis );
444 if (testFace > *answer) { *answer = testFace; }
446 while( --axis, --answer >= answers );
451 -answers[2], answers[3],
452 -answers[4], answers[5] );
470 os <<
"-----------------------------------------------------------\n"
471 <<
" *** Dump for solid - " <<
GetName() <<
" ***\n"
472 <<
" ===================================================\n"
473 <<
" Solid type: G4VCSGfaceted\n"
475 <<
" number of faces: " <<
numFace <<
"\n"
476 <<
"-----------------------------------------------------------\n";
612 std::vector<G4double> areas;
619 areas.push_back(result);
628 Achose1=0; Achose2=0.;
634 if(chose>=Achose1 && chose<Achose2)
637 point= (*face1)->GetPointOnFace();
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double EstimateCubicVolume(G4int nStat, G4double epsilon) const
G4double GetAreaAccuracy() const
CLHEP::Hep3Vector G4ThreeVector
std::vector< ExP01TrackerHit * > a
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
virtual void CalculateExtent(const EAxis axis, const G4VoxelLimits &voxelLimit, const G4AffineTransform &tranform, G4SolidExtentList &extentList)=0
virtual void AddSolid(const G4Box &)=0
static const G4double kInfinity
virtual std::ostream & StreamInfo(std::ostream &os) const
virtual G4double GetSurfaceArea()
virtual G4VCSGface * Clone()=0
static double normal(HepRandomEngine *eptr)
void SetCubVolEpsilon(G4double ep)
G4int GetCubVolStatistics() const
virtual G4Polyhedron * GetPolyhedron() const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
void SetAreaStatistics(G4int st)
virtual EInside Inside(const G4ThreeVector &p) const
G4VSolid & operator=(const G4VSolid &rhs)
#define G4MUTEX_INITIALIZER
G4VCSGfaceted(const G4String &name)
void SetAreaAccuracy(G4double ep)
static G4int GetNumberOfRotationSteps()
G4double G4ParticleHPJENDLHEData::G4double result
void CopyStuff(const G4VCSGfaceted &source)
void SetCubVolStatistics(G4int st)
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
G4VCSGfaceted & operator=(const G4VCSGfaceted &source)
virtual G4double Distance(const G4ThreeVector &p, G4bool outgoing)=0
virtual G4double GetCubicVolume()
G4ThreeVector GetPointOnSurfaceGeneric() const
virtual G4GeometryType GetEntityType() const
G4double EstimateSurfaceArea(G4int nStat, G4double ell) const
virtual G4Polyhedron * CreatePolyhedron() const =0
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
virtual G4VisExtent GetExtent() const
G4int GetAreaStatistics() const
G4bool fRebuildPolyhedron
virtual G4double DistanceTo(const G4ThreeVector &p, const G4bool outgoing) const
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
G4double GetCubVolEpsilon() const
G4bool GetExtent(G4double &min, G4double &max) const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4Polyhedron * fpPolyhedron