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