Geant4  10.00.p02
G4Trap Class Reference

#include <G4Trap.hh>

+ Inheritance diagram for G4Trap:
+ Collaboration diagram for G4Trap:

Public Member Functions

 G4Trap (const G4String &pName, G4double pDz, G4double pTheta, G4double pPhi, G4double pDy1, G4double pDx1, G4double pDx2, G4double pAlp1, G4double pDy2, G4double pDx3, G4double pDx4, G4double pAlp2)
 
 G4Trap (const G4String &pName, const G4ThreeVector pt[8])
 
 G4Trap (const G4String &pName, G4double pZ, G4double pY, G4double pX, G4double pLTX)
 
 G4Trap (const G4String &pName, G4double pDx1, G4double pDx2, G4double pDy1, G4double pDy2, G4double pDz)
 
 G4Trap (const G4String &pName, G4double pDx, G4double pDy, G4double pDz, G4double pAlpha, G4double pTheta, G4double pPhi)
 
 G4Trap (const G4String &pName)
 
virtual ~G4Trap ()
 
G4double GetZHalfLength () const
 
G4double GetYHalfLength1 () const
 
G4double GetXHalfLength1 () const
 
G4double GetXHalfLength2 () const
 
G4double GetTanAlpha1 () const
 
G4double GetYHalfLength2 () const
 
G4double GetXHalfLength3 () const
 
G4double GetXHalfLength4 () const
 
G4double GetTanAlpha2 () const
 
TrapSidePlane GetSidePlane (G4int n) const
 
G4ThreeVector GetSymAxis () const
 
void SetAllParameters (G4double pDz, G4double pTheta, G4double pPhi, G4double pDy1, G4double pDx1, G4double pDx2, G4double pAlp1, G4double pDy2, G4double pDx3, G4double pDx4, G4double pAlp2)
 
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=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
 
void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
G4PolyhedronCreatePolyhedron () const
 
 G4Trap (__void__ &)
 
 G4Trap (const G4Trap &rhs)
 
G4Trapoperator= (const G4Trap &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)
 

Protected Member Functions

G4bool MakePlanes ()
 
G4bool MakePlane (const G4ThreeVector &p1, const G4ThreeVector &p2, const G4ThreeVector &p3, const G4ThreeVector &p4, TrapSidePlane &plane)
 
G4ThreeVectorListCreateRotatedVertices (const G4AffineTransform &pTransform) const
 
- 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
 

Private Member Functions

G4ThreeVector ApproxSurfaceNormal (const G4ThreeVector &p) const
 
G4double GetFaceArea (const G4ThreeVector &p1, const G4ThreeVector &p2, const G4ThreeVector &p3, const G4ThreeVector &p4)
 
G4ThreeVector GetPointOnPlane (G4ThreeVector p0, G4ThreeVector p1, G4ThreeVector p2, G4ThreeVector p3, G4double &area) const
 

Private Attributes

G4double fDz
 
G4double fTthetaCphi
 
G4double fTthetaSphi
 
G4double fDy1
 
G4double fDx1
 
G4double fDx2
 
G4double fTalpha1
 
G4double fDy2
 
G4double fDx3
 
G4double fDx4
 
G4double fTalpha2
 
TrapSidePlane fPlanes [4]
 

Additional Inherited Members

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

Detailed Description

Definition at line 107 of file G4Trap.hh.

Constructor & Destructor Documentation

G4Trap::G4Trap ( const G4String pName,
G4double  pDz,
G4double  pTheta,
G4double  pPhi,
G4double  pDy1,
G4double  pDx1,
G4double  pDx2,
G4double  pAlp1,
G4double  pDy2,
G4double  pDx3,
G4double  pDx4,
G4double  pAlp2 
)

Definition at line 82 of file G4Trap.cc.

References FatalException, fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, G4endl, G4Exception(), G4VSolid::GetName(), and MakePlanes().

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4Trap::G4Trap ( const G4String pName,
const G4ThreeVector  pt[8] 
)

Definition at line 127 of file G4Trap.cc.

References G4VSolid::DumpInfo(), FatalException, fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fPlanes, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, G4Exception(), G4VSolid::GetName(), G4VSolid::kCarTolerance, MakePlane(), and z.

+ Here is the call graph for this function:

G4Trap::G4Trap ( const G4String pName,
G4double  pZ,
G4double  pY,
G4double  pX,
G4double  pLTX 
)

Definition at line 220 of file G4Trap.cc.

References FatalException, fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fPlanes, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, G4Exception(), G4VSolid::GetName(), and MakePlane().

+ Here is the call graph for this function:

G4Trap::G4Trap ( const G4String pName,
G4double  pDx1,
G4double  pDx2,
G4double  pDy1,
G4double  pDy2,
G4double  pDz 
)

Definition at line 318 of file G4Trap.cc.

References FatalException, fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fPlanes, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, G4Exception(), G4VSolid::GetName(), and MakePlane().

+ Here is the call graph for this function:

