]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSv11GeometrySDD.h
Bug fix (Yu.Belikov)
[u/mrichter/AliRoot.git] / ITS / AliITSv11GeometrySDD.h
1 #ifndef ALIITSV11GEOMETRYSDD_H
2 #define ALIITSV11GEOMETRYSDD_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 //*************************************************************************
8 // class AliITSv11GeometrySDD
9 // Ludovic Gaudichet                                   gaudichet@to.infn.it
10 //*************************************************************************
11
12 class TGeoVolume;
13 class TGeoTranslation;
14 class TGeoCombiTrans;
15 class TGeoArb8;
16 class TGeoNode;
17 class TGeoMedium;
18 class TGeoMatrix;
19 class AliITSgeom;
20 class AliITSv11GeomCableFlat;
21
22 #include "AliITSv11Geometry.h"
23
24
25 class AliITSv11GeometrySDD : public AliITSv11Geometry {
26
27  public:
28   AliITSv11GeometrySDD();
29   AliITSv11GeometrySDD(Int_t debug);
30   AliITSv11GeometrySDD(const AliITSv11GeometrySDD &source);
31   AliITSv11GeometrySDD& operator=(const AliITSv11GeometrySDD &source);
32   virtual ~AliITSv11GeometrySDD();
33
34   // Main functions
35   virtual void  Layer3(TGeoVolume *moth);
36   virtual void  Layer4(TGeoVolume *moth);
37   virtual Int_t ExportSensorGeometry(AliITSgeom *geom, Int_t iLaySDD,
38                                       Int_t startMod);
39   virtual Int_t GetCurrentLayLaddDet(Int_t &lay, Int_t &ladd, Int_t&det) const;
40
41   // Functions for coding, testing, debugging 
42   void          AddHybrids(bool b)     {fAddHybrids    = b;};
43   void          AddSensors(bool b)     {fAddSensors    = b;};
44   void          AddHVcables(bool b)    {fAddHVcables   = b;};
45   void          AddCables(bool b)      {fAddCables     = b;};
46   void          AddCoolingSyst(bool b) {fAddCoolingSyst= b;};
47
48   void          CheckOverlaps(Double_t precision = 0.01);
49   void          AddOnlyLay3Ladder(Int_t min,Int_t max){
50                   fAddOnlyLadder3min = min; fAddOnlyLadder3max = max; };
51   void          AddOnlyLay4Ladder(Int_t min,Int_t max) {
52                   fAddOnlyLadder4min = min; fAddOnlyLadder4max = max;};
53   void          ShowOnePiece(TGeoVolume *Moth);
54
55   virtual void  SetParameters();
56   TGeoVolume*   GetMotherVolume() const { return fMotherVol;};
57   const char*   GetSenstiveVolumeMame() const {return fgSDDsensitiveVolName;};
58
59   private:
60
61   // Create ladder virtual volumes and its detectors
62   virtual TGeoVolume*  CreateLadder(Int_t iLay);
63   virtual TGeoVolume*  CreateDetectors(Int_t iLay);
64   // Create virtual volumes inside a ladder volume
65   virtual TGeoVolume*  CreateLadderSegment(Int_t iLay, Int_t iSeg);
66   virtual TGeoVolume*  CreateEndLadder(Int_t iLay);
67   // Create some basic objects  
68   virtual TGeoVolume*  CreateHybrid(Int_t iLRSide);
69   virtual TGeoVolume*  CreatePinSupport();
70   virtual TGeoVolume*  CreateCoolPipeSupportL();
71   virtual TGeoVolume*  CreateCoolPipeSupportR();
72   virtual TGeoVolume*  CreateSDDsensor();
73   virtual TGeoVolume*  CreateBaseThermalBridge();
74   void                 CreateBasicObjects();
75
76
77   // Check that the nedium exists
78   virtual TGeoMedium* GetMedium(const char* mediumName);
79
80   // Create a TGeoCombiTrans: general rotation in phi and (dy,dz) translation 
81   TGeoCombiTrans* CreateCombiTrans( const char *name,
82                                     Double_t dy, Double_t dz, Double_t dphi);
83
84   // add (dx,dy,dz) translation to a initial TGeoCombiTrans
85   void AddTranslationToCombiTrans( TGeoCombiTrans* ct,
86                           Double_t dx=0, Double_t dy=0, Double_t dz=0) const;
87
88   // Create one side of the CF corner of the CF structure
89   TGeoArb8* CreateLadderSide( Double_t dz, Double_t angle, Double_t xSign,
90                               Double_t L, Double_t H, Double_t l);
91
92   //----------------------------
93   TGeoVolume* fPinSupport;        //!  pins glued to sensors
94   TGeoVolume* fCoolPipeSupportL;  //!  half of cooling pipe support
95   TGeoVolume* fCoolPipeSupportR;  //!  half of cooling pipe support
96   TGeoVolume* fSDDsensor;         //!  sensor and HV cables on it
97   TGeoVolume* fBaseThermalBridge; //!  Base of hybrid thermal bridge
98   TGeoVolume* fHybrid;            //!  hybrid volume
99
100   static const Int_t fgkNladdSegCommonVol = 19;       //  Number of vol.
101   TGeoVolume* fLaddSegCommonVol[fgkNladdSegCommonVol];//! volumes in ladder
102   TGeoMatrix* fLaddSegCommonTr[fgkNladdSegCommonVol]; //! their transf.
103
104   AliITSv11GeomCableFlat *fDigitCableLay3A; // layer 3 cables, side A
105   AliITSv11GeomCableFlat *fDigitCableLay3B; // layer 3 cables, side A
106   AliITSv11GeomCableFlat *fDigitCableLay4A; // layer 4 cables, side B
107   AliITSv11GeomCableFlat *fDigitCableLay4B; // layer 4 cables, side B
108
109   TGeoVolume *fMotherVol;    //! mother volume given in LayerX() funct.
110   bool  fAddHybrids;         //  Insert hybrids ?   (default TRUE)
111   bool  fAddSensors;         //  Insert sensors ?   (default TRUE)
112   bool  fAddHVcables;        //  Insert HV cables ? (default TRUE)
113   bool  fAddCables;          //  Insert cables ?    (default TRUE)
114   bool  fAddCoolingSyst;     //  Insert cooling system ? (default TRUE)
115   bool  fCoolingOn;          //  Insert cooling fluid ?  (default TRUE)
116   Int_t fAddOnlyLadder3min;  //  first ladder index
117   Int_t fAddOnlyLadder3max;  //  last  ladder index
118   Int_t fAddOnlyLadder4min;  //  first ladder index
119   Int_t fAddOnlyLadder4max;  //  last  ladder index
120   Int_t fColorCarbonFiber;   //  display colors
121   Int_t fColorRyton;         //  ===
122   Int_t fColorPhynox;        //  ===
123   Int_t fColorSilicon;       //  ===
124   Int_t fColorAl;            //  ===
125   Int_t fColorPolyhamide;    //  ===
126   Int_t fColorGlass;         //  ===
127   Int_t fColorSMD;           //  ===
128   Int_t fColorSMDweld;       //  ===
129
130   //--------------------------------------  parameters for the SDD geometry
131
132   static const char* fgSDDsensitiveVolName;       // name of sensitive vol
133
134   static const Int_t    fgkLay3Nladd;             // 14
135   static const Int_t    fgkLay3Ndet;              //  6
136   static const Double_t fgkLay3Rmin;              // min. radius of tube
137   static const Double_t fgkLay3Rmax;              // max. radius of tube
138   static const Double_t fgkLay3Length;            // length of layer 3 tube
139   static const Double_t fgkLay3LadderLength;      // tot. length of ladder
140   static const Double_t fgkLay3DetShortRadius;    // radius from beam axis
141   static const Double_t fgkLay3DetLongRadius;     // radius from beam axis
142   static const Double_t fgkLay3LaddTopCornerEnd;  // Ends of ladder 3
143   static const Double_t fgkLay3ZPlusEndLength;    // ===
144
145   static const Int_t    fgkLay4Nladd;             // 22
146   static const Int_t    fgkLay4Ndet;              //  8
147   static const Double_t fgkLay4Rmin;              // min. radius of tube
148   static const Double_t fgkLay4Rmax;              // max. radius of tube
149   static const Double_t fgkLay4Length;            // length of layer 4 tube
150   static const Double_t fgkLay4LadderLength;      // tot. length of ladder
151   static const Double_t fgkLay4DetShortRadius;    // radius from beam axis
152   static const Double_t fgkLay4DetLongRadius;     // radius from beam axis
153   static const Double_t fgkLay4LaddTopCornerEnd;  // Ends of ladder 3
154   static const Double_t fgkLay4ZPlusEndLength;    // ===
155
156   static const Double_t fgkSegmentLength;         // length of 1 ladder seg.
157   static const Double_t fgkLadderWidth;           // carbon fiber structure 
158   static const Double_t fgkLadderHeight;          // including bottom beam
159   static const Double_t fgkLadderSegBoxDW;        // To include hybrids in box
160   static const Double_t fgkLadderSegBoxDH;        // To include hybrids in box
161
162   static const Double_t fgkLadderBeamRadius;      // carbon fiber beam radius
163   static const Double_t fgkLadderLa;              // parameters defining
164   static const Double_t fgkLadderHa;              //   the V side shape
165   static const Double_t fgkLadderLb;              //   of the carbon
166   static const Double_t fgkLadderHb;              //   fiber ladder
167   static const Double_t fgkLadderl;               //   ============
168
169   static const Double_t fgkBottomBeamAngle;       // bottom beam angle
170   static const Double_t fgkBeamSidePhi;           // side beam angle
171
172   static const Double_t fgkWaferThickness;        // sensor thickness (Y)
173   static const Double_t fgkWaferWidth;            // width (X)
174   static const Double_t fgkWaferLength;           // length (Z)
175   static const Double_t fgkWaferThickSens;        // sensitive volume thich
176   static const Double_t fgkWaferWidthSens;        // sens. volume width
177   static const Double_t fgkWaferLengthSens;       // sens. volume length
178
179   static const Double_t fgkSensorGlassLX;         // dimensions of glass
180   static const Double_t fgkSensorGlassLZ;         //  (on which pins are
181   static const Double_t fgkSensorGlassLY;         //   glued)
182   static const Double_t fgkGlassDXOnSensor;       // Position of glass
183   static const Double_t fgkGlassDZOnSensor;       //   on sensor
184
185   static const Double_t fgkLadWaferSep;           // ladder-sensor dist.
186   static const Double_t fgkPinR;                  // pins radius
187   static const Double_t fgkPinSuppWidth;          // ===
188   static const Double_t fgkPinSuppHeight;         // ===
189   static const Double_t fgkPinSuppRmax;           // Parameters for pin
190   static const Double_t fgkPinSuppLength;         //   supports on
191   static const Double_t fgkPinSuppThickness;      //   carbon fiber
192   static const Double_t fgkPinSuppConeAngle;      //   ladder
193   static const Double_t fgkPinDXminOnSensor;      // ===
194   static const Double_t fgkPinPinDDXOnSensor;     // ===
195   static const Double_t fgkPinDYOnSensor;         // ===
196
197   static const Double_t fgkCoolPipeInnerDiam;     // Water cooling
198   static const Double_t fgkCoolPipeOuterDiam;     //   pipe
199   static const Double_t fgkLay3CoolPipeSuppH;     // Heights of water
200   static const Double_t fgkLay4CoolPipeSuppH;     //   pipes on ladders
201   static const Double_t fgkCoolPipeSuppHeight;    // ===
202   static const Double_t fgkCoolPipeSuppMaxLength; // ===
203   static const Double_t fgkCoolPipeSuppWidthExt;  // Parameters for
204   static const Double_t fgkCoolPipeSuppWidthIn;   //  cooling pipes
205   static const Double_t fgkCoolPipeSuppHoleDiam;  //  on carbon fiber
206   static const Double_t fgkCoolPipeSuppFulWidth;  //  ladder 
207   static const Double_t fgkCoolPipeSuppTongW;     // ===
208   static const Double_t fgkCoolPipeSuppAngle;     // ===
209   static const Double_t fgkCoolPipeSuppSlitL;     // ===
210   static const Double_t fgkCoolPipeSuppAxeDist;   // ===
211
212   static const Double_t fgkBTBthick;              // BTB for :
213   static const Double_t fgkBTBlength;             // Base of Thermal Bridge
214   static const Double_t fgkBTBwidth;              // =====================
215   static const Double_t fgkBTBaxisAtoBottom;      // axis A is the same as
216   static const Double_t fgkBTBaxisAtoBase;        // the cooling pipe axis
217   static const Double_t fgkRadiusAminBTB;         // ===
218   static const Double_t fgkRadiusBminBTB;         // ===
219   static const Double_t fgkBTBHoleLength;         // ===
220   static const Double_t fgkBTBHolewidth;          // ===
221   static const Double_t fgkBTBHoleRefX;           // ===
222   static const Double_t fgkBTBHoleRefY;           // ===
223
224   static const Double_t fgkHybridLength;          // Hybrid parameters :
225   static const Double_t fgkHybridWidth;           // ===
226   static const Double_t fgkHybridAngle;           // Hybrid on ladder in phi
227
228   static const Double_t fgkHybRndHoleRad;         // ===
229   static const Double_t fgkHybRndHoleZ;           // ===
230   static const Double_t fgkHybRndHoleX;           // ===
231
232   static const Double_t fgkHybFLlowHoleDZ;        // FLlow : low flex
233   static const Double_t fgkHybFLlowHolePasDX;     // ===
234   static const Double_t fgkHybFLlowHoleAmbDX;     // ===
235   // (center of ships to the border)
236   static const Double_t fgkHybFLlowChipZ4;        // Z1 to Z4 : position
237   static const Double_t fgkHybFLlowChipZ3;        //   in z of the chip
238   static const Double_t fgkHybFLlowChipZ2;        //   centers
239   static const Double_t fgkHybFLlowChipZ1;        // ===
240   static const Double_t fgkHybFLlowPasX;          // Pascal center X pos
241   static const Double_t fgkHybFLlowAmbX;          // Ambra center X pos
242   static const Double_t fgkHybChipsDZ;            // Z dimension of chips
243   static const Double_t fgkHybPascalDX;           // X dimension of Pascal
244   static const Double_t fgkHybAmbraDX;            // X dimension of Ambra
245   static const Double_t fgkHybFLUpperWidth;       // bFLUpper : upper flex
246   static const Double_t fgkHybFLUpperLength;      // ===
247   static const Double_t fgkHybFLUpperAlDZ;        // ===
248   static const Double_t fgkHybFLUpperAldx;        // ===
249
250   static const Double_t fgkHybridThBridgeThick;   // Thicknesses :
251   static const Double_t fgkHybAlThick;            // ===
252   static const Double_t fgkHybUpThick;            // ===
253   static const Double_t fgkHybGlueScrnThick;      // ===
254   static const Double_t fgkHybGlueLowThick;       // ===
255   static const Double_t fgkHybGlueUpThick;        // ===
256   static const Double_t fgkHybAlCCThick;          // ===
257   static const Double_t fgkHybUpCCThick;          // ===
258   static const Double_t fgkHybChipThick;          // ===
259   static const Double_t fgkHybGlueAgThick;        // ===
260   static const Double_t fgkHybUnderNiThick;       // ===
261   static const Int_t    fgkNHybSMD;               // Number of SMD
262   static const Double_t fgkHybSMDposX[25];        // X pos. of SMD
263   static const Double_t fgkHybSMDposZ[25];        // Z pos. of SMD
264   static const Double_t fgkHybSMDmiddleW;         // SMD width
265   static const Double_t fgkHybSMDmiddleL;         // SMD length
266   static const Double_t fgkHybSMDendW;            // end SMD witdh
267   static const Double_t fgkHybSMDendL;            // end SMD length
268   static const Double_t fgkHybSMDheight;          // SMD height
269
270   static const Double_t fgkDigitCablWidth;        // Digital
271   static const Double_t fgkDigitCablAlThick;      // cables
272   static const Double_t fgkDigitCablPolyThick;    // ===
273
274   //HV cables
275   static const Double_t fgkWaHVcableAlThick;      // Wrap-around
276   static const Double_t fgkWaHVcablePolyThick;    //   High Voltage
277   static const Double_t fgkWaHVcableLength;       //   cables
278   static const Double_t fgkWaHVcableWitdh;        //   (on sensor)
279   static const Double_t fgkWaHVcableDW;           // ===
280
281   static const Double_t fgkTransitHVAlThick;      // Transition
282   static const Double_t fgkTransitHVPolyThick;    //   High Voltage
283   static const Double_t fgkTransitHVHeadLX;       //   cables
284   static const Double_t fgkTransitHVHeadLZ;       //   (on sensor)
285   static const Double_t fgkTransitHVBondingLZ;    // ===
286   static const Double_t fgkTransitHVtailLength;   // ===
287   static const Double_t fgkTransitHVtailWidth;    // ===
288   static const Double_t fgkTransitHVtailXpos;     // ===
289   static const Double_t fgkTransitHVsideLZ;       // ===
290   static const Double_t fgkTransitHVsideLeftZ;    // ===
291   static const Double_t fgkTransitHVsideRightZ;   // ===
292
293   static const Double_t fgkLongHVcablePolyThick;  // Long High
294   static const Double_t fgkLongHVcableAlThick;    //   Voltage
295   static const Double_t fgkLongHVcableSeparation; //   cables
296
297   static const Double_t fgkmu;  // 1 micron, or more for debugging
298
299   // calculated parameters
300   Double_t fLay3LadderUnderSegDH;  // To include HVcables in box
301   Double_t fLay4LadderUnderSegDH;  // To include HVcables in box
302   Double_t fLay3LaddShortRadius;   // ladder 3 to beam axis radius
303   Double_t fLay3LaddLongRadius;    // ladder 3 to beam axis radius
304   Double_t fLay4LaddShortRadius;   // ladder 4 to beam axis radius
305   Double_t fLay4LaddLongRadius;    // ladder 4 to beam axis radius
306
307   // parameters that be modified
308   Double_t fLay3sensorZPos[6];     // Z pos of sensors in layer 3
309   Double_t fLay4sensorZPos[8];     // Z pos of sensors in layer 4
310
311   ClassDef(AliITSv11GeometrySDD,1) // ITS v11 SDD geometry
312 };
313
314
315 #endif