G4Root Version 6.6
Loading...
Searching...
No Matches
TG4RootSolid Class Reference

GEANT4 solid implemented by a ROOT shape. More...

#include <TG4RootSolid.h>

Inheritance diagram for TG4RootSolid:

Public Member Functions

 TG4RootSolid ()
 Default ctor.
 
 TG4RootSolid (TGeoShape *shape)
 
virtual ~TG4RootSolid ()
 Destructor.
 
virtual G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
 
virtual EInside Inside (const G4ThreeVector &p) const
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const
 
virtual G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const
 
virtual G4double DistanceToIn (const G4ThreeVector &p) const
 
virtual G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
 
virtual G4double DistanceToOut (const G4ThreeVector &p) const
 
virtual void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
virtual G4double GetCubicVolume ()
 
virtual G4GeometryType GetEntityType () const
 
virtual G4ThreeVector GetPointOnSurface () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
virtual G4VisExtent GetExtent () const
 
virtual G4Polyhedron * CreatePolyhedron () const
 
virtual G4NURBS * CreateNURBS () const
 
virtual G4Polyhedron * GetPolyhedron () const
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
virtual const G4DisplacedSolid * GetDisplacedSolidPtr () const
 
virtual G4DisplacedSolid * GetDisplacedSolidPtr ()
 

Protected Attributes

TGeoShape * fShape
 TGeo associated shape.
 

Detailed Description

GEANT4 solid implemented by a ROOT shape.

Visualization methods not implemented.

Author
A. Gheata; CERN

Definition at line 31 of file TG4RootSolid.h.

Constructor & Destructor Documentation

◆ TG4RootSolid() [1/2]

TG4RootSolid::TG4RootSolid ( )
inline

Default ctor.

Definition at line 38 of file TG4RootSolid.h.

◆ TG4RootSolid() [2/2]

TG4RootSolid::TG4RootSolid ( TGeoShape * shape)

Constructor.

Definition at line 46 of file TG4RootSolid.cxx.

◆ ~TG4RootSolid()

virtual TG4RootSolid::~TG4RootSolid ( )
inlinevirtual

Destructor.

Definition at line 40 of file TG4RootSolid.h.

Member Function Documentation

◆ CalculateExtent()

G4bool TG4RootSolid::CalculateExtent ( const EAxis pAxis,
const G4VoxelLimits & pVoxelLimit,
const G4AffineTransform & pTransform,
G4double & pMin,
G4double & pMax ) const
virtual

Calculate the minimum and maximum extent of the solid, when under the specified transform, and within the specified limits. If the solid is not intersected by the region, return false, else return true.

Definition at line 53 of file TG4RootSolid.cxx.

◆ Inside()

EInside TG4RootSolid::Inside ( const G4ThreeVector & p) const
virtual

Returns kOutside if the point at offset p is outside the shapes boundaries plus Tolerance/2, kSurface if the point is <= Tolerance/2 from a surface, otherwise kInside.

Definition at line 66 of file TG4RootSolid.cxx.

◆ SurfaceNormal()

G4ThreeVector TG4RootSolid::SurfaceNormal ( const G4ThreeVector & p) const
virtual

Returns the outwards pointing unit normal of the shape for the surface closest to the point at offset p.

Definition at line 85 of file TG4RootSolid.cxx.

◆ DistanceToIn() [1/2]

G4double TG4RootSolid::DistanceToIn ( const G4ThreeVector & p,
const G4ThreeVector & v ) const
virtual

Return the distance along the normalised vector v to the shape, from the point at offset p. If there is no intersection, return kInfinity. The first intersection resulting from ‘leaving’ a surface/volume is discarded. Hence, it is tolerant of points on the surface of the shape.

Definition at line 109 of file TG4RootSolid.cxx.

◆ DistanceToIn() [2/2]

G4double TG4RootSolid::DistanceToIn ( const G4ThreeVector & p) const
virtual

Calculate the distance to the nearest surface of a shape from an outside point. The distance can be an underestimate.

Definition at line 130 of file TG4RootSolid.cxx.

◆ DistanceToOut() [1/2]

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