G4Trap::G4Trap ( const G4String pName,
G4double  pDx,
G4double  pDy,
G4double  pDz,
G4double  pAlpha,
G4double  pTheta,
G4double  pPhi 
)

Definition at line 416 of file G4Trap.cc.

References FatalException, fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fPlanes, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, G4Exception(), G4VSolid::GetName(), and MakePlane().

+ Here is the call graph for this function:

G4Trap::G4Trap ( const G4String pName)

Definition at line 517 of file G4Trap.cc.

References MakePlanes().

+ Here is the call graph for this function:

G4Trap::~G4Trap ( )
virtual

Definition at line 542 of file G4Trap.cc.

G4Trap::G4Trap ( __void__ &  a)

Definition at line 530 of file G4Trap.cc.

References MakePlanes().

+ Here is the call graph for this function:

G4Trap::G4Trap ( const G4Trap rhs)

Definition at line 550 of file G4Trap.cc.

References TrapSidePlane::a, TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, fPlanes, G4CSGSolid::fpPolyhedron, and G4CSGSolid::GetPolyhedron().

+ Here is the call graph for this function:

Member Function Documentation

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

Definition at line 1229 of file G4Trap.cc.

References a, TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, fDz, fPlanes, and kInfinity.

Referenced by SurfaceNormal().

+ Here is the caller graph for this function:

G4bool G4Trap::CalculateExtent ( const EAxis  pAxis,
const G4VoxelLimits pVoxelLimit,
const G4AffineTransform pTransform,
G4double pMin,
G4double pMax 
) const
virtual
G4VSolid * G4Trap::Clone ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 1808 of file G4Trap.cc.

References G4Trap().

+ Here is the call graph for this function:

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

Reimplemented from G4VSolid.

Definition at line 804 of file G4Trap.cc.

References G4VPVParameterisation::ComputeDimensions().

+ Here is the call graph for this function:

G4Polyhedron * G4Trap::CreatePolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 1960 of file G4Trap.cc.

References fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fTalpha1, fTalpha2, fTthetaCphi, and fTthetaSphi.

G4ThreeVectorList * G4Trap::CreateRotatedVertices ( const G4AffineTransform pTransform) const
protected

Definition at line 1752 of file G4Trap.cc.

References G4VSolid::DumpInfo(), FatalException, fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, G4Exception(), and G4AffineTransform::TransformPoint().

Referenced by CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4Trap::DescribeYourselfTo ( G4VGraphicsScene scene) const
virtual

Implements G4VSolid.

Definition at line 1955 of file G4Trap.cc.

References G4VGraphicsScene::AddSolid().

+ Here is the call graph for this function:

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

Implements G4VSolid.

Definition at line 1270 of file G4Trap.cc.

References TrapSidePlane::a, TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, fDz, fPlanes, G4VSolid::kCarTolerance, kInfinity, G4INCL::Math::max(), and smax.

+ Here is the call graph for this function:

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

Implements G4VSolid.

Definition at line 1392 of file G4Trap.cc.

References TrapSidePlane::a, TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, fDz, and fPlanes.

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

Implements G4VSolid.

Definition at line 1412 of file G4Trap.cc.

References a, TrapSidePlane::a, TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, G4VSolid::DumpInfo(), fDz, fPlanes, G4cout, G4endl, G4Exception(), JustWarning, G4VSolid::kCarTolerance, kInfinity, kMZ, kPZ, ks0, ks1, ks2, ks3, kUndef, G4INCL::Math::max(), and mm.

+ Here is the call graph for this function:

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

Implements G4VSolid.

Definition at line 1706 of file G4Trap.cc.

References TrapSidePlane::a, TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, G4VSolid::DumpInfo(), fDz, fPlanes, G4cout, G4endl, G4Exception(), Inside(), JustWarning, kOutside, and mm.

+ Here is the call graph for this function:

G4double G4Trap::GetCubicVolume ( )
inlinevirtual

Reimplemented from G4VSolid.

G4GeometryType G4Trap::GetEntityType ( ) const
virtual

Implements G4VSolid.

Definition at line 1799 of file G4Trap.cc.

G4double G4Trap::GetFaceArea ( const G4ThreeVector p1,
const G4ThreeVector p2,
const G4ThreeVector p3,
const G4ThreeVector p4 
)
inlineprivate
G4ThreeVector G4Trap::GetPointOnPlane ( G4ThreeVector  p0,
G4ThreeVector  p1,
G4ThreeVector  p2,
G4ThreeVector  p3,
G4double area 
) const
private

Definition at line 1857 of file G4Trap.cc.

References CLHEP::normal(), and G4INCL::DeJongSpin::shoot().

Referenced by GetPointOnSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ThreeVector G4Trap::GetPointOnSurface ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 1904 of file G4Trap.cc.

References fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, GetPointOnPlane(), and G4INCL::DeJongSpin::shoot().

+ Here is the call graph for this function:

TrapSidePlane G4Trap::GetSidePlane ( G4int  n) const
inline

Referenced by export_G4Trap().

+ Here is the caller graph for this function:

