Geant4  10.00.p02
UTubs Class Reference

#include <UTubs.hh>

+ Inheritance diagram for UTubs:
+ Collaboration diagram for UTubs:

Public Member Functions

 UTubs (const std::string &pName, double pRMin, double pRMax, double pDz, double pSPhi, double pDPhi)
 
virtual ~UTubs ()
 
double GetInnerRadius () const
 
double GetOuterRadius () const
 
double GetZHalfLength () const
 
double GetStartPhiAngle () const
 
double GetDeltaPhiAngle () const
 
void SetInnerRadius (double newRMin)
 
void SetOuterRadius (double newRMax)
 
void SetZHalfLength (double newDz)
 
void SetStartPhiAngle (double newSPhi, bool trig=true)
 
void SetDeltaPhiAngle (double newDPhi)
 
double Capacity ()
 
double SurfaceArea ()
 
VUSolid::EnumInside Inside (const UVector3 &p) const
 
bool Normal (const UVector3 &p, UVector3 &normal) const
 
double DistanceToIn (const UVector3 &p, const UVector3 &v, double aPstep=UUtils::kInfinity) const
 
double SafetyFromInside (const UVector3 &p, bool precise=false) const
 
double DistanceToOut (const UVector3 &p, const UVector3 &v, UVector3 &n, bool &validNorm, double aPstep=UUtils::kInfinity) const
 
double SafetyFromOutside (const UVector3 &p, bool precise=false) const
 
double SafetyFromInsideR (const UVector3 &p, const double rho, bool precise=false) const
 
double SafetyFromOutsideR (const UVector3 &p, const double rho, 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)
 
 UTubs ()
 
 UTubs (const UTubs &rhs)
 
UTubsoperator= (const UTubs &rhs)
 
double GetRMin () const
 
double GetRMax () 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
 

Protected Types

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

Protected Member Functions

void Initialize ()
 
void CheckSPhiAngle (double sPhi)
 
void CheckDPhiAngle (double dPhi)
 
void CheckPhiAngles (double sPhi, double dPhi)
 
void InitializeTrigonometry ()
 
virtual UVector3 ApproxSurfaceNormal (const UVector3 &p) const
 
double SafetyToPhi (const UVector3 &p, const double rho, bool &outside) const
 

Protected Attributes

double fCubicVolume
 
double fSurfaceArea
 
double kRadTolerance
 
double kAngTolerance
 
double fRMin
 
double fRMax
 
double fDz
 
double fSPhi
 
double fDPhi
 
double fSinCPhi
 
double fCosCPhi
 
double fCosHDPhiOT
 
double fCosHDPhiIT
 
double fSinSPhi
 
double fCosSPhi
 
double fSinEPhi
 
double fCosEPhi
 
double fSinSPhiDPhi
 
double fCosSPhiDPhi
 
bool fPhiFullTube
 

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 47 of file UTubs.hh.

Member Enumeration Documentation

enum UTubs::ENorm
protected
Enumerator
kNRMin 
kNRMax 
kNSPhi 
kNEPhi 
kNZ 

Definition at line 170 of file UTubs.hh.

enum UTubs::ESide
protected
Enumerator
kNull 
kRMin 
kRMax 
kSPhi 
kEPhi 
kPZ 
kMZ 

Definition at line 166 of file UTubs.hh.

Constructor & Destructor Documentation

UTubs::UTubs ( const std::string &  pName,
double  pRMin,
double  pRMax,
double  pDz,
double  pSPhi,
double  pDPhi 
)

Definition at line 30 of file UTubs.cc.

References CheckPhiAngles(), UUtils::Exception(), FatalErrorInArguments, VUSolid::faTolerance, fCubicVolume, VUSolid::frTolerance, fSurfaceArea, VUSolid::GetName(), kAngTolerance, and kRadTolerance.

+ Here is the call graph for this function:

UTubs::~UTubs ( )
virtual

Definition at line 81 of file UTubs.cc.

UTubs::UTubs ( )

Definition at line 66 of file UTubs.cc.

Referenced by Clone().

+ Here is the caller graph for this function:

UTubs::UTubs ( const UTubs rhs)

Definition at line 89 of file UTubs.cc.

Member Function Documentation

UVector3 UTubs::ApproxSurfaceNormal ( const UVector3 p) const
protectedvirtual

Definition at line 473 of file UTubs.cc.

