]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSgeomSDD.cxx
Bug fix for SDD test beam simulation.
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSDD.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 ////////////////////////////////////////////////////////////////////////
19 // This class is for the Silicon Drift Detector, SDD, specific geometry.
20 // It is being replaced by AliITSsegmentationSDD class. This file also
21 // constains classes derived from AliITSgeomSDD which do nothing but
22 // initilize this one with predefined values.
23 ////////////////////////////////////////////////////////////////////////
24
25 #include <Riostream.h>
26 #include <stdlib.h>
27 #include <TShape.h>
28
29 #include "AliITSgeomSDD.h"
30
31 ClassImp(AliITSgeomSDD)
32 AliITSgeomSDD::AliITSgeomSDD(){
33 ////////////////////////////////////////////////////////////////////////
34 //    default constructor
35 ////////////////////////////////////////////////////////////////////////
36 //    const Float_t kDx = 3.500;//cm. (Geant 3.12 units) Orthonormal to y and z
37 //    const Float_t kDy = 0.014;//cm. (Geant 3.12 units) Radialy from the Beam
38 //    const Float_t kDz = 3.763;//cm. (Geant 3.12 units) Allong the Beam Pipe
39
40 //    cout << "AliITSgeomSDD default creator called: start" << endl;
41     fPeriod        = 0.0;
42     fDvelocity     = 0.0;
43     fNAnodesL      = 0;
44     fNAnodesR      = 0;
45     fAnodeXL       = 0.0;
46     fAnodeXR       = 0.0;
47     fAnodeLowEdgeL = 0;
48     fAnodeLowEdgeR = 0;
49     fShapeSDD      = 0;
50 //    cout << "AliITSgeomSDD default creator called: end" << endl;
51 }
52 //________________________________________________________________________
53 AliITSgeomSDD::AliITSgeomSDD(const Float_t *box,Float_t per,Float_t vel,
54                              Float_t axL,Float_t axR,
55                              Int_t nAL,Float_t *leL,
56                              Int_t nAR,Float_t *leR){
57 ////////////////////////////////////////////////////////////////////////
58 //    Standard constructor
59 ////////////////////////////////////////////////////////////////////////
60     fPeriod        = 0.0;
61     fDvelocity     = 0.0;
62     fNAnodesL      = 0;
63     fNAnodesR      = 0;
64     fAnodeXL       = 0.0;
65     fAnodeXR       = 0.0;
66     fAnodeLowEdgeL = 0;
67     fAnodeLowEdgeR = 0;
68     fShapeSDD      = 0;
69     ResetSDD(box,per,vel,axL,axR,nAL,leL,nAR,leR);
70 }
71 //________________________________________________________________________
72 void AliITSgeomSDD::ResetSDD(const Float_t *box,Float_t per,Float_t vel,
73                              Float_t axL,Float_t axR,
74                              Int_t nAL,Float_t *leL,
75                              Int_t nAR,Float_t *leR){
76 ////////////////////////////////////////////////////////////////////////
77 //    Standard Filler
78 ////////////////////////////////////////////////////////////////////////
79     Int_t i;
80
81     fPeriod        = per;
82     fDvelocity     = vel;
83     fNAnodesL      = nAL;
84     fNAnodesR      = nAR;
85     fAnodeXL       = axL;
86     fAnodeXR       = axR;
87 //    if(fAnodeLowEdgeL!=0) delete fAnodeLowEdgeL;
88     fAnodeLowEdgeL = new Float_t[fNAnodesL];
89 //    if(fAnodeLowEdgeR!=0) delete fAnodeLowEdgeR;
90     fAnodeLowEdgeR = new Float_t[fNAnodesR];
91     for(i=0;i<fNAnodesL;i++) fAnodeLowEdgeL[i] = leL[i];
92     for(i=0;i<fNAnodesR;i++) fAnodeLowEdgeR[i] = leR[i];
93     fShapeSDD = new TBRIK("ActiveSDD","Active volume of SDD","SDD SI DET",
94                                box[0],box[1],box[2]);
95 }
96 //________________________________________________________________________
97 AliITSgeomSDD::~AliITSgeomSDD(){
98 // Destructor
99
100     if(fShapeSDD!=0) delete fShapeSDD;
101     if(fAnodeLowEdgeL!=0) delete [] fAnodeLowEdgeL;
102     if(fAnodeLowEdgeR!=0) delete [] fAnodeLowEdgeR;
103     fShapeSDD  = 0;
104     fPeriod    = 0.0;
105     fDvelocity = 0.0;
106     fAnodeXL   = 0.0;
107     fAnodeXR   = 0.0;
108     fNAnodesL  = 0;
109     fNAnodesR  = 0;
110     fAnodeLowEdgeL = 0;
111     fAnodeLowEdgeR = 0;
112 }
113 //________________________________________________________________________
114 AliITSgeomSDD::AliITSgeomSDD(AliITSgeomSDD &source) : TObject(source){
115     // Copy constructor
116     Int_t i;
117
118     if(this==&source) return;
119     this->fShapeSDD  = new TBRIK(*(source.fShapeSDD));
120     this->fPeriod    = source.fPeriod;
121     this->fDvelocity = source.fDvelocity;
122     this->fNAnodesL  = source.fNAnodesL;
123     this->fNAnodesR  = source.fNAnodesR;
124     this->fAnodeXL  = source.fAnodeXL;
125     this->fAnodeXR  = source.fAnodeXR;
126     if(fAnodeLowEdgeL!=0) delete fAnodeLowEdgeL;
127     this->fAnodeLowEdgeL = new Float_t[fNAnodesL];
128     if(fAnodeLowEdgeR!=0) delete fAnodeLowEdgeR;
129     this->fAnodeLowEdgeR = new Float_t[fNAnodesR];
130     for(i=0;i<fNAnodesL;i++)this->fAnodeLowEdgeL[i] = source.fAnodeLowEdgeL[i];
131     for(i=0;i<fNAnodesR;i++)this->fAnodeLowEdgeR[i] = source.fAnodeLowEdgeR[i];
132     return;
133 }
134 //________________________________________________________________________
135 AliITSgeomSDD& AliITSgeomSDD::operator=(AliITSgeomSDD &source){
136     // = operator
137     Int_t i;
138
139     if(this==&source) return *this;
140     this->fShapeSDD  = new TBRIK(*(source.fShapeSDD));
141     this->fPeriod    = source.fPeriod;
142     this->fDvelocity = source.fDvelocity;
143     this->fNAnodesL  = source.fNAnodesL;
144     this->fNAnodesR  = source.fNAnodesR;
145     this->fNAnodesR  = source.fNAnodesR;
146     this->fAnodeXL  = source.fAnodeXL;
147     this->fAnodeXR  = source.fAnodeXR;
148     if(fAnodeLowEdgeL!=0) delete fAnodeLowEdgeL;
149     this->fAnodeLowEdgeL = new Float_t[fNAnodesL];
150     if(fAnodeLowEdgeR!=0) delete fAnodeLowEdgeR;
151     this->fAnodeLowEdgeR = new Float_t[fNAnodesR];
152     for(i=0;i<fNAnodesL;i++)this->fAnodeLowEdgeL[i] = source.fAnodeLowEdgeL[i];
153     for(i=0;i<fNAnodesR;i++)this->fAnodeLowEdgeR[i] = source.fAnodeLowEdgeR[i];
154     return *this;
155 }
156 //______________________________________________________________________
157 void AliITSgeomSDD::Local2Det(Float_t xl,Float_t zl,Int_t &a,Int_t &t,Int_t &s){
158 // Give the local detector coordinate it returns the anode number, time
159 // bucket, and detector side.
160     Int_t i;
161
162     if(xl>0) {
163         if(zl<fAnodeLowEdgeR[0]) i=-1;
164         else for(i=0;i<fNAnodesR;i++) if(zl<fAnodeLowEdgeR[i]) break;
165         a = i;
166         s = 1;
167     } else if(xl<0){
168         if(zl<fAnodeLowEdgeL[0]) i=-1;
169         else for(i=0;i<fNAnodesL;i++) if(zl<fAnodeLowEdgeL[i]) break;
170         a = i;
171         s = 0;
172     } else { // x==0.
173         if(zl<fAnodeLowEdgeR[0]) i=-1;
174         else for(i=0;i<fNAnodesR;i++) if(zl<fAnodeLowEdgeR[i]) break;
175         a = i;
176         if(zl<fAnodeLowEdgeL[0]) i=-1;
177         else for(i=0;i<fNAnodesL;i++) if(zl<fAnodeLowEdgeL[i]) break;
178         s = -i;
179     } // end if
180     t = (Int_t)TMath::Abs((GetAnodeX(a,s)-xl)/fDvelocity/fPeriod);
181     return;
182 }
183 //______________________________________________________________________
184 void AliITSgeomSDD::Det2Local(Int_t a,Int_t t,Int_t s,Float_t &xl,Float_t &zl){
185 // Give the anode number, time bucket, and detector side, it returns the
186 // local detector coordinate.
187
188     zl = 0.5*GetAnodeZ(a,s);
189     if(s==0){
190         xl = GetAnodeX(a,s)+(t+0.5)*fPeriod*fDvelocity;
191     } else { // s==1
192         xl = GetAnodeX(a,s)-(t+0.5)*fPeriod*fDvelocity;
193     } // end if s==0;
194     return;
195 }
196 //______________________________________________________________________
197 void AliITSgeomSDD::Print(ostream *os) const {
198 ////////////////////////////////////////////////////////////////////////
199 // Standard output format for this class.
200 ////////////////////////////////////////////////////////////////////////
201     Int_t i;
202 #if defined __GNUC__ 
203 #if __GNUC__ > 2
204     ios::fmtflags fmt;
205 #else
206     Int_t fmt;
207 #endif
208 #else
209 #if defined __ICC || defined __ECC || defined _xlc_
210     ios::fmtflags fmt;
211 #else
212     Int_t fmt;
213 #endif
214 #endif
215
216     fmt = os->setf(ios::scientific);  // set scientific floating point output
217     *os << "TBRIK" << " ";
218     *os << setprecision(16) << GetDx() << " ";
219     *os << setprecision(16) << GetDy() << " ";
220     *os << setprecision(16) << GetDz() << " ";
221     *os << setprecision(16) << fPeriod << " ";
222     *os << setprecision(16) << fDvelocity << " ";
223     *os << fNAnodesL << " ";
224     *os << fNAnodesR << " ";
225     *os << fAnodeXL << " ";
226     *os << fAnodeXR << " ";
227     for(i=0;i<fNAnodesL;i++) *os <<setprecision(16)<<fAnodeLowEdgeL[i]<< " ";
228     for(i=0;i<fNAnodesR;i++) *os <<setprecision(16)<<fAnodeLowEdgeR[i]<< " ";
229     *os << endl;
230     os->flags(fmt); // reset back to old formating.
231     return;
232 }
233 //______________________________________________________________________
234 void AliITSgeomSDD::Read(istream *is){
235 ////////////////////////////////////////////////////////////////////////
236 // Standard input format for this class.
237 ////////////////////////////////////////////////////////////////////////
238     Int_t i;
239     Float_t dx,dy,dz;
240     char shp[20];
241
242     *is >> shp;
243     *is >> dx >> dy >> dz;
244     if(fShapeSDD!=0) delete fShapeSDD;
245     fShapeSDD = new TBRIK("ActiveSDD","Active volume of SDD","SDD SI DET",
246                             dx,dy,dz);
247     *is >> fPeriod >> fDvelocity >> fNAnodesL >> fNAnodesR;
248     *is >> fAnodeXL >> fAnodeXR;
249     if(fAnodeLowEdgeL!=0) delete fAnodeLowEdgeL;
250     this->fAnodeLowEdgeL = new Float_t[fNAnodesL];
251     if(fAnodeLowEdgeR!=0) delete fAnodeLowEdgeR;
252     this->fAnodeLowEdgeR = new Float_t[fNAnodesR];
253     for(i=0;i<fNAnodesL;i++) *is >> fAnodeLowEdgeL[i];
254     for(i=0;i<fNAnodesR;i++) *is >> fAnodeLowEdgeR[i];
255     return;
256 }
257 //----------------------------------------------------------------------
258 ostream &operator<<(ostream &os,AliITSgeomSDD &p){
259 ////////////////////////////////////////////////////////////////////////
260 // Standard output streaming function.
261 ////////////////////////////////////////////////////////////////////////
262
263     p.Print(&os);
264     return os;
265 }
266 //----------------------------------------------------------------------
267 istream &operator>>(istream &is,AliITSgeomSDD &r){
268 ////////////////////////////////////////////////////////////////////////
269 // Standard input streaming function.
270 ////////////////////////////////////////////////////////////////////////
271
272     r.Read(&is);
273     return is;
274 }
275
276 //======================================================================
277
278 ClassImp(AliITSgeomSDD256)
279
280 AliITSgeomSDD256::AliITSgeomSDD256() : AliITSgeomSDD(){
281     // Default Constructor
282 }
283 //----------------------------------------------------------------------
284 AliITSgeomSDD256::AliITSgeomSDD256(Int_t npar,const Float_t *par) : 
285     AliITSgeomSDD(){
286 ////////////////////////////////////////////////////////////////////////
287 //    constructor
288 /*
289 Pads for probe cards in ALICE-D2       /05.03.2000/
290 (X,Y) coordinates are quoted in microns and referred to the centers of 
291 bonding pads. (0, 0) corrispond to the center of the detector.
292 Convention: 
293 left is for negative X, right is for positive X;
294 DOWN half is for negative Y, UP half is for positive Y.
295
296 Detector size: X= 87588 micrometers; Y= 72500 micrometers. 
297 Detector corners:
298   LEFT UP: (-43794, 36250)
299 RIGHT UP:  (43794, 36250)
300  LEFT DOWN: (-43794, -36250)
301 RIGHT DOWN:  (43794, -36250)
302
303         Drift cathodes (n-side)
304
305 cathode #0 (Ubias) 
306 (-1477, 0), pad size (150, 60)
307    (875, 0), pad size (150, 60)
308 (-36570, 0), pad size (200, 70)
309 (-37570, 0), pad size (200, 70)
310 (36570, 0), pad size (200, 70)
311 (37570, 0), pad size (200, 70)
312
313 cathode #1 DOWN half 
314 (-1477, -120), pad size (150, 60)
315    (875, -120), pad size (150, 60)
316 (-36570, -120), pad size (200, 70)
317 (-37570, -120), pad size (200, 70)
318 (36570, -120), pad size (200, 70)
319 (37570, -120), pad size (200, 70)
320
321 cathode #2 DOWN half 
322 (-1477, -240), pad size (150, 60)
323    (875, -240), pad size (150, 60)
324 (-36570, -240), pad size (200, 70)
325 (-37570, -240), pad size (200, 70)
326 (36570, -240), pad size (200, 70)
327 (37570, -240), pad size (200, 70)
328
329 cathode #3 DOWN half 
330 (-1477, -360), pad size (150, 60)
331    (875, -360), pad size (150, 60)
332 (-36570, -360), pad size (200, 70)
333 (-37570, -360), pad size (200, 70)
334 (36570, -360), pad size (200, 70)
335 (37570, -360), pad size (200, 70)
336 .....................................
337 ......................................
338 ......................................
339 cathode #30 DOWN half
340 (-1477, -3600), pad size (150, 60)
341    (875, -3600), pad size (150, 60)
342 (-36570, -3600), pad size (200, 70)
343 (-37570, -3600), pad size (200, 70)
344 (36570, -3600), pad size (200, 70)
345 (37570, -3600), pad size (200, 70)
346 ...................................
347 cathode #60 DOWN half
348 (-1477, -7200), pad size (150, 60)
349    (875, -7200), pad size (150, 60)
350 (-36570, -7200), pad size (200, 70)
351 (-37570, -7200), pad size (200, 70)
352 (36570, -7200), pad size (200, 70)
353 (37570, -7200), pad size (200, 70)
354 ....................................
355 cathode #90 DOWN half
356 (-1477, -10800), pad size (150, 60)
357    (875, -10800), pad size (150, 60)
358 (-36570, -10800), pad size (200, 70)
359 (-37570, -10800), pad size (200, 70)
360 (36570, -10800), pad size (200, 70)
361 (37570, -10800), pad size (200, 70)
362 ....................................
363 cathode #120 DOWN half
364 (-1477, -14400), pad size (150, 60)
365    (875, -14400), pad size (150, 60)
366 (-36570, -14400), pad size (200, 70)
367 (-37570, -14400), pad size (200, 70)
368 (36570, -14400), pad size (200, 70)
369 (37570, -14400), pad size (200, 70)
370 ....................................
371 cathode #150 DOWN half
372 (-1477, -18000), pad size (150, 60)
373    (875, -18000), pad size (150, 60)
374 (-36570, -18000), pad size (200, 70)
375 (-37570, -18000), pad size (200, 70)
376 (36570, -18000), pad size (200, 70)
377 (37570, -18000), pad size (200, 70)
378 ....................................
379 cathode #180 DOWN half
380 (-1477, -21600), pad size (150, 60)
381    (875, -21600), pad size (150, 60)
382 (-36570, -21600), pad size (200, 70)
383 (-37570, -21600), pad size (200, 70)
384 (36570, -21600), pad size (200, 70)
385 (37570, -21600), pad size (200, 70)
386 ....................................
387 cathode #210 DOWN half
388 (-1477, -25200), pad size (150, 60)
389    (875, -25200), pad size (150, 60)
390 (-36570, -25200), pad size (200, 70)
391 (-37570, -25200), pad size (200, 70)
392 (36570, -25200), pad size (200, 70)
393 (37570, -25200), pad size (200, 70)
394 ....................................
395 cathode #240 DOWN half
396 (-1477, -28800), pad size (150, 60)
397    (875, -28800), pad size (150, 60)
398 (-36570, -28800), pad size (200, 70)
399 (-37570, -28800), pad size (200, 70)
400 (36570, -28800), pad size (200, 70)
401 (37570, -28800), pad size (200, 70)
402 ....................................
403 cathode #270 DOWN half
404 (-1477, -32400), pad size (150, 60)
405    (875, -32400), pad size (150, 60)
406 (-36570, -32400), pad size (200, 70)
407 (-37570, -32400), pad size (200, 70)
408 (36570, -32400), pad size (200, 70)
409 (37570, -32400), pad size (200, 70)
410 ....................................
411 cathode #290 DOWN half
412 (-1477, -34800), pad size (150, 60)
413    (875, -34800), pad size (150, 60)
414 (-36570, -34800), pad size (200, 70)
415 (-37570, -34800), pad size (200, 70)
416 (36570, -34800), pad size (200, 70)
417 (37570, -34800), pad size (200, 70)
418 ___________________________________________________
419 cathode #1 UP half 
420 (-1477, 120), pad size (150, 60)
421    (875, 120), pad size (150, 60)
422 (-36570, 120), pad size (200, 70)
423 (-37570, 120), pad size (200, 70)
424 (36570, 120), pad size (200, 70)
425 (37570, 120), pad size (200, 70)
426
427 cathode #2 UP half 
428 (-1477, 240), pad size (150, 60)
429    (875, 240), pad size (150, 60)
430 (-36570, 240), pad size (200, 70)
431 (-37570, 240), pad size (200, 70)
432 (36570, 240), pad size (200, 70)
433 (37570, 240), pad size (200, 70)
434
435 cathode #3 UP half 
436 (-1477, 360), pad size (150, 60)
437    (875, 360), pad size (150, 60)
438 (-36570, 360), pad size (200, 70)
439 (-37570, 360), pad size (200, 70)
440 (36570, 360), pad size (200, 70)
441 (37570, 360), pad size (200, 70)
442 .....................................
443 ......................................
444 ......................................
445 cathode #30 UP half
446 (-1477, 3600), pad size (150, 60)
447    (875, 3600), pad size (150, 60)
448 (-36570, 3600), pad size (200, 70)
449 (-37570, 3600), pad size (200, 70)
450 (36570, 3600), pad size (200, 70)
451 (37570, 3600), pad size (200, 70)
452 ......................................
453 cathode #60 UP half
454 (-1477, 7200), pad size (150, 60)
455    (875, 7200), pad size (150, 60)
456 (-36570, 7200), pad size (200, 70)
457 (-37570, 7200), pad size (200, 70)
458 (36570, 7200), pad size (200, 70)
459 (37570, 7200), pad size (200, 70)
460 ......................................
461 cathode #90 UP half
462 (-1477, 10800), pad size (150, 60)
463    (875, 10800), pad size (150, 60)
464 (-36570, 10800), pad size (200, 70)
465 (-37570, 10800), pad size (200, 70)
466 (36570, 10800), pad size (200, 70)
467 (37570, 10800), pad size (200, 70)
468 ......................................
469 cathode #120 UP half
470 (-1477, 14400), pad size (150, 60)
471    (875, 14400), pad size (150, 60)
472 (-36570, 14400), pad size (200, 70)
473 (-37570, 14400), pad size (200, 70)
474 (36570, 14400), pad size (200, 70)
475 (37570, 14400), pad size (200, 70)
476 ......................................
477 cathode #150 UP half
478 (-1477, 18000), pad size (150, 60)
479    (875, 18000), pad size (150, 60)
480 (-36570, 18000), pad size (200, 70)
481 (-37570, 18000), pad size (200, 70)
482 (36570, 18000), pad size (200, 70)
483 (37570, 18000), pad size (200, 70)
484 ......................................
485 cathode #180 UP half
486 (-1477, 21600), pad size (150, 60)
487    (875, 21600), pad size (150, 60)
488 (-36570, 21600), pad size (200, 70)
489 (-37570, 21600), pad size (200, 70)
490 (36570, 21600), pad size (200, 70)
491 (37570, 21600), pad size (200, 70)
492 ......................................
493 cathode #210 UP half
494 (-1477, 25200), pad size (150, 60)
495    (875, 25200), pad size (150, 60)
496 (-36570, 25200), pad size (200, 70)
497 (-37570, 25200), pad size (200, 70)
498 (36570, 25200), pad size (200, 70)
499 (37570, 25200), pad size (200, 70)
500 ......................................
501 cathode #240 UP half
502 (-1477, 28800), pad size (150, 60)
503    (875, 28800), pad size (150, 60)
504 (-36570, 28800), pad size (200, 70)
505 (-37570, 28800), pad size (200, 70)
506 (36570, 28800), pad size (200, 70)
507 (37570, 28800), pad size (200, 70)
508 ......................................
509 cathode #270 UP half
510 (-1477, 32400), pad size (150, 60)
511    (875, 32400), pad size (150, 60)
512 (-36570, 32400), pad size (200, 70)
513 (-37570, 32400), pad size (200, 70)
514 (36570, 32400), pad size (200, 70)
515 (37570, 32400), pad size (200, 70)
516 ......................................
517 cathode #290 UP half
518 (-1477, 34800), pad size (150, 60)
519    (875, 34800), pad size (150, 60)
520 (-36570, 34800), pad size (200, 70)
521 (-37570, 34800), pad size (200, 70)
522 (36570, 34800), pad size (200, 70)
523 (37570, 34800), pad size (200, 70)
524         Injectors (n-side)
525
526 Central line injectors (DOWN half)
527 (-1237, -660), pad size (150, 65)
528 (1115, -660), pad size (150, 65)
529 (37890, -660), pad size (100, 74)
530
531 Middle line injectors (DOWN half)
532 (-1237, -17460), pad size (150, 80)
533 (1115, -17460), pad size (150, 80)
534 (37890, -17460), pad size (100, 74)
535
536 Bottom line injectors (DOWN half)
537 (-1237, -34020), pad size (150, 80)
538 (1115, -34020), pad size (150, 80)
539 (37890, -34020), pad size (100, 74)
540 ___________________________________________
541 Central line injectors (UP half)
542 (-1237, 660), pad size (150, 65)
543 (1115, 660), pad size (150, 65)
544 (37890, 660), pad size (100, 74)
545
546 Middle line injectors (UP half)
547 (-1237, 17460), pad size (150, 80)
548 (1115, 17460), pad size (150, 80)
549 (37890, 17460), pad size (100, 74)
550
551 Bottom line injectors (UP half)
552 (-1237, 34020), pad size (150, 80)
553 (1115, 34020), pad size (150, 80)
554 (37890, 34020), pad size (100, 74)
555
556 Drift cathodes and injectors of p-side have the bonding pads with the same 
557 coordinates as for the n-side (when looking through the masks)
558
559         Cathodes of the collection zone (n-side)
560
561 cathode #291 (-40 V) DOWN half
562 (-38220, -35055), pad size (120, 160)
563 (38190, -34992), pad size (120, 145)
564
565 GRID cathode (-15 V) DOWN half
566 (-37988, -35085), pad size (144, 210)
567   (37988, -35085), pad size (144, 210)
568
569 cathode #292 (-30 V) DOWN half
570 (-38245, -35290), pad size (100, 170)
571 (38210, -35242), pad size (150, 215)
572
573 cathode #293 (-15 V) DOWN half
574 (-38055, -35460), pad size (690, 70)
575 (36488, -35460), pad size (3805, 70)
576
577 n+ bulk contact (GND) DOWN half
578 (-38300, -36050), pad size (1000, 395)
579 (38300, -36050), pad size (1000, 395)
580
581 bonding pad of the last integrated resistor DOWN half
582 /it has to be connected to the GND/
583 (-38190, -35620) pad size (160, 110)
584 ________________________________________________ 
585 cathode #291 (-40 V) UP half
586 (-38220, 35055), pad size (120, 160)
587 (38190, 34992), pad size (120, 145)
588
589 GRID cathode (-15 V) UP half
590 (-37988, 35085), pad size (144, 210)
591   (37988, 35085), pad size (144, 210)
592
593 cathode #292 (-30 V) UP half
594 (-38245, 35290), pad size (100, 170)
595 (38210, 35242), pad size (150, 215)
596
597 cathode #293 (-15 V) UP half
598 (-38055, 35460), pad size (690, 70)
599 (36488, 35460), pad size (3805, 70)
600
601 n+ bulk contact (GND) UP half
602 (-38300, 36050), pad size (1000, 395)
603 (38300, 36050), pad size (1000, 395)
604
605 bonding pad of the last integrated resistor UP half
606 /it has to be connected to the GND/
607 (-38190, 35620) pad size (160, 110)
608
609 Cathodes of the collection zone (p-side)
610
611 cathode #291 (-40 V) DOWN half
612 (-38215, -35055), pad size (120, 160)
613 (38190, -34992), pad size (120, 145)
614
615 cathode W1 (-60 V) DOWN half
616 (-38000, -35110), pad size (140, 240)
617  (38000, -35110), pad size (140, 240)
618
619 cathode W2 (-80 V) DOWN half
620 ( 0, -35090), pad size (75600, 110)
621
622 cathode #292 (-40 V) DOWN half
623 (-38220, -35290), pad size (150, 170)
624 (38210, -35242), pad size (150, 215)
625
626 p+ bulk contact (GND) DOWN half
627 (-38300, -36050), pad size (1000, 395)
628 (38300, -36050), pad size (1000, 395)
629
630 It is necessary to connect cathode #291 to cathode #292 in order to
631 close the integrated divider to p+ bulk contact (GND).
632
633 _______________________________________________
634 cathode #291 (-40 V) UP half
635 (-38215, 35055), pad size (120, 160)
636 (38190, 34992), pad size (120, 145)
637
638 cathode W1 (-60 V) UP half
639 (-38000, 35110), pad size (140, 240)
640  (38000, 35110), pad size (140, 240)
641
642 cathode W2 (-80 V) UP half
643 ( 0, 35090), pad size (75600, 110)
644
645 cathode #292 (-40 V) UP half
646 (-38220, 35290), pad size (150, 170)
647 (38210, 35242), pad size (150, 215)
648
649 p+ bulk contact (GND) UP half
650 (-38300, 36050), pad size (1000, 395)
651 (38300, 36050), pad size (1000, 395)
652
653 It is necessary to connect cathode #291 to cathode #292 in order to
654 close the integrated divider to p+ bulk contact (GND).
655
656         Anodes (n-side)
657 There are 256 anodes to be bonded to the inputs of front-end electronics. In 
658 addition there are 2 anodes (one at the left edge and one at the right edge 
659 of the anode array) that have to be bonded to the ground. I call these 2 
660 anodes #L and #R. The pitch of all anodes is 294 micrometers.
661
662                 DOWN half anodes
663 #L             (-37779, -35085), pad size (184, 140)
664 #1             (-37485, -35085), pad size (184, 140)
665 .........................................
666 .........................................
667 #256.............(37485, -35085), pad size (184, 140)
668 #R              (37779, -35085), pad size (184, 140)
669 _____________________________________________
670                 UP half anodes
671 #L             (-37779, 35085), pad size (184, 140)
672 #1             (-37485, 35085), pad size (184, 140)
673 .........................................
674 .........................................
675 #256.............(37485, 35085), pad size (184, 140)
676 #R              (37779, 35085), pad size (184, 140)
677 */
678 ////////////////////////////////////////////////////////////////////////
679 //   const Float_t kDxyz[]   = {3.6250,0.01499,4.3794};//cm. (Geant 3.12 units)
680                                       // Size of sensitive region of detector
681     const Float_t kPeriod   = 25.0E-09; // 40 MHz sampling frequence
682     const Float_t kVelocity = 5.46875E+03; // cm/s drift velocity
683     const Float_t kAnodeXL  = -3.5085; // cm location in x of anodes left side
684     const Float_t kAnodeXR  =  3.5085; // cm location in x of anodes right side
685     const Int_t   kNAnodes  = 256;  // nuber of anodes connected
686     const Float_t kAnodePitch = 0.0294; // cm
687     const Float_t kAnodesZ  = -3.7485; // cm Starting location of anodes in z
688     Float_t anodeLowEdges[kNAnodes+1];
689     Int_t i;
690
691     if(npar<3){
692         Error("AliITSgeomSDD256","npar=%d<3. array par must be [3] or greater",
693               npar);
694         return;
695     } // end if
696 //    cout << "AliITSgeomSDD256 default creator called: start" << end;
697    anodeLowEdges[0] = kAnodesZ;
698     for(i=0;i<kNAnodes;i++)anodeLowEdges[i+1] = kAnodePitch+anodeLowEdges[i];
699     AliITSgeomSDD::ResetSDD(par,kPeriod,kVelocity,kAnodeXL,kAnodeXR,
700                             kNAnodes+1,anodeLowEdges,
701                             kNAnodes+1,anodeLowEdges);
702 //    cout << "AliITSgeomSDD256 default creator called: end" << endl;
703 }
704 //________________________________________________________________________
705 ostream &operator<<(ostream &os,AliITSgeomSDD256 &p){
706 ////////////////////////////////////////////////////////////////////////
707 // Standard output streaming function.
708 ////////////////////////////////////////////////////////////////////////
709
710     p.Print(&os);
711     return os;
712 }
713 //----------------------------------------------------------------------
714 istream &operator>>(istream &is,AliITSgeomSDD256 &r){
715 ////////////////////////////////////////////////////////////////////////
716 // Standard input streaming function.
717 ////////////////////////////////////////////////////////////////////////
718
719     r.Read(&is);
720     return is;
721 }
722
723 //======================================================================
724
725 ClassImp(AliITSgeomSDD300)
726
727 AliITSgeomSDD300::AliITSgeomSDD300() : AliITSgeomSDD(){
728 ////////////////////////////////////////////////////////////////////////
729 //    default constructor
730 ////////////////////////////////////////////////////////////////////////
731     const Float_t kDxyz[] = {3.500,0.014,3.763};//cm.
732     const Float_t kPeriod = 25.0E-09; // 40 MHz
733     const Float_t kVelocity = 5.46875E+3; // cm/s
734     const Int_t kNAnodes = 300; // number of anodes
735     const Float_t kAnodeXL = -3.500; // cm
736     const Float_t kAnodeXR = +3.500; // cm
737     const Float_t kAnodesZ = -3.75; // cm
738     Float_t anodeLowEdges[kNAnodes+1];
739     const Float_t kanode = 0.0250;// cm anode separation.
740     Int_t i;
741
742 //    cout << "AliITSgeomSDD300 default creator called: start" << endl;
743    anodeLowEdges[0] = kAnodesZ;
744     for(i=0;i<kNAnodes;i++)anodeLowEdges[i+1] = kanode+anodeLowEdges[i];
745     AliITSgeomSDD::ResetSDD(kDxyz,kPeriod,kVelocity,kAnodeXL,kAnodeXR,
746                             kNAnodes+1,anodeLowEdges,
747                             kNAnodes+1,anodeLowEdges);
748 //    cout << "AliITSgeomSDD300 default creator called: end" << endl;
749 }
750 //________________________________________________________________________
751 ostream &operator<<(ostream &os,AliITSgeomSDD300 &p){
752 ////////////////////////////////////////////////////////////////////////
753 // Standard output streaming function.
754 ////////////////////////////////////////////////////////////////////////
755
756     p.Print(&os);
757     return os;
758 }
759 //----------------------------------------------------------------------
760 istream &operator>>(istream &is,AliITSgeomSDD300 &r){
761 ////////////////////////////////////////////////////////////////////////
762 // Standard input streaming function.
763 ////////////////////////////////////////////////////////////////////////
764
765     r.Read(&is);
766     return is;
767 }
768 //----------------------------------------------------------------------