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.7 2000/10/02 16:32:35 barbera
19 Forward declaration added
21 Revision 1.1.2.8 2000/10/02 15:52:05 barbera
22 Forward declaration added
24 Revision 1.6 2000/07/10 16:07:18 fca
25 Release version of ITS code
27 Revision 1.4 2000/06/10 20:34:37 nilsen
28 Fixed compilation warning with HP unix.
30 Revision 1.3 2000/06/10 10:43:04 nilsen
31 Fixed bug in copy and operator =.
37 #include "AliITSgeomSPD300.h"
39 ClassImp(AliITSgeomSPD300)
41 AliITSgeomSPD300::AliITSgeomSPD300(){
42 ////////////////////////////////////////////////////////////////////////
43 // default constructor, for ITS TDR geometry.
44 ////////////////////////////////////////////////////////////////////////
45 const Float_t kdx=0.6400,kdy=0.0075,kdz=4.1890; // cm; Standard pixel detector
46 // size is 2dx wide, 2dz long,
47 // and 2dy thick. Geant 3.12
49 const Float_t kbinx0 = 0.0050; // cm; Standard pixel size in x direction.
50 const Int_t knbinx = 256; // number of pixels along x direction.
51 const Float_t kbinz0 = 0.0300; // cm; Standard pixel size in z direction.
52 const Int_t knbinz = 279; // number of pixels along z direction.
55 fDx = kdx; // default value.
56 fDy = kdy; // default value.
57 fDz = kdz; // default value.
58 fNbinx = knbinx; // default number of bins in x.
59 fNbinz = knbinz; // default number of bins in z.
61 fBinSizeX = new Float_t[fNbinx]; // array of bin sizes along x.
62 for(i=0;i<fNbinx;i++) fBinSizeX[i] = kbinx0; // default x bin size.
63 fBinSizeZ = new Float_t[fNbinz]; // array of bin sizes along z.
64 for(i=0;i<fNbinz;i++) fBinSizeZ[i] = kbinz0; // default z bin size.
66 // correct detector size for bin size.
68 for(i=0;i<fNbinx;i++) fDx +=fBinSizeX[i];
71 for(i=0;i<fNbinz;i++) fDz +=fBinSizeZ[i];
74 fShapeSPD = new TBRIK("ActiveSPD","Active volume of SPD","SPD SI DET",
77 //______________________________________________________________________
78 AliITSgeomSPD300::AliITSgeomSPD300(Float_t dy,Int_t nx,Float_t *bx,
79 Int_t nz,Float_t *bz){
80 ////////////////////////////////////////////////////////////////////////
81 // default constructor, for a User modified TDR based geometry.
82 ////////////////////////////////////////////////////////////////////////
87 fNbinx = nx; // new number of bins in x.
88 fNbinz = nz; // new number of bins in z.
90 fBinSizeX = new Float_t[fNbinx]; // array of bin sizes along x.
91 for(i=0;i<fNbinx;i++) fBinSizeX[i] = bx[i]; // new x bin size.
92 fBinSizeZ = new Float_t[fNbinz]; // array of bin sizes along z.
93 for(i=0;i<fNbinz;i++) fBinSizeZ[i] = bz[i]; // new z bin size.
95 // correct detector size for bin size.
96 for(i=0;i<fNbinx;i++) fDx +=fBinSizeX[i];
98 for(i=0;i<fNbinz;i++) fDz +=fBinSizeZ[i];
101 fShapeSPD = new TBRIK("ActiveSPD","Active volume of SPD","SPD SI DET",
104 //______________________________________________________________________
105 AliITSgeomSPD300::AliITSgeomSPD300(AliITSgeomSPD300 &source){
108 if(&source == this) return;
109 this->fShapeSPD = new TBRIK(*(source.fShapeSPD));
110 this->fDx = source.fDx;
111 this->fDy = source.fDy;
112 this->fDz = source.fDz;
113 if(this->fBinSizeX) delete[] this->fBinSizeX;
114 if(this->fBinSizeX) delete[] this->fBinSizeZ;
115 this->fNbinx = source.fNbinx;
116 this->fBinSizeX = new Float_t[this->fNbinx];
117 this->fNbinz = source.fNbinz;
118 this->fBinSizeZ = new Float_t[this->fNbinz];
119 for(i=0;i<fNbinx;i++) this->fBinSizeX[i] = source.fBinSizeX[i];
120 for(i=0;i<fNbinz;i++) this->fBinSizeZ[i] = source.fBinSizeZ[i];
122 //______________________________________________________________________
123 AliITSgeomSPD300& AliITSgeomSPD300::operator=(AliITSgeomSPD300 &source){
126 if(&source == this) return *this;
127 this->fShapeSPD = new TBRIK(*(source.fShapeSPD));
128 this->fDx = source.fDx;
129 this->fDy = source.fDy;
130 this->fDz = source.fDz;
131 if(this->fBinSizeX) delete[] this->fBinSizeX;
132 if(this->fBinSizeX) delete[] this->fBinSizeZ;
133 this->fNbinx = source.fNbinx;
134 this->fBinSizeX = new Float_t[this->fNbinx];
135 this->fNbinz = source.fNbinz;
136 this->fBinSizeZ = new Float_t[this->fNbinz];
137 for(i=0;i<fNbinx;i++) this->fBinSizeX[i] = source.fBinSizeX[i];
138 for(i=0;i<fNbinz;i++) this->fBinSizeZ[i] = source.fBinSizeZ[i];
141 //______________________________________________________________________
142 AliITSgeomSPD300::~AliITSgeomSPD300(){
148 //______________________________________________________________________
149 void AliITSgeomSPD300::ReSetBins(Float_t dy,Int_t nx,Float_t *bx,
150 Int_t nz,Float_t *bz){
151 ////////////////////////////////////////////////////////////////////////
152 // default constructor, for a User modified TDR based geometry.
153 ////////////////////////////////////////////////////////////////////////
158 fNbinx = nx; // new number of bins in x.
159 fNbinz = nz; // new number of bins in z.
161 if(fBinSizeX!=0) delete[] fBinSizeX;
162 fBinSizeX = new Float_t[fNbinx]; // array of bin sizes along x.
163 for(i=0;i<fNbinx;i++) fBinSizeX[i] = bx[i]; // new x bin size.
164 if(fBinSizeZ!=0) delete[] fBinSizeZ;
165 fBinSizeZ = new Float_t[fNbinz]; // array of bin sizes along z.
166 for(i=0;i<fNbinz;i++) fBinSizeZ[i] = bz[i]; // new z bin size.
168 // correct detector size for bin size.
169 for(i=0;i<fNbinx;i++) fDx +=fBinSizeX[i];
171 for(i=0;i<fNbinz;i++) fDz +=fBinSizeZ[i];
174 fShapeSPD = new TBRIK("ActiveSPD","Active volume of SPD","SPD SI DET",