G4double G4Trap::GetSurfaceArea ( )
inlinevirtual

Reimplemented from G4VSolid.

G4ThreeVector G4Trap::GetSymAxis ( ) const
inline

Referenced by export_G4Trap(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), and G4GDMLWriteSolids::TrapWrite().

+ Here is the caller graph for this function:

G4double G4Trap::GetTanAlpha1 ( ) const
inline

Referenced by export_G4Trap(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), and G4GDMLWriteSolids::TrapWrite().

+ Here is the caller graph for this function:

G4double G4Trap::GetTanAlpha2 ( ) const
inline

Referenced by export_G4Trap(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), and G4GDMLWriteSolids::TrapWrite().

+ Here is the caller graph for this function:

G4double G4Trap::GetXHalfLength1 ( ) const
inline

Referenced by export_G4Trap(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), and G4GDMLWriteSolids::TrapWrite().

+ Here is the caller graph for this function:

G4double G4Trap::GetXHalfLength2 ( ) const
inline

Referenced by export_G4Trap(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), and G4GDMLWriteSolids::TrapWrite().

+ Here is the caller graph for this function:

G4double G4Trap::GetXHalfLength3 ( ) const
inline

Referenced by export_G4Trap(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), and G4GDMLWriteSolids::TrapWrite().

+ Here is the caller graph for this function:

G4double G4Trap::GetXHalfLength4 ( ) const
inline

Referenced by export_G4Trap(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), and G4GDMLWriteSolids::TrapWrite().

+ Here is the caller graph for this function:

G4double G4Trap::GetYHalfLength1 ( ) const
inline

Referenced by export_G4Trap(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), and G4GDMLWriteSolids::TrapWrite().

+ Here is the caller graph for this function:

G4double G4Trap::GetYHalfLength2 ( ) const
inline

Referenced by export_G4Trap(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), and G4GDMLWriteSolids::TrapWrite().

+ Here is the caller graph for this function:

G4double G4Trap::GetZHalfLength ( ) const
inline

Referenced by export_G4Trap(), G4tgbGeometryDumper::GetSolidParams(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), and G4GDMLWriteSolids::TrapWrite().

+ Here is the caller graph for this function:

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

Implements G4VSolid.

Definition at line 1108 of file G4Trap.cc.

References TrapSidePlane::a, TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, fDz, fPlanes, G4VSolid::kCarTolerance, kInside, kOutside, and kSurface.

Referenced by DistanceToOut().

+ Here is the caller graph for this function:

G4bool G4Trap::MakePlane ( const G4ThreeVector p1,
const G4ThreeVector p2,
const G4ThreeVector p3,
const G4ThreeVector p4,
TrapSidePlane plane 
)
protected

Definition at line 729 of file G4Trap.cc.

References a, TrapSidePlane::a, TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, FatalException, G4Exception(), G4VSolid::GetName(), and kCoplanar_Tolerance.

Referenced by G4Trap(), and MakePlanes().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4Trap::MakePlanes ( )
protected

Definition at line 650 of file G4Trap.cc.

References FatalException, fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fPlanes, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, G4Exception(), G4VSolid::GetName(), and MakePlane().

Referenced by G4Trap(), and SetAllParameters().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 570 of file G4Trap.cc.

References TrapSidePlane::a, TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fPlanes, G4CSGSolid::fpPolyhedron, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, G4CSGSolid::GetPolyhedron(), and G4CSGSolid::operator=().

+ Here is the call graph for this function:

void G4Trap::SetAllParameters ( G4double  pDz,
G4double  pTheta,
G4double  pPhi,
G4double  pDy1,
G4double  pDx1,
G4double  pDx2,
G4double  pAlp1,
G4double  pDy2,
G4double  pDx3,
G4double  pDx4,
G4double  pAlp2 
)

Definition at line 603 of file G4Trap.cc.

References FatalException, G4CSGSolid::fCubicVolume, fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, G4CSGSolid::fpPolyhedron, G4CSGSolid::fSurfaceArea, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, G4endl, G4Exception(), G4VSolid::GetName(), and MakePlanes().

Referenced by G4GDMLParameterisation::ComputeDimensions(), G4ParameterisationTrdX::ComputeDimensions(), and export_G4Trap().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from G4CSGSolid.

Definition at line 1817 of file G4Trap.cc.

References TrapSidePlane::a, TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, degree, fDx1, fDx2, fDx3, fDx4, fDy1, fDy2, fDz, fPlanes, fTalpha1, fTalpha2, fTthetaCphi, fTthetaSphi, G4VSolid::GetName(), and mm.

+ Here is the call graph for this function:

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

Implements G4VSolid.

Definition at line 1149 of file G4Trap.cc.

References a, ApproxSurfaceNormal(), TrapSidePlane::b, TrapSidePlane::c, TrapSidePlane::d, fDz, fPlanes, G4Exception(), JustWarning, G4VSolid::kCarTolerance, and kInfinity.

+ Here is the call graph for this function:

Member Data Documentation

TrapSidePlane G4Trap::fPlanes[4]
private

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