]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDRing.h
Updated version of the geometry
[u/mrichter/AliRoot.git] / FMD / AliFMDRing.h
1 #ifndef ALIFMDRING_H
2 #define ALIFMDRING_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
7  *
8  * See cxx source for full Copyright notice                               
9  */
10 /** @file    AliFMDRing.h
11     @author  Christian Holm Christensen <cholm@nbi.dk>
12     @date    Mon Mar 27 12:47:43 2006
13     @brief   FMD ring geometry parameters 
14 */
15 //__________________________________________________________________
16 //
17 // Parameters of the FMD rings. 
18 // This class is responsible to make the (common) rings of the three
19 // sub-detectors. 
20 //
21 #ifndef ROOT_TNamed
22 # include <TNamed.h>
23 #endif
24 #ifndef ROOT_TObjArray
25 # include <TObjArray.h>
26 #endif
27
28 class TBrowser;
29 class TVector2;
30
31 /** @brief Geometry description and parameters of a ring in the FMD 
32     detector. 
33     
34     As there are only 2 kinds of rings @e Inner (@c 'I') and @e
35     Outer (@c 'O') the two objects of this class is owned by the
36     Geometry::FMD singleton object.  The 3 Geometry::FMDDetector
37     objects shares these two instances as needed. 
38     @ingroup FMD_base
39 */
40 class AliFMDRing : public TNamed
41 {
42 public:
43   /** CTOR
44       @param fId Ring ID  */
45   AliFMDRing(Char_t fId);
46   /** DTOR  */
47   virtual ~AliFMDRing() {}
48   /** Initialize the ring geometry */
49   virtual void Init();
50   
51   /** @param x Value of The Id of this ring type */
52   void SetId(Char_t x) { fId = x; }
53   /** @param x Value of With of bonding pad on sensor */
54   void SetBondingWidth(Double_t x=.5) { fBondingWidth = x; }
55   /** @param x Value of Size of wafer the sensor was made from */
56   void SetWaferRadius(Double_t x=13.4/2) { fWaferRadius = x; }
57   /** @param x Value of Thickness of sensor */
58   void SetSiThickness(Double_t x=.03) { fSiThickness = x; }
59   /** @param x Value of Lower radius of ring */
60   void SetLowR(Double_t x) { fLowR = x; }
61   /** @param x Value of Upper radius of ring */
62   void SetHighR(Double_t x) { fHighR = x; }
63   /** @param x Value of Opening angle of the silicon wafers */
64   void SetTheta(Double_t x) { fTheta = x; }
65   /** @param x Value of Number of strips */
66   void SetNStrips(Int_t x) { fNStrips = x; }
67   /** @param x Value of How far the ring extends beyond the z value given. */
68   void SetRingDepth(Double_t x) { fRingDepth = x; }
69   /** @param x Value of Radius of support legs */
70   void SetLegRadius(Double_t x=.5) { fLegRadius = x; }
71   /** @param x Value of Radius of support legs */
72   void SetLegLength(Double_t x=1) { fLegLength = x; }
73   /** @param x Value of Radius of support legs */
74   void SetLegOffset(Double_t x=2) { fLegOffset = x; }
75   /** @param x Value of Staggering offset */
76   void SetModuleSpacing(Double_t x=1) { fModuleSpacing = x; }
77   /** @param x Value of Thickness of print board */
78   void SetPrintboardThickness(Double_t x=.1) { fPrintboardThickness = x; }
79   /** @param x Value of Thickness of copper on print board */
80   void SetCopperThickness(Double_t x=.01) { fCopperThickness = x; }
81   /** @param x Value of Thickness of chip on print board */
82   void SetChipThickness(Double_t x=.01) { fChipThickness = x; }
83   /** @param x Value of spacing between si and PCB */
84   void SetSpacing(Double_t x=.05) { fSpacing = x; }
85
86   /** @return The Id of this ring type */
87   Char_t GetId() const { return fId; }
88   /** @return With of bonding pad on sensor */
89   Double_t GetBondingWidth() const { return fBondingWidth; }
90   /** @return Size of wafer the sensor was made from */
91   Double_t GetWaferRadius() const { return fWaferRadius; }
92   /** @return Thickness of sensor */
93   Double_t GetSiThickness() const { return fSiThickness; }
94   /** @return Minimum r for an active strip */
95   Double_t GetMinR() const { return fMinR; }
96   /** @return Maximum r for an active strip */
97   Double_t GetMaxR() const { return fMaxR; }
98   /** @return Lower radius of ring */
99   Double_t GetLowR() const { return fLowR; }
100   /** @return Upper radius of ring */
101   Double_t GetHighR() const { return fHighR; }
102   /** @return Opening angle of the sector (half that of silicon wafers) */
103   Double_t GetTheta() const { return fTheta; }
104   /** @return Number of strips */
105   Int_t GetNStrips() const { return fNStrips; }
106   /** @return Number of sectors */
107   Int_t GetNSectors() const { return Int_t(360. / fTheta); }
108   /** @return Number of modules (2 sectors per module) */
109   Int_t GetNModules() const { return GetNSectors() / 2; }
110   /** @return How far the ring extends beyond the z value given. */
111   Double_t GetRingDepth() const { return fRingDepth; }
112   /** @return Radius of support legs */
113   Double_t GetLegRadius() const { return fLegRadius; }
114   /** @return Radius of support legs */
115   Double_t GetLegLength() const { return fLegLength; }
116   /** @return Radius of support legs */
117   Double_t GetLegOffset() const { return fLegOffset; }
118   /** @return Staggering offset */
119   Double_t GetModuleSpacing() const { return fModuleSpacing; }
120   /** @return Thickness of print board */
121   Double_t GetPrintboardThickness() const { return fPrintboardThickness; }
122   /** @return Thickness copper of print board */
123   Double_t GetCopperThickness() const { return fCopperThickness; }
124   /** @return Thickness chip of print board */
125   Double_t GetChipThickness() const { return fChipThickness; }
126   /** @return Value of spacing between si and PCB */
127   Double_t GetSpacing() const { return fSpacing; }
128   /** @return The strip pitch */ 
129   Double_t GetPitch() const { return (fMaxR - fMinR) / fNStrips; }
130   /** @return Radius (in cm) correspondig to strip @a strip */
131   Double_t GetStripRadius(UShort_t strip) const;
132   
133   /** @return List of verticies */
134   const TObjArray& GetVerticies() const { return fVerticies; }
135   /** @return Number of verticies */
136   Int_t GetNVerticies() const { return fVerticies.GetEntries(); }
137   /** @param i Vertex number 
138       @return the ith vertex */
139   TVector2* GetVertex(Int_t i) const;
140      
141   /** Not used */
142   void Detector2XYZ(UShort_t sector, UShort_t strip, 
143                     Double_t& x, Double_t& y, Double_t& z) const;
144   /** Not used */
145   Bool_t XYZ2Detector(Double_t x, Double_t y, Double_t z, 
146                       UShort_t& sector, UShort_t& strip) const;
147 private: 
148   Char_t        fId;                    // The Id of this ring type
149   Double_t      fBondingWidth;          // With of bonding pad on sensor
150   Double_t      fWaferRadius;           // Size of wafer sensor was made from
151   Double_t      fSiThickness;           // Thickness of sensor
152   Double_t      fLowR;                  // Lower radius of ring
153   Double_t      fHighR;                 // Upper radius of ring
154   Double_t      fMinR;                  // Lower radius of active strips
155   Double_t      fMaxR;                  // Upper radius of active strips
156   Double_t      fTheta;                 // Opening angle of the silicon wafers
157   Int_t         fNStrips;               // Number of strips
158   Double_t      fRingDepth;             // How far the ring extends beyond z
159   Double_t      fLegRadius;             // Radius of support legs
160   Double_t      fLegLength;             // Radius of support legs
161   Double_t      fLegOffset;             // Radius of support legs
162   Double_t      fModuleSpacing;         // Staggering offset
163   Double_t      fPrintboardThickness;   // Thickness of print board
164   Double_t      fCopperThickness;       // Thickness of Cu on print board
165   Double_t      fChipThickness;         // Thickness of chip on print board
166   Double_t      fSpacing;               // Spacing between si and PCB
167   
168   TObjArray     fVerticies;             // List of verticies
169
170   ClassDef(AliFMDRing, 0);
171 };
172 #endif 
173 //____________________________________________________________________
174 //
175 // Local Variables:
176 //   mode: C++
177 // End:
178 //
179 // EOF
180 //