Geant4  10.00.p03
UPolyhedra Class Reference

#include <UPolyhedra.hh>

+ Inheritance diagram for UPolyhedra:
+ Collaboration diagram for UPolyhedra:

Public Member Functions

void Init (double phiStart, double phiTotal, int numSide, int numZPlanes, const double zPlane[], const double rInner[], const double rOuter[])
 
 UPolyhedra (const std::string &name, double phiStart, double phiTotal, int numSide, int numZPlanes, const double zPlane[], const double rInner[], const double rOuter[])
 
 UPolyhedra (const std::string &name, double phiStart, double phiTotal, int numSide, int numRZ, const double r[], const double z[])
 
virtual ~UPolyhedra ()
 
void GetParametersList (int, double *) const
 
void ComputeBBox (UBBox *, bool)
 
VUSolid::EnumInside Inside (const UVector3 &p) const
 
double SafetyFromOutside (const UVector3 &aPoint, bool aAccurate=false) const
 
UGeometryType GetEntityType () const
 
VUSolidClone () const
 
UVector3 GetPointOnSurface () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
bool Reset ()
 
int GetNumSide () const
 
double GetStartPhi () const
 
double GetEndPhi () const
 
bool IsOpen () const
 
bool IsGeneric () const
 
int GetNumRZCorner () const
 
UPolyhedraSideRZ GetCorner (const int index) const
 
UPolyhedraHistoricalGetOriginalParameters ()
 
void SetOriginalParameters (UPolyhedraHistorical &pars)
 
double DistanceToIn (const UVector3 &p, const UVector3 &v, double aPstep=UUtils::kInfinity) const
 
 UPolyhedra (const UPolyhedra &source)
 
UPolyhedraoperator= (const UPolyhedra &source)
 
- Public Member Functions inherited from UVCSGfaceted
 UVCSGfaceted (const std::string &name)
 
virtual ~UVCSGfaceted ()
 
 UVCSGfaceted (const UVCSGfaceted &source)
 
UVCSGfacetedoperator= (const UVCSGfaceted &source)
 
VUSolid::EnumInside InsideNoVoxels (const UVector3 &p) const
 
virtual bool Normal (const UVector3 &p, UVector3 &n) const
 
double DistanceToInNoVoxels (const UVector3 &p, const UVector3 &v) const
 
double DistanceTo (const UVector3 &p, const bool outgoing) const
 
double DistanceToOutNoVoxels (const UVector3 &p, const UVector3 &v, UVector3 &n, bool &aConvex) const
 
