Geant4  10.00.p01
UCons Class Reference

#include <UCons.hh>

+ Inheritance diagram for UCons:
+ Collaboration diagram for UCons:

Public Member Functions

 UCons (const std::string &pName, double pRmin1, double pRmax1, double pRmin2, double pRmax2, double pDz, double pSPhi, double pDPhi)
 
 ~UCons ()
 
double GetInnerRadiusMinusZ () const
 
double GetOuterRadiusMinusZ () const
 
double GetInnerRadiusPlusZ () const
 
double GetOuterRadiusPlusZ () const
 
double GetZHalfLength () const
 
double GetStartPhiAngle () const
 
double GetDeltaPhiAngle () const
 
void SetInnerRadiusMinusZ (double Rmin1)
 
void SetOuterRadiusMinusZ (double Rmax1)
 
void SetInnerRadiusPlusZ (double Rmin2)
 
void SetOuterRadiusPlusZ (double Rmax2)
 
void SetZHalfLength (double newDz)
 
void SetStartPhiAngle (double newSPhi, bool trig=true)
 
void SetDeltaPhiAngle (double newDPhi)
 
double GetCubicVolume ()
 
double GetSurfaceArea ()
 
bool Normal (const UVector3 &p, UVector3 &n) const
 
double DistanceToIn (const UVector3 &p, const UVector3 &v, double aPstep=UUtils::kInfinity) const
 
double SafetyFromOutside (const UVector3 &p, bool precise) const
 
