Geant4  10.01.p02
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 Capacity ()
 
double SurfaceArea ()
 
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=false) 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=false) 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)
 
double SafetyToPhi (const UVector3 &p, const double rho, bool &outside) const
 
double SafetyFromInsideR (const UVector3 &p, const double rho, bool) const
 
double SafetyFromOutsideR (const UVector3 &p, const double rho, bool) const
 
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

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

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

Definition at line 183 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(), VUSolid::faTolerance, fRmin1, fRmin2, VUSolid::frTolerance, VUSolid::GetName(), Initialize(), kAngTolerance, kRadTolerance, and UFatalErrorInArguments.

+ Here is the call graph for this function:

UCons::~UCons ( )

Definition at line 106 of file UCons.cc.

UCons::UCons ( )

Definition at line 92 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 114 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 298 of file UCons.cc.

References UUtils::Exception(), fDPhi, fDz, fPhiFullCone, fRmax2, fRmin2, fSPhi, kNEPhi, kNRMax, kNRMin, kNSPhi, kNZ, UUtils::kPi, secRMax, secRMin, tanRMax, tanRMin, UWarning, 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 ( )
inlinevirtual

Implements VUSolid.

void UCons::CheckDPhiAngle ( double  dPhi)
private

Definition at line 2192 of file UCons.cc.

References UUtils::Exception(), fDPhi, fPhiFullCone, fSPhi, VUSolid::GetName(), kAngTolerance, UUtils::kPi, and UFatalErrorInArguments.

+ Here is the call graph for this function:

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

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

Implements VUSolid.

Definition at line 440 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 1343 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(), UWarning, 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 2185 of file UCons.cc.

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

+ Here is the call graph for this function:

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 2044 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 2219 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 2090 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::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.

Referenced by SafetyFromInside().

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 174 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(), UWarning, UVector3::x(), UVector3::y(), and UVector3::z().

+ Here is the call graph for this function:

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

Definition at line 130 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 = false 
) const
virtual

Implements VUSolid.

Definition at line 1995 of file UCons.cc.

References degree, VUSolid::eOutside, UUtils::Exception(), fDz, Inside(), SafetyFromInsideR(), UWarning, UVector3::x(), UVector3::y(), and UVector3::z().

+ Here is the call graph for this function:

double UCons::SafetyFromInsideR ( const UVector3 p,
const double  rho,
bool   
) const
inline

Referenced by SafetyFromInside(), and UPolycone::SafetyFromInsideSection().

+ Here is the caller graph for this function:

double UCons::SafetyFromOutside ( const UVector3 p,
bool  precise = false 
) const
virtual

Implements VUSolid.

Definition at line 1259 of file UCons.cc.

References fDz, fPhiFullCone, fRmax1, fRmax2, fRmin1, fRmin2, SafetyToPhi(), secRMax, secRMin, tanRMax, tanRMin, UVector3::x(), UVector3::y(), and UVector3::z().

+ Here is the call graph for this function:

double UCons::SafetyFromOutsideR ( const UVector3 p,
const double  rho,
bool   
) const
inline

Referenced by UPolycone::SafetyFromOutsideSection().

+ Here is the caller graph for this function:

double UCons::SafetyToPhi ( const UVector3 p,
const double  rho,
bool &  outside 
) const
inline

Referenced by SafetyFromOutside().

+ Here is the caller graph for this function:

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 2063 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 ( )
inlinevirtual

Implements VUSolid.

Member Data Documentation

double UCons::cosCPhi
private

Definition at line 197 of file UCons.hh.

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

double UCons::cosEPhi
private

Definition at line 197 of file UCons.hh.

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

double UCons::cosHDPhiIT
private

Definition at line 197 of file UCons.hh.

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

double UCons::cosHDPhiOT
private

Definition at line 197 of file UCons.hh.

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

double UCons::cosSPhi
private

Definition at line 197 of file UCons.hh.

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

double UCons::fCubicVolume
private

Definition at line 158 of file UCons.hh.

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

Definition at line 158 of file UCons.hh.

double UCons::kAngTolerance
private

Definition at line 189 of file UCons.hh.

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

double UCons::kRadTolerance
private

Definition at line 189 of file UCons.hh.

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

double UCons::secRMax
private

Definition at line 206 of file UCons.hh.

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

double UCons::secRMin
private

Definition at line 206 of file UCons.hh.

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

double UCons::sinCPhi
private

Definition at line 197 of file UCons.hh.

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

double UCons::sinEPhi
private

Definition at line 197 of file UCons.hh.

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

double UCons::sinSPhi
private

Definition at line 197 of file UCons.hh.

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

double UCons::tanRMax
private

Definition at line 206 of file UCons.hh.

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

double UCons::tanRMin
private

Definition at line 206 of file UCons.hh.

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


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