57 #ifndef GLG4TorusStack_HH
58 #define GLG4TorusStack_HH
60 #include "G4CSGSolid.hh"
68 void SetAllParameters(G4int n,
69 const G4double z_edge[],
70 const G4double rho_edge[],
74 void ComputeDimensions(G4VPVParameterisation *p,
const G4int n,
const G4VPhysicalVolume *pRep);
76 G4bool CalculateExtent(
const EAxis pAxis,
const G4VoxelLimits &pVoxelLimit,
const G4AffineTransform &pTransform,
77 G4double &pmin, G4double &pmax)
const;
79 G4int GetN()
const {
return n; }
80 G4double GetZEdge(
int i)
const {
return z_edge[i]; }
81 G4double GetRhoEdge(
int i)
const {
return rho_edge[i]; }
82 G4double GetZo(
int i)
const {
return z_o[i]; }
83 G4double GetRo(
int i)
const {
return r_o[i]; }
84 G4double GetRadius(
int i)
const {
return radius[i]; }
87 EInside Inside(
const G4ThreeVector &p)
const;
89 G4ThreeVector SurfaceNormal(
const G4ThreeVector &p)
const;
91 G4double DistanceToIn(
const G4ThreeVector &p,
const G4ThreeVector &v)
const;
92 G4double DistanceToIn(
const G4ThreeVector &p)
const;
93 G4double DistanceToOut(
const G4ThreeVector &p,
const G4ThreeVector &v,
const G4bool calcNorm = G4bool(
false),
94 G4bool *validNorm = 0, G4ThreeVector *n = 0)
const;
95 G4double DistanceToOut(
const G4ThreeVector &p)
const;
98 virtual G4GeometryType GetEntityType()
const {
return G4String(
"GLG4TorusStack"); }
101 void DescribeYourselfTo(G4VGraphicsScene &scene)
const;
102 G4VisExtent GetExtent()
const;
103 G4Polyhedron *CreatePolyhedron()
const;
108 static G4int FindFirstTorusRoot(G4double a,
110 const G4ThreeVector &p,
111 const G4ThreeVector &v,
120 virtual void f_and_Df(G4double x, G4double &f, G4double &Df) = 0;
126 int FindRoot(G4double smin,
129 G4bool fFindFallingRoot,
139 static G4int FindInOrderedList(
double z_lu,
const double *z,
int n);
142 G4int FindNearestSegment(G4double pr, G4double pz)
const;
145 G4ThreeVectorList *CreateRotatedVertices(
const G4AffineTransform &pTransform, G4int &noPolygonVertices)
const;
147 EInside Inside1(
const G4ThreeVector &p)
const;
158 double myRadTolerance;
159 static double surfaceTolerance;
160 static double radTolerance;
161 static double angTolerance;
Definition: GLG4TorusStack.hh:118
Definition: GLG4TorusStack.hh:62