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