Geant4-11
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | Friends
G4GeometryTolerance Class Reference

#include <G4GeometryTolerance.hh>

Public Member Functions

G4double GetAngularTolerance () const
 
G4double GetRadialTolerance () const
 
G4double GetSurfaceTolerance () const
 
 ~G4GeometryTolerance ()
 

Static Public Member Functions

static G4GeometryToleranceGetInstance ()
 

Protected Member Functions

 G4GeometryTolerance ()
 
void SetSurfaceTolerance (G4double worldExtent)
 

Private Attributes

G4double fAngTolerance
 
G4double fCarTolerance
 
G4bool fInitialised = false
 
G4double fRadTolerance
 

Static Private Attributes

static G4ThreadLocal G4GeometryTolerancefpInstance = nullptr
 

Friends

class G4GeometryManager
 

Detailed Description

Definition at line 51 of file G4GeometryTolerance.hh.

Constructor & Destructor Documentation

◆ ~G4GeometryTolerance()

G4GeometryTolerance::~G4GeometryTolerance ( )

Definition at line 57 of file G4GeometryTolerance.cc.

57{}

◆ G4GeometryTolerance()

G4GeometryTolerance::G4GeometryTolerance ( )
protected

Definition at line 46 of file G4GeometryTolerance.cc.

47{
48 fCarTolerance = 1E-9 * mm;
49 fAngTolerance = 1E-9 * rad;
50 fRadTolerance = 1E-9 * mm;
51}
static constexpr double rad
Definition: G4SIunits.hh:129
static constexpr double mm
Definition: G4SIunits.hh:95

References fAngTolerance, fCarTolerance, fRadTolerance, mm, and rad.

Referenced by GetInstance().

Member Function Documentation

◆ GetAngularTolerance()

G4double G4GeometryTolerance::GetAngularTolerance ( ) const

◆ GetInstance()

G4GeometryTolerance * G4GeometryTolerance::GetInstance ( )
static

Definition at line 64 of file G4GeometryTolerance.cc.

65{
66 if(fpInstance == nullptr)
67 {
70 }
71 return fpInstance;
72}
static G4ThreadLocal G4GeometryTolerance * fpInstance
void Register(T *inst)
Definition: G4AutoDelete.hh:65

References fpInstance, G4GeometryTolerance(), and G4AutoDelete::Register().

Referenced by G4ExtrudedSolid::AddGeneralPolygonFacets(), G4NavigationLogger::AlongComputeStepLog(), G4VTwistSurface::AmIOnLeftSide(), G4tgbGeometryDumper::approxTo0(), G4tgbVolume::BuildSolidForDivision(), G4GeomTools::CheckSnip(), G4VParameterisationPolyhedra::ConvertRadiusFactor(), G4GPSModel::DescribeYourselfTo(), G4GeomTools::DiskExtent(), G4TwistTubsHypeSide::DistanceToSurface(), G4tgbVolume::FindOrConstructG4Solid(), G4ArrowModel::G4ArrowModel(), G4ClippablePolygon::G4ClippablePolygon(), G4Cons::G4Cons(), G4CutTubs::G4CutTubs(), G4EnclosingCylinder::G4EnclosingCylinder(), G4IntersectingCone::G4IntersectingCone(), G4ITNavigator1::G4ITNavigator1(), G4ITNavigator2::G4ITNavigator2(), G4ITPathFinder::G4ITPathFinder(), G4MicroElecSurface::G4MicroElecSurface(), G4MultiUnion::G4MultiUnion(), G4Navigator::G4Navigator(), G4OpBoundaryProcess::G4OpBoundaryProcess(), G4PathFinder::G4PathFinder(), G4PhantomParameterisation::G4PhantomParameterisation(), G4PolyconeSide::G4PolyconeSide(), G4PolyhedraSide::G4PolyhedraSide(), G4PolyPhiFace::G4PolyPhiFace(), G4PropagatorInField::G4PropagatorInField(), G4ReflectionFactory::G4ReflectionFactory(), G4RegularNavigation::G4RegularNavigation(), G4ReplicaNavigation::G4ReplicaNavigation(), G4Sphere::G4Sphere(), G4SteppingManager::G4SteppingManager(), G4Tubs::G4Tubs(), G4UCNBoundaryProcess::G4UCNBoundaryProcess(), G4VDivisionParameterisation::G4VDivisionParameterisation(), G4VFacet::G4VFacet(), G4VIntersectionLocator::G4VIntersectionLocator(), G4Voxelizer::G4Voxelizer(), G4VoxelNavigation::G4VoxelNavigation(), G4VoxelSafety::G4VoxelSafety(), G4VSolid::G4VSolid(), G4VTrackTerminator::G4VTrackTerminator(), G4VTwistedFaceted::G4VTwistedFaceted(), G4VTwistSurface::G4VTwistSurface(), G4TwistTubsFlatSide::GetAreaCode(), G4SolidExtentList::GetExtent(), G4tgrUtils::GetRotationFromDirection(), G4ErrorCylSurfaceTarget::GetTangentPlane(), G4ITStepProcessor::Initialize(), G4TwistTubsHypeSide::Inside(), G4UnionSolid::Inside(), G4TwistedTubs::Inside(), G4GeomTools::IsConvex(), G4PSFlatSurfaceCurrent::IsSelectedSurface(), G4PSFlatSurfaceFlux::IsSelectedSurface(), G4PSSphereSurfaceCurrent::IsSelectedSurface(), G4PSSphereSurfaceFlux::IsSelectedSurface(), G4PSCylinderSurfaceCurrent::IsSelectedSurface(), G4PSCylinderSurfaceFlux::IsSelectedSurface(), G4ForwardXrayTR::PostStepDoIt(), G4ErrorFreeTrajState::PropagateError(), G4PathFinder::ReLocate(), G4ITPathFinder::ReLocate(), G4AuxiliaryNavServices::ReportTolerances(), G4Torus::SetAllParameters(), G4ErrorSurfaceTrajParam::SetParameters(), G4GeometryManager::SetWorldMaximumExtent(), G4GeomTools::SphereExtent(), G4MagInt_Driver::WarnEndPointTooFar(), and G4OldMagIntDriver::WarnEndPointTooFar().