References UUtils::Exception(), fCosSPhi, fCosSPhiDPhi, fDPhi, fDz, fPhiFullTube, fRMax, fRMin, fSinSPhi, fSinSPhiDPhi, fSPhi, kNEPhi, kNRMax, kNRMin, kNSPhi, kNZ, UUtils::kPi, 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 UTubs::Capacity ( )
inlinevirtual

Implements VUSolid.

void UTubs::CheckDPhiAngle ( double  dPhi)
inlineprotected
void UTubs::CheckPhiAngles ( double  sPhi,
double  dPhi 
)
inlineprotected

Referenced by UTubs().

+ Here is the caller graph for this function:

void UTubs::CheckSPhiAngle ( double  sPhi)
inlineprotected
VUSolid * UTubs::Clone ( ) const
virtual

Implements VUSolid.

Definition at line 1583 of file UTubs.cc.

References UTubs().

+ Here is the call graph for this function:

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

Implements VUSolid.

Definition at line 111 of file UTubs.hh.

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

Implements VUSolid.

Definition at line 614 of file UTubs.cc.

References fCosCPhi, fCosEPhi, fCosHDPhiIT, fCosSPhi, fDz, fPhiFullTube, fRMax, fRMin, fSinCPhi, fSinEPhi, fSinSPhi, UUtils::kInfinity, kRadTolerance, VUSolid::Tolerance(), UVector3::x, UVector3::y, and UVector3::z.

Referenced by UEnclosingCylinder::DistanceTo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTubs::DistanceToOut ( const UVector3 p,
const UVector3 v,
UVector3 n,
bool &  validNorm,
double  aPstep = UUtils::kInfinity 
) const
virtual

Implements VUSolid.

Definition at line 1095 of file UTubs.cc.

References d2, UUtils::Exception(), fCosCPhi, fCosEPhi, fCosSPhi, fDPhi, fDz, fPhiFullTube, fRMax, fRMin, fSinCPhi, fSinEPhi, fSinSPhi, fSPhi, kAngTolerance, kEPhi, UUtils::kInfinity, kMZ, kNull, UUtils::kPi, kPZ, kRadTolerance, kRMax, kRMin, kSPhi, VUSolid::Tolerance(), Warning, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

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

Implements VUSolid.

Definition at line 1684 of file UTubs.cc.

References fDz, and fRMax.

double UTubs::GetDeltaPhiAngle ( ) const
inline

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

+ Here is the caller graph for this function:

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

Referenced by UPolycone::InsideSection().

+ Here is the caller graph for this function:

UGeometryType UTubs::GetEntityType ( ) const
virtual

Implements VUSolid.

Definition at line 1574 of file UTubs.cc.

double UTubs::GetInnerRadius ( ) const
inline

Referenced by G4UTubs::GetInnerRadius(), and GetParametersList().

+ Here is the caller graph for this function:

double UTubs::GetOuterRadius ( ) const
inline

Referenced by G4UTubs::GetOuterRadius(), and GetParametersList().

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 1690 of file UTubs.cc.

References GetDeltaPhiAngle(), GetInnerRadius(), GetOuterRadius(), GetStartPhiAngle(), and GetZHalfLength().

+ Here is the call graph for this function:

UVector3 UTubs::GetPointOnSurface ( ) const
virtual

Implements VUSolid.

Definition at line 1615 of file UTubs.cc.

References fCosSPhi, fCosSPhiDPhi, fDPhi, fDz, fRMax, fRMin, fSinSPhi, fSinSPhiDPhi, fSPhi, UUtils::GetRadiusInRing(), UUtils::kPi, and UUtils::Random().

+ Here is the call graph for this function:

double UTubs::GetRMax ( ) const
inline

Referenced by UPolycone::InsideSection().

+ Here is the caller graph for this function:

double UTubs::GetRMin ( ) const
inline

Referenced by UPolycone::InsideSection().

+ Here is the caller graph for this function:

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

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

+ Here is the caller graph for this function:

double UTubs::GetZHalfLength ( ) const
inline

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

+ Here is the caller graph for this function:

void UTubs::Initialize ( )
inlineprotected
void UTubs::InitializeTrigonometry ( )
inlineprotected
VUSolid::EnumInside UTubs::Inside ( const UVector3 p) const
inlinevirtual

Implements VUSolid.

Definition at line 153 of file UTubs.cc.

References VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, fDPhi, fDz, fPhiFullTube, fRMax, fRMin, 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 UTubs::Normal ( const UVector3 p,
UVector3 normal 
) const
virtual

Implements VUSolid.

Definition at line 356 of file UTubs.cc.

References ApproxSurfaceNormal(), UUtils::Exception(), fCosSPhi, fCosSPhiDPhi, fDPhi, fDz, fPhiFullTube, fRMax, fRMin, fSinSPhi, fSinSPhiDPhi, fSPhi, kAngTolerance, UUtils::kInfinity, UUtils::kPi, VUSolid::Tolerance(), UVector3::Unit(), Warning, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

double UTubs::SafetyFromInside ( const UVector3 p,
bool  precise = false 
) const
virtual

Implements VUSolid.

Definition at line 1534 of file UTubs.cc.

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

+ Here is the call graph for this function:

double UTubs::SafetyFromInsideR ( const UVector3 p,
const double  rho,
bool  precise = false 
) const
inline

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

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 1030 of file UTubs.cc.

References fDz, fPhiFullTube, fRMax, fRMin, SafetyToPhi(), UVector3::x, UVector3::y, and UVector3::z.

Referenced by UEnclosingCylinder::SafetyFromOutside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTubs::SafetyFromOutsideR ( const UVector3 p,
const double  rho,
bool  precise = false 
) const
inline

Referenced by UPolycone::SafetyFromOutsideSection().

+ Here is the caller graph for this function:

double UTubs::SafetyToPhi ( const UVector3 p,
const double  rho,
bool &  outside 
) const
inlineprotected

Referenced by SafetyFromOutside().

+ Here is the caller graph for this function:

void UTubs::SetDeltaPhiAngle ( double  newDPhi)
inline

Referenced by G4UTubs::SetDeltaPhiAngle().

+ Here is the caller graph for this function:

void UTubs::SetInnerRadius ( double  newRMin)
inline

Referenced by G4UTubs::SetInnerRadius().

+ Here is the caller graph for this function:

void UTubs::SetOuterRadius ( double  newRMax)
inline

Referenced by G4UTubs::SetOuterRadius().

+ Here is the caller graph for this function:

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

Referenced by G4UTubs::SetStartPhiAngle().

+ Here is the caller graph for this function:

void UTubs::SetZHalfLength ( double  newDz)
inline

Referenced by G4UTubs::SetZHalfLength().

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 1592 of file UTubs.cc.

References fDPhi, fDz, fRMax, fRMin, fSPhi, VUSolid::GetName(), and UUtils::kPi.

+ Here is the call graph for this function:

double UTubs::SurfaceArea ( )
inlinevirtual

Implements VUSolid.

Member Data Documentation

double UTubs::fCosCPhi
protected

Definition at line 180 of file UTubs.hh.

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

double UTubs::fCosEPhi
protected

Definition at line 180 of file UTubs.hh.

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

double UTubs::fCosHDPhiIT
protected

Definition at line 180 of file UTubs.hh.

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

double UTubs::fCosHDPhiOT
protected

Definition at line 180 of file UTubs.hh.

Referenced by operator=().

double UTubs::fCosSPhi
protected
double UTubs::fCosSPhiDPhi
protected

Definition at line 180 of file UTubs.hh.

Referenced by ApproxSurfaceNormal(), GetPointOnSurface(), Normal(), and operator=().

double UTubs::fCubicVolume
protected

Definition at line 163 of file UTubs.hh.

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

double UTubs::fDPhi
protected
bool UTubs::fPhiFullTube
protected
double UTubs::fRMax
protected
double UTubs::fRMin
protected
double UTubs::fSinCPhi
protected

Definition at line 180 of file UTubs.hh.

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

double UTubs::fSinEPhi
protected

Definition at line 180 of file UTubs.hh.

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

double UTubs::fSinSPhi
protected
double UTubs::fSinSPhiDPhi
protected

Definition at line 180 of file UTubs.hh.

Referenced by ApproxSurfaceNormal(), GetPointOnSurface(), Normal(), and operator=().

double UTubs::fSPhi
protected
double UTubs::fSurfaceArea
protected

Definition at line 163 of file UTubs.hh.

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

double UTubs::kAngTolerance
protected

Definition at line 172 of file UTubs.hh.

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

double UTubs::kRadTolerance
protected

Definition at line 172 of file UTubs.hh.

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


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