Geant4  10.00.p03
UTrd Class Reference

#include <UTrd.hh>

+ Inheritance diagram for UTrd:
+ Collaboration diagram for UTrd:

Public Member Functions

 UTrd ()
 
 UTrd (const std::string &pName, double pdx1, double pdx2, double pdy1, double pdy2, double pdz)
 
virtual ~UTrd ()
 
 UTrd (const UTrd &rhs)
 
UTrdoperator= (const UTrd &rhs)
 
double GetXHalfLength1 () const
 
double GetXHalfLength2 () const
 
double GetYHalfLength1 () const
 
double GetYHalfLength2 () const
 
double GetZHalfLength () const
 
void SetXHalfLength1 (double val)
 
void SetXHalfLength2 (double val)
 
void SetYHalfLength1 (double val)
 
void SetYHalfLength2 (double val)
 
void SetZHalfLength (double val)
 
EnumInside Inside (const UVector3 &aPoint) const
 Return whether point inside/outside/on surface Split into radius checks. More...
 
virtual double SafetyFromInside (const UVector3 &aPoint, bool aAccurate=false) const
 
double SafetyFromInsideAccurate (const UVector3 &aPoint) const
 
virtual double SafetyFromOutside (const UVector3 &aPoint, bool aAccurate=false) const
 
double SafetyFromOutsideAccurate (const UVector3 &aPoint) const
 
virtual double DistanceToIn (const UVector3 &aPoint, const UVector3 &aDirection, double aPstep=UUtils::kInfinity) const
 
