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