]>
Commit | Line | Data |
---|---|---|
97874584 | 1 | // |
162acd47 | 2 | #ifndef ALIITSBASEVOLPARAMS_H |
3 | #define ALIITSBASEVOLPARAMS_H | |
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* | |
8 | $Id$ | |
9 | */ | |
10 | ||
11 | ///////////////////////////////////////////////////////////////////////// | |
12 | // Geant 3 base class for volume parameters | |
13 | ///////////////////////////////////////////////////////////////////////// | |
14 | #include <TObject.h> | |
15 | class TString; | |
16 | ||
17 | class AliITSBaseVolParams : public TObject { | |
18 | public: | |
bc825688 | 19 | AliITSBaseVolParams(){fVol=-1;fCpn=-1;} // Default constructor |
162acd47 | 20 | virtual ~AliITSBaseVolParams(){} // Destructor |
21 | virtual void SetVid(Int_t i){fVol = i;}// Sets the volume id from the next | |
22 | // available one | |
23 | virtual Int_t GetVid(){return fVol;} // Returns volume id | |
24 | virtual void SetName(const char *c){fName=c;}//Sets name of this volume | |
25 | virtual TString* GetName(){return &fName;} // Returns volume name | |
bc825688 | 26 | virtual void Print(ostream *os); // Prints output content of this class |
27 | virtual void Read(istream *is); // Reads output created by Print above. | |
28 | virtual Int_t GetCopyNumber(){return fCpn;}//Returns existing max copy no. | |
29 | // incoment and return copy number. | |
30 | virtual Int_t GetNextcpn(){fCpn++;return fCpn;} | |
31 | // Same as above, but add's 1 for FORTRAN/Geant3 compliance. | |
32 | virtual Int_t GetG3cpn(){return GetNextcpn()+1;} | |
33 | /* | |
34 | Int_t ITSIndexToITSG3name(const Int_t i) | |
35 | {return AliITSBaseGeometry::ITSIndexToITSG3name(i);}; | |
36 | Int_t ITSG3VnameToIndex(const char *name)const | |
37 | {return AliITSBaseGeometry::ITSG3VnameToIndex(name);}; | |
38 | */ | |
162acd47 | 39 | private: |
40 | Int_t fVol; // Volume index number | |
bc825688 | 41 | Int_t fCpn; // max Copy number |
162acd47 | 42 | TString fName; // Volume name |
43 | ||
44 | ClassDef(AliITSBaseVolParams,1) // Basic ITS volume parameters class | |
45 | }; | |
bc825688 | 46 | // Input and output function for standard C++ input/output. |
47 | ostream &operator<<(ostream &os,AliITSBaseVolParams &source); | |
48 | istream &operator>>(istream &os,AliITSBaseVolParams &source); | |
49 | #endif | |
50 | ||
51 | #ifndef ALIITSBOXDATA_H | |
52 | #define ALIITSBOXDATA_H | |
bc825688 | 53 | ///////////////////////////////////////////////////////////////////////// |
54 | // Geant 3 Box data structure. | |
55 | ///////////////////////////////////////////////////////////////////////// | |
bc825688 | 56 | |
57 | class AliITSBoxData : public AliITSBaseVolParams { | |
58 | public: | |
59 | AliITSBoxData() : AliITSBaseVolParams() // Default constructor | |
60 | {fDx=0.0;fDy=0.0;fDz=0;} | |
61 | virtual ~AliITSBoxData(){} // Standard destructor | |
62 | // Getters | |
63 | Double_t DxAt() {return fDx;} // Returm arrau of rmin values | |
64 | Double_t DyAt() {return fDy;} // Returm arrau of rmax values | |
65 | Double_t DzAt() {return fDz;} // Return fDz coordiante | |
66 | Double_t& Dx(){return fDx;}// Returns address of fRmax | |
67 | Double_t& Dy(){return fDy;}// Returns address of fRmin | |
68 | Double_t& Dz(){return fDz;}// Returns address of fDz | |
69 | void Print(ostream *os); // Prints output content of this class | |
70 | void Read(istream *is); // Reads output created by Print above. | |
71 | private: | |
72 | Double_t fDx; // X half length | |
73 | Double_t fDy; // Y half length | |
74 | Double_t fDz; // Z half length. | |
75 | ||
76 | ClassDef(AliITSBoxData,1) // Box data class | |
77 | }; | |
78 | // Input and output function for standard C++ input/output. | |
79 | ostream &operator<<(ostream &os,AliITSBoxData &source); | |
80 | istream &operator>>(istream &os,AliITSBoxData &source); | |
81 | #endif | |
82 | ||
83 | #ifndef ALIITSTRAPEZOID1DATA_H | |
84 | #define ALIITSTRAPEZOID1DATA_H | |
bc825688 | 85 | ///////////////////////////////////////////////////////////////////////// |
86 | // Geant 3 Trapezoid 1 data structure. | |
87 | ///////////////////////////////////////////////////////////////////////// | |
bc825688 | 88 | |
89 | class AliITSTrapezoid1Data : public AliITSBaseVolParams { | |
90 | public: | |
91 | AliITSTrapezoid1Data() : AliITSBaseVolParams() // Default constructor | |
92 | {fDx[0]=0.0;fDx[1]=0.0;fDy=0.0;fDz=0;} | |
93 | virtual ~AliITSTrapezoid1Data(){} // Standard destructor | |
94 | // Getters | |
95 | Double_t DxAt(Int_t i) {return fDx[i];} // Returm arrau of rmin values | |
96 | Double_t DyAt() {return fDy;} // Returm arrau of rmax values | |
97 | Double_t DzAt() {return fDz;} // Return fDz coordiante | |
98 | Double_t& Dx(Int_t i){return fDx[i];}// Returns address of fRmax | |
99 | Double_t& Dy(){return fDy;}// Returns address of fRmin | |
100 | Double_t& Dz(){return fDz;}// Returns address of fDz | |
101 | void Print(ostream *os); // Prints output content of this class | |
102 | void Read(istream *is); // Reads output created by Print above. | |
103 | private: | |
104 | Double_t fDx[2]; // X half length | |
105 | Double_t fDy; // Y half length | |
106 | Double_t fDz; // Z half length. | |
107 | ||
108 | ClassDef(AliITSTrapezoid1Data,1) // Trapezoid 1 data class | |
109 | }; | |
110 | // Input and output function for standard C++ input/output. | |
111 | ostream &operator<<(ostream &os,AliITSTrapezoid1Data &source); | |
112 | istream &operator>>(istream &os,AliITSTrapezoid1Data &source); | |
113 | #endif | |
114 | ||
115 | #ifndef ALIITSTRAPEZOID2DATA_H | |
116 | #define ALIITSTRAPEZOID2DATA_H | |
bc825688 | 117 | ///////////////////////////////////////////////////////////////////////// |
118 | // Geant 3 Trapezoid 2 data structure. | |
119 | ///////////////////////////////////////////////////////////////////////// | |
162acd47 | 120 | |
bc825688 | 121 | class AliITSTrapezoid2Data : public AliITSBaseVolParams { |
122 | public: | |
123 | AliITSTrapezoid2Data() : AliITSBaseVolParams() // Default constructor | |
124 | {fDx[0]=0.0;fDx[1]=0.0;fDy[0]=0.0;fDy[1]=0.0;fDz=0.0;} | |
125 | virtual ~AliITSTrapezoid2Data(){} // Standard destructor | |
126 | // Getters | |
127 | Double_t DxAt(Int_t i) {return fDx[i];} // Returm arrau of rmin values | |
128 | Double_t DyAt(Int_t i) {return fDy[i];} // Returm arrau of rmax values | |
129 | Double_t DzAt() {return fDz;} // Return fDz coordiante | |
130 | Double_t& Dx(Int_t i){return fDx[i];}// Returns address of fRmax | |
131 | Double_t& Dy(Int_t i){return fDy[i];}// Returns address of fRmin | |
132 | Double_t& Dz(){return fDz;}// Returns address of fDz | |
133 | void Print(ostream *os); // Prints output content of this class | |
134 | void Read(istream *is); // Reads output created by Print above. | |
135 | private: | |
136 | Double_t fDx[2]; // X half length | |
137 | Double_t fDy[2]; // Y half length | |
138 | Double_t fDz; // Z half length. | |
139 | ||
140 | ClassDef(AliITSTrapezoid2Data,1) // Trapezoid 2 data class | |
141 | }; | |
142 | // Input and output function for standard C++ input/output. | |
143 | ostream &operator<<(ostream &os,AliITSTrapezoid2Data &source); | |
144 | istream &operator>>(istream &os,AliITSTrapezoid2Data &source); | |
162acd47 | 145 | #endif |
146 | ||
bc825688 | 147 | #ifndef ALIITSTRAPEZOIDDATA_H |
148 | #define ALIITSTRAPEZOIDDATA_H | |
bc825688 | 149 | ///////////////////////////////////////////////////////////////////////// |
150 | // Geant 3 Trapezoid General data structure. | |
97874584 | 151 | /////////////////////////////////////////////////////////////////////////; |
bc825688 | 152 | |
153 | class AliITSTrapezoidData : public AliITSBaseVolParams { | |
154 | public: | |
155 | AliITSTrapezoidData() : AliITSBaseVolParams() // Default constructor | |
156 | {fDz=0.0;fTheta=0.0;fPhi=0.0;fH[0]=0.0;fH[1]=0.0;fBl[0]=0.0; | |
157 | fBl[1]=0.0;fTl[0]=0.0;fTl[1]=0.0;fAlp[0]=0.0;fAlp[1]=0.0;} | |
158 | virtual ~AliITSTrapezoidData(){} // Standard destructor | |
159 | // Getters | |
160 | Double_t DzAt() {return fDz;} // Returm arrau of dZ values | |
161 | Double_t Theta() {return fTheta;} // Returm arrau of Theta values | |
162 | Double_t Phi() {return fPhi;} // Return Phi coordiante | |
163 | Double_t HAt(Int_t i){return fH[i];} // Return fH[] | |
164 | Double_t Bl(Int_t i){return fBl[i];} // Return fBl[] | |
165 | Double_t Tl(Int_t i){return fTl[i];} // Return fTl[] | |
166 | Double_t Alpha(Int_t i){return fAlp[i];} // Return fAlpha[] | |
167 | Double_t& Dz(){return fDz;}// Returns address of fDz | |
168 | Double_t& Th(){return fTheta;}// Returns address of fTheta | |
169 | Double_t& Ph(){return fPhi;}// Returns address of fPhi | |
170 | Double_t& H(Int_t i){return fH[i];}// Returns address of fH | |
171 | Double_t& B(Int_t i){return fBl[i];}// Returns address of fBl | |
172 | Double_t& T(Int_t i){return fTl[i];}// Returns address of fTl | |
173 | Double_t& A(Int_t i){return fAlp[i];}// Returns address of fAlp | |
174 | void Print(ostream *os); // Prints output content of this class | |
175 | void Read(istream *is); // Reads output created by Print above. | |
176 | private: | |
177 | Double_t fTheta; // Polar angle of the line joing the center of the | |
178 | // face at -dz to the center of the one at dz [degree]. | |
179 | Double_t fPhi; // aximuthal angle of the line joing the center of the | |
180 | // face at -dz to the center of the one at +dz [degree]. | |
181 | Double_t fDz; // Half-length along the z-asix | |
182 | Double_t fH[2]; // half-length along y of the face at -dz & _dz. | |
183 | Double_t fBl[2]; // half-length along x of the side at -h1 in y of | |
184 | // the face at -dz & +dz in z. | |
185 | Double_t fTl[2]; // half-length along x of teh side at +h1 in y of | |
186 | // the face at -dz & +dz in z. | |
187 | Double_t fAlp[2];// angle with respect to the y axis from the center of | |
188 | // the side at -fH[0] & +fH[1] in y to the cetner of the | |
189 | // side at +h1 in y of the face at -dz in z [degree]. | |
190 | ||
191 | ClassDef(AliITSTrapezoidData,1) // General Trapezoid data class | |
192 | }; | |
193 | // Input and output function for standard C++ input/output. | |
194 | ostream &operator<<(ostream &os,AliITSTrapezoidData &source); | |
195 | istream &operator>>(istream &os,AliITSTrapezoidData &source); | |
196 | #endif | |
197 | ||
198 | #ifndef ALIITSTRAPEZOIDTWISTEDDATA_H | |
199 | #define ALIITSTRAPEZOIDTWISTEDDATA_H | |
bc825688 | 200 | ///////////////////////////////////////////////////////////////////////// |
201 | // Geant 3 Trapezoid General data structure. | |
97874584 | 202 | /////////////////////////////////////////////////////////////////////////; |
bc825688 | 203 | |
204 | class AliITSTrapezoidTwistedData : public AliITSBaseVolParams { | |
205 | public: | |
206 | AliITSTrapezoidTwistedData() : AliITSBaseVolParams() //Default constructor | |
207 | {fTwist=0.0;fDz=0.0;fTheta=0.0;fPhi=0.0;fH[0]=0.0;fH[1]=0.0; | |
208 | fBl[0]=0.0;fBl[1]=0.0;fTl[0]=0.0;fTl[1]=0.0;fAlp[0]=0.0;fAlp[1]=0.0;} | |
209 | virtual ~AliITSTrapezoidTwistedData(){} // Standard destructor | |
210 | // Getters | |
211 | Double_t DzAt() {return fDz;} // Returm arrau of dZ values | |
212 | Double_t Theta() {return fTheta;} // Returm arrau of Theta values | |
213 | Double_t Phi() {return fPhi;} // Return Phi angle | |
214 | Double_t Twist(){return fTwist;} // Returns Twist angle | |
215 | Double_t HAt(Int_t i){return fH[i];} // Return fH[] | |
216 | Double_t Bl(Int_t i){return fBl[i];} // Return fBl[] | |
217 | Double_t Tl(Int_t i){return fTl[i];} // Return fTl[] | |
218 | Double_t Alpha(Int_t i){return fAlp[i];} // Return fAlpha[] | |
219 | Double_t& Dz(){return fDz;}// Returns address of fDz | |
220 | Double_t& Th(){return fTheta;}// Returns address of fTheta | |
221 | Double_t& Ph(){return fPhi;}// Returns address of fPhi | |
222 | Double_t& Tw(){return fTwist;}// Returns address of fTwist | |
223 | Double_t& H(Int_t i){return fH[i];}// Returns address of fH | |
224 | Double_t& B(Int_t i){return fBl[i];}// Returns address of fBl | |
225 | Double_t& T(Int_t i){return fTl[i];}// Returns address of fTl | |
226 | Double_t& A(Int_t i){return fAlp[i];}// Returns address of fAlp | |
227 | void Print(ostream *os); // Prints output content of this class | |
228 | void Read(istream *is); // Reads output created by Print above. | |
229 | private: | |
230 | Double_t fTwist; // Twist angle of the faces parallel to the x-y | |
231 | // plane at z=+-dz around an axis parallel to z | |
232 | Double_t fTheta; // Polar angle of the line joing the center of the | |
233 | // face at -dz to the center of the one at dz [degree]. | |
234 | Double_t fPhi; // aximuthal angle of the line joing the center of the | |
235 | // face at -dz to the center of the one at +dz [degree]. | |
236 | Double_t fDz; // Half-length along the z-asix | |
237 | Double_t fH[2]; // half-length along y of the face at -dz & _dz. | |
238 | Double_t fBl[2]; // half-length along x of the side at -h1 in y of | |
239 | // the face at -dz & +dz in z. | |
240 | Double_t fTl[2]; // half-length along x of teh side at +h1 in y of | |
241 | // the face at -dz & +dz in z. | |
242 | Double_t fAlp[2];// angle with respect to the y axis from the center of | |
243 | // the side at -fH[0] & +fH[1] in y to the cetner of the | |
244 | // side at +h1 in y of the face at -dz in z [degree]. | |
245 | ||
246 | ClassDef(AliITSTrapezoidTwistedData,1) // Twisted Trapezoid data class | |
247 | }; | |
248 | // Input and output function for standard C++ input/output. | |
249 | ostream &operator<<(ostream &os,AliITSTrapezoidTwistedData &source); | |
250 | istream &operator>>(istream &os,AliITSTrapezoidTwistedData &source); | |
251 | #endif | |
162acd47 | 252 | |
253 | #ifndef ALIITSTUBEDATA_H | |
254 | #define ALIITSTUBEDATA_H | |
162acd47 | 255 | ///////////////////////////////////////////////////////////////////////// |
bc825688 | 256 | // Geant 3 Tube data structure. |
162acd47 | 257 | ///////////////////////////////////////////////////////////////////////// |
162acd47 | 258 | |
259 | class AliITSTubeData : public AliITSBaseVolParams { | |
260 | public: | |
261 | AliITSTubeData() : AliITSBaseVolParams() // Default constructor | |
262 | {fDz=0;fRmin=0;fRmax=0;} | |
263 | virtual ~AliITSTubeData(){} // Standard destructor | |
264 | // Getters | |
bc825688 | 265 | Double_t DzAt(){return fDz;} // Return fDz coordiante |
162acd47 | 266 | Double_t Rmin() {return fRmin;} // Returm arrau of rmin values |
267 | Double_t Rmax() {return fRmax;} // Returm arrau of rmax values | |
bc825688 | 268 | Double_t& Z(){return fDz;}// Returns address of fDz |
269 | Double_t& Rn(){return fRmin;}// Returns address of fRmin | |
270 | Double_t& Rx(){return fRmax;}// Returns address of fRmax | |
162acd47 | 271 | void Print(ostream *os); // Prints output content of this class |
272 | void Read(istream *is); // Reads output created by Print above. | |
273 | private: | |
274 | Double_t fRmin; // Inner Radius | |
275 | Double_t fRmax; // Outer Radius | |
276 | Double_t fDz; // Z half length. | |
277 | ||
bc825688 | 278 | ClassDef(AliITSTubeData,1) // Simple Tube data class |
162acd47 | 279 | }; |
280 | // Input and output function for standard C++ input/output. | |
281 | ostream &operator<<(ostream &os,AliITSTubeData &source); | |
282 | istream &operator>>(istream &os,AliITSTubeData &source); | |
bc825688 | 283 | #endif |
162acd47 | 284 | |
bc825688 | 285 | #ifndef ALIITSTUBESEGDATA_H |
286 | #define ALIITSTUBESEGDATA_H | |
bc825688 | 287 | ///////////////////////////////////////////////////////////////////////// |
288 | // Geant 3 Tube Segment data structure. | |
289 | ///////////////////////////////////////////////////////////////////////// | |
bc825688 | 290 | |
291 | class AliITSTubeSegData : public AliITSBaseVolParams { | |
292 | public: | |
293 | AliITSTubeSegData() : AliITSBaseVolParams() // Default constructor | |
294 | {fDz=0;fRmin=0;fRmax=0;} | |
295 | virtual ~AliITSTubeSegData(){} // Standard destructor | |
296 | // Getters | |
297 | Double_t Phi0() {return fPhi0;} // Returns starting Phi value | |
298 | Double_t Phi1() {return fPhi1;} // Returns endinging Phi value | |
299 | Double_t DzAt(){return fDz;} // Return fDz coordiante | |
300 | Double_t Rmin() {return fRmin;} // Returm arrau of rmin values | |
301 | Double_t Rmax() {return fRmax;} // Returm arrau of rmax values | |
302 | Double_t& P0(){return fPhi0;}// Returns addres of fPhi0 | |
303 | Double_t& P1(){return fPhi1;}// Returns addres of fPhi1 | |
304 | Double_t& Z(){return fDz;}// Returns address of fDz | |
305 | Double_t& Rn(){return fRmin;}// Returns address of fRmin | |
306 | Double_t& Rx(){return fRmax;}// Returns address of fRmax | |
307 | void Print(ostream *os); // Prints output content of this class | |
308 | void Read(istream *is); // Reads output created by Print above. | |
309 | private: | |
310 | Double_t fPhi0,fPhi1; // Starting and ending phi angles [degrees] | |
311 | Double_t fRmin; // Inner Radius | |
312 | Double_t fRmax; // Outer Radius | |
313 | Double_t fDz; // Z half length. | |
162acd47 | 314 | |
bc825688 | 315 | ClassDef(AliITSTubeSegData,1) // Segment of a Tube data class |
316 | }; | |
317 | // Input and output function for standard C++ input/output. | |
318 | ostream &operator<<(ostream &os,AliITSTubeSegData &source); | |
319 | istream &operator>>(istream &os,AliITSTubeSegData &source); | |
320 | #endif | |
321 | ||
322 | #ifndef ALIITSTUBECUTDATA_H | |
323 | #define ALIITSTUBECUTDATA_H | |
bc825688 | 324 | |
325 | #include <TVector3.h> | |
326 | ||
327 | ///////////////////////////////////////////////////////////////////////// | |
328 | // Geant 3 Tube Cut data structure. | |
329 | ///////////////////////////////////////////////////////////////////////// | |
bc825688 | 330 | |
331 | class AliITSTubeCutData : public AliITSBaseVolParams { | |
332 | public: | |
333 | AliITSTubeCutData() : AliITSBaseVolParams() // Default constructor | |
334 | {fDz=0;fRmin=0;fRmax=0;fPhi0=0.0,fPhi1=0.0;} | |
335 | virtual ~AliITSTubeCutData(){} // Standard destructor | |
336 | // Getters | |
337 | Double_t Phi0() {return fPhi0;} // Returns starting Phi value | |
338 | Double_t Phi1() {return fPhi1;} // Returns endinging Phi value | |
339 | Double_t DzAt(){return fDz;} // Return fDz coordiante | |
340 | Double_t Rmin() {return fRmin;} // Returm arrau of rmin values | |
341 | Double_t Rmax() {return fRmax;} // Returm arrau of rmax values | |
342 | TVector3 Normal(Int_t i){return (fNorm[i]).Unit();}// Returns unit normal | |
343 | //at z serface -dz & +dz. | |
344 | // Returns jth unit normal at z serface -dz & +dz. | |
345 | Double_t Normal(Int_t i,Int_t j){return ((fNorm[i]).Unit())[j];} | |
346 | Double_t& P0(){return fPhi0;}// Returns addres of fPhi0 | |
347 | Double_t& P1(){return fPhi1;}// Returns addres of fPhi1 | |
348 | Double_t& Z(){return fDz;}// Returns address of fDz | |
349 | Double_t& Rn(){return fRmin;}// Returns address of fRmin | |
350 | Double_t& Rx(){return fRmax;}// Returns address of fRmax | |
351 | // Returns address of normal at z serface -dz & +dz. | |
352 | TVector3& Nv(Int_t i){return fNorm[i];} | |
353 | Double_t& Nx(Int_t i){return (fNorm[i])[0];}// return address of x | |
354 | //component of the nomal vect. | |
355 | Double_t& Ny(Int_t i){return (fNorm[i])[1];}// return address of y | |
356 | //component of the nomal vect. | |
357 | Double_t& Nz(Int_t i){return (fNorm[i])[2];}// return address of z | |
358 | //component of the nomal vect. | |
359 | void Print(ostream *os); // Prints output content of this class | |
360 | void Read(istream *is); // Reads output created by Print above. | |
361 | private: | |
362 | Double_t fPhi0,fPhi1; // Starting and ending phi angles [degrees] | |
363 | Double_t fRmin; // Inner Radius | |
364 | Double_t fRmax; // Outer Radius | |
365 | Double_t fDz; // Z half length. | |
366 | TVector3 fNorm[2]; // unit vector normal to -dz and +dz surfaces. | |
367 | ||
368 | ClassDef(AliITSTubeCutData,1) // A tube segment with cut ends data class | |
369 | }; | |
370 | // Input and output function for standard C++ input/output. | |
371 | ostream &operator<<(ostream &os,AliITSTubeCutData &source); | |
372 | istream &operator>>(istream &os,AliITSTubeCutData &source); | |
162acd47 | 373 | #endif |
bc825688 | 374 | |
375 | #ifndef ALIITSTUBEELLIPTICALDATA_H | |
376 | #define ALIITSTUBEELLIPTICALDATA_H | |
bc825688 | 377 | |
378 | ///////////////////////////////////////////////////////////////////////// | |
379 | // Geant 3 Tube Elliptical data structure. | |
380 | ///////////////////////////////////////////////////////////////////////// | |
bc825688 | 381 | |
382 | class AliITSTubeEllipticalData : public AliITSBaseVolParams { | |
383 | public: | |
384 | AliITSTubeEllipticalData() : AliITSBaseVolParams() // Default constructor | |
385 | {fDz=0;fP0=0;fP1=0;} | |
386 | virtual ~AliITSTubeEllipticalData(){} // Standard destructor | |
387 | // Getters | |
388 | Double_t DzAt(){return fDz;} // Return fDz coordiante | |
389 | Double_t P0At() {return fP0;} // Returm fP0 values | |
390 | Double_t P1At() {return fP1;} // Returm fP1 values | |
391 | Double_t& Z(){return fDz;}// Returns address of fDz | |
392 | Double_t& P0(){return fP0;}// Returns address of fP0 | |
393 | Double_t& P1(){return fP1;}// Returns address of fP1 | |
394 | void Print(ostream *os); // Prints output content of this class | |
395 | void Read(istream *is); // Reads output created by Print above. | |
396 | private: | |
397 | Double_t fP0; // semi-axis of the elipse along x | |
398 | Double_t fP1; // semi-asis of the elipse along y | |
399 | Double_t fDz; // Z half length. | |
400 | ||
401 | ClassDef(AliITSTubeEllipticalData,1) // Tube with an elliptical cross | |
402 | // section data class | |
403 | }; | |
404 | // Input and output function for standard C++ input/output. | |
405 | ostream &operator<<(ostream &os,AliITSTubeEllipticalData &source); | |
406 | istream &operator>>(istream &os,AliITSTubeEllipticalData &source); | |
407 | #endif | |
408 | ||
409 | #ifndef ALIITSTUBEHYPERBOLICDATA_H | |
410 | #define ALIITSTUBEHYPERBOLICDATA_H | |
bc825688 | 411 | |
412 | ///////////////////////////////////////////////////////////////////////// | |
413 | // Geant 3 Tube Hyperbolic data structure. | |
414 | ///////////////////////////////////////////////////////////////////////// | |
bc825688 | 415 | |
416 | class AliITSTubeHyperbolicData : public AliITSBaseVolParams { | |
417 | public: | |
418 | AliITSTubeHyperbolicData() : AliITSBaseVolParams() // Default constructor | |
419 | {fTheta=0.0;fDz=0;fRmin=0;fRmax=0;} | |
420 | virtual ~AliITSTubeHyperbolicData(){} // Standard destructor | |
421 | // Getters | |
422 | Double_t ThetaAt() {return fTheta;} // Returns starting Theta value | |
423 | Double_t DzAt(){return fDz;} // Return fDz coordiante | |
424 | Double_t Rmin() {return fRmin;} // Returm arrau of rmin values | |
425 | Double_t Rmax() {return fRmax;} // Returm arrau of rmax values | |
426 | Double_t& Theta(){return fTheta;}// Returns addres of fTheta | |
427 | Double_t& Z(){return fDz;}// Returns address of fDz | |
428 | Double_t& Rn(){return fRmin;}// Returns address of fRmin | |
429 | Double_t& Rx(){return fRmax;}// Returns address of fRmax | |
430 | void Print(ostream *os); // Prints output content of this class | |
431 | void Read(istream *is); // Reads output created by Print above. | |
432 | private: | |
433 | Double_t fTheta; // stero angle of rotation of the tetwo faces [degrees] | |
434 | Double_t fRmin; // Inner Radius | |
435 | Double_t fRmax; // Outer Radius | |
436 | Double_t fDz; // Z half length. | |
437 | ||
438 | ClassDef(AliITSTubeHyperbolicData,1) // Hyperbolic Tube data class | |
439 | }; | |
440 | // Input and output function for standard C++ input/output. | |
441 | ostream &operator<<(ostream &os,AliITSTubeHyperbolicData &source); | |
442 | istream &operator>>(istream &os,AliITSTubeHyperbolicData &source); | |
443 | #endif | |
444 | ||
445 | #ifndef ALIITSCONEDATA_H | |
446 | #define ALIITSCONEDATA_H | |
bc825688 | 447 | ///////////////////////////////////////////////////////////////////////// |
448 | // Geant 3 Cone data structure. | |
449 | ///////////////////////////////////////////////////////////////////////// | |
bc825688 | 450 | |
451 | class AliITSConeData : public AliITSBaseVolParams { | |
452 | public: | |
453 | AliITSConeData() : AliITSBaseVolParams() // Default constructor | |
454 | {fDz=0;fRmin0=0;fRmax0=0;fRmin1=0;fRmax1=0;} | |
455 | virtual ~AliITSConeData(){} // Standard destructor | |
456 | // Getters | |
457 | Double_t DzAt(){return fDz;} // Return fDz coordiante | |
458 | Double_t Rmin0() {return fRmin0;} // Returm arrau of rmin0 values | |
459 | Double_t Rmax0() {return fRmax0;} // Returm arrau of rmax0 values | |
460 | Double_t Rmin1() {return fRmin1;} // Returm arrau of rmin1 values | |
461 | Double_t Rmax1() {return fRmax1;} // Returm arrau of rmax1 values | |
462 | Double_t& Z(){return fDz;}// Returns address of fDz | |
463 | Double_t& Rn0(){return fRmin0;}// Returns address of fRmin0 | |
464 | Double_t& Rx0(){return fRmax0;}// Returns address of fRmax0 | |
465 | Double_t& Rn1(){return fRmin1;}// Returns address of fRmin1 | |
466 | Double_t& Rx1(){return fRmax1;}// Returns address of fRmax1 | |
467 | void Print(ostream *os); // Prints output content of this class | |
468 | void Read(istream *is); // Reads output created by Print above. | |
469 | private: | |
470 | Double_t fRmin0,fRmin1; // Inner Radius | |
471 | Double_t fRmax0,fRmax1; // Outer Radius | |
472 | Double_t fDz; // Z half length. | |
473 | ||
474 | ClassDef(AliITSConeData,1) // Simple Cone data class | |
475 | }; | |
476 | // Input and output function for standard C++ input/output. | |
477 | ostream &operator<<(ostream &os,AliITSConeData &source); | |
478 | istream &operator>>(istream &os,AliITSConeData &source); | |
479 | #endif | |
480 | ||
481 | #ifndef ALIITSCONESEGDATA_H | |
482 | #define ALIITSCONESEGDATA_H | |
bc825688 | 483 | ///////////////////////////////////////////////////////////////////////// |
484 | // Geant 3 Cone Segment data structure. | |
485 | ///////////////////////////////////////////////////////////////////////// | |
bc825688 | 486 | |
487 | class AliITSConeSegData : public AliITSBaseVolParams { | |
488 | public: | |
489 | AliITSConeSegData() : AliITSBaseVolParams() // Default constructor | |
490 | {fPhi0=0.0;fPhi1=360.0;fDz=0;fRmin0=0;fRmax0=0;fRmin1=0;fRmax1=0;} | |
491 | virtual ~AliITSConeSegData(){} // Standard destructor | |
492 | // Getters | |
493 | Double_t Phi0() {return fPhi0;} // Returns starting Phi value | |
494 | Double_t Phi1() {return fPhi1;} // Returns endinging Phi value | |
495 | Double_t DzAt() {return fDz;} // Return fDz coordiante | |
496 | Double_t Rmin0() {return fRmin0;} // Returm arrau of rmin0 values | |
497 | Double_t Rmax0() {return fRmax0;} // Returm arrau of rmax0 values | |
498 | Double_t Rmin1() {return fRmin1;} // Returm arrau of rmin1 values | |
499 | Double_t Rmax1() {return fRmax1;} // Returm arrau of rmax1 values | |
500 | Double_t& P0(){return fPhi0;}// Returns addres of fPhi0 | |
501 | Double_t& P1(){return fPhi1;}// Returns addres of fPhi1 | |
502 | Double_t& Z(){return fDz;}// Returns address of fDz | |
503 | Double_t& Rn0(){return fRmin0;}// Returns address of fRmin0 | |
504 | Double_t& Rx0(){return fRmax0;}// Returns address of fRmax0 | |
505 | Double_t& Rn1(){return fRmin1;}// Returns address of fRmin1 | |
506 | Double_t& Rx1(){return fRmax1;}// Returns address of fRmax1 | |
507 | void Print(ostream *os); // Prints output content of this class | |
508 | void Read(istream *is); // Reads output created by Print above. | |
509 | private: | |
510 | Double_t fPhi0,fPhi1; // Starting and ending phi angles [degrees] | |
511 | Double_t fRmin0,fRmin1; // Inner Radius | |
512 | Double_t fRmax0,fRmax1; // Outer Radius | |
513 | Double_t fDz; // Z half length. | |
514 | ||
515 | ClassDef(AliITSConeSegData,1) // Cone segment data class | |
516 | }; | |
517 | // Input and output function for standard C++ input/output. | |
518 | ostream &operator<<(ostream &os,AliITSConeSegData &source); | |
519 | istream &operator>>(istream &os,AliITSConeSegData &source); | |
520 | #endif | |
521 | ||
162acd47 | 522 | #ifndef ALIITSPCONEDATA_H |
523 | #define ALIITSPCONEDATA_H | |
162acd47 | 524 | ///////////////////////////////////////////////////////////////////////// |
525 | // Geant 3 Poly-Cone data structure. | |
526 | ///////////////////////////////////////////////////////////////////////// | |
527 | #include <math.h> // for the definision of NAN. | |
162acd47 | 528 | |
529 | class AliITSPConeData : public AliITSBaseVolParams { | |
530 | public: | |
531 | AliITSPConeData() : AliITSBaseVolParams() // Default constructor | |
532 | {fNz=0;fPhi0=0.0;fDphi=0.0;fZ=0;fRmin=0;fRmax=0;} | |
533 | AliITSPConeData(Int_t n) : AliITSBaseVolParams() // Standard constructor | |
534 | {fNz=n;fPhi0=0.0;fDphi=360.0;fZ=new Double_t[n]; | |
535 | fRmin=new Double_t[n];fRmax=new Double_t[n];} | |
536 | AliITSPConeData(AliITSPConeData &source) // Copy constructor | |
537 | { *this = source;} | |
538 | virtual ~AliITSPConeData() // Standard destructor | |
539 | {delete[] fZ;delete[] fRmin;delete[] fRmax;fNz=0;} | |
540 | AliITSPConeData& operator=(AliITSPConeData &source) // Equals operator | |
541 | {this->SetVid(source.GetVid()); | |
542 | this->SetName((source.GetName())->Data()); | |
543 | this->fNz = source.fNz;this->fPhi0=source.fPhi0; | |
544 | this->fDphi=source.fDphi; | |
545 | if(this->fZ!=0) delete[] this->fZ; | |
546 | if(this->fRmin!=0) delete[] this->fRmin; | |
547 | if(this->fRmax!=0) delete[] this->fRmax; | |
548 | this->fZ=0;this->fRmin=0;this->fRmax=0;if(this->fNz<=0) return *this; | |
549 | this->fZ=new Double_t[this->fNz];this->fRmin=new Double_t[this->fNz]; | |
550 | this->fRmax=new Double_t[this->fNz];for(Int_t i=0;i<this->fNz;i++){ | |
551 | this->fZ[i]=source.fZ[i];this->fRmin[i]=source.fRmin[i]; | |
552 | fRmax[i]=source.fRmax[i];}return *this;} | |
553 | void Size(Int_t n)// Sets the number of Z,Rmin,Rmax parameters | |
554 | {if(fZ!=0) delete fZ;if(fRmin!=0) delete fRmin; | |
555 | if(fRmax!=0) delete fRmax; fNz=n;fPhi0=0.0;fDphi=360.0; | |
556 | fZ=new Double_t[n];fRmin=new Double_t[n];fRmax=new Double_t[n];} | |
557 | void Size(Int_t n,const char *c){//Sets the number of Z,Rmin, and Rmax | |
558 | // parameters as well as the volume name. | |
559 | Size(n);SetName(c);} | |
560 | // Getters | |
561 | Int_t Nz() {return fNz;} // Returns fNz | |
562 | Double_t Phi0(){return fPhi0;}// Return starting phi value | |
563 | Double_t DPhi(){return fDphi;}// Return delta phi value | |
564 | Double_t ZAt(Int_t i) // Return Z coordiante | |
25a1de04 | 565 | {/*if(i<0||i>=fNz) return NAN;else*/ return fZ[i];} |
162acd47 | 566 | Double_t *Z(){return fZ;} // Returns array of z values |
567 | Double_t *Rmin() {return fRmin;} // Returm arrau of rmin values | |
568 | Double_t *Rmax() {return fRmax;} // Returm arrau of rmax values | |
569 | Double_t Rmin(Int_t i) // Return Inner radius value | |
25a1de04 | 570 | {/*if(i<0||i>=fNz) return NAN;else*/ return fRmin[i];} |
162acd47 | 571 | Double_t Rmax(Int_t i) // Return Outer radius value |
25a1de04 | 572 | {/*if(i<0||i>=fNz) return NAN;else*/ return fRmax[i];} |
162acd47 | 573 | // Setters |
574 | Double_t& P0() // Returns the address of fPhi0 | |
575 | {return fPhi0;} | |
576 | Double_t& dP() // Returns the address of fDphi | |
577 | {return fDphi;} | |
578 | Double_t& Z(Int_t i)// Returns address of fZ | |
579 | {/*if(i<0||i>=fNz) return 0;*/return fZ[i];} | |
580 | Double_t& Rn(Int_t i)// Returns address of fRmin | |
581 | {/*if(i<0||i>=fNz) return 0;*/return fRmin[i];} | |
582 | Double_t& Rx(Int_t i)// Returns address of fRmax | |
583 | {/*if(i<0||i>=fNz) return 0;*/return fRmax[i];} | |
584 | void Print(ostream *os); // Prints output content of this class | |
585 | void Read(istream *is); // Reads output created by Print above. | |
586 | private: | |
587 | Int_t fNz; // Number of z sections | |
588 | Double_t fPhi0,fDphi; // Starting phi angle and delta phi [degrees] | |
589 | Double_t *fZ; //[n] Z coordiantes | |
590 | Double_t *fRmin; //[n] Inner radius | |
591 | Double_t *fRmax; //[n] Outer radius | |
592 | ||
593 | ClassDef(AliITSPConeData,1) // Poly Cone data class | |
594 | }; | |
595 | // Input and output function for standard C++ input/output. | |
596 | ostream &operator<<(ostream &os,AliITSPConeData &source); | |
597 | istream &operator>>(istream &os,AliITSPConeData &source); | |
bc825688 | 598 | #endif |
599 | ||
600 | #ifndef ALIITSSPHEREDATA_H | |
601 | #define ALIITSSPHEREDATA_H | |
bc825688 | 602 | ///////////////////////////////////////////////////////////////////////// |
603 | // Geant 3 Tube Segment data structure. | |
604 | ///////////////////////////////////////////////////////////////////////// | |
bc825688 | 605 | |
606 | class AliITSSphereData : public AliITSBaseVolParams { | |
607 | public: | |
608 | AliITSSphereData() : AliITSBaseVolParams() // Default constructor | |
609 | {fTheta[0]=0.0,fTheta[1]=0.0;fPhi[0]=0.0,fPhi[1]=0.0;fRmin=0;fRmax=0;} | |
610 | virtual ~AliITSSphereData(){} // Standard destructor | |
611 | // Getters | |
612 | Double_t Theta0() {return fTheta[0];} // Returns starting Phi value | |
613 | Double_t Theta1() {return fTheta[1];} // Returns endinging Phi value | |
614 | Double_t Phi0() {return fPhi[0];} // Returns starting Phi value | |
615 | Double_t Phi1() {return fPhi[1];} // Returns endinging Phi value | |
616 | Double_t Rmin() {return fRmin;} // Returm arrau of rmin values | |
617 | Double_t Rmax() {return fRmax;} // Returm arrau of rmax values | |
618 | Double_t& T0(){return fTheta[0];}// Returns addres of fTheta[0] | |
619 | Double_t& T1(){return fTheta[1];}// Returns addres of fTheta[1] | |
620 | Double_t& P0(){return fPhi[0];}// Returns addres of fPhi[0] | |
621 | Double_t& P1(){return fPhi[1];}// Returns addres of fPhi[1] | |
622 | Double_t& Rn(){return fRmin;}// Returns address of fRmin | |
623 | Double_t& Rx(){return fRmax;}// Returns address of fRmax | |
624 | void Print(ostream *os); // Prints output content of this class | |
625 | void Read(istream *is); // Reads output created by Print above. | |
626 | private: | |
627 | Double_t fTheta[2]; // Starting and ending theta angles [degree] | |
628 | Double_t fPhi[2]; // Starting and ending phi angles [degrees] | |
629 | Double_t fRmin; // Inner Radius | |
630 | Double_t fRmax; // Outer Radius | |
162acd47 | 631 | |
bc825688 | 632 | ClassDef(AliITSSphereData,1) // sphere data class |
633 | }; | |
634 | // Input and output function for standard C++ input/output. | |
635 | ostream &operator<<(ostream &os,AliITSSphereData &source); | |
636 | istream &operator>>(istream &os,AliITSSphereData &source); | |
162acd47 | 637 | #endif |
bc825688 | 638 | |
639 | #ifndef ALIITSPARALLELEPIPEDDATA_H | |
640 | #define ALIITSPARALLELEPIPEDDATA_H | |
bc825688 | 641 | ///////////////////////////////////////////////////////////////////////// |
642 | // Geant 3 Box data structure. | |
643 | ///////////////////////////////////////////////////////////////////////// | |
bc825688 | 644 | |
645 | class AliITSParallelpipedData : public AliITSBaseVolParams { | |
646 | public: | |
647 | AliITSParallelpipedData() : AliITSBaseVolParams() // Default constructor | |
648 | {fDx=0.0;fDy=0.0;fDz=0;} | |
649 | virtual ~AliITSParallelpipedData(){} // Standard destructor | |
650 | // Getters | |
651 | Double_t DxAt() {return fDx;} // Returm arrau of rmin values | |
652 | Double_t DyAt() {return fDy;} // Returm arrau of rmax values | |
653 | Double_t DzAt() {return fDz;} // Return fDz coordiante | |
654 | Double_t Theta() {return fTheta;} // Returm arrau of Theta values | |
655 | Double_t Phi() {return fPhi;} // Return Phi coordiante | |
656 | Double_t Alpha(){return fAlpha;} // Return fAlph | |
657 | Double_t& Dx(){return fDx;}// Returns address of fRmax | |
658 | Double_t& Dy(){return fDy;}// Returns address of fRmin | |
659 | Double_t& Dz(){return fDz;}// Returns address of fDz | |
660 | Double_t& Th(){return fTheta;}// Returns address of fTheta | |
661 | Double_t& Ph(){return fPhi;}// Returns address of fPhi | |
662 | Double_t& A(){return fAlpha;}// Returns address of fAlpha | |
663 | void Print(ostream *os); // Prints output content of this class | |
664 | void Read(istream *is); // Reads output created by Print above. | |
665 | private: | |
666 | Double_t fDx; // X half length | |
667 | Double_t fDy; // Y half length | |
668 | Double_t fDz; // Z half length. | |
669 | Double_t fAlpha; // angle formed by the y axis and by the plane | |
670 | // joining the center of teh faces parallel to the | |
671 | // z-x plane at -dY and +dy [degree]. | |
672 | Double_t fTheta; //polar angle of the line joining the centers of | |
673 | // the faces at -dz and +dz in z [degree]. | |
674 | Double_t fPhi; // azimuthal angle of teh line joing the centers | |
675 | // of the faaces at -dz and +dz in z [degree]. | |
676 | ||
677 | ClassDef(AliITSParallelpipedData,1) // Parallel piped data class | |
678 | }; | |
679 | // Input and output function for standard C++ input/output. | |
680 | ostream &operator<<(ostream &os,AliITSParallelpipedData &source); | |
681 | istream &operator>>(istream &os,AliITSParallelpipedData &source); | |
682 | #endif | |
162acd47 | 683 | |
684 | #ifndef ALIITSPGONDATA_H | |
685 | #define ALIITSPGONDATA_H | |
162acd47 | 686 | ///////////////////////////////////////////////////////////////////////// |
687 | // Geant 3 Poly-Gon data structure. | |
688 | ///////////////////////////////////////////////////////////////////////// | |
689 | #include <math.h> // for the definision of NAN. | |
162acd47 | 690 | |
691 | class AliITSPGonData : public AliITSBaseVolParams { | |
692 | public: | |
693 | AliITSPGonData() : AliITSBaseVolParams() // Default constructor | |
694 | {fNz=0;fNphi=0;fPhi0=0.0;fDphi=0.0;fZ=0;fRmin=0;fRmax=0;} | |
695 | AliITSPGonData(Int_t n) : AliITSBaseVolParams() // Standard constructor | |
696 | {fNz=n;fNphi=0;fPhi0=0.0;fDphi=360.0;fZ=new Double_t[n]; | |
697 | fRmin=new Double_t[n];fRmax=new Double_t[n];} | |
698 | AliITSPGonData(AliITSPGonData &source) // Copy constructor | |
699 | { *this = source;} | |
700 | virtual ~AliITSPGonData() // Standard destructor | |
701 | {delete[] fZ;delete[] fRmin;delete[] fRmax;fNz=0;} | |
702 | AliITSPGonData& operator=(AliITSPGonData &source) // Equals operator | |
703 | {this->SetVid(source.GetVid()); | |
704 | this->SetName((source.GetName())->Data()); | |
705 | this->fNz = source.fNz;this->fNphi=source.fNphi; | |
706 | this->fPhi0=source.fPhi0;this->fDphi=source.fDphi; | |
707 | if(this->fZ!=0) delete[] this->fZ; | |
708 | if(this->fRmin!=0) delete[] this->fRmin; | |
709 | if(this->fRmax!=0) delete[] this->fRmax; | |
710 | this->fZ=0;this->fRmin=0;this->fRmax=0;if(this->fNz<=0) return *this; | |
711 | this->fZ=new Double_t[this->fNz];this->fRmin=new Double_t[this->fNz]; | |
712 | this->fRmax=new Double_t[this->fNz];for(Int_t i=0;i<this->fNz;i++){ | |
713 | this->fZ[i]=source.fZ[i];this->fRmin[i]=source.fRmin[i]; | |
714 | fRmax[i]=source.fRmax[i];}return *this;} | |
715 | void Size(Int_t n)// Sets the number of Z,Rmin,Rmax parameters | |
716 | {if(fZ!=0) delete fZ;if(fRmin!=0) delete fRmin; | |
717 | if(fRmax!=0) delete fRmax; fNz=n;fPhi0=0.0;fDphi=360.0; | |
718 | fZ=new Double_t[n];fRmin=new Double_t[n];fRmax=new Double_t[n];} | |
719 | void Size(Int_t n,const char *c){//Sets the number of Z,Rmin, and Rmax | |
720 | // parameters as well as the volume name. | |
721 | Size(n);SetName(c);} | |
722 | // Getters | |
723 | Int_t NPhi() {return fNz;} // Returns fNphi | |
724 | Int_t Nz() {return fNz;} // Returns fNz | |
725 | Double_t Phi0(){return fPhi0;}// Return starting phi value | |
726 | Double_t DPhi(){return fDphi;}// Return delta phi value | |
727 | Double_t *Z(){return fZ;} // Returns array of z values | |
728 | Double_t *Rmin() {return fRmin;} // Returm arrau of rmin values | |
729 | Double_t *Rmax() {return fRmax;} // Returm arrau of rmax values | |
730 | Double_t ZAt(Int_t i) // Return Z coordiante | |
25a1de04 | 731 | {/*if(i<0||i>=fNz) return NAN;else*/ return fZ[i];} |
162acd47 | 732 | Double_t Rmin(Int_t i) // Return Inner radius value |
25a1de04 | 733 | {/*if(i<0||i>=fNz) return NAN;else*/ return fRmin[i];} |
162acd47 | 734 | Double_t Rmax(Int_t i) // Return Outer radius value |
25a1de04 | 735 | {/*if(i<0||i>=fNz) return NAN;else*/ return fRmax[i];} |
162acd47 | 736 | // Setters |
737 | void Nphi(Int_t i) {fNphi = i;} // Sets fNphi | |
738 | Double_t& P0() // Returns the address of fPhi0 | |
739 | {return fPhi0;} | |
740 | Double_t& dP() // Returns the address of fDphi | |
741 | {return fDphi;} | |
742 | Double_t& Z(Int_t i)// Returns address of fZ | |
743 | {/*if(i<0||i>=fNz) return 0;*/return fZ[i];} | |
744 | Double_t& Rn(Int_t i)// Returns address of fRmin | |
745 | {/*if(i<0||i>=fNz) return 0;*/return fRmin[i];} | |
746 | Double_t& Rx(Int_t i)// Returns address of fRmax | |
747 | {/*if(i<0||i>=fNz) return 0;*/return fRmax[i];} | |
748 | void Print(ostream *os); // Prints output content of this class | |
749 | void Read(istream *is); // Reads output created by Print above. | |
750 | private: | |
751 | Int_t fNphi; // Number of sections in phi. | |
752 | Int_t fNz; // Number of Z sections | |
753 | Double_t fPhi0,fDphi; // Starting phi angle and delta phi [degrees] | |
754 | Double_t *fZ; //[n] Z coordiantes | |
755 | Double_t *fRmin; //[n] Inner radius | |
756 | Double_t *fRmax; //[n] Outer radius | |
757 | ||
758 | ClassDef(AliITSPGonData,1) // Poly Gon Data Class | |
759 | }; | |
760 | // Input and output function for standard C++ input/output. | |
761 | ostream &operator<<(ostream &os,AliITSPGonData &source); | |
762 | istream &operator>>(istream &os,AliITSPGonData &source); | |
162acd47 | 763 | #endif |
97874584 | 764 | |
aa9bc63b | 765 | #ifndef ALIITSBASEGEOMETRY_H |
766 | #define ALIITSBASEGEOMETRY_H | |
aa9bc63b | 767 | ///////////////////////////////////////////////////////////////////////// |
768 | // A basic geometry class for the ITS simulation geometry stucture | |
769 | ///////////////////////////////////////////////////////////////////////// | |
aa9bc63b | 770 | #include <TObject.h> |
97874584 | 771 | |
010fd694 | 772 | #include "AliModule.h" |
aa9bc63b | 773 | class TString; |
162acd47 | 774 | class TVector3; |
aa9bc63b | 775 | |
776 | class AliITSBaseGeometry : public TObject { | |
777 | public: | |
778 | AliITSBaseGeometry(); // Default constructor | |
779 | AliITSBaseGeometry(AliModule *its,Int_t iflag); // Standard Constructor | |
780 | virtual ~AliITSBaseGeometry(); // Destructor | |
781 | virtual void BuildDisplayGeometry(){}; // Calls ROOT geometry interface | |
782 | // to AliRoot display | |
162acd47 | 783 | // Calls Geant3 interface geometry routines |
784 | virtual void CreateG3Geometry(){}; | |
785 | virtual void CreateG3Materials(){};//Calls Geant3 interface for materials | |
aa9bc63b | 786 | virtual Int_t IsVersion() const{return 11;}// return version of geometry. |
162acd47 | 787 | // Get Index for Geant3 v name |
bc825688 | 788 | static Int_t ITSG3VnameToIndex(const char name[3]); |
789 | static Int_t ITSIndexToITSG3name(const Int_t i); // Get Geant3 volume name | |
aa9bc63b | 790 | Int_t AddVolName(const TString name); // Add volumen name to list |
791 | TString GetVolName(const Int_t i)const; // Return volume name at index | |
792 | Int_t GetVolumeIndex(const TString &a); | |
793 | void SetScalecm(){fScale = 1.0;}// Sets scale factor for centemeters | |
794 | void SetScalemm(){fScale = 0.10;}// Sets scale factor for milimeters | |
795 | void SetScalemicrons(){fScale = 1.0E-04;}// Sets scale factor for microns | |
796 | void SetScale(Double_t s=1.0){fScale = s;}// Sets scale factor | |
797 | Double_t GetScale()const{return fScale;}// Returns the scale factor | |
798 | Bool_t IsScalecm()const{// Returens kTRUE if scale factor is set of [cm] | |
799 | if(fScale==1.0) return kTRUE; return kFALSE;} | |
800 | // Create a Box | |
162acd47 | 801 | virtual void Box(const char *gnam,const TString &dis, |
aa9bc63b | 802 | Double_t dx,Double_t dy,Double_t dz,Int_t med); |
bc825688 | 803 | virtual void Box(AliITSBoxData &d,Int_t med); |
aa9bc63b | 804 | // Greate A Trapizoid with the x dimension varing along z. |
162acd47 | 805 | virtual void Trapezoid1(const char *gnam,const TString &dis,Double_t dxn, |
aa9bc63b | 806 | Double_t dxp,Double_t dy,Double_t dz,Int_t med); |
bc825688 | 807 | virtual void Trapezoid1(AliITSTrapezoid1Data &d,Int_t med); |
aa9bc63b | 808 | // Greate A Trapizoid with the x and y dimension varing along z. |
162acd47 | 809 | virtual void Trapezoid2(const char *gnam,const TString &dis,Double_t dxn, |
aa9bc63b | 810 | Double_t dxp,Double_t dyn,Double_t dyp,Double_t dz, |
811 | Int_t med); | |
bc825688 | 812 | virtual void Trapezoid2(AliITSTrapezoid2Data &d,Int_t med); |
aa9bc63b | 813 | // General trapazoid. |
162acd47 | 814 | virtual void Trapezoid(const char *gnam,const TString &dis,Double_t dz, |
aa9bc63b | 815 | Double_t thet,Double_t phi,Double_t h1,Double_t bl1, |
816 | Double_t tl1,Double_t alp1,Double_t h2,Double_t bl2, | |
817 | Double_t tl2,Double_t alp2,Int_t med); | |
bc825688 | 818 | virtual void Trapezoid(AliITSTrapezoidData &d,Int_t med); |
819 | // Twisted genral trapezoid. | |
820 | virtual void TwistedTrapezoid(const char *gnam,const TString &dis, | |
821 | Double_t dz, | |
822 | Double_t thet,Double_t phi,Double_t twist, | |
823 | Double_t h1,Double_t bl1,Double_t tl1, | |
824 | Double_t apl1,Double_t h2,Double_t bl2, | |
825 | Double_t tl2,Double_t apl2,Int_t med); | |
826 | virtual void TwistedTrapezoid(AliITSTrapezoidTwistedData &d,Int_t med); | |
aa9bc63b | 827 | // Simple Tube. |
162acd47 | 828 | virtual void Tube(const char *gnam,const TString &dis,Double_t rmin, |
aa9bc63b | 829 | Double_t rmax,Double_t dz,Int_t med); |
162acd47 | 830 | virtual void Tube(AliITSTubeData &d,Int_t med); |
aa9bc63b | 831 | // Tube segment. |
bc825688 | 832 | virtual void TubeSegment(const char *gnam,const TString &dis, |
833 | Double_t rmin,Double_t rmax,Double_t dz, | |
834 | Double_t phi1,Double_t phi2,Int_t med); | |
835 | virtual void TubeSegment(AliITSTubeSegData &v,Int_t med); | |
836 | // Cut tube. | |
837 | virtual void CutTube(const char *gnam,const TString &dis,Double_t rmin, | |
838 | Double_t rmax,Double_t dz,Double_t phi1,Double_t phi2, | |
839 | Double_t lx,Double_t ly,Double_t lz,Double_t hx,Double_t hy, | |
840 | Double_t hz,Int_t med); | |
841 | virtual void CutTube(AliITSTubeCutData &d,Int_t med); | |
842 | // Ellliptical cross-sectino tube | |
843 | virtual void TubeElliptical(const char *gnam,const TString &dis, | |
844 | Double_t p1,Double_t p2,Double_t dz, | |
845 | Int_t med); | |
846 | virtual void TubeElliptical(AliITSTubeEllipticalData &v,Int_t med); | |
847 | // Hyperbolic tube | |
848 | virtual void HyperbolicTube(const char *gnam,const TString &dis, | |
849 | Double_t rmin,Double_t rmax,Double_t dz, | |
850 | Double_t thet,Int_t med); | |
851 | virtual void HyperbolicTube(AliITSTubeHyperbolicData &d,Int_t med); | |
aa9bc63b | 852 | // Simple Cone. |
162acd47 | 853 | virtual void Cone(const char *gnam,const TString &dis,Double_t dz, |
854 | Double_t rmin1,Double_t rmax1,Double_t rmin2,Double_t rmax2, | |
855 | Int_t med); | |
bc825688 | 856 | virtual void Cone(AliITSConeData &d,Int_t med); |
aa9bc63b | 857 | // Segment of a Cone. |
162acd47 | 858 | virtual void ConeSegment(const char *gnam,const TString &dis,Double_t dz, |
aa9bc63b | 859 | Double_t rmin1,Double_t rmax1,Double_t rmin2, |
860 | Double_t rmax2,Double_t phi1,Double_t phi2,Int_t med); | |
bc825688 | 861 | virtual void ConeSegment(AliITSConeSegData &d,Int_t med); |
862 | //Poly-Cone | |
863 | virtual void PolyCone(const char *gnam,const TString &dis,Double_t phi1, | |
864 | Double_t dphi,Int_t nz,Double_t *z,Double_t *rmin, | |
865 | Double_t *rmax,Int_t med); | |
866 | virtual void PolyCone(AliITSPConeData &d,Int_t med); | |
aa9bc63b | 867 | // Spherical shell segment. |
162acd47 | 868 | virtual void Sphere(const char *gnam,const TString &dis,Double_t rmin, |
aa9bc63b | 869 | Double_t rmax,Double_t the1,Double_t the2,Double_t phi1, |
870 | Double_t phi2,Int_t med); | |
bc825688 | 871 | virtual void Sphere(AliITSSphereData &d,Int_t med); |
aa9bc63b | 872 | // Parallelepiped. |
162acd47 | 873 | virtual void Parallelepiped(const char *gnam,const TString &dis, |
874 | Double_t dx,Double_t dy,Double_t dz, | |
875 | Double_t alph,Double_t thet, | |
876 | Double_t phi,Int_t med); | |
bc825688 | 877 | virtual void Parallelepiped(AliITSParallelpipedData &d,Int_t med); |
aa9bc63b | 878 | // Polygon. |
162acd47 | 879 | virtual void PolyGon(const char *gnam,const TString &dis,Double_t phi1, |
aa9bc63b | 880 | Double_t dphi,Int_t npdv,Int_t nz,Double_t *z,Double_t *rmin, |
881 | Double_t *rmax,Int_t med); | |
162acd47 | 882 | virtual void PolyGon(AliITSPGonData &d,Int_t med); |
aa9bc63b | 883 | // Position one volume inside another |
162acd47 | 884 | virtual void Pos(const char *vol,Int_t cn,const char *moth,Double_t x, |
aa9bc63b | 885 | Double_t y,Double_t z,Int_t irot); |
162acd47 | 886 | // Position one volume inside another |
887 | virtual void Pos(AliITSBaseVolParams &v,Int_t cn, | |
888 | AliITSBaseVolParams &m,TVector3 &t,Int_t irot); | |
bc825688 | 889 | // Position one volume inside another |
890 | virtual void Pos(AliITSBaseVolParams &v,AliITSBaseVolParams &m, | |
891 | TVector3 &t,Int_t irot){Pos(v,m.GetG3cpn(),m,t,irot);}; | |
162acd47 | 892 | Int_t GetMed(Int_t med){return (fits->GetIdtmed())->At(med);} |
893 | // Define rotation matrix | |
aa9bc63b | 894 | void Matrix(Int_t irot,Double_t thet1,Double_t phi1,Double_t thet2, |
895 | Double_t phi2,Double_t thet3,Double_t phi3); | |
896 | // Defube ritatuib matrix | |
897 | void Matrix(Int_t irot,Double_t rot[3][3]); | |
898 | // Rotation matrix about axis i (i=0=>x, i=1=>y, i=2=>z). | |
899 | void Matrix(Int_t irot,Int_t axis,Double_t thet); | |
900 | // Rotation matrix about x axis | |
901 | void XMatrix(Int_t irot,Double_t thet){Matrix(irot,0,thet);} | |
902 | // Rotation matrix about y axis | |
903 | void YMatrix(Int_t irot,Double_t thet){Matrix(irot,1,thet);} | |
904 | // Rotation matrix about z axis | |
905 | void ZMatrix(Int_t irot,Double_t thet){Matrix(irot,2,thet);} | |
906 | // Define Element material and medium | |
162acd47 | 907 | void Element(Int_t imat,const char *name,Int_t z,Double_t den,Int_t istd); |
aa9bc63b | 908 | // Define Material by constituant weights |
909 | void MixtureByWeight(Int_t imat,const char *name,Int_t *z,Double_t *w, | |
910 | Double_t dens,Int_t nelments,Int_t istd); | |
911 | // Define Material by constituant relative number | |
912 | void MixtureByNumber(Int_t imat,const char *name,Int_t *z,Int_t *i, | |
913 | Double_t dens,Int_t nelments,Int_t istd); | |
914 | // Returns standard radiation lenghts of elements. | |
915 | Float_t GetRadLength(Int_t z){return RadLength(z,(Double_t)GetA(z));} | |
916 | // Returns natrual abundance atomic mass numbers for a given element | |
917 | Float_t GetA(Int_t z); | |
918 | // Returns ITS standard Theata Max transport cut values | |
919 | Float_t GetStandardThetaMax(Int_t istd); | |
920 | // Returns ITS standard Max step size transport cut values | |
921 | Float_t GetStandardMaxStepSize(Int_t istd); | |
922 | // Returns ITS standard frational energy transport cut values | |
923 | Float_t GetStandardEfraction(Int_t istd); | |
924 | // Returns ITS standard epsilon transport cut values | |
925 | Float_t GetStandardEpsilon(Int_t istd); | |
926 | // Degree Versions of TMath functions (as needed) | |
927 | Double_t Sind(Double_t t){return TMath::Sin(TMath::Pi()*t/180.);} | |
928 | Double_t Cosd(Double_t t){return TMath::Cos(TMath::Pi()*t/180.);} | |
929 | Double_t Tand(Double_t t){return TMath::Tan(TMath::Pi()*t/180.);} | |
930 | Double_t ASind(Double_t t){return 180.0*TMath::ASin(t)/TMath::Pi();} | |
931 | Double_t ACosd(Double_t t){return 180.0*TMath::ACos(t)/TMath::Pi();} | |
932 | Double_t ATand(Double_t t){return 180.0*TMath::ATan(t)/TMath::Pi();} | |
933 | Double_t ATand2(Double_t y,Double_t x){return 180.0*TMath::ATan2(y,x)/ | |
934 | TMath::Pi();} | |
bc825688 | 935 | // gives angles in degree between 0.<=t<360. |
936 | Double_t Mod360(Double_t t){if(t>=360.) return Mod360(t-360.); | |
937 | if(t<0.0) return Mod360(t+360.);return t;} | |
aa9bc63b | 938 | Double_t RadLength(Int_t iz,Double_t a); // Computes radiation length |
939 | // for an element | |
940 | private: | |
162acd47 | 941 | void G3name(const char *gname,char *name)//Add's I to name and ending null |
942 | {for(Int_t i=0;i<3;i++) name[i+1] = gname[i]; | |
943 | name[0]='I';name[4]='\0';} | |
944 | // | |
945 | protected: | |
aa9bc63b | 946 | static Int_t fNCreates; //! Counts the number of time this class has |
947 | // been created. | |
0b126f29 | 948 | static const Double_t fAlpha; //! find structure constant |
949 | static const Double_t fRe; //![cm]classical elect. radius | |
950 | static const Double_t fNa; //! [#/mole] Avogadro's number | |
aa9bc63b | 951 | static Int_t *fidrot; |
952 | static Int_t fidrotsize; | |
953 | static Int_t fidrotlast; | |
954 | static TString *fVolName; // Array of ITS Volumen names. | |
955 | static Int_t fVolNameSize; // Size of Array fVolName | |
956 | static Int_t fVolNameLast; // Last filled element of fVolName | |
957 | Double_t fScale; // Scale factor (=1=>[cm]). | |
aa9bc63b | 958 | AliModule *fits; // local pointer to ITS module needed for AliMixture... |
959 | ||
960 | ClassDef(AliITSBaseGeometry,1) // Basic ITS Geometry class | |
961 | }; | |
962 | ||
963 | #endif | |
162acd47 | 964 |