Return the distance along the normalised vector v to the shape, from a point at an offset p inside or on the surface of the shape. Intersections with surfaces, when the point is < Tolerance/2 from a surface must be ignored. If calcNorm==true: validNorm set true if the solid lies entirely behind or on the exiting surface. n set to exiting outwards normal vector (undefined Magnitude). validNorm set to false if the solid does not lie entirely behind or on the exiting surface If calcNorm==false: validNorm and n are unused.

Must be called as solid.DistanceToOut(p,v) or by specifying all the parameters.

Definition at line 143 of file TG4RootSolid.cxx.

◆ DistanceToOut() [2/2]

G4double TG4RootSolid::DistanceToOut ( const G4ThreeVector & p) const
virtual

Calculate the distance to the nearest surface of a shape from an inside point. The distance can be an underestimate.

Definition at line 186 of file TG4RootSolid.cxx.

◆ ComputeDimensions()

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

Throw exception if ComputeDimensions called frrom an illegal derived class. It should not be called with this interface.

Definition at line 199 of file TG4RootSolid.cxx.

◆ GetCubicVolume()

G4double TG4RootSolid::GetCubicVolume ( )
virtual

Returns an estimation of the solid volume in internal units. This method may be overloaded by derived classes to compute the exact geometrical quantity for solids where this is possible, or anyway to cache the computed value. Note: the computed value is NOT cached.

Definition at line 209 of file TG4RootSolid.cxx.

◆ GetEntityType()

G4GeometryType TG4RootSolid::GetEntityType ( ) const
virtual

Provide identification of the class of an object. (required for persistency and STEP interface)

Definition at line 221 of file TG4RootSolid.cxx.

◆ GetPointOnSurface()

G4ThreeVector TG4RootSolid::GetPointOnSurface ( ) const
virtual

Returns a random point located on the surface of the solid.

Definition at line 229 of file TG4RootSolid.cxx.

◆ StreamInfo()

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

Dumps contents of the solid to a stream.

Definition at line 238 of file TG4RootSolid.cxx.

◆ DescribeYourselfTo()

void TG4RootSolid::DescribeYourselfTo ( G4VGraphicsScene & scene) const
virtual

A "double dispatch" function which identifies the solid to the graphics scene.

Definition at line 260 of file TG4RootSolid.cxx.

◆ GetExtent()

G4VisExtent TG4RootSolid::GetExtent ( ) const
virtual

Provide extent (bounding box) as possible hint to the graphics view.

Definition at line 268 of file TG4RootSolid.cxx.

◆ CreatePolyhedron()

G4Polyhedron * TG4RootSolid::CreatePolyhedron ( ) const
virtual

Create polyhedron for the bounding box

Definition at line 282 of file TG4RootSolid.cxx.

Referenced by GetPolyhedron().

◆ CreateNURBS()

G4NURBS * TG4RootSolid::CreateNURBS ( ) const
virtual

Create a G4Polyhedron/G4NURBS/... (It is the caller's responsibility to delete it). A null pointer means "not created".

Definition at line 293 of file TG4RootSolid.cxx.

◆ GetPolyhedron()

G4Polyhedron * TG4RootSolid::GetPolyhedron ( ) const
virtual

Smart access function - creates on request and stores for future access. A null pointer means "not available".

Definition at line 302 of file TG4RootSolid.cxx.

◆ GetConstituentSolid() [1/2]

const G4VSolid * TG4RootSolid::GetConstituentSolid ( G4int no) const
virtual

Dummy implementation

Definition at line 310 of file TG4RootSolid.cxx.

◆ GetConstituentSolid() [2/2]

G4VSolid * TG4RootSolid::GetConstituentSolid ( G4int no)
virtual

If the solid is made up from a Boolean operation of two solids, return the "no" solid. If the solid is not a "Boolean", return 0.

Definition at line 317 of file TG4RootSolid.cxx.

◆ GetDisplacedSolidPtr() [1/2]

const G4DisplacedSolid * TG4RootSolid::GetDisplacedSolidPtr ( ) const
virtual

Dummy implementation

Definition at line 325 of file TG4RootSolid.cxx.

◆ GetDisplacedSolidPtr() [2/2]

G4DisplacedSolid * TG4RootSolid::GetDisplacedSolidPtr ( )
virtual

Dummy implementation

Definition at line 332 of file TG4RootSolid.cxx.

Member Data Documentation

◆ fShape

TGeoShape* TG4RootSolid::fShape
protected

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