4 #include "Sti/Base/Named.h"
9 enum StiShapeCode {kPlanar = 1, kCylindrical, kSector, kConical, kDisk};
20 StiShape(
const string &name=
"undefined",
float halfDepth=0,
float thickness=0,
float edge=0) :
21 Named(name),_halfDepth(halfDepth),_thickness(thickness),_edgeWidth(edge) {}
24 float getHalfDepth()
const {
return _halfDepth; }
25 virtual float getHalfWidth()
const=0;
26 float getThickness()
const {
return _thickness; }
27 virtual StiShapeCode getShapeCode()
const = 0;
28 float getEdgeWidth()
const {
return _edgeWidth; }
29 virtual float getOpeningAngle()
const =0;
30 virtual float getOuterRadius()
const {
return -999;}
32 virtual double getVolume()
const = 0;
35 void setHalfDepth(
float val) {
if(val >= 0.) _halfDepth = val; }
36 void setThickness(
float val) {
if(val >= 0.) _thickness = val; }
40 double nice(
double val);
51 ostream& operator<<(ostream& os,
const StiShape& m);
54 inline double StiShape::nice(
double val)
56 while (val < 0.){ val += 2*M_PI; }
57 while (val >= 2*M_PI){ val -= 2*M_PI; }
float _thickness
"thickness", always >= 0
float _edgeWidth
size of the edge used in tracking, deltaX local
float _halfDepth
half extent along z, always >= 0