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