#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 G4Polyhedron * | GetPolyhedron () const |
G4CSGSolid (__void__ &) | |
G4CSGSolid (const G4CSGSolid &rhs) | |
G4CSGSolid & | operator= (const G4CSGSolid &rhs) |
Protected Member Functions | |
G4double | GetRadiusInRing (G4double rmin, G4double rmax) const |
Protected Attributes | |
G4double | fCubicVolume |
G4double | fSurfaceArea |
G4Polyhedron * | fpPolyhedron |
Definition at line 49 of file G4CSGSolid.hh.
G4CSGSolid::G4CSGSolid | ( | const G4String & | pName | ) |
Definition at line 42 of file G4CSGSolid.cc.
00042 : 00043 G4VSolid(name), fCubicVolume(0.), fSurfaceArea(0.), fpPolyhedron(0) 00044 { 00045 }
G4CSGSolid::~G4CSGSolid | ( | ) | [virtual] |
Definition at line 62 of file G4CSGSolid.cc.
References fpPolyhedron.
00063 { 00064 delete fpPolyhedron; 00065 }
G4CSGSolid::G4CSGSolid | ( | __void__ & | ) |
Definition at line 52 of file G4CSGSolid.cc.
00053 : G4VSolid(a), fCubicVolume(0.), fSurfaceArea(0.), fpPolyhedron(0) 00054 { 00055 }
G4CSGSolid::G4CSGSolid | ( | const G4CSGSolid & | rhs | ) |
Definition at line 72 of file G4CSGSolid.cc.
00073 : G4VSolid(rhs), fCubicVolume(rhs.fCubicVolume), 00074 fSurfaceArea(rhs.fSurfaceArea), fpPolyhedron(0) 00075 { 00076 }
G4Polyhedron * G4CSGSolid::GetPolyhedron | ( | ) | const [virtual] |
Reimplemented from G4VSolid.
Definition at line 124 of file G4CSGSolid.cc.
References G4VSolid::CreatePolyhedron(), fpPolyhedron, and G4Polyhedron::GetNumberOfRotationStepsAtTimeOfCreation().
00125 { 00126 if (!fpPolyhedron || 00127 fpPolyhedron->GetNumberOfRotationStepsAtTimeOfCreation() != 00128 fpPolyhedron->GetNumberOfRotationSteps()) 00129 { 00130 delete fpPolyhedron; 00131 fpPolyhedron = CreatePolyhedron(); 00132 } 00133 return fpPolyhedron; 00134 }
Definition at line 101 of file G4CSGSolid.cc.
References G4UniformRand, and sqr().
Referenced by G4Tubs::GetPointOnSurface(), G4Torus::GetPointOnSurface(), G4Sphere::GetPointOnSurface(), G4CutTubs::GetPointOnSurface(), and G4Cons::GetPointOnSurface().
00102 { 00103 // Generate radius in annular ring according to uniform area 00104 // 00105 if (rmin<=0.) { return rmax*std::sqrt(G4UniformRand()); } 00106 if (rmin!=rmax) { return std::sqrt(G4UniformRand() 00107 * (sqr(rmax)-sqr(rmin))+sqr(rmin)); } 00108 return rmin; 00109 }
G4CSGSolid & G4CSGSolid::operator= | ( | const G4CSGSolid & | rhs | ) |
Definition at line 82 of file G4CSGSolid.cc.
References fCubicVolume, fpPolyhedron, fSurfaceArea, and G4VSolid::operator=().
Referenced by G4Tubs::operator=(), G4Trd::operator=(), G4Trap::operator=(), G4Torus::operator=(), G4Sphere::operator=(), G4Para::operator=(), G4Orb::operator=(), G4Cons::operator=(), and G4Box::operator=().
00083 { 00084 // Check assignment to self 00085 // 00086 if (this == &rhs) { return *this; } 00087 00088 // Copy base class data 00089 // 00090 G4VSolid::operator=(rhs); 00091 00092 // Copy data 00093 // 00094 fCubicVolume = rhs.fCubicVolume; 00095 fSurfaceArea = rhs.fSurfaceArea; 00096 fpPolyhedron = 0; 00097 00098 return *this; 00099 }
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.
References G4VSolid::GetEntityType(), and G4VSolid::GetName().
00112 { 00113 os << "-----------------------------------------------------------\n" 00114 << " *** Dump for solid - " << GetName() << " ***\n" 00115 << " ===================================================\n" 00116 << " Solid type: " << GetEntityType() << "\n" 00117 << " Parameters: \n" 00118 << " NOT available !\n" 00119 << "-----------------------------------------------------------\n"; 00120 00121 return os; 00122 }
G4double G4CSGSolid::fCubicVolume [protected] |
Definition at line 78 of file G4CSGSolid.hh.
Referenced by G4Trd::CheckAndSetAllParameters(), G4Para::G4Para(), G4Tubs::GetCubicVolume(), G4Trd::GetCubicVolume(), G4Trap::GetCubicVolume(), G4Torus::GetCubicVolume(), G4Sphere::GetCubicVolume(), G4Para::GetCubicVolume(), G4Orb::GetCubicVolume(), G4Cons::GetCubicVolume(), G4Box::GetCubicVolume(), G4Tubs::Initialize(), operator=(), G4Trap::SetAllParameters(), G4Torus::SetAllParameters(), G4Para::SetAllParameters(), G4Para::SetAlpha(), G4Orb::SetRadius(), G4Para::SetTanAlpha(), G4Para::SetThetaAndPhi(), G4Para::SetXHalfLength(), G4Box::SetXHalfLength(), G4Trd::SetXHalfLength1(), G4Trd::SetXHalfLength2(), G4Para::SetYHalfLength(), G4Box::SetYHalfLength(), G4Trd::SetYHalfLength1(), G4Trd::SetYHalfLength2(), G4Trd::SetZHalfLength(), G4Para::SetZHalfLength(), and G4Box::SetZHalfLength().
G4Polyhedron* G4CSGSolid::fpPolyhedron [mutable, protected] |
Definition at line 80 of file G4CSGSolid.hh.
Referenced by G4Trd::CheckAndSetAllParameters(), G4Para::G4Para(), GetPolyhedron(), G4Tubs::Initialize(), operator=(), G4Trap::SetAllParameters(), G4Torus::SetAllParameters(), G4Para::SetAllParameters(), G4Para::SetAlpha(), G4Orb::SetRadius(), G4Para::SetTanAlpha(), G4Para::SetThetaAndPhi(), G4Para::SetXHalfLength(), G4Box::SetXHalfLength(), G4Trd::SetXHalfLength1(), G4Trd::SetXHalfLength2(), G4Para::SetYHalfLength(), G4Box::SetYHalfLength(), G4Trd::SetYHalfLength1(), G4Trd::SetYHalfLength2(), G4Trd::SetZHalfLength(), G4Para::SetZHalfLength(), G4Box::SetZHalfLength(), and ~G4CSGSolid().
G4double G4CSGSolid::fSurfaceArea [protected] |
Definition at line 79 of file G4CSGSolid.hh.
Referenced by G4Trd::CheckAndSetAllParameters(), G4Para::G4Para(), G4Tubs::GetSurfaceArea(), G4Trd::GetSurfaceArea(), G4Trap::GetSurfaceArea(), G4Torus::GetSurfaceArea(), G4Sphere::GetSurfaceArea(), G4Para::GetSurfaceArea(), G4Orb::GetSurfaceArea(), G4Cons::GetSurfaceArea(), G4Box::GetSurfaceArea(), G4Tubs::Initialize(), operator=(), G4Trap::SetAllParameters(), G4Torus::SetAllParameters(), G4Para::SetAllParameters(), G4Para::SetAlpha(), G4Orb::SetRadius(), G4Para::SetTanAlpha(), G4Para::SetThetaAndPhi(), G4Para::SetXHalfLength(), G4Box::SetXHalfLength(), G4Trd::SetXHalfLength1(), G4Trd::SetXHalfLength2(), G4Para::SetYHalfLength(), G4Box::SetYHalfLength(), G4Trd::SetYHalfLength1(), G4Trd::SetYHalfLength2(), G4Trd::SetZHalfLength(), G4Para::SetZHalfLength(), and G4Box::SetZHalfLength().