]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STRUCT/AliALIFE.h
New recess dimensions and use of assemblies to avoid overlaps with MUON.
[u/mrichter/AliRoot.git] / STRUCT / AliALIFE.h
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
8 #include "TObject.h"
9 #include "TString.h"
10
11 class AliALIFE : public  TObject {
12  public:
13     AliALIFE(const char *name1, const char *name2);
14     AliALIFE();    
15     AliALIFE(const AliALIFE &rhs) : TObject(rhs) {
16         rhs.Copy(*this);
17     }
18     virtual ~AliALIFE() {}
19     void Cylinder(Float_t rmin, Float_t rmax,
20                   Float_t zmin, Float_t zmax,
21                   Float_t pos[3],
22                   const char* Material, 
23                   const char* Field="MF", 
24                   const char* Cuts="$UNSHIELDED");
25     void OnionCylinder(Float_t* r, Int_t nr, Float_t zmin, Float_t zmax,
26                        Float_t pos[3],
27                        const char** Materials,
28                        const char** Fields=0,
29                        const char** Cuts=0);
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],
35               const char* Material, 
36               const char* Field="MF", 
37               const char* Cuts="$UNSHIELDED");
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],
42                    const char** Materials,
43                    const char** Fields=0,
44                    const char** Cuts=0);
45
46     void PolyCone(Float_t* rmin, Float_t* rmax, Float_t* z, Int_t nz,
47                   Float_t pos[3], 
48                   const char* Material, 
49                   const char* Field="MF", 
50                   const char* Cuts="$UNSHIELDED");
51
52     void OnionPolyCone(Float_t** r , Float_t* z, Int_t nr, Int_t nz,
53                        Float_t pos[3], 
54                        const char** Materials,
55                        const char** Fields=0,
56                        const char** Cuts=0);
57     
58     void Comment(const char* Comment);
59
60     void Finish(Bool_t remove = 0);
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();
80     void Copy(TObject &alife) const;
81
82     AliALIFE & operator = (const AliALIFE &rhs) {
83         rhs.Copy(*this);
84         return (*this);
85     }
86    ClassDef(AliALIFE,1)
87 };
88 #endif
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103