double DistanceToOut (const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
double SafetyFromInside (const UVector3 &p, bool precise) const
 
UGeometryType GetEntityType () const
 
UVector3 GetPointOnSurface () const
 
VUSolidClone () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
void Extent (UVector3 &aMin, UVector3 &aMax) const
 
virtual void GetParametersList (int, double *) const
 
virtual void ComputeBBox (UBBox *, bool)
 
VUSolid::EnumInside Inside (const UVector3 &p) const
 
 UCons ()
 
 UCons (const UCons &rhs)
 
UConsoperator= (const UCons &rhs)
 
double GetRmin1 () const
 
double GetRmax1 () const
 
double GetRmin2 () const
 
double GetRmax2 () const
 
double GetDz () const
 
double GetSPhi () const
 
double GetDPhi () const
 
- 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
 

Private Types

enum  ESide {
  kNull, kRMin, kRMax, kSPhi,
  kEPhi, kPZ, kMZ
}
 
enum  ENorm {
  kNRMin, kNRMax, kNSPhi, kNEPhi,
  kNZ
}
 

Private Member Functions

double Capacity ()
 
double SurfaceArea ()
 
void Initialize ()
 
void CheckSPhiAngle (double sPhi)
 
void CheckDPhiAngle (double dPhi)
 
void CheckPhiAngles (double sPhi, double dPhi)
 
void InitializeTrigonometry ()
 
UVector3 ApproxSurfaceNormal (const UVector3 &p) const
 

Private Attributes

double fCubicVolume
 
double fSurfaceArea
 
double kRadTolerance
 
double kAngTolerance
 
double fRmin1
 
double fRmin2
 
double fRmax1
 
double fRmax2
 
double fDz
 
double fSPhi
 
double fDPhi
 
double sinCPhi
 
double cosCPhi
 
double cosHDPhiOT
 
double cosHDPhiIT
 
double sinSPhi
 
double cosSPhi
 
double sinEPhi
 
double cosEPhi
 
bool fPhiFullCone
 
double secRMin
 
double tanRMin
 
double tanRMax
 
double secRMax
 

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 49 of file UCons.hh.

Member Enumeration Documentation

enum UCons::ENorm
private
Enumerator
kNRMin 
kNRMax 
kNSPhi 
kNEPhi 
kNZ 

Definition at line 275 of file UCons.hh.

enum UCons::ESide
private
Enumerator
kNull 
kRMin 
kRMax 
kSPhi 
kEPhi 
kPZ 
kMZ 

Definition at line 271 of file UCons.hh.

Constructor & Destructor Documentation

UCons::UCons ( const std::string &  pName,
double  pRmin1,
double  pRmax1,
double  pRmin2,
double  pRmax2,
double  pDz,
double  pSPhi,
double  pDPhi 
)

Definition at line 40 of file UCons.cc.

References CheckPhiAngles(), e3, UUtils::Exception(), FatalErrorInArguments, VUSolid::faTolerance, fRmin1, fRmin2, VUSolid::frTolerance, VUSolid::GetName(), Initialize(), kAngTolerance, and kRadTolerance.

+ Here is the call graph for this function:

UCons::~UCons ( )

Definition at line 107 of file UCons.cc.

UCons::UCons ( )

Definition at line 93 of file UCons.cc.

References Initialize().

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UCons::UCons ( const UCons rhs)

Definition at line 115 of file UCons.cc.

References Initialize().

+ Here is the call graph for this function:

Member Function Documentation

UVector3 UCons::ApproxSurfaceNormal ( const UVector3 p) const
private

Definition at line 299 of file UCons.cc.

References UUtils::Exception(), fDPhi, fDz, fPhiFullCone, fRmax2, fRmin2, fSPhi, kNEPhi, kNRMax, kNRMin, kNSPhi, kNZ, UUtils::kPi, secRMax, secRMin, tanRMax, tanRMin, Warning, UVector3::x, UVector3::y, and UVector3::z.

Referenced by Normal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UCons::Capacity ( )
inlineprivatevirtual

Implements VUSolid.

void UCons::CheckDPhiAngle ( double  dPhi)
inlineprivate
void UCons::CheckPhiAngles ( double  sPhi,
double  dPhi 
)
inlineprivate

Referenced by UCons().

+ Here is the caller graph for this function:

void UCons::CheckSPhiAngle ( double  sPhi)
inlineprivate
VUSolid * UCons::Clone ( ) const
virtual

Implements VUSolid.

Definition at line 2098 of file UCons.cc.

References UCons().

+ Here is the call graph for this function:

virtual void UCons::ComputeBBox ( UBBox ,
bool   
)
inlinevirtual

Implements VUSolid.

Definition at line 122 of file UCons.hh.

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

Implements VUSolid.

Definition at line 441 of file UCons.cc.

References cosCPhi, cosEPhi, cosHDPhiIT, cosHDPhiOT, cosSPhi, UVector3::Dot(), fDz, fPhiFullCone, fRmax1, fRmax2, fRmin1, fRmin2, UUtils::kInfinity, kRadTolerance, G4INCL::Math::max(), secRMax, secRMin, sinCPhi, sinEPhi, sinSPhi, tanRMax, tanRMin, VUSolid::Tolerance(), UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

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

Implements VUSolid.

Definition at line 1355 of file UCons.cc.

References cosCPhi, cosEPhi, cosSPhi, UVector3::Dot(), UUtils::Exception(), fDPhi, fDz, fPhiFullCone, fRmax1, fRmax2, fRmin1, fRmin2, fSPhi, kAngTolerance, kEPhi, UUtils::kInfinity, kMZ, kNull, UUtils::kPi, kPZ, kRadTolerance, kRMax, kRMin, kSPhi, secRMax, secRMin, sinCPhi, sinEPhi, sinSPhi, tanRMax, tanRMin, VUSolid::Tolerance(), UVector3::Unit(), Warning, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

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

Implements VUSolid.

Definition at line 2230 of file UCons.cc.

References fDz, fRmax1, fRmax2, and G4INCL::Math::max().

+ Here is the call graph for this function:

double UCons::GetCubicVolume ( )
inline
double UCons::GetDeltaPhiAngle ( ) const
inline

Referenced by G4UCons::GetDeltaPhiAngle(), and GetParametersList().

+ Here is the caller graph for this function:

double UCons::GetDPhi ( ) const
inline
double UCons::GetDz ( ) const
inline

Referenced by UPolycone::InsideSection().

+ Here is the caller graph for this function:

UGeometryType UCons::GetEntityType ( ) const
virtual

Implements VUSolid.

Definition at line 2089 of file UCons.cc.

double UCons::GetInnerRadiusMinusZ ( ) const
inline

Referenced by G4UCons::GetInnerRadiusMinusZ(), and GetParametersList().

+ Here is the caller graph for this function:

double UCons::GetInnerRadiusPlusZ ( ) const
inline

Referenced by G4UCons::GetInnerRadiusPlusZ(), and GetParametersList().

+ Here is the caller graph for this function:

double UCons::GetOuterRadiusMinusZ ( ) const
inline

Referenced by G4UCons::GetOuterRadiusMinusZ(), and GetParametersList().

+ Here is the caller graph for this function:

double UCons::GetOuterRadiusPlusZ ( ) const
inline

Referenced by G4UCons::GetOuterRadiusPlusZ(), and GetParametersList().

+ Here is the caller graph for this function:

void UCons::GetParametersList ( int  ,
double *  aArray 
) const
virtual

Implements VUSolid.

Definition at line 2237 of file UCons.cc.

References GetDeltaPhiAngle(), GetInnerRadiusMinusZ(), GetInnerRadiusPlusZ(), GetOuterRadiusMinusZ(), GetOuterRadiusPlusZ(), GetStartPhiAngle(), and GetZHalfLength().

+ Here is the call graph for this function:

UVector3 UCons::GetPointOnSurface ( ) const
virtual

Implements VUSolid.

Definition at line 2135 of file UCons.cc.

References fDPhi, fDz, fPhiFullCone, fRmax1, fRmax2, fRmin1, fRmin2, fSPhi, UUtils::GetRadiusInRing(), UUtils::Random(), and UUtils::sqr().

+ Here is the call graph for this function:

double UCons::GetRmax1 ( ) const
inline

Referenced by UPolycone::InsideSection().

+ Here is the caller graph for this function:

double UCons::GetRmax2 ( ) const
inline

Referenced by UPolycone::InsideSection().

+ Here is the caller graph for this function:

double UCons::GetRmin1 ( ) const
inline

Referenced by UPolycone::InsideSection().

+ Here is the caller graph for this function:

double UCons::GetRmin2 ( ) const
inline

Referenced by UPolycone::InsideSection().

+ Here is the caller graph for this function:

double UCons::GetSPhi ( ) const
inline
double UCons::GetStartPhiAngle ( ) const
inline

Referenced by GetParametersList(), and G4UCons::GetStartPhiAngle().

+ Here is the caller graph for this function:

double UCons::GetSurfaceArea ( )
inline
double UCons::GetZHalfLength ( ) const
inline

Referenced by GetParametersList(), and G4UCons::GetZHalfLength().

+ Here is the caller graph for this function:

void UCons::Initialize ( )
inlineprivate

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

+ Here is the caller graph for this function:

void UCons::InitializeTrigonometry ( )
inlineprivate
VUSolid::EnumInside UCons::Inside ( const UVector3 p) const
inlinevirtual

Implements VUSolid.

Definition at line 127 of file UCons.hh.

References VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, fDPhi, fDz, fPhiFullCone, fRmax1, fRmax2, fRmin1, fRmin2, fSPhi, kAngTolerance, UUtils::kPi, kRadTolerance, VUSolid::Tolerance(), 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:

bool UCons::Normal ( const UVector3 p,
UVector3 n 
) const
virtual

Implements VUSolid.

Definition at line 175 of file UCons.cc.

References ApproxSurfaceNormal(), UUtils::Exception(), fDPhi, fDz, fPhiFullCone, fRmax2, fRmin1, fRmin2, fSPhi, kAngTolerance, UUtils::kInfinity, UUtils::kPi, secRMax, secRMin, tanRMax, tanRMin, VUSolid::Tolerance(), UVector3::Unit(), Warning, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

UCons & UCons::operator= ( const UCons rhs)

Definition at line 131 of file UCons.cc.

References cosCPhi, cosEPhi, cosHDPhiIT, cosHDPhiOT, cosSPhi, fDPhi, fDz, fPhiFullCone, fRmax1, fRmax2, fRmin1, fRmin2, fSPhi, Initialize(), kAngTolerance, kRadTolerance, sinCPhi, sinEPhi, and sinSPhi.

+ Here is the call graph for this function:

double UCons::SafetyFromInside ( const UVector3 p,
bool  precise 
) const
virtual

Implements VUSolid.

Definition at line 1999 of file UCons.cc.

References cosCPhi, cosEPhi, cosSPhi, degree, VUSolid::eOutside, UUtils::Exception(), fDz, fPhiFullCone, fRmax1, fRmax2, fRmin1, fRmin2, Inside(), UUtils::kInfinity, secRMax, secRMin, sinCPhi, sinEPhi, sinSPhi, tanRMax, tanRMin, Warning, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

double UCons::SafetyFromOutside ( const UVector3 p,
bool  precise 
) const
virtual
void UCons::SetDeltaPhiAngle ( double  newDPhi)
inline

Referenced by G4UCons::SetDeltaPhiAngle().

+ Here is the caller graph for this function:

void UCons::SetInnerRadiusMinusZ ( double  Rmin1)
inline

Referenced by G4UCons::SetInnerRadiusMinusZ().

+ Here is the caller graph for this function:

void UCons::SetInnerRadiusPlusZ ( double  Rmin2)
inline

Referenced by G4UCons::SetInnerRadiusPlusZ().

+ Here is the caller graph for this function:

void UCons::SetOuterRadiusMinusZ ( double  Rmax1)
inline

Referenced by G4UCons::SetOuterRadiusMinusZ().

+ Here is the caller graph for this function:

void UCons::SetOuterRadiusPlusZ ( double  Rmax2)
inline

Referenced by G4UCons::SetOuterRadiusPlusZ().

+ Here is the caller graph for this function:

void UCons::SetStartPhiAngle ( double  newSPhi,
bool  trig = true 
)
inline

Referenced by G4UCons::SetStartPhiAngle().

+ Here is the caller graph for this function:

void UCons::SetZHalfLength ( double  newDz)
inline

Referenced by G4UCons::SetZHalfLength().

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 2108 of file UCons.cc.

References fDPhi, fDz, fRmax1, fRmax2, fRmin1, fRmin2, fSPhi, VUSolid::GetName(), and UUtils::kPi.

+ Here is the call graph for this function:

double UCons::SurfaceArea ( )
inlineprivatevirtual

Implements VUSolid.

Member Data Documentation

double UCons::cosCPhi
private

Definition at line 285 of file UCons.hh.

Referenced by DistanceToIn(), DistanceToOut(), operator=(), SafetyFromInside(), and SafetyFromOutside().

double UCons::cosEPhi
private

Definition at line 285 of file UCons.hh.

Referenced by DistanceToIn(), DistanceToOut(), operator=(), SafetyFromInside(), and SafetyFromOutside().

double UCons::cosHDPhiIT
private

Definition at line 285 of file UCons.hh.

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

double UCons::cosHDPhiOT
private

Definition at line 285 of file UCons.hh.

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

double UCons::cosSPhi
private

Definition at line 285 of file UCons.hh.

Referenced by DistanceToIn(), DistanceToOut(), operator=(), and SafetyFromInside().

double UCons::fCubicVolume
private

Definition at line 243 of file UCons.hh.

double UCons::fDPhi
private
bool UCons::fPhiFullCone
private
double UCons::fRmax1
private
double UCons::fRmin1
private
double UCons::fSPhi
private
double UCons::fSurfaceArea
private

Definition at line 243 of file UCons.hh.

double UCons::kAngTolerance
private

Definition at line 277 of file UCons.hh.

Referenced by DistanceToOut(), Inside(), Normal(), operator=(), and UCons().

double UCons::kRadTolerance
private

Definition at line 277 of file UCons.hh.

Referenced by DistanceToIn(), DistanceToOut(), Inside(), operator=(), and UCons().

double UCons::secRMax
private
double UCons::secRMin
private
double UCons::sinCPhi
private

Definition at line 285 of file UCons.hh.

Referenced by DistanceToIn(), DistanceToOut(), operator=(), SafetyFromInside(), and SafetyFromOutside().

double UCons::sinEPhi
private

Definition at line 285 of file UCons.hh.

Referenced by DistanceToIn(), DistanceToOut(), operator=(), SafetyFromInside(), and SafetyFromOutside().

double UCons::sinSPhi
private

Definition at line 285 of file UCons.hh.

Referenced by DistanceToIn(), DistanceToOut(), operator=(), and SafetyFromInside().

double UCons::tanRMax
private
double UCons::tanRMin
private

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