virtual double DistanceToOut (const UVector3 &p, const UVector3 &v, UVector3 &n, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
virtual double SafetyFromInside (const UVector3 &aPoint, bool aAccurate=false) const
 
virtual double SafetyFromInsideNoVoxels (const UVector3 &aPoint, bool aAccurate=false) const
 
int GetCubVolStatistics () const
 
double GetCubVolEpsilon () const
 
void SetCubVolStatistics (int st)
 
void SetCubVolEpsilon (double ep)
 
int GetAreaStatistics () const
 
double GetAreaAccuracy () const
 
void SetAreaStatistics (int st)
 
void SetAreaAccuracy (double ep)
 
virtual double Capacity ()
 
virtual double SurfaceArea ()
 
- Public Member Functions inherited from VUSolid
 VUSolid ()
 
 VUSolid (const std::string &name)
 
virtual ~VUSolid ()
 
double GetCarTolerance () const
 
double GetRadTolerance () const
 
double GetAngTolerance () const
 
void SetCarTolerance (double eps)
 
void SetRadTolerance (double eps)
 
void SetAngTolerance (double eps)
 
virtual void ExtentAxis (EAxisType aAxis, double &aMin, double &aMax) const
 
const std::string & GetName () const
 
void SetName (const std::string &aName)
 
virtual void SamplePointsInside (int, UVector3 *) const
 
virtual void SamplePointsOnSurface (int, UVector3 *) const
 
virtual void SamplePointsOnEdge (int, UVector3 *) const
 
double EstimateCubicVolume (int nStat, double epsilon) const
 
double EstimateSurfaceArea (int nStat, double ell) const
 

Protected Member Functions

 UPolyhedra (const std::string &name)
 
void SetOriginalParameters ()
 
void Create (double phiStart, double phiTotal, int numSide, UReduciblePolygon *rz)
 
void CopyStuff (const UPolyhedra &source)
 
void DeleteStuff ()
 
UVector3 GetPointOnPlane (UVector3 p0, UVector3 p1, UVector3 p2, UVector3 p3) const
 
UVector3 GetPointOnTriangle (UVector3 p0, UVector3 p1, UVector3 p2) const
 
UVector3 GetPointOnSurfaceCorners () const
 
void Extent (UVector3 &aMin, UVector3 &aMax) const
 
- Protected Member Functions inherited from UVCSGfaceted
double SafetyFromInsideSection (int index, const UVector3 &p, UBits &bits) const
 
int GetSection (double z) const
 
UVector3 GetPointOnSurfaceGeneric () const
 
void CopyStuff (const UVCSGfaceted &source)
 
void DeleteStuff ()
 
void FindCandidates (double z, std::vector< int > &candidates, bool sides=false)
 
void InitVoxels (UReduciblePolygon &z, double radius)
 

Protected Attributes

int fNumSides
 
double fStartPhi
 
double fEndPhi
 
bool fPhiIsOpen
 
bool fGenericPgon
 
int fNumCorner
 
UPolyhedraSideRZfCorners
 
UPolyhedraHistorical fOriginalParameters
 
UEnclosingCylinderfEnclosingCylinder
 
- Protected Attributes inherited from UVCSGfaceted
int numFace
 
UVCSGface ** faces
 
double fCubicVolume
 
double fSurfaceArea
 
std::vector< double > fZs
 
std::vector< std::vector< int > > fCandidates
 
int fMaxSection
 
UBox fBox
 
double fBoxShift
 
bool fNoVoxels
 

Additional Inherited Members

- Public Types inherited from VUSolid
enum  EnumInside { eInside =0, eSurface =1, eOutside =2 }
 
enum  EAxisType { eXaxis =0, eYaxis =1, eZaxis =2 }
 
- Static Public Member Functions inherited from VUSolid
static double Tolerance ()
 
- Static Protected Attributes inherited from VUSolid
static double fgTolerance = 1.0E-9
 
static double frTolerance = 1.0E-9
 
static double faTolerance = 1.0E-9
 

Detailed Description

Definition at line 64 of file UPolyhedra.hh.

Constructor & Destructor Documentation

UPolyhedra::UPolyhedra ( const std::string &  name)
inlineprotected

Definition at line 68 of file UPolyhedra.hh.

Referenced by Clone().

+ Here is the caller graph for this function:

UPolyhedra::UPolyhedra ( const std::string &  name,
double  phiStart,
double  phiTotal,
int  numSide,
int  numZPlanes,
const double  zPlane[],
const double  rInner[],
const double  rOuter[] 
)

Definition at line 49 of file UPolyhedra.cc.

References Init().

+ Here is the call graph for this function:

UPolyhedra::UPolyhedra ( const std::string &  name,
double  phiStart,
double  phiTotal,
int  numSide,
int  numRZ,
const double  r[],
const double  z[] 
)

Definition at line 156 of file UPolyhedra.cc.

References Create(), and SetOriginalParameters().

+ Here is the call graph for this function:

UPolyhedra::~UPolyhedra ( )
virtual

Definition at line 382 of file UPolyhedra.cc.

References fCorners, and fEnclosingCylinder.

UPolyhedra::UPolyhedra ( const UPolyhedra source)

Definition at line 394 of file UPolyhedra.cc.

References CopyStuff().

+ Here is the call graph for this function:

Member Function Documentation

VUSolid * UPolyhedra::Clone ( ) const
virtual

Implements VUSolid.

Definition at line 541 of file UPolyhedra.cc.

References UPolyhedra().

+ Here is the call graph for this function:

void UPolyhedra::ComputeBBox ( UBBox ,
bool   
)
inlinevirtual

Implements VUSolid.

Definition at line 104 of file UPolyhedra.hh.

void UPolyhedra::CopyStuff ( const UPolyhedra source)
protected

Definition at line 424 of file UPolyhedra.cc.

References fCorners, fEnclosingCylinder, fEndPhi, fGenericPgon, fNumCorner, fNumSides, fOriginalParameters, fPhiIsOpen, and fStartPhi.

Referenced by operator=(), and UPolyhedra().

+ Here is the caller graph for this function:

void UPolyhedra::DeleteStuff ( )
protected
double UPolyhedra::DistanceToIn ( const UVector3 p,
const UVector3 v,
double  aPstep = UUtils::kInfinity 
) const
virtual

Reimplemented from UVCSGfaceted.

Definition at line 935 of file UPolyhedra.cc.

References UVCSGfaceted::DistanceToIn(), fEnclosingCylinder, UVCSGfaceted::fNoVoxels, UUtils::kInfinity, and UEnclosingCylinder::ShouldMiss().

+ Here is the call graph for this function:

void UPolyhedra::Extent ( UVector3 aMin,
UVector3 aMax 
) const
protectedvirtual

Implements VUSolid.

Definition at line 923 of file UPolyhedra.cc.

References UEnclosingCylinder::Extent(), and fEnclosingCylinder.

+ Here is the call graph for this function:

UPolyhedraSideRZ UPolyhedra::GetCorner ( const int  index) const
inline

Referenced by G4UPolyhedra::GetCorner().

+ Here is the caller graph for this function:

double UPolyhedra::GetEndPhi ( ) const
inline

Referenced by G4UPolyhedra::GetEndPhi().

+ Here is the caller graph for this function:

UGeometryType UPolyhedra::GetEntityType ( ) const
virtual

Reimplemented from UVCSGfaceted.

Definition at line 532 of file UPolyhedra.cc.

int UPolyhedra::GetNumRZCorner ( ) const
inline

Referenced by G4UPolyhedra::GetNumRZCorner().

+ Here is the caller graph for this function:

int UPolyhedra::GetNumSide ( ) const
inline

Referenced by G4UPolyhedra::GetNumSide().

+ Here is the caller graph for this function:

UPolyhedraHistorical* UPolyhedra::GetOriginalParameters ( )
inline

Referenced by G4UPolyhedra::GetOriginalParameters(), and G4UPolyhedra::SetOriginalParameters().

+ Here is the caller graph for this function:

void UPolyhedra::GetParametersList ( int  ,
double *   
) const
inlinevirtual

Implements VUSolid.

Definition at line 102 of file UPolyhedra.hh.

UVector3 UPolyhedra::GetPointOnPlane ( UVector3  p0,
UVector3  p1,
UVector3  p2,
UVector3  p3 
) const
protected

Definition at line 603 of file UPolyhedra.cc.

References CLHEP::normal(), and UUtils::Random().

Referenced by GetPointOnSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UVector3 UPolyhedra::GetPointOnSurface ( ) const
virtual

Implements VUSolid.

Definition at line 652 of file UPolyhedra.cc.

References a, fEndPhi, fGenericPgon, fNumSides, UPolyhedraHistorical::fNumZPlanes, fOriginalParameters, fPhiIsOpen, fStartPhi, UPolyhedraHistorical::fZValues, GetPointOnPlane(), UVCSGfaceted::GetPointOnSurfaceGeneric(), UUtils::kPi, UUtils::Random(), UPolyhedraHistorical::Rmax, UPolyhedraHistorical::Rmin, and UUtils::sqr().

+ Here is the call graph for this function:

UVector3 UPolyhedra::GetPointOnSurfaceCorners ( ) const
protected
UVector3 UPolyhedra::GetPointOnTriangle ( UVector3  p0,
UVector3  p1,
UVector3  p2 
) const
protected

Definition at line 635 of file UPolyhedra.cc.

References UUtils::Random().

+ Here is the call graph for this function:

double UPolyhedra::GetStartPhi ( ) const
inline

Referenced by G4UPolyhedra::GetStartPhi().

+ Here is the caller graph for this function:

void UPolyhedra::Init ( double  phiStart,
double  phiTotal,
int  numSide,
int  numZPlanes,
const double  zPlane[],
const double  rInner[],
const double  rOuter[] 
)

Definition at line 67 of file UPolyhedra.cc.

References Create(), DBL_EPSILON, UUtils::Exception(), FatalErrorInArguments, fGenericPgon, UPolyhedraHistorical::fNumSide, UPolyhedraHistorical::fNumZPlanes, UPolyhedraHistorical::fOpeningAngle, fOriginalParameters, UPolyhedraHistorical::fStartAngle, UPolyhedraHistorical::fZValues, VUSolid::GetName(), UUtils::kPi, UPolyhedraHistorical::Rmax, UPolyhedraHistorical::Rmin, and UReduciblePolygon::ScaleA().

Referenced by UPolyhedra().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VUSolid::EnumInside UPolyhedra::Inside ( const UVector3 p) const
virtual

Reimplemented from UVCSGfaceted.

Definition at line 506 of file UPolyhedra.cc.

References VUSolid::eOutside, fEnclosingCylinder, UVCSGfaceted::Inside(), and UEnclosingCylinder::MustBeOutside().

+ Here is the call graph for this function:

bool UPolyhedra::IsGeneric ( ) const
inline

Referenced by G4UPolyhedra::IsGeneric().

+ Here is the caller graph for this function:

bool UPolyhedra::IsOpen ( ) const
inline

Referenced by G4UPolyhedra::IsOpen().

+ Here is the caller graph for this function:

UPolyhedra & UPolyhedra::operator= ( const UPolyhedra source)

Definition at line 404 of file UPolyhedra.cc.

References CopyStuff(), fCorners, fEnclosingCylinder, and UVCSGfaceted::operator=().

+ Here is the call graph for this function:

bool UPolyhedra::Reset ( )

Definition at line 464 of file UPolyhedra.cc.

References Create(), UVCSGfaceted::DeleteStuff(), UUtils::Exception(), fCorners, fEnclosingCylinder, fGenericPgon, UPolyhedraHistorical::fNumSide, UPolyhedraHistorical::fNumZPlanes, UPolyhedraHistorical::fOpeningAngle, fOriginalParameters, UPolyhedraHistorical::fStartAngle, UPolyhedraHistorical::fZValues, VUSolid::GetName(), UPolyhedraHistorical::Rmax, UPolyhedraHistorical::Rmin, and Warning.

Referenced by G4UPolyhedra::Reset().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UPolyhedra::SafetyFromOutside ( const UVector3 aPoint,
bool  aAccurate = false 
) const
virtual

Reimplemented from UVCSGfaceted.

Definition at line 523 of file UPolyhedra.cc.

References UVCSGfaceted::SafetyFromOutside().

+ Here is the call graph for this function:

void UPolyhedra::SetOriginalParameters ( UPolyhedraHistorical pars)
inline
void UPolyhedra::SetOriginalParameters ( )
inlineprotected

Referenced by UPolyhedra().

+ Here is the caller graph for this function:

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

Reimplemented from UVCSGfaceted.

Definition at line 550 of file UPolyhedra.cc.

References fCorners, fEndPhi, fGenericPgon, fNumCorner, UPolyhedraHistorical::fNumZPlanes, fOriginalParameters, fStartPhi, UPolyhedraHistorical::fZValues, VUSolid::GetName(), UUtils::kPi, UPolyhedraSideRZ::r, UPolyhedraHistorical::Rmax, UPolyhedraHistorical::Rmin, and UPolyhedraSideRZ::z.

+ Here is the call graph for this function:

Member Data Documentation

UPolyhedraSideRZ* UPolyhedra::fCorners
protected

Definition at line 186 of file UPolyhedra.hh.

Referenced by CopyStuff(), Create(), operator=(), Reset(), StreamInfo(), and ~UPolyhedra().

UEnclosingCylinder* UPolyhedra::fEnclosingCylinder
protected

Definition at line 188 of file UPolyhedra.hh.

Referenced by CopyStuff(), Create(), DistanceToIn(), Extent(), Inside(), operator=(), Reset(), and ~UPolyhedra().

double UPolyhedra::fEndPhi
protected

Definition at line 182 of file UPolyhedra.hh.

Referenced by CopyStuff(), Create(), GetPointOnSurface(), and StreamInfo().

bool UPolyhedra::fGenericPgon
protected

Definition at line 184 of file UPolyhedra.hh.

Referenced by CopyStuff(), GetPointOnSurface(), Init(), Reset(), and StreamInfo().

int UPolyhedra::fNumCorner
protected

Definition at line 185 of file UPolyhedra.hh.

Referenced by CopyStuff(), Create(), and StreamInfo().

int UPolyhedra::fNumSides
protected

Definition at line 180 of file UPolyhedra.hh.

Referenced by CopyStuff(), Create(), and GetPointOnSurface().

UPolyhedraHistorical UPolyhedra::fOriginalParameters
protected

Definition at line 187 of file UPolyhedra.hh.

Referenced by CopyStuff(), GetPointOnSurface(), Init(), Reset(), and StreamInfo().

bool UPolyhedra::fPhiIsOpen
protected

Definition at line 183 of file UPolyhedra.hh.

Referenced by CopyStuff(), Create(), and GetPointOnSurface().

double UPolyhedra::fStartPhi
protected

Definition at line 181 of file UPolyhedra.hh.

Referenced by CopyStuff(), Create(), GetPointOnSurface(), and StreamInfo().


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