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