Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4CSGSolid Class Reference

#include <G4CSGSolid.hh>

+ Inheritance diagram for G4CSGSolid:

Public Member Functions

 G4CSGSolid (const G4String &pName)
 
virtual ~G4CSGSolid ()
 
virtual std::ostream & StreamInfo (std::ostream &os) const
 
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
 
virtual G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
 
virtual EInside Inside (const G4ThreeVector &p) const =0
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p) const =0
 
virtual void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
virtual G4double GetCubicVolume ()
 
virtual G4double GetSurfaceArea ()
 
virtual G4GeometryType GetEntityType () const =0
 
virtual G4ThreeVector GetPointOnSurface () const
 
virtual G4VSolidClone () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const =0
 
void DumpInfo () const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const =0
 
virtual G4VisExtent GetExtent () const
 
virtual G4PolyhedronCreatePolyhedron () const
 
virtual G4NURBSCreateNURBS () const
 
virtual G4PolyhedronGetPolyhedron () 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)
 

Protected Member Functions

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

G4double fCubicVolume
 
G4double fSurfaceArea
 
G4PolyhedronfpPolyhedron
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 

Detailed Description

Definition at line 49 of file G4CSGSolid.hh.

Constructor & Destructor Documentation

◆ G4CSGSolid() [1/3]

G4CSGSolid::G4CSGSolid ( const G4String pName)

Definition at line 42 of file G4CSGSolid.cc.

42 :
44{
45}
G4Polyhedron * fpPolyhedron
Definition: G4CSGSolid.hh:80
G4double fSurfaceArea
Definition: G4CSGSolid.hh:79
G4double fCubicVolume
Definition: G4CSGSolid.hh:78

◆ ~G4CSGSolid()

G4CSGSolid::~G4CSGSolid ( )
virtual

Definition at line 62 of file G4CSGSolid.cc.

63{
64 delete fpPolyhedron;
65}

◆ G4CSGSolid() [2/3]

G4CSGSolid::G4CSGSolid ( __void__ &  a)

Definition at line 52 of file G4CSGSolid.cc.

54{
55}

◆ G4CSGSolid() [3/3]

G4CSGSolid::G4CSGSolid ( const G4CSGSolid rhs)

Definition at line 72 of file G4CSGSolid.cc.

Member Function Documentation

◆ GetPolyhedron()

G4Polyhedron * G4CSGSolid::GetPolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 124 of file G4CSGSolid.cc.

125{
126 if (!fpPolyhedron ||
129 {
130 delete fpPolyhedron;
132 }
133 return fpPolyhedron;
134}
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
virtual G4Polyhedron * CreatePolyhedron() const
Definition: G4VSolid.cc:637
static G4int GetNumberOfRotationSteps()

◆ GetRadiusInRing()

G4double G4CSGSolid::GetRadiusInRing ( G4double  rmin,
G4double  rmax 
) const
protected

Definition at line 101 of file G4CSGSolid.cc.

102{
103 // Generate radius in annular ring according to uniform area
104 //
105 if (rmin<=0.) { return rmax*std::sqrt(G4UniformRand()); }
106 if (rmin!=rmax) { return std::sqrt(G4UniformRand()
107 * (sqr(rmax)-sqr(rmin))+sqr(rmin)); }
108 return rmin;
109}
#define G4UniformRand()
Definition: Randomize.hh:53
T sqr(const T &x)
Definition: templates.hh:145

Referenced by G4Cons::GetPointOnSurface(), G4CutTubs::GetPointOnSurface(), G4Sphere::GetPointOnSurface(), G4Torus::GetPointOnSurface(), and G4Tubs::GetPointOnSurface().

◆ operator=()

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

Definition at line 82 of file G4CSGSolid.cc.

83{
84 // Check assignment to self
85 //
86 if (this == &rhs) { return *this; }
87
88 // Copy base class data
89 //
91
92 // Copy data
93 //
96 fpPolyhedron = 0;
97
98 return *this;
99}
G4VSolid & operator=(const G4VSolid &rhs)
Definition: G4VSolid.cc:110

Referenced by G4Box::operator=(), G4Cons::operator=(), G4Orb::operator=(), G4Para::operator=(), G4Sphere::operator=(), G4Torus::operator=(), G4Trap::operator=(), G4Trd::operator=(), and G4Tubs::operator=().

◆ StreamInfo()

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

Implements G4VSolid.

Reimplemented in G4Box, G4Cons, G4CutTubs, G4Orb, G4Para, G4Sphere, G4Torus, G4Trap, G4Trd, and G4Tubs.

Definition at line 111 of file G4CSGSolid.cc.

112{
113 os << "-----------------------------------------------------------\n"
114 << " *** Dump for solid - " << GetName() << " ***\n"
115 << " ===================================================\n"
116 << " Solid type: " << GetEntityType() << "\n"
117 << " Parameters: \n"
118 << " NOT available !\n"
119 << "-----------------------------------------------------------\n";
120
121 return os;
122}
G4String GetName() const
virtual G4GeometryType GetEntityType() const =0

Member Data Documentation

◆ fCubicVolume

◆ fpPolyhedron

◆ fSurfaceArea


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