]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSgeomSDD.cxx
Merging the VirtualMC branch to the main development branch (HEAD)
[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 /*
17 $Log$
18 Revision 1.15.6.1  2002/06/10 17:51:15  hristov
19 Merged with v3-08-02
20
21 Revision 1.16  2002/05/19 18:17:03  hristov
22 Changes needed by ICC/IFC compiler (Intel)
23
24 Revision 1.15  2001/11/19 16:17:03  nilsen
25 Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
26 bugs found by Rene require more work to fix. Will be fixed soon.
27
28 Revision 1.14  2001/10/19 21:32:35  nilsen
29 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
30 cleanded up a little bit of code.
31
32 Revision 1.13  2001/10/12 22:07:20  nilsen
33 A patch for C++ io manipulation functions so that they will work both
34 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
35 other platforms.
36
37 Revision 1.12  2001/08/24 21:06:37  nilsen
38 Added more documentation, fixed up some coding violations, and some
39 forward declorations.
40
41 Revision 1.11  2001/05/16 08:17:49  hristov
42 Bug fixed in the StepManager to account for the difference in the geometry 
43 tree for the ITS pixels. This fixes both the funny distribution of pixel 
44 coordinates and the missing hits/digits/points in many sectors of the ITS 
45 pixel barrel. Also included is a patch to properly get and use the detector 
46 dimensions through out the ITS code. (B.Nilsen)
47
48 Revision 1.10  2001/02/09 00:00:57  nilsen
49 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
50 bugs in iostream based streamers used to read and write .det files. Fixed
51 some detector sizes. Fixed bugs in some default-special constructors.
52
53 Revision 1.9  2001/02/03 00:00:30  nilsen
54 New version of AliITSgeom and related files. Now uses automatic streamers,
55 set up for new formatted .det file which includes detector information.
56 Additional smaller modifications are still to come.
57
58 Revision 1.8  2000/10/02 16:32:35  barbera
59 Forward declaration added
60
61 Revision 1.2.4.8  2000/10/02 15:52:05  barbera
62 Forward declaration added
63
64 Revision 1.7  2000/07/10 16:07:18  fca
65 Release version of ITS code
66
67 Revision 1.2.4.2  2000/03/04 23:55:35  nilsen
68 Fixed up comments/documentation.
69
70 Revision 1.2.4.1  2000/01/12 19:03:32  nilsen
71 This is the version of the files after the merging done in December 1999.
72 See the ReadMe110100.txt file for details
73
74 Revision 1.2  1999/09/29 09:24:20  fca
75 Introduction of the Copyright and cvs Log
76
77 */
78
79 ////////////////////////////////////////////////////////////////////////
80 // This class is for the Silicon Drift Detector, SDD, specific geometry.
81 // It is being replaced by AliITSsegmentationSDD class. This file also
82 // constains classes derived from AliITSgeomSDD which do nothing but
83 // initilize this one with predefined values.
84 ////////////////////////////////////////////////////////////////////////
85
86 #include <iostream.h>
87 #include <iomanip.h>
88 #include <stdlib.h>
89 #include <TShape.h>
90
91 #include "AliITSgeomSDD.h"
92
93 ClassImp(AliITSgeomSDD)
94 AliITSgeomSDD::AliITSgeomSDD(){
95 ////////////////////////////////////////////////////////////////////////
96 //    default constructor
97 ////////////////////////////////////////////////////////////////////////
98 //    const Float_t kDx = 3.500;//cm. (Geant 3.12 units) Orthonormal to y and z
99 //    const Float_t kDy = 0.014;//cm. (Geant 3.12 units) Radialy from the Beam
100 //    const Float_t kDz = 3.763;//cm. (Geant 3.12 units) Allong the Beam Pipe
101
102 //    cout << "AliITSgeomSDD default creator called: start" << endl;
103     fPeriod        = 0.0;
104     fDvelocity     = 0.0;
105     fNAnodesL      = 0;
106     fNAnodesR      = 0;
107     fAnodeXL       = 0.0;
108     fAnodeXR       = 0.0;
109     fAnodeLowEdgeL = 0;
110     fAnodeLowEdgeR = 0;
111     fShapeSDD      = 0;
112 //    cout << "AliITSgeomSDD default creator called: end" << endl;
113 }
114 //________________________________________________________________________
115 AliITSgeomSDD::AliITSgeomSDD(const Float_t *box,Float_t per,Float_t vel,
116                              Float_t axL,Float_t axR,
117                              Int_t nAL,Float_t *leL,
118                              Int_t nAR,Float_t *leR){
119 ////////////////////////////////////////////////////////////////////////
120 //    Standard constructor
121 ////////////////////////////////////////////////////////////////////////
122     fPeriod        = 0.0;
123     fDvelocity     = 0.0;
124     fNAnodesL      = 0;
125     fNAnodesR      = 0;
126     fAnodeXL       = 0.0;
127     fAnodeXR       = 0.0;
128     fAnodeLowEdgeL = 0;
129     fAnodeLowEdgeR = 0;
130     fShapeSDD      = 0;
131     ResetSDD(box,per,vel,axL,axR,nAL,leL,nAR,leR);
132 }
133 //________________________________________________________________________
134 void AliITSgeomSDD::ResetSDD(const Float_t *box,Float_t per,Float_t vel,
135                              Float_t axL,Float_t axR,
136                              Int_t nAL,Float_t *leL,
137                              Int_t nAR,Float_t *leR){
138 ////////////////////////////////////////////////////////////////////////
139 //    Standard Filler
140 ////////////////////////////////////////////////////////////////////////
141     Int_t i;
142
143     fPeriod        = per;
144     fDvelocity     = vel;
145     fNAnodesL      = nAL;
146     fNAnodesR      = nAR;
147     fAnodeXL       = axL;
148     fAnodeXR       = axR;
149 //    if(fAnodeLowEdgeL!=0) delete fAnodeLowEdgeL;
150     fAnodeLowEdgeL = new Float_t[fNAnodesL];
151 //    if(fAnodeLowEdgeR!=0) delete fAnodeLowEdgeR;
152     fAnodeLowEdgeR = new Float_t[fNAnodesR];
153     for(i=0;i<fNAnodesL;i++) fAnodeLowEdgeL[i] = leL[i];
154     for(i=0;i<fNAnodesR;i++) fAnodeLowEdgeR[i] = leR[i];
155     fShapeSDD = new TBRIK("ActiveSDD","Active volume of SDD","SDD SI DET",
156                                box[0],box[1],box[2]);
157 }
158 //________________________________________________________________________
159 AliITSgeomSDD::~AliITSgeomSDD(){
160 // Destructor
161
162     if(fShapeSDD!=0) delete fShapeSDD;
163     if(fAnodeLowEdgeL!=0) delete [] fAnodeLowEdgeL;
164     if(fAnodeLowEdgeR!=0) delete [] fAnodeLowEdgeR;
165     fShapeSDD  = 0;
166     fPeriod    = 0.0;
167     fDvelocity = 0.0;
168     fAnodeXL   = 0.0;
169     fAnodeXR   = 0.0;
170     fNAnodesL  = 0;
171     fNAnodesR  = 0;
172     fAnodeLowEdgeL = 0;
173     fAnodeLowEdgeR = 0;
174 }
175 //________________________________________________________________________
176 AliITSgeomSDD::AliITSgeomSDD(AliITSgeomSDD &source){
177     // Copy constructor
178     Int_t i;
179
180     if(this==&source) return;
181     this->fShapeSDD  = new TBRIK(*(source.fShapeSDD));
182     this->fPeriod    = source.fPeriod;
183     this->fDvelocity = source.fDvelocity;
184     this->fNAnodesL  = source.fNAnodesL;
185     this->fNAnodesR  = source.fNAnodesR;
186     this->fAnodeXL  = source.fAnodeXL;
187     this->fAnodeXR  = source.fAnodeXR;
188     if(fAnodeLowEdgeL!=0) delete fAnodeLowEdgeL;
189     this->fAnodeLowEdgeL = new Float_t[fNAnodesL];
190     if(fAnodeLowEdgeR!=0) delete fAnodeLowEdgeR;
191     this->fAnodeLowEdgeR = new Float_t[fNAnodesR];
192     for(i=0;i<fNAnodesL;i++)this->fAnodeLowEdgeL[i] = source.fAnodeLowEdgeL[i];
193     for(i=0;i<fNAnodesR;i++)this->fAnodeLowEdgeR[i] = source.fAnodeLowEdgeR[i];
194     return;
195 }
196 //________________________________________________________________________
197 AliITSgeomSDD& AliITSgeomSDD::operator=(AliITSgeomSDD &source){
198     // = operator
199     Int_t i;
200
201     if(this==&source) return *this;
202     this->fShapeSDD  = new TBRIK(*(source.fShapeSDD));
203     this->fPeriod    = source.fPeriod;
204     this->fDvelocity = source.fDvelocity;
205     this->fNAnodesL  = source.fNAnodesL;
206     this->fNAnodesR  = source.fNAnodesR;
207     this->fNAnodesR  = source.fNAnodesR;
208     this->fAnodeXL  = source.fAnodeXL;
209     this->fAnodeXR  = source.fAnodeXR;
210     if(fAnodeLowEdgeL!=0) delete fAnodeLowEdgeL;
211     this->fAnodeLowEdgeL = new Float_t[fNAnodesL];
212     if(fAnodeLowEdgeR!=0) delete fAnodeLowEdgeR;
213     this->fAnodeLowEdgeR = new Float_t[fNAnodesR];
214     for(i=0;i<fNAnodesL;i++)this->fAnodeLowEdgeL[i] = source.fAnodeLowEdgeL[i];
215     for(i=0;i<fNAnodesR;i++)this->fAnodeLowEdgeR[i] = source.fAnodeLowEdgeR[i];
216     return *this;
217 }
218 //______________________________________________________________________
219 void AliITSgeomSDD::Local2Det(Float_t xl,Float_t zl,Int_t &a,Int_t &t,Int_t &s){
220 // Give the local detector coordinate it returns the anode number, time
221 // bucket, and detector side.
222     Int_t i;
223
224     if(xl>0) {
225         if(zl<fAnodeLowEdgeR[0]) i=-1;
226         else for(i=0;i<fNAnodesR;i++) if(zl<fAnodeLowEdgeR[i]) break;
227         a = i;
228         s = 1;
229     } else if(xl<0){
230         if(zl<fAnodeLowEdgeL[0]) i=-1;
231         else for(i=0;i<fNAnodesL;i++) if(zl<fAnodeLowEdgeL[i]) break;
232         a = i;
233         s = 0;
234     } else { // x==0.
235         if(zl<fAnodeLowEdgeR[0]) i=-1;
236         else for(i=0;i<fNAnodesR;i++) if(zl<fAnodeLowEdgeR[i]) break;
237         a = i;
238         if(zl<fAnodeLowEdgeL[0]) i=-1;
239         else for(i=0;i<fNAnodesL;i++) if(zl<fAnodeLowEdgeL[i]) break;
240         s = -i;
241     } // end if
242     t = (Int_t)TMath::Abs((GetAnodeX(a,s)-xl)/fDvelocity/fPeriod);
243     return;
244 }
245 //______________________________________________________________________
246 void AliITSgeomSDD::Det2Local(Int_t a,Int_t t,Int_t s,Float_t &xl,Float_t &zl){
247 // Give the anode number, time bucket, and detector side, it returns the
248 // local detector coordinate.
249
250     zl = 0.5*GetAnodeZ(a,s);
251     if(s==0){
252         xl = GetAnodeX(a,s)+(t+0.5)*fPeriod*fDvelocity;
253     } else { // s==1
254         xl = GetAnodeX(a,s)-(t+0.5)*fPeriod*fDvelocity;
255     } // end if s==0;
256     return;
257 }
258 //______________________________________________________________________
259 void AliITSgeomSDD::Print(ostream *os) const {
260 ////////////////////////////////////////////////////////////////////////
261 // Standard output format for this class.
262 ////////////////////////////////////////////////////////////////////////
263     Int_t i;
264 #if defined __GNUC__
265 #if __GNUC__ > 2
266     ios::fmtflags fmt;
267 #else
268     Int_t fmt;
269 #endif
270 #else
271 #if defined __ICC
272     ios::fmtflags fmt;
273 #else
274     Int_t fmt;
275 #endif
276 #endif
277
278     fmt = os->setf(ios::scientific);  // set scientific floating point output
279     *os << "TBRIK" << " ";
280     *os << setprecision(16) << GetDx() << " ";
281     *os << setprecision(16) << GetDy() << " ";
282     *os << setprecision(16) << GetDz() << " ";
283     *os << setprecision(16) << fPeriod << " ";
284     *os << setprecision(16) << fDvelocity << " ";
285     *os << fNAnodesL << " ";
286     *os << fNAnodesR << " ";
287     *os << fAnodeXL << " ";
288     *os << fAnodeXR << " ";
289     for(i=0;i<fNAnodesL;i++) *os <<setprecision(16)<<fAnodeLowEdgeL[i]<< " ";
290     for(i=0;i<fNAnodesR;i++) *os <<setprecision(16)<<fAnodeLowEdgeR[i]<< " ";
291     *os << endl;
292     os->flags(fmt); // reset back to old formating.
293     return;
294 }
295 //______________________________________________________________________
296 void AliITSgeomSDD::Read(istream *is){
297 ////////////////////////////////////////////////////////////////////////
298 // Standard input format for this class.
299 ////////////////////////////////////////////////////////////////////////
300     Int_t i;
301     Float_t dx,dy,dz;
302     char shp[20];
303
304     *is >> shp;
305     *is >> dx >> dy >> dz;
306     if(fShapeSDD!=0) delete fShapeSDD;
307     fShapeSDD = new TBRIK("ActiveSDD","Active volume of SDD","SDD SI DET",
308                             dx,dy,dz);
309     *is >> fPeriod >> fDvelocity >> fNAnodesL >> fNAnodesR;
310     *is >> fAnodeXL >> fAnodeXR;
311     if(fAnodeLowEdgeL!=0) delete fAnodeLowEdgeL;
312     this->fAnodeLowEdgeL = new Float_t[fNAnodesL];
313     if(fAnodeLowEdgeR!=0) delete fAnodeLowEdgeR;
314     this->fAnodeLowEdgeR = new Float_t[fNAnodesR];
315     for(i=0;i<fNAnodesL;i++) *is >> fAnodeLowEdgeL[i];
316     for(i=0;i<fNAnodesR;i++) *is >> fAnodeLowEdgeR[i];
317     return;
318 }
319 //----------------------------------------------------------------------
320 ostream &operator<<(ostream &os,AliITSgeomSDD &p){
321 ////////////////////////////////////////////////////////////////////////
322 // Standard output streaming function.
323 ////////////////////////////////////////////////////////////////////////
324
325     p.Print(&os);
326     return os;
327 }
328 //----------------------------------------------------------------------
329 istream &operator>>(istream &is,AliITSgeomSDD &r){
330 ////////////////////////////////////////////////////////////////////////
331 // Standard input streaming function.
332 ////////////////////////////////////////////////////////////////////////
333
334     r.Read(&is);
335     return is;
336 }
337 //======================================================================
338 /*
339 $Log$
340 Revision 1.15.6.1  2002/06/10 17:51:15  hristov
341 Merged with v3-08-02
342
343 Revision 1.16  2002/05/19 18:17:03  hristov
344 Changes needed by ICC/IFC compiler (Intel)
345
346 Revision 1.15  2001/11/19 16:17:03  nilsen
347 Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
348 bugs found by Rene require more work to fix. Will be fixed soon.
349
350 Revision 1.14  2001/10/19 21:32:35  nilsen
351 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
352 cleanded up a little bit of code.
353
354 Revision 1.13  2001/10/12 22:07:20  nilsen
355 A patch for C++ io manipulation functions so that they will work both
356 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
357 other platforms.
358
359 Revision 1.12  2001/08/24 21:06:37  nilsen
360 Added more documentation, fixed up some coding violations, and some
361 forward declorations.
362
363 Revision 1.11  2001/05/16 08:17:49  hristov
364 Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
365
366 Revision 1.10  2001/02/09 00:00:57  nilsen
367 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
368 bugs in iostream based streamers used to read and write .det files. Fixed
369 some detector sizes. Fixed bugs in some default-special constructors.
370
371 Revision 1.9  2001/02/03 00:00:30  nilsen
372 New version of AliITSgeom and related files. Now uses automatic streamers,
373 set up for new formatted .det file which includes detector information.
374 Additional smaller modifications are still to come.
375
376 */
377 //#include <iostream.h>
378 //#include <TBRIK.h>
379
380 //#include "AliITSgeomSDD256.h"
381
382 ClassImp(AliITSgeomSDD256)
383
384 AliITSgeomSDD256::AliITSgeomSDD256() : AliITSgeomSDD(){
385     // Default Constructor
386 }
387 //----------------------------------------------------------------------
388 AliITSgeomSDD256::AliITSgeomSDD256(Int_t npar,const Float_t *par) : 
389     AliITSgeomSDD(){
390 ////////////////////////////////////////////////////////////////////////
391 //    constructor
392 /*
393 Pads for probe cards in ALICE-D2       /05.03.2000/
394 (X,Y) coordinates are quoted in microns and referred to the centers of 
395 bonding pads. (0, 0) corrispond to the center of the detector.
396 Convention: 
397 left is for negative X, right is for positive X;
398 DOWN half is for negative Y, UP half is for positive Y.
399
400 Detector size: X= 87588 micrometers; Y= 72500 micrometers. 
401 Detector corners:
402   LEFT UP: (-43794, 36250)
403 RIGHT UP:  (43794, 36250)
404  LEFT DOWN: (-43794, -36250)
405 RIGHT DOWN:  (43794, -36250)
406
407         Drift cathodes (n-side)
408
409 cathode #0 (Ubias) 
410 (-1477, 0), pad size (150, 60)
411    (875, 0), pad size (150, 60)
412 (-36570, 0), pad size (200, 70)
413 (-37570, 0), pad size (200, 70)
414 (36570, 0), pad size (200, 70)
415 (37570, 0), pad size (200, 70)
416
417 cathode #1 DOWN half 
418 (-1477, -120), pad size (150, 60)
419    (875, -120), pad size (150, 60)
420 (-36570, -120), pad size (200, 70)
421 (-37570, -120), pad size (200, 70)
422 (36570, -120), pad size (200, 70)
423 (37570, -120), pad size (200, 70)
424
425 cathode #2 DOWN half 
426 (-1477, -240), pad size (150, 60)
427    (875, -240), pad size (150, 60)
428 (-36570, -240), pad size (200, 70)
429 (-37570, -240), pad size (200, 70)
430 (36570, -240), pad size (200, 70)
431 (37570, -240), pad size (200, 70)
432
433 cathode #3 DOWN half 
434 (-1477, -360), pad size (150, 60)
435    (875, -360), pad size (150, 60)
436 (-36570, -360), pad size (200, 70)
437 (-37570, -360), pad size (200, 70)
438 (36570, -360), pad size (200, 70)
439 (37570, -360), pad size (200, 70)
440 .....................................
441 ......................................
442 ......................................
443 cathode #30 DOWN half
444 (-1477, -3600), pad size (150, 60)
445    (875, -3600), pad size (150, 60)
446 (-36570, -3600), pad size (200, 70)
447 (-37570, -3600), pad size (200, 70)
448 (36570, -3600), pad size (200, 70)
449 (37570, -3600), pad size (200, 70)
450 ...................................
451 cathode #60 DOWN half
452 (-1477, -7200), pad size (150, 60)
453    (875, -7200), pad size (150, 60)
454 (-36570, -7200), pad size (200, 70)
455 (-37570, -7200), pad size (200, 70)
456 (36570, -7200), pad size (200, 70)
457 (37570, -7200), pad size (200, 70)
458 ....................................
459 cathode #90 DOWN half
460 (-1477, -10800), pad size (150, 60)
461    (875, -10800), pad size (150, 60)
462 (-36570, -10800), pad size (200, 70)
463 (-37570, -10800), pad size (200, 70)
464 (36570, -10800), pad size (200, 70)
465 (37570, -10800), pad size (200, 70)
466 ....................................
467 cathode #120 DOWN half
468 (-1477, -14400), pad size (150, 60)
469    (875, -14400), pad size (150, 60)
470 (-36570, -14400), pad size (200, 70)
471 (-37570, -14400), pad size (200, 70)
472 (36570, -14400), pad size (200, 70)
473 (37570, -14400), pad size (200, 70)
474 ....................................
475 cathode #150 DOWN half
476 (-1477, -18000), pad size (150, 60)
477    (875, -18000), pad size (150, 60)
478 (-36570, -18000), pad size (200, 70)
479 (-37570, -18000), pad size (200, 70)
480 (36570, -18000), pad size (200, 70)
481 (37570, -18000), pad size (200, 70)
482 ....................................
483 cathode #180 DOWN half
484 (-1477, -21600), pad size (150, 60)
485    (875, -21600), pad size (150, 60)
486 (-36570, -21600), pad size (200, 70)
487 (-37570, -21600), pad size (200, 70)
488 (36570, -21600), pad size (200, 70)
489 (37570, -21600), pad size (200, 70)
490 ....................................
491 cathode #210 DOWN half
492 (-1477, -25200), pad size (150, 60)
493    (875, -25200), pad size (150, 60)
494 (-36570, -25200), pad size (200, 70)
495 (-37570, -25200), pad size (200, 70)
496 (36570, -25200), pad size (200, 70)
497 (37570, -25200), pad size (200, 70)
498 ....................................
499 cathode #240 DOWN half
500 (-1477, -28800), pad size (150, 60)
501    (875, -28800), pad size (150, 60)
502 (-36570, -28800), pad size (200, 70)
503 (-37570, -28800), pad size (200, 70)
504 (36570, -28800), pad size (200, 70)
505 (37570, -28800), pad size (200, 70)
506 ....................................
507 cathode #270 DOWN half
508 (-1477, -32400), pad size (150, 60)
509    (875, -32400), pad size (150, 60)
510 (-36570, -32400), pad size (200, 70)
511 (-37570, -32400), pad size (200, 70)
512 (36570, -32400), pad size (200, 70)
513 (37570, -32400), pad size (200, 70)
514 ....................................
515 cathode #290 DOWN half
516 (-1477, -34800), pad size (150, 60)
517    (875, -34800), pad size (150, 60)
518 (-36570, -34800), pad size (200, 70)
519 (-37570, -34800), pad size (200, 70)
520 (36570, -34800), pad size (200, 70)
521 (37570, -34800), pad size (200, 70)
522 ___________________________________________________
523 cathode #1 UP half 
524 (-1477, 120), pad size (150, 60)
525    (875, 120), pad size (150, 60)
526 (-36570, 120), pad size (200, 70)
527 (-37570, 120), pad size (200, 70)
528 (36570, 120), pad size (200, 70)
529 (37570, 120), pad size (200, 70)
530
531 cathode #2 UP half 
532 (-1477, 240), pad size (150, 60)
533    (875, 240), pad size (150, 60)
534 (-36570, 240), pad size (200, 70)
535 (-37570, 240), pad size (200, 70)
536 (36570, 240), pad size (200, 70)
537 (37570, 240), pad size (200, 70)
538
539 cathode #3 UP half 
540 (-1477, 360), pad size (150, 60)
541    (875, 360), pad size (150, 60)
542 (-36570, 360), pad size (200, 70)
543 (-37570, 360), pad size (200, 70)
544 (36570, 360), pad size (200, 70)
545 (37570, 360), pad size (200, 70)
546 .....................................
547 ......................................
548 ......................................
549 cathode #30 UP half
550 (-1477, 3600), pad size (150, 60)
551    (875, 3600), pad size (150, 60)
552 (-36570, 3600), pad size (200, 70)
553 (-37570, 3600), pad size (200, 70)
554 (36570, 3600), pad size (200, 70)
555 (37570, 3600), pad size (200, 70)
556 ......................................
557 cathode #60 UP half
558 (-1477, 7200), pad size (150, 60)
559    (875, 7200), pad size (150, 60)
560 (-36570, 7200), pad size (200, 70)
561 (-37570, 7200), pad size (200, 70)
562 (36570, 7200), pad size (200, 70)
563 (37570, 7200), pad size (200, 70)
564 ......................................
565 cathode #90 UP half
566 (-1477, 10800), pad size (150, 60)
567    (875, 10800), pad size (150, 60)
568 (-36570, 10800), pad size (200, 70)
569 (-37570, 10800), pad size (200, 70)
570 (36570, 10800), pad size (200, 70)
571 (37570, 10800), pad size (200, 70)
572 ......................................
573 cathode #120 UP half
574 (-1477, 14400), pad size (150, 60)
575    (875, 14400), pad size (150, 60)
576 (-36570, 14400), pad size (200, 70)
577 (-37570, 14400), pad size (200, 70)
578 (36570, 14400), pad size (200, 70)
579 (37570, 14400), pad size (200, 70)
580 ......................................
581 cathode #150 UP half
582 (-1477, 18000), pad size (150, 60)
583    (875, 18000), pad size (150, 60)
584 (-36570, 18000), pad size (200, 70)
585 (-37570, 18000), pad size (200, 70)
586 (36570, 18000), pad size (200, 70)
587 (37570, 18000), pad size (200, 70)
588 ......................................
589 cathode #180 UP half
590 (-1477, 21600), pad size (150, 60)
591    (875, 21600), pad size (150, 60)
592 (-36570, 21600), pad size (200, 70)
593 (-37570, 21600), pad size (200, 70)
594 (36570, 21600), pad size (200, 70)
595 (37570, 21600), pad size (200, 70)
596 ......................................
597 cathode #210 UP half
598 (-1477, 25200), pad size (150, 60)
599    (875, 25200), pad size (150, 60)
600 (-36570, 25200), pad size (200, 70)
601 (-37570, 25200), pad size (200, 70)
602 (36570, 25200), pad size (200, 70)
603 (37570, 25200), pad size (200, 70)
604 ......................................
605 cathode #240 UP half
606 (-1477, 28800), pad size (150, 60)
607    (875, 28800), pad size (150, 60)
608 (-36570, 28800), pad size (200, 70)
609 (-37570, 28800), pad size (200, 70)
610 (36570, 28800), pad size (200, 70)
611 (37570, 28800), pad size (200, 70)
612 ......................................
613 cathode #270 UP half
614 (-1477, 32400), pad size (150, 60)
615    (875, 32400), pad size (150, 60)
616 (-36570, 32400), pad size (200, 70)
617 (-37570, 32400), pad size (200, 70)
618 (36570, 32400), pad size (200, 70)
619 (37570, 32400), pad size (200, 70)
620 ......................................
621 cathode #290 UP half
622 (-1477, 34800), pad size (150, 60)
623    (875, 34800), pad size (150, 60)
624 (-36570, 34800), pad size (200, 70)
625 (-37570, 34800), pad size (200, 70)
626 (36570, 34800), pad size (200, 70)
627 (37570, 34800), pad size (200, 70)
628         Injectors (n-side)
629
630 Central line injectors (DOWN half)
631 (-1237, -660), pad size (150, 65)
632 (1115, -660), pad size (150, 65)
633 (37890, -660), pad size (100, 74)
634
635 Middle line injectors (DOWN half)
636 (-1237, -17460), pad size (150, 80)
637 (1115, -17460), pad size (150, 80)
638 (37890, -17460), pad size (100, 74)
639
640 Bottom line injectors (DOWN half)
641 (-1237, -34020), pad size (150, 80)
642 (1115, -34020), pad size (150, 80)
643 (37890, -34020), pad size (100, 74)
644 ___________________________________________
645 Central line injectors (UP half)
646 (-1237, 660), pad size (150, 65)
647 (1115, 660), pad size (150, 65)
648 (37890, 660), pad size (100, 74)
649
650 Middle line injectors (UP half)
651 (-1237, 17460), pad size (150, 80)
652 (1115, 17460), pad size (150, 80)
653 (37890, 17460), pad size (100, 74)
654
655 Bottom line injectors (UP half)
656 (-1237, 34020), pad size (150, 80)
657 (1115, 34020), pad size (150, 80)
658 (37890, 34020), pad size (100, 74)
659
660 Drift cathodes and injectors of p-side have the bonding pads with the same 
661 coordinates as for the n-side (when looking through the masks)
662
663         Cathodes of the collection zone (n-side)
664
665 cathode #291 (-40 V) DOWN half
666 (-38220, -35055), pad size (120, 160)
667 (38190, -34992), pad size (120, 145)
668
669 GRID cathode (-15 V) DOWN half
670 (-37988, -35085), pad size (144, 210)
671   (37988, -35085), pad size (144, 210)
672
673 cathode #292 (-30 V) DOWN half
674 (-38245, -35290), pad size (100, 170)
675 (38210, -35242), pad size (150, 215)
676
677 cathode #293 (-15 V) DOWN half
678 (-38055, -35460), pad size (690, 70)
679 (36488, -35460), pad size (3805, 70)
680
681 n+ bulk contact (GND) DOWN half
682 (-38300, -36050), pad size (1000, 395)
683 (38300, -36050), pad size (1000, 395)
684
685 bonding pad of the last integrated resistor DOWN half
686 /it has to be connected to the GND/
687 (-38190, -35620) pad size (160, 110)
688 ________________________________________________ 
689 cathode #291 (-40 V) UP half
690 (-38220, 35055), pad size (120, 160)
691 (38190, 34992), pad size (120, 145)
692
693 GRID cathode (-15 V) UP half
694 (-37988, 35085), pad size (144, 210)
695   (37988, 35085), pad size (144, 210)
696
697 cathode #292 (-30 V) UP half
698 (-38245, 35290), pad size (100, 170)
699 (38210, 35242), pad size (150, 215)
700
701 cathode #293 (-15 V) UP half
702 (-38055, 35460), pad size (690, 70)
703 (36488, 35460), pad size (3805, 70)
704
705 n+ bulk contact (GND) UP half
706 (-38300, 36050), pad size (1000, 395)
707 (38300, 36050), pad size (1000, 395)
708
709 bonding pad of the last integrated resistor UP half
710 /it has to be connected to the GND/
711 (-38190, 35620) pad size (160, 110)
712
713 Cathodes of the collection zone (p-side)
714
715 cathode #291 (-40 V) DOWN half
716 (-38215, -35055), pad size (120, 160)
717 (38190, -34992), pad size (120, 145)
718
719 cathode W1 (-60 V) DOWN half
720 (-38000, -35110), pad size (140, 240)
721  (38000, -35110), pad size (140, 240)
722
723 cathode W2 (-80 V) DOWN half
724 ( 0, -35090), pad size (75600, 110)
725
726 cathode #292 (-40 V) DOWN half
727 (-38220, -35290), pad size (150, 170)
728 (38210, -35242), pad size (150, 215)
729
730 p+ bulk contact (GND) DOWN half
731 (-38300, -36050), pad size (1000, 395)
732 (38300, -36050), pad size (1000, 395)
733
734 It is necessary to connect cathode #291 to cathode #292 in order to
735 close the integrated divider to p+ bulk contact (GND).
736
737 _______________________________________________
738 cathode #291 (-40 V) UP half
739 (-38215, 35055), pad size (120, 160)
740 (38190, 34992), pad size (120, 145)
741
742 cathode W1 (-60 V) UP half
743 (-38000, 35110), pad size (140, 240)
744  (38000, 35110), pad size (140, 240)
745
746 cathode W2 (-80 V) UP half
747 ( 0, 35090), pad size (75600, 110)
748
749 cathode #292 (-40 V) UP half
750 (-38220, 35290), pad size (150, 170)
751 (38210, 35242), pad size (150, 215)
752
753 p+ bulk contact (GND) UP half
754 (-38300, 36050), pad size (1000, 395)
755 (38300, 36050), pad size (1000, 395)
756
757 It is necessary to connect cathode #291 to cathode #292 in order to
758 close the integrated divider to p+ bulk contact (GND).
759
760         Anodes (n-side)
761 There are 256 anodes to be bonded to the inputs of front-end electronics. In 
762 addition there are 2 anodes (one at the left edge and one at the right edge 
763 of the anode array) that have to be bonded to the ground. I call these 2 
764 anodes #L and #R. The pitch of all anodes is 294 micrometers.
765
766                 DOWN half anodes
767 #L             (-37779, -35085), pad size (184, 140)
768 #1             (-37485, -35085), pad size (184, 140)
769 .........................................
770 .........................................
771 #256.............(37485, -35085), pad size (184, 140)
772 #R              (37779, -35085), pad size (184, 140)
773 _____________________________________________
774                 UP half anodes
775 #L             (-37779, 35085), pad size (184, 140)
776 #1             (-37485, 35085), pad size (184, 140)
777 .........................................
778 .........................................
779 #256.............(37485, 35085), pad size (184, 140)
780 #R              (37779, 35085), pad size (184, 140)
781 */
782 ////////////////////////////////////////////////////////////////////////
783 //   const Float_t kDxyz[]   = {3.6250,0.01499,4.3794};//cm. (Geant 3.12 units)
784                                       // Size of sensitive region of detector
785     const Float_t kPeriod   = 25.0E-09; // 40 MHz sampling frequence
786     const Float_t kVelocity = 5.46875E+03; // cm/s drift velocity
787     const Float_t kAnodeXL  = -3.5085; // cm location in x of anodes left side
788     const Float_t kAnodeXR  =  3.5085; // cm location in x of anodes right side
789     const Int_t   kNAnodes  = 256;  // nuber of anodes connected
790     const Float_t kAnodePitch = 0.0294; // cm
791     const Float_t kAnodesZ  = -3.7485; // cm Starting location of anodes in z
792     Float_t anodeLowEdges[kNAnodes+1];
793     Int_t i;
794
795 //    cout << "AliITSgeomSDD256 default creator called: start" << end;
796    anodeLowEdges[0] = kAnodesZ;
797     for(i=0;i<kNAnodes;i++)anodeLowEdges[i+1] = kAnodePitch+anodeLowEdges[i];
798     AliITSgeomSDD::ResetSDD(par,kPeriod,kVelocity,kAnodeXL,kAnodeXR,
799                             kNAnodes+1,anodeLowEdges,
800                             kNAnodes+1,anodeLowEdges);
801 //    cout << "AliITSgeomSDD256 default creator called: end" << endl;
802 }
803 //________________________________________________________________________
804 ostream &operator<<(ostream &os,AliITSgeomSDD256 &p){
805 ////////////////////////////////////////////////////////////////////////
806 // Standard output streaming function.
807 ////////////////////////////////////////////////////////////////////////
808
809     p.Print(&os);
810     return os;
811 }
812 //----------------------------------------------------------------------
813 istream &operator>>(istream &is,AliITSgeomSDD256 &r){
814 ////////////////////////////////////////////////////////////////////////
815 // Standard input streaming function.
816 ////////////////////////////////////////////////////////////////////////
817
818     r.Read(&is);
819     return is;
820 }
821 //======================================================================
822 /*
823 $Log$
824 Revision 1.15.6.1  2002/06/10 17:51:15  hristov
825 Merged with v3-08-02
826
827 Revision 1.16  2002/05/19 18:17:03  hristov
828 Changes needed by ICC/IFC compiler (Intel)
829
830 Revision 1.15  2001/11/19 16:17:03  nilsen
831 Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
832 bugs found by Rene require more work to fix. Will be fixed soon.
833
834 Revision 1.14  2001/10/19 21:32:35  nilsen
835 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
836 cleanded up a little bit of code.
837
838 Revision 1.13  2001/10/12 22:07:20  nilsen
839 A patch for C++ io manipulation functions so that they will work both
840 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
841 other platforms.
842
843 Revision 1.12  2001/08/24 21:06:37  nilsen
844 Added more documentation, fixed up some coding violations, and some
845 forward declorations.
846
847 Revision 1.11  2001/05/16 08:17:49  hristov
848 Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
849
850 Revision 1.10  2001/02/09 00:00:57  nilsen
851 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
852 bugs in iostream based streamers used to read and write .det files. Fixed
853 some detector sizes. Fixed bugs in some default-special constructors.
854
855 Revision 1.9  2001/02/03 00:00:30  nilsen
856 New version of AliITSgeom and related files. Now uses automatic streamers,
857 set up for new formatted .det file which includes detector information.
858 Additional smaller modifications are still to come.
859
860 */
861 //#include <iostream.h>
862 //#include <TBRIK.h>
863
864 //#include "AliITSgeomSDD300.h"
865
866 ClassImp(AliITSgeomSDD300)
867
868 AliITSgeomSDD300::AliITSgeomSDD300() : AliITSgeomSDD(){
869 ////////////////////////////////////////////////////////////////////////
870 //    default constructor
871 ////////////////////////////////////////////////////////////////////////
872     const Float_t kDxyz[] = {3.500,0.014,3.763};//cm.
873     const Float_t kPeriod = 25.0E-09; // 40 MHz
874     const Float_t kVelocity = 5.46875E+3; // cm/s
875     const Int_t kNAnodes = 300; // number of anodes
876     const Float_t kAnodeXL = -3.500; // cm
877     const Float_t kAnodeXR = +3.500; // cm
878     const Float_t kAnodesZ = -3.75; // cm
879     Float_t anodeLowEdges[kNAnodes+1];
880     const Float_t kanode = 0.0250;// cm anode separation.
881     Int_t i;
882
883 //    cout << "AliITSgeomSDD300 default creator called: start" << endl;
884    anodeLowEdges[0] = kAnodesZ;
885     for(i=0;i<kNAnodes;i++)anodeLowEdges[i+1] = kanode+anodeLowEdges[i];
886     AliITSgeomSDD::ResetSDD(kDxyz,kPeriod,kVelocity,kAnodeXL,kAnodeXR,
887                             kNAnodes+1,anodeLowEdges,
888                             kNAnodes+1,anodeLowEdges);
889 //    cout << "AliITSgeomSDD300 default creator called: end" << endl;
890 }
891 //________________________________________________________________________
892 ostream &operator<<(ostream &os,AliITSgeomSDD300 &p){
893 ////////////////////////////////////////////////////////////////////////
894 // Standard output streaming function.
895 ////////////////////////////////////////////////////////////////////////
896
897     p.Print(&os);
898     return os;
899 }
900 //----------------------------------------------------------------------
901 istream &operator>>(istream &is,AliITSgeomSDD300 &r){
902 ////////////////////////////////////////////////////////////////////////
903 // Standard input streaming function.
904 ////////////////////////////////////////////////////////////////////////
905
906     r.Read(&is);
907     return is;
908 }
909 //----------------------------------------------------------------------