StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSvtWaferGeometry.hh
1 /***************************************************************************
2  *
3  * $Id: StSvtWaferGeometry.hh,v 1.2 2007/03/21 17:22:21 fisyak Exp $
4  *
5  * Author: Marcelo Munhoz
6  ***************************************************************************
7  *
8  * Description: SVT Wafer Geometry object. It makes the link with the Data Base
9  *
10  ***************************************************************************
11  *
12  * $Log: StSvtWaferGeometry.hh,v $
13  * Revision 1.2 2007/03/21 17:22:21 fisyak
14  * Ivan Kotov's drift velocities, use TGeoHMatrix for coordinate transformation
15  *
16  * Revision 1.1 2001/08/16 21:02:04 munhoz
17  * changing StObjArray to StStrArray. StSvtConfig reestructured. New classes for geometry DB
18  *
19  *
20  **************************************************************************/
21 
22 #ifndef STSVTWAFERGEOMETRY_HH
23 #define STSVTWAFERGEOMETRY_HH
24 
25 #include "StSvtHybrid.h"
26 #include "TGeoMatrix.h"
27 class StSvtWaferGeometry: public TGeoHMatrix, public StSvtHybrid
28 {
29 public:
30  StSvtWaferGeometry(Int_t barrel = 0, Int_t ladder = 0, Int_t wafer = 0);
31  StSvtWaferGeometry(Int_t barrel, Int_t ladder, Int_t wafer, TGeoHMatrix &martix);
32  virtual ~StSvtWaferGeometry() {}
33 
34  StSvtWaferGeometry& operator = (const StSvtWaferGeometry&) {return *this;}
35 
36  void setID(Int_t i){id = i;}
37  void setDriftDirection(Double_t x1, Double_t x2, Double_t x3)
38  {Double_t *r = GetRotationMatrix(); r[0] = x1; r[3] = x2; r[6] = x3;}
39  void setTransverseDirection(Double_t x1, Double_t x2, Double_t x3)
40  {Double_t *r = GetRotationMatrix(); r[1] = x1; r[4] = x2; r[7] = x3;};
41  void setNormalDirection(Double_t x1, Double_t x2, Double_t x3)
42  {Double_t *r = GetRotationMatrix(); r[2] = x1; r[5] = x2; r[8] = x3;};
43  void setCenterPosition(Double_t x1, Double_t x2, Double_t x3) {Double_t *t = GetTranslation(); t[0] = x1; t[1] = x2; t[2] = x3;}
44 
45  Int_t getID(){return id;}
46  Double_t d(Int_t i){Double_t *r = GetRotationMatrix(); return r[3*i]; }
47  Double_t t(Int_t i){Double_t *r = GetRotationMatrix(); return r[3*i+1];}
48  Double_t n(Int_t i){Double_t *r = GetRotationMatrix(); return r[3*i+2];}
49  Double_t x(Int_t i){Double_t *t = GetTranslation(); return t[i]; }
50  void setName();
51  void print(Option_t *option="");
52 
53 private:
54 
55  Int_t id;
56 
57  ClassDef(StSvtWaferGeometry,1)
58 };
59 
60 #endif