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