Geant4  10.00.p02
G4Sphere Class Reference

#include <G4Sphere.hh>

+ Inheritance diagram for G4Sphere:
+ Collaboration diagram for G4Sphere:

Public Member Functions

 G4Sphere (const G4String &pName, G4double pRmin, G4double pRmax, G4double pSPhi, G4double pDPhi, G4double pSTheta, G4double pDTheta)
 
 ~G4Sphere ()
 
G4double GetInnerRadius () const
 
G4double GetOuterRadius () const
 
G4double GetStartPhiAngle () const
 
G4double GetDeltaPhiAngle () const
 
G4double GetStartThetaAngle () const
 
G4double GetDeltaThetaAngle () const
 
void SetInnerRadius (G4double newRMin)
 
void SetOuterRadius (G4double newRmax)
 
void SetStartPhiAngle (G4double newSphi, G4bool trig=true)
 
void SetDeltaPhiAngle (G4double newDphi)
 
void SetStartThetaAngle (G4double newSTheta)
 
void SetDeltaThetaAngle (G4double newDTheta)
 
G4double GetCubicVolume ()
 
G4double GetSurfaceArea ()
 
void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
 
EInside Inside (const G4ThreeVector &p) const
 
G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const
 
G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const
 
G4double DistanceToIn (const G4ThreeVector &p) const
 
G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=G4bool(false), G4bool *validNorm=0, G4ThreeVector *n=0) const
 
G4double DistanceToOut (const G4ThreeVector &p) const
 
G4GeometryType GetEntityType () const
 
G4ThreeVector GetPointOnSurface () const
 
G4VSolidClone () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
G4VisExtent GetExtent () const
 
void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
G4PolyhedronCreatePolyhedron () const
 
 G4Sphere (__void__ &)
 
 G4Sphere (const G4Sphere &rhs)
 
G4Sphereoperator= (const G4Sphere &rhs)
 
G4double GetRmin () const
 
G4double GetRmax () const
 
G4double GetSPhi () const
 
G4double GetDPhi () const
 
G4double GetSTheta () const
 
G4double GetDTheta () const
 
G4double GetInsideRadius () const
 
void SetInsideRadius (G4double newRmin)
 
- Public Member Functions inherited from G4CSGSolid
 G4CSGSolid (const G4String &pName)
 
virtual ~G4CSGSolid ()
 
virtual G4PolyhedronGetPolyhedron () const
 
 G4CSGSolid (__void__ &)
 
 G4CSGSolid (const G4CSGSolid &rhs)
 
G4CSGSolidoperator= (const G4CSGSolid &rhs)
 
- Public Member Functions inherited from G4VSolid
 G4VSolid (const G4String &name)
 
virtual ~G4VSolid ()
 
G4bool operator== (const G4VSolid &s) const
 
G4String GetName () const
 
void SetName (const G4String &name)
 
G4double GetTolerance () const
 
void DumpInfo () const
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
virtual const G4DisplacedSolidGetDisplacedSolidPtr () const
 
virtual G4DisplacedSolidGetDisplacedSolidPtr ()
 
 G4VSolid (__void__ &)
 
 G4VSolid (const G4VSolid &rhs)
 
G4VSolidoperator= (const G4VSolid &rhs)
 

Private Types

enum  ESide {
  kNull, kRMin, kRMax, kSPhi,
  kEPhi, kSTheta, kETheta
}
 
enum  ENorm {
  kNRMin, kNRMax, kNSPhi, kNEPhi,
  kNSTheta, kNETheta
}
 

Private Member Functions

G4ThreeVectorListCreateRotatedVertices (const G4AffineTransform &pTransform, G4int &noPolygonVertices) const
 
void Initialize ()
 
void CheckThetaAngles (G4double sTheta, G4double dTheta)
 
void CheckSPhiAngle (G4double sPhi)
 
void CheckDPhiAngle (G4double dPhi)
 
void CheckPhiAngles (G4double sPhi, G4double dPhi)
 
void InitializePhiTrigonometry ()
 
void InitializeThetaTrigonometry ()
 
G4ThreeVector ApproxSurfaceNormal (const G4ThreeVector &p) const
 

Private Attributes

G4double fRminTolerance
 
G4double fRmaxTolerance
 
