Geant4  10.00.p02
UPolycone Class Reference

#include <UPolycone.hh>

+ Inheritance diagram for UPolycone:
+ Collaboration diagram for UPolycone:

Classes

struct  UPolyconeSection
 

Public Member Functions

void Init (double phiStart, double phiTotal, int numZPlanes, const double zPlane[], const double rInner[], const double rOuter[])
 
 UPolycone (const std::string &name)
 
 UPolycone (const std::string &name, double phiStart, double phiTotal, int numZPlanes, const double zPlane[], const double rInner[], const double rOuter[])
 
 UPolycone (const std::string &name, double phiStart, double phiTotal, int numRZ, const double r[], const double z[])
 
virtual ~UPolycone ()
 
void Reset ()
 
std::ostream & StreamInfo (std::ostream &os) const
 
VUSolid::EnumInside Inside (const UVector3 &p) const
 
double DistanceToIn (const UVector3 &p, const UVector3 &v, double aPstep=UUtils::kInfinity) const
 
double SafetyFromInside (const UVector3 &aPoint, bool aAccurate=false) const
 
double SafetyFromOutside (const UVector3 &aPoint, bool aAccurate=false) const
 
double DistanceToOut (const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
bool Normal (const UVector3 &aPoint, UVector3 &aNormal) const
 
void Extent (UVector3 &aMin, UVector3 &aMax) const
 
double Capacity ()
 
double SurfaceArea ()
 
UGeometryType GetEntityType () const
 
void ComputeBBox (UBBox *, bool)
 
void GetParametersList (int, double *) const
 
VUSolidClone () const
 
 UPolycone (const UPolycone &source)
 
UPolyconeoperator= (const UPolycone &source)
 
void CopyStuff (const UPolycone &source)
 
UVector3 GetPointOnSurface () const
 
UVector3 GetPointOnCone (double fRmin1, double fRmax1, double fRmin2, double fRmax2, double zOne, double zTwo, double &totArea) const
 
UVector3 GetPointOnTubs (double fRMin, double fRMax, double zOne, double zTwo, double &totArea) const
 
UVector3 GetPointOnCut (double fRMin1, double fRMax1, double fRMin2, double fRMax2, double zOne, double zTwo, double &totArea) const
 
UVector3 GetPointOnRing (double fRMin, double fRMax, double fRMin2, double fRMax2, double zOne) const
 
double GetStartPhi () const
 
double GetEndPhi () const
 
bool IsOpen () const
 
bool IsGeneric () const
 
int GetNumRZCorner () const
 
UPolyconeSideRZ GetCorner (int index) const
 
UPolyconeHistoricalGetOriginalParameters () const
 
void SetOriginalParameters (UPolyconeHistorical *pars)
 
- 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

bool SetOriginalParameters (UReduciblePolygon *rz)
 
void SetOriginalParameters ()
 
VUSolid::EnumInside InsideSection (int index, const UVector3 &p) const
 
double SafetyFromInsideSection (int index, const double rho, const UVector3 &p) const
 
double SafetyFromOutsideSection (int index, const double rho, const UVector3 &p) const
 
double SafetyFromOutsideSection (int index, const UVector3 &p) const
 
bool NormalSection (int index, const UVector3 &p, UVector3 &n) const
 
int GetSection (double z) const
 

Protected Attributes

double startPhi
 
double endPhi
 
bool phiIsOpen
 
int numCorner
 
UPolyconeSideRZcorners
 
UPolyconeHistoricalfOriginalParameters
 
double fCubicVolume
 
double fSurfaceArea
 
UBox fBox
 
UEnclosingCylinderenclosingCylinder
 
std::vector< double > fZs
 
std::vector< UPolyconeSectionfSections
 
int fMaxSection
 

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 69 of file UPolycone.hh.

Constructor & Destructor Documentation

UPolycone::UPolycone ( const std::string &  name)
inline

Definition at line 82 of file UPolycone.hh.

Referenced by Clone().

+ Here is the caller graph for this function:

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

Definition at line 32 of file UPolycone.cc.

References fCubicVolume, fSurfaceArea, and Init().

+ Here is the call graph for this function:

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

Definition at line 47 of file UPolycone.cc.

References UUtils::Exception(), FatalError, UPolyconeHistorical::fNumZPlanes, fOriginalParameters, UPolyconeHistorical::fZValues, VUSolid::GetName(), Init(), UPolyconeHistorical::Rmax, UPolyconeHistorical::Rmin, and SetOriginalParameters().

+ Here is the call graph for this function:

UPolycone::~UPolycone ( )
virtual

Definition at line 350 of file UPolycone.cc.

UPolycone::UPolycone ( const UPolycone source)

Definition at line 1297 of file UPolycone.cc.

References CopyStuff().

+ Here is the call graph for this function:

Member Function Documentation

double UPolycone::Capacity ( )
virtual

Implements VUSolid.

Definition at line 832 of file UPolycone.cc.

References VUSolid::Capacity(), fCubicVolume, fMaxSection, fSections, and UPolycone::UPolyconeSection::solid.

+ Here is the call graph for this function:

VUSolid * UPolycone::Clone ( ) const
virtual

Implements VUSolid.

Definition at line 1290 of file UPolycone.cc.

References UPolycone().

+ Here is the call graph for this function:

void UPolycone::ComputeBBox ( UBBox ,
bool   
)
inlinevirtual

Implements VUSolid.

Definition at line 135 of file UPolycone.hh.

void UPolycone::CopyStuff ( const UPolycone source)

Definition at line 1323 of file UPolycone.cc.

References enclosingCylinder, endPhi, fBox, fCubicVolume, fOriginalParameters, fSurfaceArea, phiIsOpen, and startPhi.

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

+ Here is the caller graph for this function:

double UPolycone::DistanceToIn ( const UVector3 p,
const UVector3 v,
double  aPstep = UUtils::kInfinity 
) const
virtual

Implements VUSolid.

Definition at line 519 of file UPolycone.cc.

References VUSolid::DistanceToIn(), UBox::DistanceToIn(), fBox, VUSolid::fgTolerance, fMaxSection, fSections, fZs, GetSection(), UBox::GetZHalfLength(), UUtils::kInfinity, UPolycone::UPolyconeSection::shift, UPolycone::UPolyconeSection::solid, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

double UPolycone::DistanceToOut ( const UVector3 aPoint,
const UVector3 aDirection,
UVector3 aNormalVector,
bool &  aConvex,
double  aPstep = UUtils::kInfinity 
) const
virtual

Implements VUSolid.

Definition at line 563 of file UPolycone.cc.

References UPolycone::UPolyconeSection::convex, VUSolid::DistanceToOut(), VUSolid::eOutside, VUSolid::fgTolerance, fMaxSection, UPolyconeHistorical::fNumZPlanes, fOriginalParameters, fSections, fZs, GetSection(), VUSolid::Inside(), G4InuclParticleNames::pn, UVector3::Set(), UPolycone::UPolyconeSection::shift, UPolycone::UPolyconeSection::solid, and UVector3::z.

+ Here is the call graph for this function:

void UPolycone::Extent ( UVector3 aMin,
UVector3 aMax 
) const
virtual

Implements VUSolid.

Definition at line 825 of file UPolycone.cc.

References enclosingCylinder, fZs, UEnclosingCylinder::radius, and UVector3::Set().

+ Here is the call graph for this function:

UPolyconeSideRZ UPolycone::GetCorner ( int  index) const
inline

Definition at line 192 of file UPolycone.hh.

References corners.

Referenced by G4UPolycone::GetCorner().

+ Here is the caller graph for this function:

double UPolycone::GetEndPhi ( ) const
inline

Definition at line 172 of file UPolycone.hh.

References endPhi.

Referenced by G4UPolycone::GetEndPhi().

+ Here is the caller graph for this function:

UGeometryType UPolycone::GetEntityType ( ) const
virtual

Implements VUSolid.

Definition at line 1347 of file UPolycone.cc.

int UPolycone::GetNumRZCorner ( ) const
inline

Definition at line 187 of file UPolycone.hh.

References numCorner.

Referenced by G4UPolycone::GetNumRZCorner().

+ Here is the caller graph for this function:

UPolyconeHistorical* UPolycone::GetOriginalParameters ( ) const
inline

Definition at line 197 of file UPolycone.hh.

References fOriginalParameters.

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

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 138 of file UPolycone.hh.

UVector3 UPolycone::GetPointOnCone ( double  fRmin1,
double  fRmax1,
double  fRmin2,
double  fRmax2,
double  zOne,
double  zTwo,
double &  totArea 
) const

Definition at line 916 of file UPolycone.cc.

References endPhi, UUtils::kPi, UUtils::Random(), UUtils::sqr(), and startPhi.

Referenced by GetPointOnCut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UVector3 UPolycone::GetPointOnCut ( double  fRMin1,
double  fRMax1,
double  fRMin2,
double  fRMax2,
double  zOne,
double  zTwo,
double &  totArea 
) const

Definition at line 1127 of file UPolycone.cc.

References GetPointOnCone(), GetPointOnRing(), and GetPointOnTubs().

Referenced by GetPointOnSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UVector3 UPolycone::GetPointOnRing ( double  fRMin,
double  fRMax,
double  fRMin2,
double  fRMax2,
double  zOne 
) const

Definition at line 1079 of file UPolycone.cc.

References endPhi, UUtils::Random(), and startPhi.

Referenced by GetPointOnCut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UVector3 UPolycone::GetPointOnSurface ( ) const
virtual

Implements VUSolid.

Definition at line 1147 of file UPolycone.cc.

References endPhi, UPolyconeHistorical::fNumZPlanes, fOriginalParameters, UPolyconeHistorical::fZValues, GetPointOnCut(), UUtils::kPi, UUtils::Random(), UPolyconeHistorical::Rmax, UPolyconeHistorical::Rmin, UUtils::sqr(), and startPhi.

+ Here is the call graph for this function:

UVector3 UPolycone::GetPointOnTubs ( double  fRMin,
double  fRMax,
double  zOne,
double  zTwo,
double &  totArea 
) const

Definition at line 1020 of file UPolycone.cc.

References endPhi, UUtils::kPi, UUtils::Random(), and startPhi.

Referenced by GetPointOnCut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int UPolycone::GetSection ( double  z) const
inlineprotected

Definition at line 327 of file UPolycone.hh.

References UVoxelizer::BinarySearch(), and fMaxSection.

Referenced by DistanceToIn(), DistanceToOut(), Inside(), Normal(), and SafetyFromOutside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UPolycone::GetStartPhi ( ) const
inline

Definition at line 167 of file UPolycone.hh.

References startPhi.

Referenced by G4UPolycone::GetStartPhi().

+ Here is the caller graph for this function:

void UPolycone::Init ( double  phiStart,
double  phiTotal,
int  numZPlanes,
const double  zPlane[],
const double  rInner[],
const double  rOuter[] 
)
VUSolid::EnumInside UPolycone::Inside ( const UVector3 p) const
virtual

Implements VUSolid.

Definition at line 470 of file UPolycone.cc.

References VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, fBox, VUSolid::fgTolerance, fMaxSection, VUSolid::frTolerance, fZs, GetSection(), UBox::GetZHalfLength(), UBox::Inside(), InsideSection(), n, NormalSection(), pos, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

VUSolid::EnumInside UPolycone::InsideSection ( int  index,
const UVector3 p 
) const
inlineprotected

Definition at line 399 of file UPolycone.cc.

References VUSolid::eInside, endPhi, VUSolid::eOutside, VUSolid::eSurface, VUSolid::fgTolerance, VUSolid::frTolerance, fSections, UTubs::GetDz(), UCons::GetDz(), UTubs::GetRMax(), UCons::GetRmax1(), UCons::GetRmax2(), UTubs::GetRMin(), UCons::GetRmin1(), UCons::GetRmin2(), UUtils::kTwoPi, phiIsOpen, UPolycone::UPolyconeSection::shift, UPolycone::UPolyconeSection::solid, startPhi, UPolycone::UPolyconeSection::tubular, UVector3::x, UVector3::y, and UVector3::z.

Referenced by Inside(), and Normal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UPolycone::IsGeneric ( ) const
inline

Definition at line 182 of file UPolycone.hh.

bool UPolycone::IsOpen ( ) const
inline

Definition at line 177 of file UPolycone.hh.

References phiIsOpen.

Referenced by G4UPolycone::IsOpen().

+ Here is the caller graph for this function:

bool UPolycone::Normal ( const UVector3 aPoint,
UVector3 aNormal 
) const
virtual

Implements VUSolid.

Definition at line 740 of file UPolycone.cc.

References VUSolid::eInside, VUSolid::eSurface, VUSolid::fgTolerance, fMaxSection, VUSolid::frTolerance, fSections, fZs, GetSection(), VUSolid::Inside(), InsideSection(), VUSolid::Normal(), NormalSection(), pos, UPolycone::UPolyconeSection::shift, UPolycone::UPolyconeSection::solid, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

bool UPolycone::NormalSection ( int  index,
const UVector3 p,
UVector3 n 
) const
inlineprotected

Definition at line 319 of file UPolycone.hh.

References VUSolid::Normal(), UPolycone::UPolyconeSection::shift, UPolycone::UPolyconeSection::solid, UVector3::x, UVector3::y, and UVector3::z.

Referenced by Inside(), and Normal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 1306 of file UPolycone.cc.

References CopyStuff(), and enclosingCylinder.

+ Here is the call graph for this function:

void UPolycone::Reset ( )

Definition at line 1565 of file UPolycone.cc.

References enclosingCylinder, fCubicVolume, UPolyconeHistorical::fNumZPlanes, UPolyconeHistorical::fOpeningAngle, fOriginalParameters, UPolyconeHistorical::fStartAngle, fSurfaceArea, UPolyconeHistorical::fZValues, Init(), UPolyconeHistorical::Rmax, and UPolyconeHistorical::Rmin.

Referenced by G4UPolycone::Reset().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UPolycone::SafetyFromInside ( const UVector3 aPoint,
bool  aAccurate = false 
) const
virtual

Implements VUSolid.

Definition at line 662 of file UPolycone.cc.

References UVoxelizer::BinarySearch(), fMaxSection, fZs, UUtils::kInfinity, SafetyFromInsideSection(), SafetyFromOutsideSection(), UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

double UPolycone::SafetyFromInsideSection ( int  index,
const double  rho,
const UVector3 p 
) const
inlineprotected

Definition at line 265 of file UPolycone.hh.

References UTubs::SafetyFromInsideR(), UCons::SafetyFromInsideR(), UPolycone::UPolyconeSection::shift, UPolycone::UPolyconeSection::solid, UPolycone::UPolyconeSection::tubular, UVector3::x, UVector3::y, and UVector3::z.

Referenced by SafetyFromInside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 711 of file UPolycone.cc.

References enclosingCylinder, fMaxSection, fZs, GetSection(), UEnclosingCylinder::SafetyFromOutside(), SafetyFromOutsideSection(), and UVector3::z.

+ Here is the call graph for this function:

double UPolycone::SafetyFromOutsideSection ( int  index,
const double  rho,
const UVector3 p 
) const
inlineprotected

Definition at line 287 of file UPolycone.hh.

References UTubs::SafetyFromOutsideR(), UCons::SafetyFromOutsideR(), UPolycone::UPolyconeSection::solid, UPolycone::UPolyconeSection::tubular, UVector3::x, UVector3::y, and UVector3::z.

Referenced by SafetyFromInside(), and SafetyFromOutside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UPolycone::SafetyFromOutsideSection ( int  index,
const UVector3 p 
) const
inlineprotected

Definition at line 309 of file UPolycone.hh.

References VUSolid::SafetyFromOutside(), UPolycone::UPolyconeSection::shift, UPolycone::UPolyconeSection::solid, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

void UPolycone::SetOriginalParameters ( UPolyconeHistorical pars)
inline

Definition at line 202 of file UPolycone.hh.

References fOriginalParameters.

bool UPolycone::SetOriginalParameters ( UReduciblePolygon rz)
protected
void UPolycone::SetOriginalParameters ( )
inlineprotected

Definition at line 226 of file UPolycone.hh.

References UPolyconeHistorical::fNumZPlanes, UPolyconeHistorical::fOpeningAngle, UPolyconeHistorical::fStartAngle, UPolyconeHistorical::fZValues, UPolyconeSideRZ::r, UPolyconeHistorical::Rmax, UPolyconeHistorical::Rmin, startPhi, and UPolyconeSideRZ::z.

Referenced by UPolycone().

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 361 of file UPolycone.cc.

References endPhi, UPolyconeHistorical::fNumZPlanes, fOriginalParameters, UPolyconeHistorical::fZValues, VUSolid::GetName(), UUtils::kPi, UPolyconeHistorical::Rmax, UPolyconeHistorical::Rmin, and startPhi.

+ Here is the call graph for this function:

double UPolycone::SurfaceArea ( )
virtual

Implements VUSolid.

Definition at line 849 of file UPolycone.cc.

References endPhi, UPolyconeHistorical::fNumZPlanes, fOriginalParameters, fSurfaceArea, UPolyconeHistorical::fZValues, UUtils::kPi, UPolyconeHistorical::Rmax, UPolyconeHistorical::Rmin, UUtils::sqr(), and startPhi.

+ Here is the call graph for this function:

Member Data Documentation

UPolyconeSideRZ* UPolycone::corners
protected

Definition at line 220 of file UPolycone.hh.

Referenced by GetCorner(), and SetOriginalParameters().

UEnclosingCylinder* UPolycone::enclosingCylinder
protected

Definition at line 248 of file UPolycone.hh.

Referenced by CopyStuff(), Extent(), Init(), operator=(), Reset(), and SafetyFromOutside().

UBox UPolycone::fBox
mutableprotected

Definition at line 224 of file UPolycone.hh.

Referenced by CopyStuff(), DistanceToIn(), Init(), and Inside().

double UPolycone::fCubicVolume
protected

Definition at line 222 of file UPolycone.hh.

Referenced by Capacity(), CopyStuff(), Reset(), and UPolycone().

int UPolycone::fMaxSection
protected
std::vector<UPolyconeSection> UPolycone::fSections
protected

Definition at line 260 of file UPolycone.hh.

Referenced by Capacity(), DistanceToIn(), DistanceToOut(), Init(), InsideSection(), and Normal().

double UPolycone::fSurfaceArea
protected

Definition at line 223 of file UPolycone.hh.

Referenced by CopyStuff(), Reset(), SurfaceArea(), and UPolycone().

std::vector<double> UPolycone::fZs
protected
int UPolycone::numCorner
protected

Definition at line 219 of file UPolycone.hh.

Referenced by GetNumRZCorner(), and SetOriginalParameters().

bool UPolycone::phiIsOpen
protected

Definition at line 218 of file UPolycone.hh.

Referenced by CopyStuff(), Init(), InsideSection(), and IsOpen().


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