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