13#include "G4CSGSolid.hh"
14#include "G4Polyhedron.hh"
42 BelleCrystal(
const G4String& pName,
int,
const G4ThreeVector*);
58 const G4VPhysicalVolume* pRep);
62 const G4VoxelLimits& pVoxelLimit,
63 const G4AffineTransform& pTransform,
64 G4double& pMin, G4double& pMax)
const;
67 EInside
Inside(
const G4ThreeVector& p)
const;
73 G4double
DistanceToIn(
const G4ThreeVector& p,
const G4ThreeVector& v)
const;
79 G4double
DistanceToOut(
const G4ThreeVector& p,
const G4ThreeVector& v,
80 const G4bool calcNorm =
false,
81 G4bool* validNorm = 0, G4ThreeVector* n = 0)
const;
93 G4VSolid*
Clone()
const;
96 std::ostream&
StreamInfo(std::ostream& os)
const;
104 void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax)
const;
120 G4ThreeVector vertex(
unsigned int i)
const;
132 G4bool
MakePlane(
const G4ThreeVector& p1,
133 const G4ThreeVector& p2,
134 const G4ThreeVector& p3,
135 const G4ThreeVector& p4,
140 double area(
int,
double&)
const;
142 const unsigned int*
ivertx(
unsigned int i)
const;
147 std::vector<Point_t>
fx;
a Belle crystal in Geant4
std::vector< Plane_t > fPlanes
vector of planes
G4GeometryType GetEntityType() const
Get entity type.
void DescribeYourselfTo(G4VGraphicsScene &scene) const
Visualisation functions.
const unsigned int * ivertx(unsigned int i) const
get the ith vertex
G4ThreeVector GetPointOnTriangle(int) const
Returns a random point on the surface of one of the faces.
G4Polyhedron * CreatePolyhedron() const
create polyhedron
G4bool MakePlane(const G4ThreeVector &p1, const G4ThreeVector &p2, const G4ThreeVector &p3, const G4ThreeVector &p4, Plane_t &plane) const
Calculate the coef's of the plane p1->p2->p3->p4->p1 where the ThreeVectors 1-4 are in anti-clockwise...
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
Two vectors define an axis-parallel bounding box for the shape.
double area(int, double &) const
triangle area
G4double GetCubicVolume()
get the Cubic volume
BelleCrystal & operator=(const BelleCrystal &rhs)
assignment operator
Plane_t GetSidePlane(G4int n) const
Get side plane.
G4ThreeVector GetPointOnSurface() const
get point on surface
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
calculate the extent of the volume
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
Calculate side nearest to p, and return normal.
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
Calculate exact shortest distance to any boundary from outside.
virtual ~BelleCrystal()
Destructor.
G4VSolid * Clone() const
Make a clone of the object.
std::ostream & StreamInfo(std::ostream &os) const
Stream object contents to an output stream.
std::vector< double > fareas
vector of area values
double getvolarea() const
get volume area
EInside Inside(const G4ThreeVector &p) const
Return whether point inside/outside/on surface, using tolerance.
std::vector< Point_t > fx
vector of points
G4double GetSurfaceArea()
get the surface area
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
compute the dimensions
unsigned int nsides
the number of sides
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
Calculate exact shortest distance to any boundary from inside.
Belle crystal in polyhedron.
virtual ~PolyhedronBelleCrystal()
destructor
Abstract base class for different kinds of events.
G4ThreeVector n
Normal unit vector (a,b,c)