virtual double DistanceToOut (const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
virtual bool Normal (const UVector3 &aPoint, UVector3 &aNormal) const
 
void CheckAndSetAllParameters (double pdx1, double pdx2, double pdy1, double pdy2, double pdz)
 
void SetAllParameters (double pdx1, double pdx2, double pdy1, double pdy2, double pdz)
 
void Extent (UVector3 &aMin, UVector3 &aMax) const
 Returns the full 3D cartesian extent of the solid. More...
 
double Capacity ()
 
double SurfaceArea ()
 
VUSolidClone () const
 
UGeometryType GetEntityType () const
 
virtual void ComputeBBox (UBBox *, bool)
 
virtual void GetParametersList (int, double *) const
 
std::ostream & StreamInfo (std::ostream &os) const
 
UVector3 GetPointOnSurface () 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 {
  kUndefined, kPX, kMX, kPY,
  kMY, kPZ, kMZ
}
 

Private Member Functions

UVector3 ApproxSurfaceNormal (const UVector3 &p) const
 
double amin (int n, const double *a) const
 
double amax (int n, const double *a) const
 

Private Attributes

double fDx1
 
double fDx2
 
double fDy1
 
double fDy2
 
double fDz
 
double fCubicVolume
 
double fSurfaceArea
 

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 28 of file UTrd.hh.

Member Enumeration Documentation

enum UTrd::ESide
private
Enumerator
kUndefined 
kPX 
kMX 
kPY 
kMY 
kPZ 
kMZ 

Definition at line 30 of file UTrd.hh.

Constructor & Destructor Documentation

UTrd::UTrd ( )
inline

Definition at line 32 of file UTrd.hh.

Referenced by Clone().

+ Here is the caller graph for this function:

UTrd::UTrd ( const std::string &  pName,
double  pdx1,
double  pdx2,
double  pdy1,
double  pdy2,
double  pdz 
)

Definition at line 29 of file UTrd.cc.

References CheckAndSetAllParameters().

+ Here is the call graph for this function:

virtual UTrd::~UTrd ( )
inlinevirtual

Definition at line 34 of file UTrd.hh.

UTrd::UTrd ( const UTrd rhs)

Definition at line 1238 of file UTrd.cc.

Member Function Documentation

double UTrd::amax ( int  n,
const double *  a 
) const
inlineprivate

Referenced by SafetyFromOutsideAccurate().

+ Here is the caller graph for this function:

double UTrd::amin ( int  n,
const double *  a 
) const
inlineprivate

Referenced by SafetyFromInsideAccurate().

+ Here is the caller graph for this function:

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

Definition at line 1047 of file UTrd.cc.

References fcos(), fDx1, fDx2, fDy1, fDy2, fDz, UVector3::x, UVector3::y, z, and UVector3::z.

+ Here is the call graph for this function:

double UTrd::Capacity ( )
inlinevirtual

Implements VUSolid.

void UTrd::CheckAndSetAllParameters ( double  pdx1,
double  pdx2,
double  pdy1,
double  pdy2,
double  pdz 
)

Definition at line 38 of file UTrd.cc.

References UUtils::Exception(), FatalErrorInArguments, fDx1, fDx2, fDy1, fDy2, fDz, VUSolid::fgTolerance, VUSolid::GetName(), and G4INCL::Math::max().

Referenced by SetAllParameters(), and UTrd().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VUSolid * UTrd::Clone ( ) const
virtual

Implements VUSolid.

Definition at line 1288 of file UTrd.cc.

References UTrd().

+ Here is the call graph for this function:

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

Implements VUSolid.

Definition at line 96 of file UTrd.hh.

double UTrd::DistanceToIn ( const UVector3 aPoint,
const UVector3 aDirection,
double  aPstep = UUtils::kInfinity 
) const
virtual

Implements VUSolid.

Definition at line 321 of file UTrd.cc.

References fDx1, fDx2, fDy1, fDy2, fDz, VUSolid::fgTolerance, UUtils::kInfinity, smax, UVector3::x, UVector3::y, and UVector3::z.

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

Implements VUSolid.

Definition at line 555 of file UTrd.cc.

References UUtils::Exception(), fDx1, fDx2, fDy1, fDy2, fDz, VUSolid::fgTolerance, UUtils::kInfinity, kMX, kMY, kMZ, kPX, kPY, kPZ, kUndefined, UVector3::Set(), Warning, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

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

Returns the full 3D cartesian extent of the solid.

OK

Implements VUSolid.

Definition at line 1126 of file UTrd.cc.

References fDx1, fDx2, fDy1, fDy2, fDz, G4INCL::Math::max(), and UVector3::Set().

+ Here is the call graph for this function:

UGeometryType UTrd::GetEntityType ( ) const
virtual

Implements VUSolid.

Definition at line 1296 of file UTrd.cc.

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

Implements VUSolid.

Definition at line 1276 of file UTrd.cc.

References GetXHalfLength1(), GetXHalfLength2(), GetYHalfLength1(), GetYHalfLength2(), and GetZHalfLength().

+ Here is the call graph for this function:

UVector3 UTrd::GetPointOnSurface ( ) const
virtual

Implements VUSolid.

Definition at line 1163 of file UTrd.cc.

References fDx1, fDx2, fDy1, fDy2, fDz, and UUtils::Random().

+ Here is the call graph for this function:

double UTrd::GetXHalfLength1 ( ) const
inline

Referenced by GetParametersList(), and G4UTrd::GetXHalfLength1().

+ Here is the caller graph for this function:

double UTrd::GetXHalfLength2 ( ) const
inline

Referenced by GetParametersList(), and G4UTrd::GetXHalfLength2().

+ Here is the caller graph for this function:

double UTrd::GetYHalfLength1 ( ) const
inline

Referenced by GetParametersList(), and G4UTrd::GetYHalfLength1().

+ Here is the caller graph for this function:

double UTrd::GetYHalfLength2 ( ) const
inline

Referenced by GetParametersList(), and G4UTrd::GetYHalfLength2().

+ Here is the caller graph for this function:

double UTrd::GetZHalfLength ( ) const
inline

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

+ Here is the caller graph for this function:

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

Return whether point inside/outside/on surface Split into radius checks.

Classify point location with respect to solid: o eInside - inside the solid o eSurface - close to surface within tolerance o eOutside - outside the solid

Implements VUSolid.

Definition at line 255 of file UTrd.cc.

References VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, fDx1, fDx2, fDy1, fDy2, fDz, VUSolid::fgTolerance, UVector3::x, UVector3::y, and UVector3::z.

Referenced by SafetyFromInside().

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 932 of file UTrd.cc.

References UUtils::Exception(), fcos(), fDx1, fDx2, fDy1, fDy2, fDz, VUSolid::fgTolerance, UVector3::Normalize(), Warning, UVector3::x, UVector3::y, z, and UVector3::z.

+ Here is the call graph for this function:

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

Definition at line 1249 of file UTrd.cc.

References fCubicVolume, fDx1, fDx2, fDy1, fDy2, fDz, and fSurfaceArea.

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

Implements VUSolid.

Definition at line 83 of file UTrd.cc.

References UUtils::Exception(), fDx1, fDx2, fDy1, fDy2, fDz, Inside(), kOutside, mm, SafetyFromInsideAccurate(), Warning, UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

double UTrd::SafetyFromInsideAccurate ( const UVector3 aPoint) const

Definition at line 132 of file UTrd.cc.

References amin(), fDx1, fDx2, fDy1, fDy2, fDz, UUtils::kInfinity, 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 UTrd::SafetyFromOutside ( const UVector3 aPoint,
bool  aAccurate = false 
) const
virtual

Implements VUSolid.

Definition at line 170 of file UTrd.cc.

References fDx1, fDx2, fDy1, fDy2, fDz, SafetyFromOutsideAccurate(), UVector3::x, UVector3::y, and UVector3::z.

+ Here is the call graph for this function:

double UTrd::SafetyFromOutsideAccurate ( const UVector3 aPoint) const

Definition at line 209 of file UTrd.cc.

References amax(), fDx1, fDx2, fDy1, fDy2, fDz, UUtils::kInfinity, UVector3::x, UVector3::y, and UVector3::z.

Referenced by SafetyFromOutside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UTrd::SetAllParameters ( double  pdx1,
double  pdx2,
double  pdy1,
double  pdy2,
double  pdz 
)

Definition at line 77 of file UTrd.cc.

References CheckAndSetAllParameters().

Referenced by G4UTrd::SetAllParameters().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UTrd::SetXHalfLength1 ( double  val)
inline

Referenced by G4UTrd::SetXHalfLength1().

+ Here is the caller graph for this function:

void UTrd::SetXHalfLength2 ( double  val)
inline

Referenced by G4UTrd::SetXHalfLength2().

+ Here is the caller graph for this function:

void UTrd::SetYHalfLength1 ( double  val)
inline

Referenced by G4UTrd::SetYHalfLength1().

+ Here is the caller graph for this function:

void UTrd::SetYHalfLength2 ( double  val)
inline

Referenced by G4UTrd::SetYHalfLength2().

+ Here is the caller graph for this function:

void UTrd::SetZHalfLength ( double  val)
inline

Referenced by G4UTrd::SetZHalfLength().

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 1137 of file UTrd.cc.

References fDx1, fDx2, fDy1, fDy2, fDz, and VUSolid::GetName().

+ Here is the call graph for this function:

double UTrd::SurfaceArea ( )
inlinevirtual

Implements VUSolid.

Member Data Documentation

double UTrd::fCubicVolume
private

Definition at line 109 of file UTrd.hh.

Referenced by operator=().

double UTrd::fSurfaceArea
private

Definition at line 110 of file UTrd.hh.

Referenced by operator=().


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