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.17 2002/10/22 14:45:41 alibrary
19 Introducing Riostream.h
21 Revision 1.16 2002/10/14 14:57:00 hristov
22 Merging the VirtualMC branch to the main development branch (HEAD)
24 Revision 1.14.6.1 2002/06/10 17:51:15 hristov
27 Revision 1.15 2002/05/19 18:17:03 hristov
28 Changes needed by ICC/IFC compiler (Intel)
30 Revision 1.14 2001/10/19 21:32:35 nilsen
31 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
32 cleanded up a little bit of code.
34 Revision 1.13 2001/10/12 22:07:20 nilsen
35 A patch for C++ io manipulation functions so that they will work both
36 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
39 Revision 1.12 2001/08/24 21:06:37 nilsen
40 Added more documentation, fixed up some coding violations, and some
43 Revision 1.11 2001/05/16 08:17:49 hristov
44 Bug fixed in the StepManager to account for the difference in the geometry
45 tree for the ITS pixels. This fixes both the funny distribution of pixel
46 coordinates and the missing hits/digits/points in many sectors of the ITS
47 pixel barrel. Also included is a patch to properly get and use the detector
48 dimensions through out the ITS code. (B.Nilsen)
50 Revision 1.10 2001/04/26 22:44:34 nilsen
53 Revision 1.9 2001/02/09 00:00:57 nilsen
54 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
55 bugs in iostream based streamers used to read and write .det files. Fixed
56 some detector sizes. Fixed bugs in some default-special constructors.
58 Revision 1.8 2001/02/03 00:00:30 nilsen
59 New version of AliITSgeom and related files. Now uses automatic streamers,
60 set up for new formatted .det file which includes detector information.
61 Additional smaller modifications are still to come.
65 ////////////////////////////////////////////////////////////////////////
66 // This class is for the Silicon Pixel Detector, SPD, specific geometry.
67 // It is being replaced by AliITSsegmentationSPD class. This file also
68 // constains classes derived from AliITSgeomSPD which do nothing but
69 // initilize this one with predefined values.
70 ////////////////////////////////////////////////////////////////////////
72 #include <Riostream.h>
76 #include "AliITSgeomSPD.h"
78 ClassImp(AliITSgeomSPD)
80 AliITSgeomSPD::AliITSgeomSPD(){
81 // Default Constructor. Set everthing to null.
89 //______________________________________________________________________
90 AliITSgeomSPD::AliITSgeomSPD(Float_t dy,Int_t nx,Float_t *bx,
91 Int_t nz,Float_t *bz){
92 // Standard Constructor. Set everthing to null.
99 ReSetBins(dy,nx,bx,nz,bz);
102 //______________________________________________________________________
103 void AliITSgeomSPD::ReSetBins(Float_t dy,Int_t nx,Float_t *bx,
104 Int_t nz,Float_t *bz){
105 // delets the contents of this and replaces it with the given values.
107 Float_t dx = 0.0, dz = 0.0;
109 // Compute size in x and z (based on bins).
110 for(i=0;i<nx;i++) dx += bx[i];
111 for(i=0;i<nz;i++) dz += bz[i];
115 delete fShapeSPD; // delete existing shape
116 if(this->fLowBinEdgeX) delete[] this->fLowBinEdgeX; // delete existing
117 if(this->fLowBinEdgeZ) delete[] this->fLowBinEdgeZ; // delete existing
123 fLowBinEdgeX[0] = -dx;
124 fLowBinEdgeZ[0] = -dz;
125 for(i=0;i<nx;i++) fLowBinEdgeX[i+1] = fLowBinEdgeX[i] + bx[i];
126 for(i=0;i<nz;i++) fLowBinEdgeZ[i+1] = fLowBinEdgeZ[i] + bz[i];
127 SetShape("ActiveSPD","Active volume of SPD","SPD SI DET",dx,dy,dz);
130 //______________________________________________________________________
131 AliITSgeomSPD::AliITSgeomSPD(AliITSgeomSPD &source){
134 *this = source; // just use the = operator for now.
137 //______________________________________________________________________
138 AliITSgeomSPD& AliITSgeomSPD::operator=(AliITSgeomSPD &source){
142 if(&source == this) return *this;
143 this->fShapeSPD = new TBRIK(*(source.fShapeSPD));
144 if(this->fLowBinEdgeX) delete[] this->fLowBinEdgeX;
145 if(this->fLowBinEdgeZ) delete[] this->fLowBinEdgeZ;
146 this->fNbinx = source.fNbinx;
147 this->fNbinz = source.fNbinz;
148 this->InitLowBinEdgeX();
149 this->InitLowBinEdgeZ();
150 for(i=0;i<fNbinx;i++) this->fLowBinEdgeX[i] = source.fLowBinEdgeX[i];
151 for(i=0;i<fNbinz;i++) this->fLowBinEdgeZ[i] = source.fLowBinEdgeZ[i];
154 //______________________________________________________________________
155 AliITSgeomSPD::~AliITSgeomSPD(){
159 if(this->fLowBinEdgeX) delete[] this->fLowBinEdgeX;
160 if(this->fLowBinEdgeZ) delete[] this->fLowBinEdgeZ;
167 //______________________________________________________________________
168 void AliITSgeomSPD::LToDet(Float_t xl,Float_t zl,Int_t &row,Int_t &col){
169 // Returns the row and column pixel numbers for a given local coordinate
170 // system. If they are outside then it will return -1 or fNbinx/z.
173 if(xl<fLowBinEdgeX[0]) row = -1;
175 for(i=0;i<fNbinx;i++) if(xl<=fLowBinEdgeX[i]) break;
178 if(zl<fLowBinEdgeX[0]) col = -1;
180 for(i=0;i<fNbinz;i++) if(zl<=fLowBinEdgeZ[i]) break;
185 //______________________________________________________________________
186 void AliITSgeomSPD::DetToL(Int_t row,Int_t col,Float_t &xl,Float_t &zl){
187 // returns the pixel center local coordinate system location for a given
188 // row and column number. It the row or column number is outside of the
189 // defined range then it will return the nearest detector edge.
191 if(row>=0||row<fNbinx-1) xl = 0.5*(fLowBinEdgeX[row]+fLowBinEdgeX[row+1]);
192 else if(row<0) xl = fLowBinEdgeX[0];else xl = fLowBinEdgeX[fNbinx-1];
193 if(col>=0||col<fNbinz-1) zl = 0.5*(fLowBinEdgeZ[col]+fLowBinEdgeZ[col+1]);
194 else if(col<0) zl = fLowBinEdgeZ[0];else zl = fLowBinEdgeZ[fNbinz-1];
197 //______________________________________________________________________
198 void AliITSgeomSPD::Print(ostream *os) const {
199 // Standard output format for this class
208 #if defined __ICC || defined __ECC
215 fmt = os->setf(ios::scientific); // set scientific floating point output
216 *os << "TBRIK" << " ";
217 *os << setprecision(16) << GetDx() << " ";
218 *os << setprecision(16) << GetDy() << " ";
219 *os << setprecision(16) << GetDz() << " ";
220 *os << fNbinx-1 << " " << fNbinz-1 << " ";
221 for(i=0;i<fNbinx;i++) *os << setprecision(16) << fLowBinEdgeX[i] << " ";
222 for(i=0;i<fNbinz;i++) *os << setprecision(16) << fLowBinEdgeZ[i] << " ";
227 //______________________________________________________________________
228 void AliITSgeomSPD::Read(istream *is){
229 // Standard input format for this class
234 for(i=0;i<20;i++) shape[i]='\0';
236 if(strcmp(shape,"TBRIK")) Warning("::Read","Shape not a TBRIK");
237 *is >> dx >> dy >> dz;
238 if(fShapeSPD!=0) delete fShapeSPD;
239 SetShape("ActiveSPD","Active volume of SPD","SPD SI DET",dx,dy,dz);
245 for(i=0;i<fNbinx;i++) *is >> fLowBinEdgeX[i];
246 for(i=0;i<fNbinz;i++) *is >> fLowBinEdgeZ[i];
249 //----------------------------------------------------------------------
250 ostream &operator<<(ostream &os,AliITSgeomSPD &p){
251 ////////////////////////////////////////////////////////////////////////
252 // Standard output streaming function.
253 ////////////////////////////////////////////////////////////////////////
258 //----------------------------------------------------------------------
259 istream &operator>>(istream &is,AliITSgeomSPD &r){
260 ////////////////////////////////////////////////////////////////////////
261 // Standard input streaming function.
262 ////////////////////////////////////////////////////////////////////////
267 //=====================================================================
271 Revision 1.17 2002/10/22 14:45:41 alibrary
272 Introducing Riostream.h
274 Revision 1.16 2002/10/14 14:57:00 hristov
275 Merging the VirtualMC branch to the main development branch (HEAD)
277 Revision 1.14.6.1 2002/06/10 17:51:15 hristov
280 Revision 1.15 2002/05/19 18:17:03 hristov
281 Changes needed by ICC/IFC compiler (Intel)
283 Revision 1.14 2001/10/19 21:32:35 nilsen
284 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
285 cleanded up a little bit of code.
287 Revision 1.13 2001/10/12 22:07:20 nilsen
288 A patch for C++ io manipulation functions so that they will work both
289 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
292 Revision 1.12 2001/08/24 21:06:37 nilsen
293 Added more documentation, fixed up some coding violations, and some
294 forward declorations.
296 Revision 1.11 2001/05/16 08:17:49 hristov
297 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)
299 Revision 1.10 2001/04/26 22:44:34 nilsen
302 Revision 1.9 2001/02/09 00:00:57 nilsen
303 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
304 bugs in iostream based streamers used to read and write .det files. Fixed
305 some detector sizes. Fixed bugs in some default-special constructors.
307 Revision 1.8 2001/02/03 00:00:30 nilsen
308 New version of AliITSgeom and related files. Now uses automatic streamers,
309 set up for new formatted .det file which includes detector information.
310 Additional smaller modifications are still to come.
312 Revision 1.7 2000/10/02 16:32:35 barbera
313 Forward declaration added
315 Revision 1.1.2.8 2000/10/02 15:52:05 barbera
316 Forward declaration added
318 Revision 1.6 2000/07/10 16:07:18 fca
319 Release version of ITS code
321 Revision 1.4 2000/06/10 20:34:37 nilsen
322 Fixed compilation warning with HP unix.
324 Revision 1.3 2000/06/10 10:43:04 nilsen
325 Fixed bug in copy and operator =.
329 //#include "AliITSgeomSPD300.h"
331 ClassImp(AliITSgeomSPD300)
333 AliITSgeomSPD300::AliITSgeomSPD300() : AliITSgeomSPD(){
334 ////////////////////////////////////////////////////////////////////////
335 // default constructor, for ITS TDR geometry. This only consists of
336 // a default constructor to construct the defalut TDR SPD detector geometry
337 // 256 X 279 300 by 50 micron pixels.
338 ////////////////////////////////////////////////////////////////////////
339 const Float_t kdx=0.6400,kdy=0.0075,kdz=4.1900; // cm; Standard pixel detector
340 // size is 2dx wide, 2dz long,
341 // and 2dy thick. Geant 3.12
343 const Float_t kbinx0 = 0.0050; // cm; Standard pixel size in x direction.
344 const Int_t knbinx = 256; // number of pixels along x direction.
345 const Float_t kbinz0 = 0.0300; // cm; Standard pixel size in z direction.
346 const Float_t kbinz1 = 0.0350; // cm; Edge pixel size in z direction.
347 const Int_t knbinz = 279; // number of pixels along z direction.
349 Float_t dx=0.0,dz=0.0;
351 // cout << "AliITSgeomSPD300 default creator called: start" << endl;
353 SetNbinX(knbinx); // default number of bins in x.
354 SetNbinZ(knbinz); // default number of bins in z.
356 for(i=0;i<knbinx;i++) dx += kbinx0; // Compute size x.
358 for(i=0;i<knbinz;i++) dz += kbinz0; // Compute size z.
359 dz += 2.0*(kbinz1-kbinz0);
363 SetLowBinEdgeX(0,-dx); // Starting position X
364 for(i=0;i<knbinx;i++) SetLowBinEdgeX(i+1,GetBinLowEdgeX(i)+kbinx0);
365 SetLowBinEdgeZ(0,-dz); // Starting position z
366 SetLowBinEdgeZ(1,GetBinLowEdgeZ(0)+kbinz1);
367 for(i=1;i<knbinz;i++) SetLowBinEdgeZ(i+1,GetBinLowEdgeZ(i)+kbinz0);
368 SetLowBinEdgeZ(knbinz,GetBinLowEdgeZ(knbinz-1)+kbinz1);
370 if(TMath::Abs(dx-kdx)>1.0E-4 || TMath::Abs(dz-kdz)>1.0E-4)
371 Warning("Default Creator","Detector size may not be write.");
372 SetShape("ActiveSPD","Active volume of SPD","SPD SI DET",dx,kdy,dz);
373 // cout << "AliITSgeomSPD300 default creator called: end" << endl;
375 //----------------------------------------------------------------------
376 ostream &operator<<(ostream &os,AliITSgeomSPD300 &p){
377 ////////////////////////////////////////////////////////////////////////
378 // Standard output streaming function.
379 ////////////////////////////////////////////////////////////////////////
384 //----------------------------------------------------------------------
385 istream &operator>>(istream &is,AliITSgeomSPD300 &r){
386 ////////////////////////////////////////////////////////////////////////
387 // Standard input streaming function.
388 ////////////////////////////////////////////////////////////////////////
393 //=====================================================================
396 Revision 1.17 2002/10/22 14:45:41 alibrary
397 Introducing Riostream.h
399 Revision 1.16 2002/10/14 14:57:00 hristov
400 Merging the VirtualMC branch to the main development branch (HEAD)
402 Revision 1.14.6.1 2002/06/10 17:51:15 hristov
405 Revision 1.15 2002/05/19 18:17:03 hristov
406 Changes needed by ICC/IFC compiler (Intel)
408 Revision 1.14 2001/10/19 21:32:35 nilsen
409 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
410 cleanded up a little bit of code.
412 Revision 1.13 2001/10/12 22:07:20 nilsen
413 A patch for C++ io manipulation functions so that they will work both
414 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
417 Revision 1.12 2001/08/24 21:06:37 nilsen
418 Added more documentation, fixed up some coding violations, and some
419 forward declorations.
421 Revision 1.11 2001/05/16 08:17:49 hristov
422 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)
424 Revision 1.10 2001/04/26 22:44:34 nilsen
427 Revision 1.9 2001/02/09 00:00:57 nilsen
428 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
429 bugs in iostream based streamers used to read and write .det files. Fixed
430 some detector sizes. Fixed bugs in some default-special constructors.
432 Revision 1.8 2001/02/03 00:00:30 nilsen
433 New version of AliITSgeom and related files. Now uses automatic streamers,
434 set up for new formatted .det file which includes detector information.
435 Additional smaller modifications are still to come.
437 Revision 1.7 2000/10/02 16:32:35 barbera
438 Forward declaration added
440 Revision 1.1.2.8 2000/10/02 15:52:05 barbera
441 Forward declaration added
443 Revision 1.6 2000/07/10 16:07:18 fca
444 Release version of ITS code
446 Revision 1.4 2000/06/10 20:34:22 nilsen
447 Fixed compilation warning with HP unix.
449 Revision 1.3 2000/06/10 10:42:49 nilsen
450 Fixed bug in copy and operator =.
455 //#include "AliITSgeomSPD425Short.h"
457 ClassImp(AliITSgeomSPD425Short)
459 AliITSgeomSPD425Short::AliITSgeomSPD425Short() : AliITSgeomSPD(){
460 ////////////////////////////////////////////////////////////////////////
461 // default constructor, for ITS post TDR geometry. This only consists of
462 // a default constructor to construct the defalut post TDR SPD detector
463 // geometry 256 X 197 425 by 50 micron pixels with interleaved 625 by 50
464 // micron pixels (large detector).
465 ////////////////////////////////////////////////////////////////////////
467 //----------------------------------------------------------------------
468 AliITSgeomSPD425Short::AliITSgeomSPD425Short(Int_t npar,Float_t *par) :
470 ////////////////////////////////////////////////////////////////////////
471 // Standard constructor, for ITS post TDR geometry. This only consists of
472 // a default constructor to construct the defalut post TDR SPD detector
473 // geometry 256 X 197 425 by 50 micron pixels with interleaved 625 by 50
474 // micron pixels (large detector).
475 ////////////////////////////////////////////////////////////////////////
477 const Float_t kdx=0.6400/*,kdy=0.015*/,kdz=3.480; // cm; Standard pixel
478 // detector size is 2dx
479 // wide, 2dz long, and
480 // 2dy thick. Geant 3.12
482 const Float_t kbinx0 = 0.0050; // cm; Standard pixel size in x direction.
483 const Int_t knbinx = 256; // number of pixels along x direction.
484 const Float_t kbinz0 = 0.0425; // cm; Standard pixel size in z direction.
485 const Float_t kbinz1 = 0.0625; // cm; Special pixel size in z direction.
486 const Int_t knbinz = 160; // number of pixels along z direction.
488 Float_t dx,dz,*binSizeX,*binSizeZ;
490 SetNbinX(knbinx); // default number of bins in x.
491 SetNbinZ(knbinz); // default number of bins in z.
493 binSizeX = new Float_t[knbinx]; // array of bin sizes along x.
494 for(i=0;i<knbinx;i++) binSizeX[i] = kbinx0; // default x bin size.
495 binSizeZ = new Float_t[knbinz]; // array of bin sizes along z.
496 for(i=0;i<knbinz;i++) binSizeZ[i] = kbinz0; // default z bin size.
497 binSizeZ[ 31] = kbinz1;
498 binSizeZ[ 32] = kbinz1;
500 binSizeZ[ 63] = kbinz1;
501 binSizeZ[ 64] = kbinz1;
503 binSizeZ[ 95] = kbinz1;
504 binSizeZ[ 96] = kbinz1;
506 binSizeZ[127] = kbinz1;
507 binSizeZ[128] = kbinz1;
509 // correct detector size for bin size.
511 for(i=0;i<knbinx;i++) dx += binSizeX[i];
514 for(i=0;i<knbinz;i++) dz += binSizeZ[i];
517 SetShape("ActiveSPD","Active volume of SPD","SPD SI DET",
518 par[0],par[1],par[2]);
519 if(TMath::Abs(dx-kdx)>1.0E-4 || TMath::Abs(dz-kdz)>1.0E-4)
520 Warning("Default Creator","Detector size may not be write.");
522 InitLowBinEdgeX(); // array of bin sizes along x.
523 InitLowBinEdgeZ(); // array of bin sizes along x.
524 SetLowBinEdgeX(0,-dx);
525 SetLowBinEdgeZ(0,-dz);
526 for(i=0;i<knbinx;i++) SetLowBinEdgeX(i+1,GetBinLowEdgeX(i)+binSizeX[i]);
527 for(i=0;i<knbinz;i++) SetLowBinEdgeZ(i+1,GetBinLowEdgeZ(i)+binSizeZ[i]);
529 //----------------------------------------------------------------------
530 ostream &operator<<(ostream &os,AliITSgeomSPD425Short &p){
531 ////////////////////////////////////////////////////////////////////////
532 // Standard output streaming function.
533 ////////////////////////////////////////////////////////////////////////
538 //----------------------------------------------------------------------
539 istream &operator>>(istream &is,AliITSgeomSPD425Short &r){
540 ////////////////////////////////////////////////////////////////////////
541 // Standard input streaming function.
542 ////////////////////////////////////////////////////////////////////////
547 //======================================================================
551 Revision 1.17 2002/10/22 14:45:41 alibrary
552 Introducing Riostream.h
554 Revision 1.16 2002/10/14 14:57:00 hristov
555 Merging the VirtualMC branch to the main development branch (HEAD)
557 Revision 1.14.6.1 2002/06/10 17:51:15 hristov
560 Revision 1.15 2002/05/19 18:17:03 hristov
561 Changes needed by ICC/IFC compiler (Intel)
563 Revision 1.14 2001/10/19 21:32:35 nilsen
564 Minor changes to remove compliation warning on gcc 2.92.2 compiler, and
565 cleanded up a little bit of code.
567 Revision 1.13 2001/10/12 22:07:20 nilsen
568 A patch for C++ io manipulation functions so that they will work both
569 with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
572 Revision 1.12 2001/08/24 21:06:37 nilsen
573 Added more documentation, fixed up some coding violations, and some
574 forward declorations.
576 Revision 1.11 2001/05/16 08:17:49 hristov
577 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)
579 Revision 1.10 2001/04/26 22:44:34 nilsen
582 Revision 1.9 2001/02/09 00:00:57 nilsen
583 Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
584 bugs in iostream based streamers used to read and write .det files. Fixed
585 some detector sizes. Fixed bugs in some default-special constructors.
587 Revision 1.8 2001/02/03 00:00:30 nilsen
588 New version of AliITSgeom and related files. Now uses automatic streamers,
589 set up for new formatted .det file which includes detector information.
590 Additional smaller modifications are still to come.
592 Revision 1.7 2000/10/02 16:32:35 barbera
593 Forward declaration added
595 Revision 1.1.2.8 2000/10/02 15:52:05 barbera
596 Forward declaration added
598 Revision 1.6 2000/07/10 16:07:18 fca
599 Release version of ITS code
601 Revision 1.4 2000/06/10 20:34:22 nilsen
602 Fixed compilation warning with HP unix.
604 Revision 1.3 2000/06/10 10:42:49 nilsen
605 Fixed bug in copy and operator =.
610 //#include "AliITSgeomSPD425Long.h"
612 ClassImp(AliITSgeomSPD425Long)
614 AliITSgeomSPD425Long::AliITSgeomSPD425Long(){
615 ////////////////////////////////////////////////////////////////////////
616 // default constructor, for ITS post TDR geometry. This only consists of
617 // a default constructor to construct the defalut post TDR SPD detector
618 // geometry 256 X 197 425 by 50 micron pixels with interleaved 625 by 50
619 // micron pixels (large detector).
620 ////////////////////////////////////////////////////////////////////////
622 const Float_t kdx=0.6400,kdy=0.0075,kdz=4.2650; // cm; Standard pixel
623 // detector size is 2dx
624 // wide, 2dz long, and
625 // 2dy thick. Geant 3.12
627 const Float_t kbinx0 = 0.0050; // cm; Standard pixel size in x direction.
628 const Int_t knbinx = 256; // number of pixels along x direction.
629 const Float_t kbinz0 = 0.0425; // cm; Standard pixel size in z direction.
630 const Float_t kbinz1 = 0.0625; // cm; Special pixel size in z direction.
631 const Int_t knbinz = 192; // number of pixels along z direction.
633 Float_t dx,dz,*binSizeX,*binSizeZ;
635 SetNbinX(knbinx); // default number of bins in x.
636 SetNbinZ(knbinz); // default number of bins in z.
638 binSizeX = new Float_t[knbinx]; // array of bin sizes along x.
639 for(i=0;i<knbinx;i++) binSizeX[i] = kbinx0; // default x bin size.
640 binSizeZ = new Float_t[knbinz]; // array of bin sizes along z.
641 for(i=0;i<knbinz;i++) binSizeZ[i] = kbinz0; // default z bin size.
642 binSizeZ[ 31] = kbinz1;
643 binSizeZ[ 32] = kbinz1;
645 binSizeZ[ 63] = kbinz1;
646 binSizeZ[ 64] = kbinz1;
648 binSizeZ[ 95] = kbinz1;
649 binSizeZ[ 96] = kbinz1;
651 binSizeZ[127] = kbinz1;
652 binSizeZ[128] = kbinz1;
654 binSizeZ[159] = kbinz1;
655 binSizeZ[160] = kbinz1;
657 // correct detector size for bin size.
659 for(i=0;i<knbinx;i++) dx += binSizeX[i];
662 for(i=0;i<knbinz;i++) dz += binSizeZ[i];
665 SetShape("ActiveSPD","Active volume of SPD","SPD SI DET",dx,kdy,dz);
666 if(TMath::Abs(dx-kdx)>1.0E-4 || TMath::Abs(dz-kdz)>1.0E-4)
667 Warning("Default Creator","Detector size may not be write.");
669 InitLowBinEdgeX(); // array of bin sizes along x.
670 InitLowBinEdgeZ(); // array of bin sizes along x.
671 SetLowBinEdgeX(0,-dx);
672 SetLowBinEdgeZ(0,-dz);
673 for(i=0;i<knbinx;i++) SetLowBinEdgeX(i+1,GetBinLowEdgeX(i)+binSizeX[i]);
674 for(i=0;i<knbinz;i++) SetLowBinEdgeZ(i+1,GetBinLowEdgeZ(i)+binSizeZ[i]);
676 //----------------------------------------------------------------------
677 ostream &operator<<(ostream &os,AliITSgeomSPD425Long &p){
678 ////////////////////////////////////////////////////////////////////////
679 // Standard output streaming function.
680 ////////////////////////////////////////////////////////////////////////
685 //----------------------------------------------------------------------
686 istream &operator>>(istream &is,AliITSgeomSPD425Long &r){
687 ////////////////////////////////////////////////////////////////////////
688 // Standard input streaming function.
689 ////////////////////////////////////////////////////////////////////////
694 //======================================================================