ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4Torus Class Reference

#include <geant4/tree/geant4-10.6-release/source/geometry/solids/CSG/include/G4Torus.hh>

+ Inheritance diagram for G4Torus:
+ Collaboration diagram for G4Torus:

Public Member Functions

 G4Torus (const G4String &pName, G4double pRmin, G4double pRmax, G4double pRtor, G4double pSPhi, G4double pDPhi)
 
 ~G4Torus ()
 
G4double GetRmin () const
 
G4double GetRmax () const
 
G4double GetRtor () const
 
G4double GetSPhi () const
 
G4double GetDPhi () const
 
G4double GetSinStartPhi () const
 
G4double GetCosStartPhi () const
 
G4double GetSinEndPhi () const
 
G4double GetCosEndPhi () const
 
G4double GetCubicVolume ()
 
G4double GetSurfaceArea ()
 
EInside Inside (const G4ThreeVector &p) const
 
void BoundingLimits (G4ThreeVector &pMin, G4ThreeVector &pMax) const
 
G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
 
void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
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=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const
 
G4double DistanceToOut (const G4ThreeVector &p) const
 
G4GeometryType GetEntityType () const
 
G4ThreeVector GetPointOnSurface () const
 
G4VSolidClone () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
G4PolyhedronCreatePolyhedron () const
 
void SetAllParameters (G4double pRmin, G4double pRmax, G4double pRtor, G4double pSPhi, G4double pDPhi)
 
 G4Torus (__void__ &)
 
 G4Torus (const G4Torus &rhs)
 
G4Torusoperator= (const G4Torus &rhs)
 
- 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 G4VisExtent GetExtent () 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)
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 

Private Types

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

Private Member Functions

void TorusRootsJT (const G4ThreeVector &p, const G4ThreeVector &v, G4double r, std::vector< G4double > &roots) const
 
G4double SolveNumericJT (const G4ThreeVector &p, const G4ThreeVector &v, G4double r, G4bool IsDistanceToIn) const
 
G4ThreeVector ApproxSurfaceNormal (const G4ThreeVector &p) const
 

Private Attributes

G4double fRmin
 
G4double fRmax
 
G4double fRtor
 
G4double fSPhi
 
G4double fDPhi
 
G4double fRminTolerance
 
G4double fRmaxTolerance
 
G4double kRadTolerance
 
G4double kAngTolerance
 
G4double halfCarTolerance
 
G4double halfAngTolerance
 

Additional Inherited Members

- Protected Member Functions inherited from G4CSGSolid
G4double GetRadiusInRing (G4double rmin, G4double rmax) const
 
- Protected Attributes inherited from G4CSGSolid
G4double fCubicVolume = 0.0
 
G4double fSurfaceArea = 0.0
 
G4bool fRebuildPolyhedron = false
 
G4PolyhedronfpPolyhedron = nullptr
 

Detailed Description

Definition at line 91 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 91 of file G4Torus.hh

Member Enumeration Documentation

enum G4Torus::ENorm
private
Enumerator:
kNRMin 
kNRMax 
kNSPhi 
kNEPhi 

Definition at line 191 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 191 of file G4Torus.hh

enum G4Torus::ESide
private
Enumerator:
kNull 
kRMin 
kRMax 
kSPhi 
kEPhi 

Definition at line 188 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 188 of file G4Torus.hh

Constructor & Destructor Documentation

G4Torus::G4Torus ( const G4String pName,
G4double  pRmin,
G4double  pRmax,
G4double  pRtor,
G4double  pSPhi,
G4double  pDPhi 
)

Definition at line 65 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 65 of file G4Torus.cc

References SetAllParameters().

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4Torus::~G4Torus ( )

Definition at line 178 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 178 of file G4Torus.cc

G4Torus::G4Torus ( __void__ &  a)

Definition at line 166 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 166 of file G4Torus.cc

G4Torus::G4Torus ( const G4Torus rhs)

Definition at line 185 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 185 of file G4Torus.cc

Member Function Documentation

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

Definition at line 819 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 819 of file G4Torus.cc

