StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSvtGeometry.hh
1 /***************************************************************************
2  *
3  * $Id: StSvtGeometry.hh,v 1.1 2001/08/16 21:02:03 munhoz Exp $
4  *
5  * Author: Marcelo Munhoz
6  ***************************************************************************
7  *
8  * Description: SVT Geometry object. It makes the link with the Data Base
9  *
10  ***************************************************************************
11  *
12  * $Log: StSvtGeometry.hh,v $
13  * Revision 1.1 2001/08/16 21:02:03 munhoz
14  * changing StObjArray to StStrArray. StSvtConfig reestructured. New classes for geometry DB
15  *
16  *
17  **************************************************************************/
18 
19 #ifndef STSVTGEOMETRY_HH
20 #define STSVTGEOMETRY_HH
21 
22 #include "StSvtWaferCollection.hh"
23 
24 class StSvtConfig;
25 class svg_geom_st;
26 class svg_shape_st;
27 class srs_srspar_st;
28 
30 {
31 public:
32  StSvtGeometry();
33  StSvtGeometry(const char* config);
34  StSvtGeometry(StSvtConfig* config);
35  StSvtGeometry(srs_srspar_st* param, svg_geom_st *geom, svg_shape_st *shape);
36  virtual ~StSvtGeometry();
37 
39  StSvtGeometry& operator = (const StSvtGeometry&);
40 
41  void setBarrelRadius(double x[6]);
42  void setWaferLength(double x);
43  void setWaferThickness(double x);
44  void setWaferWidth(double x);
45  void setAnodePitch(double x);
46  void setFocusRegionLength(double x);
47  void setDistanceInjector(double x[4]);
48  void setLaserPosition(double x[5]);
49 
50  double getBarrelRadius(int layer){return barrelRadius[layer-1];}
51  double getWaferLength(){return waferLength;}
52  double getWaferThickness(){return waferThickness;}
53  double getWaferWidth(){return waferWidth;}
54  double getAnodePitch(){return anodePitch;}
55  double getFocusRegionLength(){return focusRegionLength;}
56  double getDistanceInjector(int line){return distanceInjector[line-1];}
57  double getLaserPosition(int i){return laserPosition[i];}
58 
59  int getWaferIndex(int barrel, int ladder, int wafer);
60  int getWaferIndex(int HardWarePos);
61  int getBarrelID(int layer, int ladder);
62 
63 private:
64 
65  double barrelRadius[6]; //cm
66 
67  double waferLength;
68  double waferThickness;
69  double waferWidth;
70  double anodePitch;
71  double focusRegionLength;
72  double distanceInjector[4]; //Index 0 is the closest to anodes
73  double laserPosition[5];
74 
75  ClassDef(StSvtGeometry,1)
76 };
77 
78 inline void StSvtGeometry::setBarrelRadius(double x[6])
79 {barrelRadius[0] = x[0];
80  barrelRadius[1] = x[1];
81  barrelRadius[2] = x[2];
82  barrelRadius[3] = x[3];
83  barrelRadius[4] = x[4];
84  barrelRadius[5] = x[5];
85 };
86 
87 inline void StSvtGeometry::setWaferLength(double x)
88 {waferLength = x;};
89 
90 inline void StSvtGeometry::setWaferThickness(double x)
91 {waferThickness = x;};
92 
93 inline void StSvtGeometry::setWaferWidth(double x)
94 {waferWidth = x;};
95 
96 inline void StSvtGeometry::setAnodePitch(double x)
97 {anodePitch = x;};
98 
99 inline void StSvtGeometry::setFocusRegionLength(double x)
100 {focusRegionLength = x;};
101 
102 inline void StSvtGeometry::setDistanceInjector(double x[4])
103 {distanceInjector[0] = x[0];
104  distanceInjector[1] = x[1];
105  distanceInjector[2] = x[2];
106  distanceInjector[3] = x[3];
107 };
108 
109 inline void StSvtGeometry::setLaserPosition(double x[5])
110 {laserPosition[0] = x[0];
111  laserPosition[1] = x[1];
112  laserPosition[2] = x[2];
113  laserPosition[3] = x[3];
114  laserPosition[4] = x[4];
115 };
116 
117 #endif