1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 1.16 2002/10/14 14:57:00 hristov
19 Merging the VirtualMC branch to the main development branch (HEAD)
21 Revision 1.14.6.1 2002/06/10 17:51:15 hristov
24 Revision 1.15 2002/05/19 18:17:03 hristov
25 Changes needed by ICC/IFC compiler (Intel)
27 Revision 1.14 2001/10/19 21:32:35 nilsen
28 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
29 cleanded up a little bit of code.
31 Revision 1.13 2001/10/12 22:07:20 nilsen
32 A patch for C++ io manipulation functions so that they will work both
33 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
36 Revision 1.12 2001/08/24 21:06:37 nilsen
37 Added more documentation, fixed up some coding violations, and some
40 Revision 1.11 2001/05/16 08:17:49 hristov
41 Bug fixed in the StepManager to account for the difference in the geometry
42 tree for the ITS pixels. This fixes both the funny distribution of pixel
43 coordinates and the missing hits/digits/points in many sectors of the ITS
44 pixel barrel. Also included is a patch to properly get and use the detector
45 dimensions through out the ITS code. (B.Nilsen)
47 Revision 1.10 2001/04/26 22:44:34 nilsen
50 Revision 1.9 2001/02/09 00:00:57 nilsen
51 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
52 bugs in iostream based streamers used to read and write .det files. Fixed
53 some detector sizes. Fixed bugs in some default-special constructors.
55 Revision 1.8 2001/02/03 00:00:30 nilsen
56 New version of AliITSgeom and related files. Now uses automatic streamers,
57 set up for new formatted .det file which includes detector information.
58 Additional smaller modifications are still to come.
62 ////////////////////////////////////////////////////////////////////////
63 // This class is for the Silicon Pixel Detector, SPD, specific geometry.
64 // It is being replaced by AliITSsegmentationSPD class. This file also
65 // constains classes derived from AliITSgeomSPD which do nothing but
66 // initilize this one with predefined values.
67 ////////////////////////////////////////////////////////////////////////
69 #include <Riostream.h>
73 #include "AliITSgeomSPD.h"
75 ClassImp(AliITSgeomSPD)
77 AliITSgeomSPD::AliITSgeomSPD(){
78 // Default Constructor. Set everthing to null.
86 //______________________________________________________________________
87 AliITSgeomSPD::AliITSgeomSPD(Float_t dy,Int_t nx,Float_t *bx,
88 Int_t nz,Float_t *bz){
89 // Standard Constructor. Set everthing to null.
96 ReSetBins(dy,nx,bx,nz,bz);
99 //______________________________________________________________________
100 void AliITSgeomSPD::ReSetBins(Float_t dy,Int_t nx,Float_t *bx,
101 Int_t nz,Float_t *bz){
102 // delets the contents of this and replaces it with the given values.
104 Float_t dx = 0.0, dz = 0.0;
106 // Compute size in x and z (based on bins).
107 for(i=0;i<nx;i++) dx += bx[i];
108 for(i=0;i<nz;i++) dz += bz[i];
112 delete fShapeSPD; // delete existing shape
113 if(this->fLowBinEdgeX) delete[] this->fLowBinEdgeX; // delete existing
114 if(this->fLowBinEdgeZ) delete[] this->fLowBinEdgeZ; // delete existing
120 fLowBinEdgeX[0] = -dx;
121 fLowBinEdgeZ[0] = -dz;
122 for(i=0;i<nx;i++) fLowBinEdgeX[i+1] = fLowBinEdgeX[i] + bx[i];
123 for(i=0;i<nz;i++) fLowBinEdgeZ[i+1] = fLowBinEdgeZ[i] + bz[i];
124 SetShape("ActiveSPD","Active volume of SPD","SPD SI DET",dx,dy,dz);
127 //______________________________________________________________________
128 AliITSgeomSPD::AliITSgeomSPD(AliITSgeomSPD &source){
131 *this = source; // just use the = operator for now.
134 //______________________________________________________________________
135 AliITSgeomSPD& AliITSgeomSPD::operator=(AliITSgeomSPD &source){
139 if(&source == this) return *this;
140 this->fShapeSPD = new TBRIK(*(source.fShapeSPD));
141 if(this->fLowBinEdgeX) delete[] this->fLowBinEdgeX;
142 if(this->fLowBinEdgeZ) delete[] this->fLowBinEdgeZ;
143 this->fNbinx = source.fNbinx;
144 this->fNbinz = source.fNbinz;
145 this->InitLowBinEdgeX();
146 this->InitLowBinEdgeZ();
147 for(i=0;i<fNbinx;i++) this->fLowBinEdgeX[i] = source.fLowBinEdgeX[i];
148 for(i=0;i<fNbinz;i++) this->fLowBinEdgeZ[i] = source.fLowBinEdgeZ[i];
151 //______________________________________________________________________
152 AliITSgeomSPD::~AliITSgeomSPD(){
156 if(this->fLowBinEdgeX) delete[] this->fLowBinEdgeX;
157 if(this->fLowBinEdgeZ) delete[] this->fLowBinEdgeZ;
164 //______________________________________________________________________
165 void AliITSgeomSPD::LToDet(Float_t xl,Float_t zl,Int_t &row,Int_t &col){
166 // Returns the row and column pixel numbers for a given local coordinate
167 // system. If they are outside then it will return -1 or fNbinx/z.
170 if(xl<fLowBinEdgeX[0]) row = -1;
172 for(i=0;i<fNbinx;i++) if(xl<=fLowBinEdgeX[i]) break;
175 if(zl<fLowBinEdgeX[0]) col = -1;
177 for(i=0;i<fNbinz;i++) if(zl<=fLowBinEdgeZ[i]) break;
182 //______________________________________________________________________
183 void AliITSgeomSPD::DetToL(Int_t row,Int_t col,Float_t &xl,Float_t &zl){
184 // returns the pixel center local coordinate system location for a given
185 // row and column number. It the row or column number is outside of the
186 // defined range then it will return the nearest detector edge.
188 if(row>=0||row<fNbinx-1) xl = 0.5*(fLowBinEdgeX[row]+fLowBinEdgeX[row+1]);
189 else if(row<0) xl = fLowBinEdgeX[0];else xl = fLowBinEdgeX[fNbinx-1];
190 if(col>=0||col<fNbinz-1) zl = 0.5*(fLowBinEdgeZ[col]+fLowBinEdgeZ[col+1]);
191 else if(col<0) zl = fLowBinEdgeZ[0];else zl = fLowBinEdgeZ[fNbinz-1];
194 //______________________________________________________________________
195 void AliITSgeomSPD::Print(ostream *os) const {
196 // Standard output format for this class
212 fmt = os->setf(ios::scientific); // set scientific floating point output
213 *os << "TBRIK" << " ";
214 *os << setprecision(16) << GetDx() << " ";
215 *os << setprecision(16) << GetDy() << " ";
216 *os << setprecision(16) << GetDz() << " ";
217 *os << fNbinx-1 << " " << fNbinz-1 << " ";
218 for(i=0;i<fNbinx;i++) *os << setprecision(16) << fLowBinEdgeX[i] << " ";
219 for(i=0;i<fNbinz;i++) *os << setprecision(16) << fLowBinEdgeZ[i] << " ";
224 //______________________________________________________________________
225 void AliITSgeomSPD::Read(istream *is){
226 // Standard input format for this class
231 for(i=0;i<20;i++) shape[i]='\0';
233 if(strcmp(shape,"TBRIK")) Warning("::Read","Shape not a TBRIK");
234 *is >> dx >> dy >> dz;
235 if(fShapeSPD!=0) delete fShapeSPD;
236 SetShape("ActiveSPD","Active volume of SPD","SPD SI DET",dx,dy,dz);
242 for(i=0;i<fNbinx;i++) *is >> fLowBinEdgeX[i];
243 for(i=0;i<fNbinz;i++) *is >> fLowBinEdgeZ[i];
246 //----------------------------------------------------------------------
247 ostream &operator<<(ostream &os,AliITSgeomSPD &p){
248 ////////////////////////////////////////////////////////////////////////
249 // Standard output streaming function.
250 ////////////////////////////////////////////////////////////////////////
255 //----------------------------------------------------------------------
256 istream &operator>>(istream &is,AliITSgeomSPD &r){
257 ////////////////////////////////////////////////////////////////////////
258 // Standard input streaming function.
259 ////////////////////////////////////////////////////////////////////////
264 //=====================================================================
268 Revision 1.16 2002/10/14 14:57:00 hristov
269 Merging the VirtualMC branch to the main development branch (HEAD)
271 Revision 1.14.6.1 2002/06/10 17:51:15 hristov
274 Revision 1.15 2002/05/19 18:17:03 hristov
275 Changes needed by ICC/IFC compiler (Intel)
277 Revision 1.14 2001/10/19 21:32:35 nilsen
278 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
279 cleanded up a little bit of code.
281 Revision 1.13 2001/10/12 22:07:20 nilsen
282 A patch for C++ io manipulation functions so that they will work both
283 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
286 Revision 1.12 2001/08/24 21:06:37 nilsen
287 Added more documentation, fixed up some coding violations, and some
288 forward declorations.
290 Revision 1.11 2001/05/16 08:17:49 hristov
291 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)
293 Revision 1.10 2001/04/26 22:44:34 nilsen
296 Revision 1.9 2001/02/09 00:00:57 nilsen
297 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
298 bugs in iostream based streamers used to read and write .det files. Fixed
299 some detector sizes. Fixed bugs in some default-special constructors.
301 Revision 1.8 2001/02/03 00:00:30 nilsen
302 New version of AliITSgeom and related files. Now uses automatic streamers,
303 set up for new formatted .det file which includes detector information.
304 Additional smaller modifications are still to come.
306 Revision 1.7 2000/10/02 16:32:35 barbera
307 Forward declaration added
309 Revision 1.1.2.8 2000/10/02 15:52:05 barbera
310 Forward declaration added
312 Revision 1.6 2000/07/10 16:07:18 fca
313 Release version of ITS code
315 Revision 1.4 2000/06/10 20:34:37 nilsen
316 Fixed compilation warning with HP unix.
318 Revision 1.3 2000/06/10 10:43:04 nilsen
319 Fixed bug in copy and operator =.
323 //#include "AliITSgeomSPD300.h"
325 ClassImp(AliITSgeomSPD300)
327 AliITSgeomSPD300::AliITSgeomSPD300() : AliITSgeomSPD(){
328 ////////////////////////////////////////////////////////////////////////
329 // default constructor, for ITS TDR geometry. This only consists of
330 // a default constructor to construct the defalut TDR SPD detector geometry
331 // 256 X 279 300 by 50 micron pixels.
332 ////////////////////////////////////////////////////////////////////////
333 const Float_t kdx=0.6400,kdy=0.0075,kdz=4.1900; // cm; Standard pixel detector
334 // size is 2dx wide, 2dz long,
335 // and 2dy thick. Geant 3.12
337 const Float_t kbinx0 = 0.0050; // cm; Standard pixel size in x direction.
338 const Int_t knbinx = 256; // number of pixels along x direction.
339 const Float_t kbinz0 = 0.0300; // cm; Standard pixel size in z direction.
340 const Float_t kbinz1 = 0.0350; // cm; Edge pixel size in z direction.
341 const Int_t knbinz = 279; // number of pixels along z direction.
343 Float_t dx=0.0,dz=0.0;
345 // cout << "AliITSgeomSPD300 default creator called: start" << endl;
347 SetNbinX(knbinx); // default number of bins in x.
348 SetNbinZ(knbinz); // default number of bins in z.
350 for(i=0;i<knbinx;i++) dx += kbinx0; // Compute size x.
352 for(i=0;i<knbinz;i++) dz += kbinz0; // Compute size z.
353 dz += 2.0*(kbinz1-kbinz0);
357 SetLowBinEdgeX(0,-dx); // Starting position X
358 for(i=0;i<knbinx;i++) SetLowBinEdgeX(i+1,GetBinLowEdgeX(i)+kbinx0);
359 SetLowBinEdgeZ(0,-dz); // Starting position z
360 SetLowBinEdgeZ(1,GetBinLowEdgeZ(0)+kbinz1);
361 for(i=1;i<knbinz;i++) SetLowBinEdgeZ(i+1,GetBinLowEdgeZ(i)+kbinz0);
362 SetLowBinEdgeZ(knbinz,GetBinLowEdgeZ(knbinz-1)+kbinz1);
364 if(TMath::Abs(dx-kdx)>1.0E-4 || TMath::Abs(dz-kdz)>1.0E-4)
365 Warning("Default Creator","Detector size may not be write.");
366 SetShape("ActiveSPD","Active volume of SPD","SPD SI DET",dx,kdy,dz);
367 // cout << "AliITSgeomSPD300 default creator called: end" << endl;
369 //----------------------------------------------------------------------
370 ostream &operator<<(ostream &os,AliITSgeomSPD300 &p){
371 ////////////////////////////////////////////////////////////////////////
372 // Standard output streaming function.
373 ////////////////////////////////////////////////////////////////////////
378 //----------------------------------------------------------------------
379 istream &operator>>(istream &is,AliITSgeomSPD300 &r){
380 ////////////////////////////////////////////////////////////////////////
381 // Standard input streaming function.
382 ////////////////////////////////////////////////////////////////////////
387 //=====================================================================
390 Revision 1.16 2002/10/14 14:57:00 hristov
391 Merging the VirtualMC branch to the main development branch (HEAD)
393 Revision 1.14.6.1 2002/06/10 17:51:15 hristov
396 Revision 1.15 2002/05/19 18:17:03 hristov
397 Changes needed by ICC/IFC compiler (Intel)
399 Revision 1.14 2001/10/19 21:32:35 nilsen
400 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
401 cleanded up a little bit of code.
403 Revision 1.13 2001/10/12 22:07:20 nilsen
404 A patch for C++ io manipulation functions so that they will work both
405 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
408 Revision 1.12 2001/08/24 21:06:37 nilsen
409 Added more documentation, fixed up some coding violations, and some
410 forward declorations.
412 Revision 1.11 2001/05/16 08:17:49 hristov
413 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)
415 Revision 1.10 2001/04/26 22:44:34 nilsen
418 Revision 1.9 2001/02/09 00:00:57 nilsen
419 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
420 bugs in iostream based streamers used to read and write .det files. Fixed
421 some detector sizes. Fixed bugs in some default-special constructors.
423 Revision 1.8 2001/02/03 00:00:30 nilsen
424 New version of AliITSgeom and related files. Now uses automatic streamers,
425 set up for new formatted .det file which includes detector information.
426 Additional smaller modifications are still to come.
428 Revision 1.7 2000/10/02 16:32:35 barbera
429 Forward declaration added
431 Revision 1.1.2.8 2000/10/02 15:52:05 barbera
432 Forward declaration added
434 Revision 1.6 2000/07/10 16:07:18 fca
435 Release version of ITS code
437 Revision 1.4 2000/06/10 20:34:22 nilsen
438 Fixed compilation warning with HP unix.
440 Revision 1.3 2000/06/10 10:42:49 nilsen
441 Fixed bug in copy and operator =.
446 //#include "AliITSgeomSPD425Short.h"
448 ClassImp(AliITSgeomSPD425Short)
450 AliITSgeomSPD425Short::AliITSgeomSPD425Short() : AliITSgeomSPD(){
451 ////////////////////////////////////////////////////////////////////////
452 // default constructor, for ITS post TDR geometry. This only consists of
453 // a default constructor to construct the defalut post TDR SPD detector
454 // geometry 256 X 197 425 by 50 micron pixels with interleaved 625 by 50
455 // micron pixels (large detector).
456 ////////////////////////////////////////////////////////////////////////
458 //----------------------------------------------------------------------
459 AliITSgeomSPD425Short::AliITSgeomSPD425Short(Int_t npar,Float_t *par) :
461 ////////////////////////////////////////////////////////////////////////
462 // Standard constructor, for ITS post TDR geometry. This only consists of
463 // a default constructor to construct the defalut post TDR SPD detector
464 // geometry 256 X 197 425 by 50 micron pixels with interleaved 625 by 50
465 // micron pixels (large detector).
466 ////////////////////////////////////////////////////////////////////////
468 const Float_t kdx=0.6400/*,kdy=0.015*/,kdz=3.480; // cm; Standard pixel
469 // detector size is 2dx
470 // wide, 2dz long, and
471 // 2dy thick. Geant 3.12
473 const Float_t kbinx0 = 0.0050; // cm; Standard pixel size in x direction.
474 const Int_t knbinx = 256; // number of pixels along x direction.
475 const Float_t kbinz0 = 0.0425; // cm; Standard pixel size in z direction.
476 const Float_t kbinz1 = 0.0625; // cm; Special pixel size in z direction.
477 const Int_t knbinz = 160; // number of pixels along z direction.
479 Float_t dx,dz,*binSizeX,*binSizeZ;
481 SetNbinX(knbinx); // default number of bins in x.
482 SetNbinZ(knbinz); // default number of bins in z.
484 binSizeX = new Float_t[knbinx]; // array of bin sizes along x.
485 for(i=0;i<knbinx;i++) binSizeX[i] = kbinx0; // default x bin size.
486 binSizeZ = new Float_t[knbinz]; // array of bin sizes along z.
487 for(i=0;i<knbinz;i++) binSizeZ[i] = kbinz0; // default z bin size.
488 binSizeZ[ 31] = kbinz1;
489 binSizeZ[ 32] = kbinz1;
491 binSizeZ[ 63] = kbinz1;
492 binSizeZ[ 64] = kbinz1;
494 binSizeZ[ 95] = kbinz1;
495 binSizeZ[ 96] = kbinz1;
497 binSizeZ[127] = kbinz1;
498 binSizeZ[128] = kbinz1;
500 // correct detector size for bin size.
502 for(i=0;i<knbinx;i++) dx += binSizeX[i];
505 for(i=0;i<knbinz;i++) dz += binSizeZ[i];
508 SetShape("ActiveSPD","Active volume of SPD","SPD SI DET",
509 par[0],par[1],par[2]);
510 if(TMath::Abs(dx-kdx)>1.0E-4 || TMath::Abs(dz-kdz)>1.0E-4)
511 Warning("Default Creator","Detector size may not be write.");
513 InitLowBinEdgeX(); // array of bin sizes along x.
514 InitLowBinEdgeZ(); // array of bin sizes along x.
515 SetLowBinEdgeX(0,-dx);
516 SetLowBinEdgeZ(0,-dz);
517 for(i=0;i<knbinx;i++) SetLowBinEdgeX(i+1,GetBinLowEdgeX(i)+binSizeX[i]);
518 for(i=0;i<knbinz;i++) SetLowBinEdgeZ(i+1,GetBinLowEdgeZ(i)+binSizeZ[i]);
520 //----------------------------------------------------------------------
521 ostream &operator<<(ostream &os,AliITSgeomSPD425Short &p){
522 ////////////////////////////////////////////////////////////////////////
523 // Standard output streaming function.
524 ////////////////////////////////////////////////////////////////////////
529 //----------------------------------------------------------------------
530 istream &operator>>(istream &is,AliITSgeomSPD425Short &r){
531 ////////////////////////////////////////////////////////////////////////
532 // Standard input streaming function.
533 ////////////////////////////////////////////////////////////////////////
538 //======================================================================
542 Revision 1.16 2002/10/14 14:57:00 hristov
543 Merging the VirtualMC branch to the main development branch (HEAD)
545 Revision 1.14.6.1 2002/06/10 17:51:15 hristov
548 Revision 1.15 2002/05/19 18:17:03 hristov
549 Changes needed by ICC/IFC compiler (Intel)
551 Revision 1.14 2001/10/19 21:32:35 nilsen
552 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
553 cleanded up a little bit of code.
555 Revision 1.13 2001/10/12 22:07:20 nilsen
556 A patch for C++ io manipulation functions so that they will work both
557 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
560 Revision 1.12 2001/08/24 21:06:37 nilsen
561 Added more documentation, fixed up some coding violations, and some
562 forward declorations.
564 Revision 1.11 2001/05/16 08:17:49 hristov
565 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)
567 Revision 1.10 2001/04/26 22:44:34 nilsen
570 Revision 1.9 2001/02/09 00:00:57 nilsen
571 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
572 bugs in iostream based streamers used to read and write .det files. Fixed
573 some detector sizes. Fixed bugs in some default-special constructors.
575 Revision 1.8 2001/02/03 00:00:30 nilsen
576 New version of AliITSgeom and related files. Now uses automatic streamers,
577 set up for new formatted .det file which includes detector information.
578 Additional smaller modifications are still to come.
580 Revision 1.7 2000/10/02 16:32:35 barbera
581 Forward declaration added
583 Revision 1.1.2.8 2000/10/02 15:52:05 barbera
584 Forward declaration added
586 Revision 1.6 2000/07/10 16:07:18 fca
587 Release version of ITS code
589 Revision 1.4 2000/06/10 20:34:22 nilsen
590 Fixed compilation warning with HP unix.
592 Revision 1.3 2000/06/10 10:42:49 nilsen
593 Fixed bug in copy and operator =.
598 //#include "AliITSgeomSPD425Long.h"
600 ClassImp(AliITSgeomSPD425Long)
602 AliITSgeomSPD425Long::AliITSgeomSPD425Long(){
603 ////////////////////////////////////////////////////////////////////////
604 // default constructor, for ITS post TDR geometry. This only consists of
605 // a default constructor to construct the defalut post TDR SPD detector
606 // geometry 256 X 197 425 by 50 micron pixels with interleaved 625 by 50
607 // micron pixels (large detector).
608 ////////////////////////////////////////////////////////////////////////
610 const Float_t kdx=0.6400,kdy=0.0075,kdz=4.2650; // cm; Standard pixel
611 // detector size is 2dx
612 // wide, 2dz long, and
613 // 2dy thick. Geant 3.12
615 const Float_t kbinx0 = 0.0050; // cm; Standard pixel size in x direction.
616 const Int_t knbinx = 256; // number of pixels along x direction.
617 const Float_t kbinz0 = 0.0425; // cm; Standard pixel size in z direction.
618 const Float_t kbinz1 = 0.0625; // cm; Special pixel size in z direction.
619 const Int_t knbinz = 192; // number of pixels along z direction.
621 Float_t dx,dz,*binSizeX,*binSizeZ;
623 SetNbinX(knbinx); // default number of bins in x.
624 SetNbinZ(knbinz); // default number of bins in z.
626 binSizeX = new Float_t[knbinx]; // array of bin sizes along x.
627 for(i=0;i<knbinx;i++) binSizeX[i] = kbinx0; // default x bin size.
628 binSizeZ = new Float_t[knbinz]; // array of bin sizes along z.
629 for(i=0;i<knbinz;i++) binSizeZ[i] = kbinz0; // default z bin size.
630 binSizeZ[ 31] = kbinz1;
631 binSizeZ[ 32] = kbinz1;
633 binSizeZ[ 63] = kbinz1;
634 binSizeZ[ 64] = kbinz1;
636 binSizeZ[ 95] = kbinz1;
637 binSizeZ[ 96] = kbinz1;
639 binSizeZ[127] = kbinz1;
640 binSizeZ[128] = kbinz1;
642 binSizeZ[159] = kbinz1;
643 binSizeZ[160] = kbinz1;
645 // correct detector size for bin size.
647 for(i=0;i<knbinx;i++) dx += binSizeX[i];
650 for(i=0;i<knbinz;i++) dz += binSizeZ[i];
653 SetShape("ActiveSPD","Active volume of SPD","SPD SI DET",dx,kdy,dz);
654 if(TMath::Abs(dx-kdx)>1.0E-4 || TMath::Abs(dz-kdz)>1.0E-4)
655 Warning("Default Creator","Detector size may not be write.");
657 InitLowBinEdgeX(); // array of bin sizes along x.
658 InitLowBinEdgeZ(); // array of bin sizes along x.
659 SetLowBinEdgeX(0,-dx);
660 SetLowBinEdgeZ(0,-dz);
661 for(i=0;i<knbinx;i++) SetLowBinEdgeX(i+1,GetBinLowEdgeX(i)+binSizeX[i]);
662 for(i=0;i<knbinz;i++) SetLowBinEdgeZ(i+1,GetBinLowEdgeZ(i)+binSizeZ[i]);
664 //----------------------------------------------------------------------
665 ostream &operator<<(ostream &os,AliITSgeomSPD425Long &p){
666 ////////////////////////////////////////////////////////////////////////
667 // Standard output streaming function.
668 ////////////////////////////////////////////////////////////////////////
673 //----------------------------------------------------------------------
674 istream &operator>>(istream &is,AliITSgeomSPD425Long &r){
675 ////////////////////////////////////////////////////////////////////////
676 // Standard input streaming function.
677 ////////////////////////////////////////////////////////////////////////
682 //======================================================================