]>
Commit | Line | Data |
---|---|---|
660eb9a2 | 1 | #ifndef ALIALIFE_H |
2 | #define ALIALIFE_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
844b1dde | 8 | #include "TObject.h" |
660eb9a2 | 9 | #include "TString.h" |
10 | ||
11 | class AliALIFE : public TObject { | |
12 | public: | |
13 | AliALIFE(const char *name1, const char *name2); | |
14 | AliALIFE(); | |
9b62c596 | 15 | AliALIFE(const AliALIFE &rhs) : TObject(rhs) { |
16 | rhs.Copy(*this); | |
eeacf08b | 17 | } |
844b1dde | 18 | virtual ~AliALIFE() {} |
660eb9a2 | 19 | void Cylinder(Float_t rmin, Float_t rmax, |
20 | Float_t zmin, Float_t zmax, | |
21 | Float_t pos[3], | |
01a62e80 | 22 | const char* Material, |
23 | const char* Field="MF", | |
24 | const char* Cuts="$UNSHIELDED"); | |
660eb9a2 | 25 | void OnionCylinder(Float_t* r, Int_t nr, Float_t zmin, Float_t zmax, |
26 | Float_t pos[3], | |
01a62e80 | 27 | const char** Materials, |
28 | const char** Fields=0, | |
29 | const char** Cuts=0); | |
660eb9a2 | 30 | |
31 | void Cone(Float_t rmin1, Float_t rmin2, | |
32 | Float_t rmax1, Float_t rmax2, | |
33 | Float_t zmin, Float_t zmax, | |
34 | Float_t pos[3], | |
01a62e80 | 35 | const char* Material, |
36 | const char* Field="MF", | |
37 | const char* Cuts="$UNSHIELDED"); | |
660eb9a2 | 38 | |
39 | void OnionCone(Float_t* r1, Float_t* r2, Int_t nr, | |
40 | Float_t zmin, Float_t zmax, | |
41 | Float_t pos[3], | |
01a62e80 | 42 | const char** Materials, |
43 | const char** Fields=0, | |
44 | const char** Cuts=0); | |
660eb9a2 | 45 | |
46 | void PolyCone(Float_t* rmin, Float_t* rmax, Float_t* z, Int_t nz, | |
47 | Float_t pos[3], | |
01a62e80 | 48 | const char* Material, |
49 | const char* Field="MF", | |
50 | const char* Cuts="$UNSHIELDED"); | |
660eb9a2 | 51 | |
52 | void OnionPolyCone(Float_t** r , Float_t* z, Int_t nr, Int_t nz, | |
53 | Float_t pos[3], | |
01a62e80 | 54 | const char** Materials, |
55 | const char** Fields=0, | |
56 | const char** Cuts=0); | |
660eb9a2 | 57 | |
01a62e80 | 58 | void Comment(const char* Comment); |
660eb9a2 | 59 | |
e59713af | 60 | void Finish(Bool_t remove = 0); |
660eb9a2 | 61 | |
62 | void SetDefaultVolume(TString vol1, TString vol2) | |
63 | {fDefaultVolume1=vol1; fDefaultVolume2=vol2;} | |
64 | ||
65 | void SetDefaultVolume(TString vol) | |
66 | {fDefaultVolume1=vol;} | |
67 | ||
68 | protected: | |
69 | Int_t fNBodies; // current number of bodies | |
70 | Int_t fNVolumes; // current number of volumes | |
71 | TString fBodyFile; // File for Fluka bodies | |
72 | TString fVolumeFile; // File for Fluka volumes | |
73 | FILE *fFile1; // ! output file for fluka geometry in ALIFE format | |
74 | FILE *fFile2; // ! scratch file | |
75 | TString fDefaultVolume1; // default external volume 1 | |
76 | TString fDefaultVolume2; // default external volume 2 | |
77 | private: | |
78 | void BodyHeader(); | |
79 | void VolumeHeader(); | |
cbd70aad | 80 | void Copy(TObject &alife) const; |
660eb9a2 | 81 | |
9b62c596 | 82 | AliALIFE & operator = (const AliALIFE &rhs) { |
83 | rhs.Copy(*this); | |
84 | return (*this); | |
85 | } | |
660eb9a2 | 86 | ClassDef(AliALIFE,1) |
87 | }; | |
88 | #endif | |
89 | ||
90 | ||
91 | ||
92 | ||
93 | ||
94 | ||
95 | ||
96 | ||
97 | ||
98 | ||
99 | ||
100 | ||
101 | ||
102 | ||
103 |