References G4VSolid::DumpInfo(), fDPhi, fRmax, fRmin, fRtor, fSPhi, G4cout, G4endl, G4Exception(), JustWarning, kNEPhi, kNRMax, kNRMin, kNSPhi, norm, phi, pt, twopi, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by SurfaceNormal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4Torus::BoundingLimits ( G4ThreeVector pMin,
G4ThreeVector pMax 
) const
virtual

Reimplemented from G4VSolid.

Definition at line 395 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 395 of file G4Torus.cc

References G4GeomTools::DiskExtent(), G4VSolid::DumpInfo(), dz, G4Exception(), GetCosEndPhi(), GetCosStartPhi(), GetDPhi(), G4VSolid::GetName(), GetRmax(), GetRtor(), GetSinEndPhi(), GetSinStartPhi(), JustWarning, message(), pMax, rmax(), CLHEP::Hep3Vector::set(), twopi, CLHEP::Hep2Vector::x(), CLHEP::Hep3Vector::x(), CLHEP::Hep2Vector::y(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4Torus::CalculateExtent ( const EAxis  pAxis,
const G4VoxelLimits pVoxelLimit,
const G4AffineTransform pTransform,
G4double pmin,
G4double pmax 
) const
virtual
G4VSolid * G4Torus::Clone ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 1565 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 1565 of file G4Torus.cc

References G4Torus().

+ Here is the call graph for this function:

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

Reimplemented from G4VSolid.

Definition at line 226 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 226 of file G4Torus.cc

References G4VPVParameterisation::ComputeDimensions().

+ Here is the call graph for this function:

G4Polyhedron * G4Torus::CreatePolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 1650 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 1650 of file G4Torus.cc

References fDPhi, fRmax, fRmin, fRtor, and fSPhi.

void G4Torus::DescribeYourselfTo ( G4VGraphicsScene scene) const
virtual

Implements G4VSolid.

Definition at line 1645 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 1645 of file G4Torus.cc

References G4VGraphicsScene::AddSolid().

+ Here is the call graph for this function:

G4double G4Torus::DistanceToIn ( const G4ThreeVector p,
const G4ThreeVector v 
) const
virtual

Implements G4VSolid.

Definition at line 926 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 926 of file G4Torus.cc

References kdfinder::abs(), false, fDPhi, fRmax, fRmaxTolerance, fRmin, fRminTolerance, fRtor, fSPhi, halfCarTolerance, kInfinity, max, SolveNumericJT(), true, twopi, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by SurfaceNormal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4Torus::DistanceToIn ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 1104 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 1104 of file G4Torus.cc

References fDPhi, fRmax, fRmin, fRtor, fSPhi, pt, twopi, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

+ Here is the call graph for this function:

G4double G4Torus::DistanceToOut ( const G4ThreeVector p,
const G4ThreeVector v,
const G4bool  calcNorm = false,
G4bool validNorm = nullptr,
G4ThreeVector n = nullptr 
) const
virtual

Implements G4VSolid.

Definition at line 1149 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 1149 of file G4Torus.cc

References G4VSolid::DumpInfo(), false, fDPhi, fRmax, fRmaxTolerance, fRmin, fRminTolerance, fRtor, fSPhi, G4cout, G4endl, G4Exception(), halfAngTolerance, halfCarTolerance, it, JustWarning, G4VSolid::kCarTolerance, kEPhi, kInfinity, kNull, kRMax, kRMin, kSPhi, message(), mm, pi, pt, SolveNumericJT(), true, twopi, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by SurfaceNormal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements G4VSolid.

Definition at line 1491 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 1491 of file G4Torus.cc

References G4VSolid::DumpInfo(), fDPhi, fRmax, fRmin, fRtor, fSPhi, G4cout, G4endl, G4Exception(), Inside(), JustWarning, kOutside, mm, pt, twopi, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

+ Here is the call graph for this function:

G4double G4Torus::GetCosEndPhi ( ) const
inline

Referenced by BoundingLimits(), and CalculateExtent().

+ Here is the caller graph for this function:

G4double G4Torus::GetCosStartPhi ( ) const
inline

Referenced by BoundingLimits(), and CalculateExtent().

+ Here is the caller graph for this function:

G4double G4Torus::GetCubicVolume ( )
inlinevirtual

Reimplemented from G4VSolid.

G4double G4Torus::GetDPhi ( ) const
inline

Referenced by BoundingLimits(), CalculateExtent(), export_G4Torus(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Torus_dimensionsWrite(), PHG4GDMLWriteParamvol::Torus_dimensionsWrite(), PHG4GDMLWriteSolids::TorusWrite(), and G4GDMLWriteSolids::TorusWrite().

+ Here is the caller graph for this function:

G4GeometryType G4Torus::GetEntityType ( ) const
virtual

Implements G4VSolid.

Definition at line 1556 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 1556 of file G4Torus.cc

G4ThreeVector G4Torus::GetPointOnSurface ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 1597 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 1597 of file G4Torus.cc

References fDPhi, fRmax, fRmin, fRtor, fSPhi, G4CSGSolid::GetRadiusInRing(), phi, pi, G4INCL::DeJongSpin::shoot(), theta(), and twopi.

+ Here is the call graph for this function:

G4double G4Torus::GetRmax ( ) const
inline

Referenced by BoundingLimits(), CalculateExtent(), export_G4Torus(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Torus_dimensionsWrite(), PHG4GDMLWriteParamvol::Torus_dimensionsWrite(), PHG4GDMLWriteSolids::TorusWrite(), and G4GDMLWriteSolids::TorusWrite().

+ Here is the caller graph for this function:

G4double G4Torus::GetRmin ( ) const
inline

Referenced by CalculateExtent(), export_G4Torus(), G4tgbGeometryDumper::GetSolidParams(), SolveNumericJT(), G4GDMLWriteParamvol::Torus_dimensionsWrite(), PHG4GDMLWriteParamvol::Torus_dimensionsWrite(), PHG4GDMLWriteSolids::TorusWrite(), and G4GDMLWriteSolids::TorusWrite().

+ Here is the caller graph for this function:

G4double G4Torus::GetRtor ( ) const
inline

Referenced by BoundingLimits(), CalculateExtent(), export_G4Torus(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Torus_dimensionsWrite(), PHG4GDMLWriteParamvol::Torus_dimensionsWrite(), PHG4GDMLWriteSolids::TorusWrite(), and G4GDMLWriteSolids::TorusWrite().

+ Here is the caller graph for this function:

G4double G4Torus::GetSinEndPhi ( ) const
inline

Referenced by BoundingLimits(), and CalculateExtent().

+ Here is the caller graph for this function:

G4double G4Torus::GetSinStartPhi ( ) const
inline

Referenced by BoundingLimits(), and CalculateExtent().

+ Here is the caller graph for this function:

G4double G4Torus::GetSPhi ( ) const
inline

Referenced by export_G4Torus(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Torus_dimensionsWrite(), PHG4GDMLWriteParamvol::Torus_dimensionsWrite(), PHG4GDMLWriteSolids::TorusWrite(), and G4GDMLWriteSolids::TorusWrite().

+ Here is the caller graph for this function:

G4double G4Torus::GetSurfaceArea ( )
inlinevirtual

Reimplemented from G4VSolid.

EInside G4Torus::Inside ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 578 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 578 of file G4Torus.cc

References fDPhi, fRmax, fRmaxTolerance, fRmin, fRminTolerance, fRtor, fSPhi, halfAngTolerance, in, kInside, kOutside, kSurface, pt2, r, twopi, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by DistanceToOut(), and SurfaceNormal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 199 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 199 of file G4Torus.cc

References fDPhi, fRmax, fRmaxTolerance, fRmin, fRminTolerance, fRtor, fSPhi, halfAngTolerance, halfCarTolerance, kAngTolerance, kRadTolerance, and G4CSGSolid::operator=().

+ Here is the call graph for this function:

void G4Torus::SetAllParameters ( G4double  pRmin,
G4double  pRmax,
G4double  pRtor,
G4double  pSPhi,
G4double  pDPhi 
)

Definition at line 81 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 81 of file G4Torus.cc

References e2, e3, FatalException, G4CSGSolid::fCubicVolume, fDPhi, G4CSGSolid::fRebuildPolyhedron, fRmax, fRmaxTolerance, fRmin, fRminTolerance, fRtor, fSPhi, G4CSGSolid::fSurfaceArea, G4endl, G4Exception(), G4GeometryTolerance::GetAngularTolerance(), G4GeometryTolerance::GetInstance(), G4VSolid::GetName(), G4GeometryTolerance::GetRadialTolerance(), halfAngTolerance, halfCarTolerance, kAngTolerance, G4VSolid::kCarTolerance, kRadTolerance, max, message(), and twopi.

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4Torus::SolveNumericJT ( const G4ThreeVector p,
const G4ThreeVector v,
G4double  r,
G4bool  IsDistanceToIn 
) const
private

Definition at line 280 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 280 of file G4Torus.cc

References fDPhi, fRtor, fSPhi, GetRmin(), halfAngTolerance, halfCarTolerance, k, kInfinity, mm, pi, t, theta(), TorusRootsJT(), twopi, v, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by DistanceToIn(), and DistanceToOut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from G4CSGSolid.

Definition at line 1574 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 1574 of file G4Torus.cc

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

+ Here is the call graph for this function:

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

Implements G4VSolid.

Definition at line 689 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 689 of file G4Torus.cc

References ApproxSurfaceNormal(), Acts::Test::delta, DistanceToIn(), DistanceToOut(), e, fDPhi, fRmax, fRmin, fRtor, fSPhi, G4endl, G4Exception(), Inside(), JustWarning, kAngTolerance, G4VSolid::kCarTolerance, kInfinity, kInside, kOutside, kSurface, max, norm, pt, twopi, CLHEP::Hep3Vector::unit(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

+ Here is the call graph for this function:

void G4Torus::TorusRootsJT ( const G4ThreeVector p,
const G4ThreeVector v,
G4double  r,
std::vector< G4double > &  roots 
) const
private

Definition at line 240 of file G4Torus.cc.

View newest version in sPHENIX GitHub at line 240 of file G4Torus.cc

References c, d, G4JTPolynomialSolver::FindRoots(), fRtor, num, r, r2, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by SolveNumericJT().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

G4double G4Torus::fDPhi
private
G4double G4Torus::fRmax
private

Definition at line 185 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 185 of file G4Torus.hh

Referenced by ApproxSurfaceNormal(), CreatePolyhedron(), DistanceToIn(), DistanceToOut(), GetPointOnSurface(), Inside(), operator=(), SetAllParameters(), StreamInfo(), and SurfaceNormal().

G4double G4Torus::fRmaxTolerance
private

Definition at line 193 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 193 of file G4Torus.hh

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

G4double G4Torus::fRmin
private

Definition at line 185 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 185 of file G4Torus.hh

Referenced by ApproxSurfaceNormal(), CreatePolyhedron(), DistanceToIn(), DistanceToOut(), GetPointOnSurface(), Inside(), operator=(), SetAllParameters(), StreamInfo(), and SurfaceNormal().

G4double G4Torus::fRminTolerance
private

Definition at line 193 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 193 of file G4Torus.hh

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

G4double G4Torus::fRtor
private
G4double G4Torus::fSPhi
private
G4double G4Torus::halfAngTolerance
private

Definition at line 196 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 196 of file G4Torus.hh

Referenced by DistanceToOut(), Inside(), operator=(), SetAllParameters(), and SolveNumericJT().

G4double G4Torus::halfCarTolerance
private

Definition at line 196 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 196 of file G4Torus.hh

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

G4double G4Torus::kAngTolerance
private

Definition at line 193 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 193 of file G4Torus.hh

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

G4double G4Torus::kRadTolerance
private

Definition at line 193 of file G4Torus.hh.

View newest version in sPHENIX GitHub at line 193 of file G4Torus.hh

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


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