G4double kAngTolerance
 
G4double kRadTolerance
 
G4double fEpsilon
 
G4double fRmin
 
G4double fRmax
 
G4double fSPhi
 
G4double fDPhi
 
G4double fSTheta
 
G4double fDTheta
 
G4double sinCPhi
 
G4double cosCPhi
 
G4double cosHDPhiOT
 
G4double cosHDPhiIT
 
G4double sinSPhi
 
G4double cosSPhi
 
G4double sinEPhi
 
G4double cosEPhi
 
G4double hDPhi
 
G4double cPhi
 
G4double ePhi
 
G4double sinSTheta
 
G4double cosSTheta
 
G4double sinETheta
 
G4double cosETheta
 
G4double tanSTheta
 
G4double tanSTheta2
 
G4double tanETheta
 
G4double tanETheta2
 
G4double eTheta
 
G4bool fFullPhiSphere
 
G4bool fFullThetaSphere
 
G4bool fFullSphere
 
G4double halfCarTolerance
 
G4double halfAngTolerance
 

Additional Inherited Members

- Protected Member Functions inherited from G4CSGSolid
G4double GetRadiusInRing (G4double rmin, G4double rmax) const
 
- Protected Member Functions inherited from G4VSolid
void CalculateClippedPolygonExtent (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipCrossSection (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipBetweenSections (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipPolygon (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 
- Protected Attributes inherited from G4CSGSolid
G4double fCubicVolume
 
G4double fSurfaceArea
 
G4PolyhedronfpPolyhedron
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 

Detailed Description

Definition at line 87 of file G4Sphere.hh.

Member Enumeration Documentation

enum G4Sphere::ENorm
private
Enumerator
kNRMin 
kNRMax 
kNSPhi 
kNEPhi 
kNSTheta 
kNETheta 

Definition at line 227 of file G4Sphere.hh.

enum G4Sphere::ESide
private
Enumerator
kNull 
kRMin 
kRMax 
kSPhi 
kEPhi 
kSTheta 
kETheta 

Definition at line 223 of file G4Sphere.hh.

Constructor & Destructor Documentation

G4Sphere::G4Sphere ( const G4String pName,
G4double  pRmin,
G4double  pRmax,
G4double  pSPhi,
G4double  pDPhi,
G4double  pSTheta,
G4double  pDTheta 
)

Definition at line 89 of file G4Sphere.cc.

References CheckPhiAngles(), CheckThetaAngles(), FatalException, fEpsilon, fRmax, fRmaxTolerance, fRmin, fRminTolerance, G4endl, G4Exception(), G4GeometryTolerance::GetAngularTolerance(), G4GeometryTolerance::GetInstance(), G4VSolid::GetName(), G4GeometryTolerance::GetRadialTolerance(), halfAngTolerance, halfCarTolerance, kAngTolerance, G4VSolid::kCarTolerance, kRadTolerance, and G4INCL::Math::max().

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4Sphere::~G4Sphere ( )

Definition at line 144 of file G4Sphere.cc.

G4Sphere::G4Sphere ( __void__ &  a)

Definition at line 127 of file G4Sphere.cc.

G4Sphere::G4Sphere ( const G4Sphere rhs)

Definition at line 152 of file G4Sphere.cc.

References G4CSGSolid::fpPolyhedron, and G4CSGSolid::GetPolyhedron().

+ Here is the call graph for this function:

Member Function Documentation

G4ThreeVector G4Sphere::ApproxSurfaceNormal ( const G4ThreeVector p) const
private

Definition at line 700 of file G4Sphere.cc.

References cosEPhi, cosETheta, cosSPhi, cosSTheta, G4VSolid::DumpInfo(), fDPhi, fDTheta, fFullPhiSphere, fFullThetaSphere, fRmax, fRmin, fSPhi, fSTheta, G4Exception(), JustWarning, kNEPhi, kNETheta, kNRMax, kNRMin, kNSPhi, kNSTheta, sinEPhi, sinETheta, sinSPhi, and sinSTheta.

Referenced by SurfaceNormal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4Sphere::CheckDPhiAngle ( G4double  dPhi)
inlineprivate
void G4Sphere::CheckPhiAngles ( G4double  sPhi,
G4double  dPhi 
)
inlineprivate

Referenced by G4Sphere().

+ Here is the caller graph for this function:

void G4Sphere::CheckSPhiAngle ( G4double  sPhi)
inlineprivate
void G4Sphere::CheckThetaAngles ( G4double  sTheta,
G4double  dTheta 
)
inlineprivate

Referenced by G4Sphere().

+ Here is the caller graph for this function:

G4VSolid * G4Sphere::Clone ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 3011 of file G4Sphere.cc.

References G4Sphere().

+ Here is the call graph for this function:

void G4Sphere::ComputeDimensions ( G4VPVParameterisation p,
const G4int  n,
const G4VPhysicalVolume pRep 
)
virtual

Reimplemented from G4VSolid.

Definition at line 218 of file G4Sphere.cc.

References G4VPVParameterisation::ComputeDimensions().

+ Here is the call graph for this function:

G4Polyhedron * G4Sphere::CreatePolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 3184 of file G4Sphere.cc.

References fDPhi, fDTheta, fRmax, fRmin, fSPhi, and fSTheta.

G4ThreeVectorList * G4Sphere::CreateRotatedVertices ( const G4AffineTransform pTransform,
G4int noPolygonVertices 
) const
private

Definition at line 2875 of file G4Sphere.cc.

References G4VSolid::DumpInfo(), FatalException, fDPhi, fDTheta, fFullPhiSphere, fFullThetaSphere, fRmax, fRmin, fSPhi, fSTheta, G4Exception(), kMaxMeshSections, kMeshAngleDefault, kMinMeshSections, and G4AffineTransform::TransformPoint().

Referenced by CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4Sphere::DescribeYourselfTo ( G4VGraphicsScene scene) const
virtual

Implements G4VSolid.

Definition at line 3179 of file G4Sphere.cc.

References G4VGraphicsScene::AddSolid().

+ Here is the call graph for this function:

G4double G4Sphere::DistanceToIn ( const G4ThreeVector p) const
virtual
G4double G4Sphere::DistanceToOut ( const G4ThreeVector p,
const G4ThreeVector v,
const G4bool  calcNorm = G4bool(false),
G4bool validNorm = 0,
G4ThreeVector n = 0 
) const
virtual

Implements G4VSolid.

Definition at line 1901 of file G4Sphere.cc.

References cosCPhi, cosEPhi, cosSPhi, d2, G4VSolid::DumpInfo(), ePhi, eTheta, fDPhi, fFullPhiSphere, fFullThetaSphere, fRmax, fRmaxTolerance, fRmin, fRminTolerance, fSPhi, fSTheta, G4cout, G4endl, G4Exception(), halfAngTolerance, halfCarTolerance, JustWarning, kAngTolerance, G4VSolid::kCarTolerance, kEPhi, kETheta, kInfinity, kNull, kRMax, kRMin, kSPhi, kSTheta, mm, G4INCL::Math::pi, s, sinCPhi, sinEPhi, sinETheta, sinSPhi, tanETheta, tanETheta2, tanSTheta, and tanSTheta2.

+ Here is the call graph for this function:

G4double G4Sphere::DistanceToOut ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 2783 of file G4Sphere.cc.

References cosCPhi, cosEPhi, cosSPhi, G4VSolid::DumpInfo(), eTheta, fFullPhiSphere, fRmax, fRmin, fSTheta, G4cout, G4endl, G4Exception(), Inside(), JustWarning, kOutside, mm, G4INCL::Math::pi, sinCPhi, sinEPhi, and sinSPhi.

+ Here is the call graph for this function:

G4double G4Sphere::GetCubicVolume ( )
inlinevirtual

Reimplemented from G4VSolid.

G4double G4Sphere::GetDeltaPhiAngle ( ) const
inline

Referenced by export_G4Sphere(), G4tgbGeometryDumper::GetSolidParams(), G4PSSphereSurfaceCurrent::ProcessHits(), G4PSSphereSurfaceFlux::ProcessHits(), G4GDMLWriteParamvol::Sphere_dimensionsWrite(), and G4GDMLWriteSolids::SphereWrite().

+ Here is the caller graph for this function:

G4double G4Sphere::GetDeltaThetaAngle ( ) const
inline

Referenced by export_G4Sphere(), G4tgbGeometryDumper::GetSolidParams(), G4PSSphereSurfaceCurrent::ProcessHits(), G4PSSphereSurfaceFlux::ProcessHits(), G4GDMLWriteParamvol::Sphere_dimensionsWrite(), and G4GDMLWriteSolids::SphereWrite().

+ Here is the caller graph for this function:

G4double G4Sphere::GetDPhi ( ) const
inline
G4double G4Sphere::GetDTheta ( ) const
inline
G4GeometryType G4Sphere::GetEntityType ( ) const
virtual

Implements G4VSolid.

Definition at line 3002 of file G4Sphere.cc.

G4VisExtent G4Sphere::GetExtent ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 3173 of file G4Sphere.cc.

References fRmax.

G4double G4Sphere::GetInnerRadius ( ) const
inline
G4double G4Sphere::GetInsideRadius ( ) const
inline

Referenced by export_G4Sphere().

+ Here is the caller graph for this function:

G4double G4Sphere::GetOuterRadius ( ) const
inline

Referenced by export_G4Sphere(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Sphere_dimensionsWrite(), and G4GDMLWriteSolids::SphereWrite().

+ Here is the caller graph for this function:

G4ThreeVector G4Sphere::GetPointOnSurface ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 3044 of file G4Sphere.cc.

References cosEPhi, cosETheta, cosSPhi, cosSTheta, ePhi, eTheta, fDPhi, fDTheta, fFullPhiSphere, fRmax, fRmin, fSPhi, fSTheta, G4CSGSolid::GetRadiusInRing(), G4INCL::Math::pi, G4INCL::DeJongSpin::shoot(), sinEPhi, sinETheta, sinSPhi, sinSTheta, sqr(), tanETheta, and tanSTheta.

+ Here is the call graph for this function:

G4double G4Sphere::GetRmax ( ) const
inline
G4double G4Sphere::GetRmin ( ) const
inline
G4double G4Sphere::GetSPhi ( ) const
inline
G4double G4Sphere::GetStartPhiAngle ( ) const
inline

Referenced by export_G4Sphere(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Sphere_dimensionsWrite(), and G4GDMLWriteSolids::SphereWrite().

+ Here is the caller graph for this function:

G4double G4Sphere::GetStartThetaAngle ( ) const
inline

Referenced by export_G4Sphere(), G4tgbGeometryDumper::GetSolidParams(), G4PSSphereSurfaceCurrent::ProcessHits(), G4PSSphereSurfaceFlux::ProcessHits(), G4GDMLWriteParamvol::Sphere_dimensionsWrite(), and G4GDMLWriteSolids::SphereWrite().

+ Here is the caller graph for this function:

G4double G4Sphere::GetSTheta ( ) const
inline
G4double G4Sphere::GetSurfaceArea ( )
virtual
void G4Sphere::Initialize ( )
inlineprivate
void G4Sphere::InitializePhiTrigonometry ( )
inlineprivate
void G4Sphere::InitializeThetaTrigonometry ( )
inlineprivate
EInside G4Sphere::Inside ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 474 of file G4Sphere.cc.

References ePhi, eTheta, fFullPhiSphere, fFullThetaSphere, fRmax, fRmaxTolerance, fRmin, fRminTolerance, fSPhi, fSTheta, halfAngTolerance, kInside, kOutside, kSurface, and G4INCL::Math::max().

Referenced by CalculateExtent(), and DistanceToOut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4Sphere & G4Sphere::operator= ( const G4Sphere rhs)
void G4Sphere::SetDeltaPhiAngle ( G4double  newDphi)
inline

Referenced by G4GDMLParameterisation::ComputeDimensions(), and export_G4Sphere().

+ Here is the caller graph for this function:

void G4Sphere::SetDeltaThetaAngle ( G4double  newDTheta)
inline

Referenced by G4GDMLParameterisation::ComputeDimensions(), and export_G4Sphere().

+ Here is the caller graph for this function:

void G4Sphere::SetInnerRadius ( G4double  newRMin)
inline

Referenced by G4GDMLParameterisation::ComputeDimensions().

+ Here is the caller graph for this function:

void G4Sphere::SetInsideRadius ( G4double  newRmin)
inline

Referenced by export_G4Sphere().

+ Here is the caller graph for this function:

void G4Sphere::SetOuterRadius ( G4double  newRmax)
inline

Referenced by G4GDMLParameterisation::ComputeDimensions(), and export_G4Sphere().

+ Here is the caller graph for this function:

void G4Sphere::SetStartPhiAngle ( G4double  newSphi,
G4bool  trig = true 
)
inline

Referenced by G4GDMLParameterisation::ComputeDimensions(), and export_G4Sphere().

+ Here is the caller graph for this function:

void G4Sphere::SetStartThetaAngle ( G4double  newSTheta)
inline

Referenced by G4GDMLParameterisation::ComputeDimensions(), and export_G4Sphere().

+ Here is the caller graph for this function:

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

Reimplemented from G4CSGSolid.

Definition at line 3020 of file G4Sphere.cc.

References degree, fDPhi, fDTheta, fRmax, fRmin, fSPhi, fSTheta, G4VSolid::GetName(), and mm.

+ Here is the call graph for this function:

G4ThreeVector G4Sphere::SurfaceNormal ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 571 of file G4Sphere.cc.

References ApproxSurfaceNormal(), cosEPhi, cosETheta, cosSPhi, cosSTheta, ePhi, eTheta, fFullPhiSphere, fFullSphere, fFullThetaSphere, fRmax, fRmin, fSPhi, fSTheta, G4Exception(), halfAngTolerance, halfCarTolerance, JustWarning, kInfinity, G4INCL::Math::pi, sinEPhi, sinETheta, sinSPhi, and sinSTheta.

+ Here is the call graph for this function:

Member Data Documentation

G4double G4Sphere::cosCPhi
private

Definition at line 238 of file G4Sphere.hh.

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

G4double G4Sphere::cosEPhi
private
G4double G4Sphere::cosETheta
private
G4double G4Sphere::cosHDPhiIT
private

Definition at line 238 of file G4Sphere.hh.

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

G4double G4Sphere::cosHDPhiOT
private

Definition at line 238 of file G4Sphere.hh.

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

G4double G4Sphere::cosSPhi
private
G4double G4Sphere::cosSTheta
private
G4double G4Sphere::cPhi
private

Definition at line 238 of file G4Sphere.hh.

Referenced by operator=().

G4double G4Sphere::ePhi
private

Definition at line 238 of file G4Sphere.hh.

Referenced by DistanceToOut(), GetPointOnSurface(), Inside(), operator=(), and SurfaceNormal().

G4double G4Sphere::eTheta
private
G4double G4Sphere::fEpsilon
private

Definition at line 229 of file G4Sphere.hh.

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

G4bool G4Sphere::fFullSphere
private

Definition at line 248 of file G4Sphere.hh.

Referenced by CalculateExtent(), operator=(), and SurfaceNormal().

G4bool G4Sphere::fFullThetaSphere
private
G4double G4Sphere::fRmaxTolerance
private

Definition at line 229 of file G4Sphere.hh.

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

G4double G4Sphere::fRminTolerance
private

Definition at line 229 of file G4Sphere.hh.

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

G4double G4Sphere::halfAngTolerance
private

Definition at line 252 of file G4Sphere.hh.

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

G4double G4Sphere::halfCarTolerance
private

Definition at line 252 of file G4Sphere.hh.

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

G4double G4Sphere::hDPhi
private

Definition at line 238 of file G4Sphere.hh.

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

G4double G4Sphere::kAngTolerance
private

Definition at line 229 of file G4Sphere.hh.

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

G4double G4Sphere::kRadTolerance
private

Definition at line 229 of file G4Sphere.hh.

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

G4double G4Sphere::sinCPhi
private

Definition at line 238 of file G4Sphere.hh.

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

G4double G4Sphere::sinEPhi
private
G4double G4Sphere::sinETheta
private
G4double G4Sphere::sinSPhi
private
G4double G4Sphere::sinSTheta
private
G4double G4Sphere::tanETheta
private

Definition at line 243 of file G4Sphere.hh.

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

G4double G4Sphere::tanETheta2
private

Definition at line 243 of file G4Sphere.hh.

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

G4double G4Sphere::tanSTheta
private

Definition at line 243 of file G4Sphere.hh.

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

G4double G4Sphere::tanSTheta2
private

Definition at line 243 of file G4Sphere.hh.

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


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