00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef STSVTGEOMETRY_HH
00020 #define STSVTGEOMETRY_HH
00021
00022 #include "StSvtWaferCollection.hh"
00023
00024 class StSvtConfig;
00025 class svg_geom_st;
00026 class svg_shape_st;
00027 class srs_srspar_st;
00028
00029 class StSvtGeometry: public StSvtWaferCollection
00030 {
00031 public:
00032 StSvtGeometry();
00033 StSvtGeometry(const char* config);
00034 StSvtGeometry(StSvtConfig* config);
00035 StSvtGeometry(srs_srspar_st* param, svg_geom_st *geom, svg_shape_st *shape);
00036 virtual ~StSvtGeometry();
00037
00038 StSvtGeometry(const StSvtGeometry&);
00039 StSvtGeometry& operator = (const StSvtGeometry&);
00040
00041 void setBarrelRadius(double x[6]);
00042 void setWaferLength(double x);
00043 void setWaferThickness(double x);
00044 void setWaferWidth(double x);
00045 void setAnodePitch(double x);
00046 void setFocusRegionLength(double x);
00047 void setDistanceInjector(double x[4]);
00048 void setLaserPosition(double x[5]);
00049
00050 double getBarrelRadius(int layer){return barrelRadius[layer-1];}
00051 double getWaferLength(){return waferLength;}
00052 double getWaferThickness(){return waferThickness;}
00053 double getWaferWidth(){return waferWidth;}
00054 double getAnodePitch(){return anodePitch;}
00055 double getFocusRegionLength(){return focusRegionLength;}
00056 double getDistanceInjector(int line){return distanceInjector[line-1];}
00057 double getLaserPosition(int i){return laserPosition[i];}
00058
00059 int getWaferIndex(int barrel, int ladder, int wafer);
00060 int getWaferIndex(int HardWarePos);
00061 int getBarrelID(int layer, int ladder);
00062
00063 private:
00064
00065 double barrelRadius[6];
00066
00067 double waferLength;
00068 double waferThickness;
00069 double waferWidth;
00070 double anodePitch;
00071 double focusRegionLength;
00072 double distanceInjector[4];
00073 double laserPosition[5];
00074
00075 ClassDef(StSvtGeometry,1)
00076 };
00077
00078 inline void StSvtGeometry::setBarrelRadius(double x[6])
00079 {barrelRadius[0] = x[0];
00080 barrelRadius[1] = x[1];
00081 barrelRadius[2] = x[2];
00082 barrelRadius[3] = x[3];
00083 barrelRadius[4] = x[4];
00084 barrelRadius[5] = x[5];
00085 };
00086
00087 inline void StSvtGeometry::setWaferLength(double x)
00088 {waferLength = x;};
00089
00090 inline void StSvtGeometry::setWaferThickness(double x)
00091 {waferThickness = x;};
00092
00093 inline void StSvtGeometry::setWaferWidth(double x)
00094 {waferWidth = x;};
00095
00096 inline void StSvtGeometry::setAnodePitch(double x)
00097 {anodePitch = x;};
00098
00099 inline void StSvtGeometry::setFocusRegionLength(double x)
00100 {focusRegionLength = x;};
00101
00102 inline void StSvtGeometry::setDistanceInjector(double x[4])
00103 {distanceInjector[0] = x[0];
00104 distanceInjector[1] = x[1];
00105 distanceInjector[2] = x[2];
00106 distanceInjector[3] = x[3];
00107 };
00108
00109 inline void StSvtGeometry::setLaserPosition(double x[5])
00110 {laserPosition[0] = x[0];
00111 laserPosition[1] = x[1];
00112 laserPosition[2] = x[2];
00113 laserPosition[3] = x[3];
00114 laserPosition[4] = x[4];
00115 };
00116
00117 #endif