00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef STSVTWAFERGEOMETRY_HH
00023 #define STSVTWAFERGEOMETRY_HH
00024
00025 #include "StSvtHybrid.h"
00026 #include "TGeoMatrix.h"
00027 class StSvtWaferGeometry: public TGeoHMatrix, public StSvtHybrid
00028 {
00029 public:
00030 StSvtWaferGeometry(Int_t barrel = 0, Int_t ladder = 0, Int_t wafer = 0);
00031 StSvtWaferGeometry(Int_t barrel, Int_t ladder, Int_t wafer, TGeoHMatrix &martix);
00032 virtual ~StSvtWaferGeometry() {}
00033
00034 StSvtWaferGeometry& operator = (const StSvtWaferGeometry&) {return *this;}
00035
00036 void setID(Int_t i){id = i;}
00037 void setDriftDirection(Double_t x1, Double_t x2, Double_t x3)
00038 {Double_t *r = GetRotationMatrix(); r[0] = x1; r[3] = x2; r[6] = x3;}
00039 void setTransverseDirection(Double_t x1, Double_t x2, Double_t x3)
00040 {Double_t *r = GetRotationMatrix(); r[1] = x1; r[4] = x2; r[7] = x3;};
00041 void setNormalDirection(Double_t x1, Double_t x2, Double_t x3)
00042 {Double_t *r = GetRotationMatrix(); r[2] = x1; r[5] = x2; r[8] = x3;};
00043 void setCenterPosition(Double_t x1, Double_t x2, Double_t x3) {Double_t *t = GetTranslation(); t[0] = x1; t[1] = x2; t[2] = x3;}
00044
00045 Int_t getID(){return id;}
00046 Double_t d(Int_t i){Double_t *r = GetRotationMatrix(); return r[3*i]; }
00047 Double_t t(Int_t i){Double_t *r = GetRotationMatrix(); return r[3*i+1];}
00048 Double_t n(Int_t i){Double_t *r = GetRotationMatrix(); return r[3*i+2];}
00049 Double_t x(Int_t i){Double_t *t = GetTranslation(); return t[i]; }
00050 void setName();
00051 void print(Option_t *option="");
00052
00053 private:
00054
00055 Int_t id;
00056
00057 ClassDef(StSvtWaferGeometry,1)
00058 };
00059
00060 #endif