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