◆ GetRadialTolerance()

G4double G4GeometryTolerance::GetRadialTolerance ( ) const

◆ GetSurfaceTolerance()

G4double G4GeometryTolerance::GetSurfaceTolerance ( ) const

Definition at line 78 of file G4GeometryTolerance.cc.

79{
80 return fCarTolerance;
81}

References fCarTolerance.

Referenced by G4tgbGeometryDumper::approxTo0(), G4tgbVolume::BuildSolidForDivision(), G4GeomTools::CheckSnip(), G4GPSModel::DescribeYourselfTo(), G4GeomTools::DiskExtent(), G4ClippablePolygon::G4ClippablePolygon(), G4EnclosingCylinder::G4EnclosingCylinder(), G4IntersectingCone::G4IntersectingCone(), G4ITNavigator1::G4ITNavigator1(), G4ITNavigator2::G4ITNavigator2(), G4ITPathFinder::G4ITPathFinder(), G4MicroElecSurface::G4MicroElecSurface(), G4Navigator::G4Navigator(), G4OpBoundaryProcess::G4OpBoundaryProcess(), G4PathFinder::G4PathFinder(), G4PhantomParameterisation::G4PhantomParameterisation(), G4PolyconeSide::G4PolyconeSide(), G4PolyhedraSide::G4PolyhedraSide(), G4PolyPhiFace::G4PolyPhiFace(), G4PropagatorInField::G4PropagatorInField(), G4ReflectionFactory::G4ReflectionFactory(), G4RegularNavigation::G4RegularNavigation(), G4ReplicaNavigation::G4ReplicaNavigation(), G4SteppingManager::G4SteppingManager(), G4UCNBoundaryProcess::G4UCNBoundaryProcess(), G4VDivisionParameterisation::G4VDivisionParameterisation(), G4VFacet::G4VFacet(), G4VIntersectionLocator::G4VIntersectionLocator(), G4Voxelizer::G4Voxelizer(), G4VoxelNavigation::G4VoxelNavigation(), G4VoxelSafety::G4VoxelSafety(), G4VSolid::G4VSolid(), G4VTrackTerminator::G4VTrackTerminator(), G4VTwistSurface::G4VTwistSurface(), G4SolidExtentList::GetExtent(), G4tgrUtils::GetRotationFromDirection(), G4ErrorCylSurfaceTarget::GetTangentPlane(), G4ITStepProcessor::Initialize(), G4GeomTools::IsConvex(), G4PSFlatSurfaceCurrent::IsSelectedSurface(), G4PSFlatSurfaceFlux::IsSelectedSurface(), G4PSSphereSurfaceCurrent::IsSelectedSurface(), G4PSSphereSurfaceFlux::IsSelectedSurface(), G4PSCylinderSurfaceCurrent::IsSelectedSurface(), G4PSCylinderSurfaceFlux::IsSelectedSurface(), G4ForwardXrayTR::PostStepDoIt(), G4ErrorFreeTrajState::PropagateError(), G4AuxiliaryNavServices::ReportTolerances(), G4ErrorSurfaceTrajParam::SetParameters(), G4GeomTools::SphereExtent(), G4MagInt_Driver::WarnEndPointTooFar(), and G4OldMagIntDriver::WarnEndPointTooFar().

◆ SetSurfaceTolerance()

void G4GeometryTolerance::SetSurfaceTolerance ( G4double  worldExtent)
protected

Definition at line 98 of file G4GeometryTolerance.cc.

99{
100 if(!fInitialised)
101 {
102 fCarTolerance = fRadTolerance = worldExtent * 1E-11;
103 fInitialised = true;
104 }
105 else
106 {
107 G4cout << "WARNING - G4GeometryTolerance::SetSurfaceTolerance()" << G4endl
108 << " Tolerance can only be set once. Currently set to: "
109 << fCarTolerance / mm << " mm." << G4endl;
110 G4Exception("G4GeometryTolerance::SetSurfaceTolerance()", "NotApplicable",
111 JustWarning, "The tolerance has been already set!");
112 }
113}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

References fCarTolerance, fInitialised, fRadTolerance, G4cout, G4endl, G4Exception(), JustWarning, and mm.

Referenced by G4GeometryManager::SetWorldMaximumExtent().

Friends And Related Function Documentation

◆ G4GeometryManager

friend class G4GeometryManager
friend

Definition at line 53 of file G4GeometryTolerance.hh.

Field Documentation

◆ fAngTolerance

G4double G4GeometryTolerance::fAngTolerance
private

Definition at line 83 of file G4GeometryTolerance.hh.

Referenced by G4GeometryTolerance(), and GetAngularTolerance().

◆ fCarTolerance

G4double G4GeometryTolerance::fCarTolerance
private

◆ fInitialised

G4bool G4GeometryTolerance::fInitialised = false
private

Definition at line 85 of file G4GeometryTolerance.hh.

Referenced by SetSurfaceTolerance().

◆ fpInstance

G4ThreadLocal G4GeometryTolerance * G4GeometryTolerance::fpInstance = nullptr
staticprivate

Definition at line 81 of file G4GeometryTolerance.hh.

Referenced by GetInstance().

◆ fRadTolerance

G4double G4GeometryTolerance::fRadTolerance
private

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