]>
Commit | Line | Data |
---|---|---|
e2e989f9 | 1 | #ifndef TFLUKAMCGEOMETRY_H |
2 | #define TFLUKAMCGEOMETRY_H | |
8495a208 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
8495a208 | 6 | // |
7 | // Class TFlukaMCGeometry | |
8 | // -------------------- | |
9 | // Implementation of the TVirtualMCGeometry interface | |
10 | // for defining and using TGeo geometry with FLUKA. | |
e2e989f9 | 11 | // |
12 | // Author: Andrei Gheata 10/07/2003 | |
8495a208 | 13 | |
89125dc7 | 14 | #ifndef ROOT_TNamed |
15 | #include "TNamed.h" | |
8495a208 | 16 | #endif |
17 | ||
ccf43c1e | 18 | class TGeoMaterial; |
19 | ||
20 | ||
89125dc7 | 21 | class TFlukaMCGeometry :public TNamed { |
8495a208 | 22 | |
23 | public: | |
d11bf3ca | 24 | enum EFlukaLatticeTypes { |
25 | kLttcOutside = 999999999, | |
26 | kLttcVirtual = 1000000000 | |
27 | }; | |
28 | ||
8495a208 | 29 | TFlukaMCGeometry(); |
30 | TFlukaMCGeometry(const char* name, const char* title); | |
31 | virtual ~TFlukaMCGeometry(); | |
32 | ||
8495a208 | 33 | // get methods |
4aba9d66 | 34 | Int_t GetNstep(); // to be removed |
8495a208 | 35 | Int_t GetMedium() const; |
b1536e91 | 36 | Int_t *GetRegionList(Int_t imed, Int_t &nreg); |
37 | Int_t *GetMaterialList(Int_t imat, Int_t &nreg); | |
0bc73b6c | 38 | Int_t GetFlukaMaterial(Int_t imed) const; |
efde9b4d | 39 | Int_t GetLastMaterialIndex() const {return fLastMaterial;} |
8495a208 | 40 | virtual Int_t NofVolumes() const; |
8495a208 | 41 | // FLUKA specific methods |
efde9b4d | 42 | void CreateFlukaMatFile(const char *fname=0); |
8495a208 | 43 | void PrintHeader(ofstream &out, const char *text) const; |
2bc4c610 | 44 | Bool_t IsDebugging() const {return fDebug;} |
45 | void SetDebugMode(Bool_t flag=kTRUE) {fDebug = flag;} | |
aae6bcdd | 46 | void SetMreg(Int_t mreg, Int_t lttc); |
d11bf3ca | 47 | void SetCurrentRegion(Int_t mreg, Int_t latt); |
48 | void GetCurrentRegion(Int_t &mreg, Int_t &latt) const {mreg=fCurrentRegion; latt=fCurrentLattice;} | |
4aba9d66 | 49 | Int_t GetCurrentRegion() const {return fCurrentRegion;} |
aae6bcdd | 50 | Int_t GetDummyRegion() const {return fDummyRegion;} |
51 | Int_t GetDummyLattice() const {return kLttcVirtual;} | |
05265ca9 | 52 | void SetNextRegion(Int_t mreg, Int_t latt); |
d11bf3ca | 53 | void GetNextRegion(Int_t &mreg, Int_t &latt) const {mreg=fNextRegion; latt=fNextLattice;} |
89125dc7 | 54 | TGeoMaterial *GetMakeWrongMaterial(Double_t z); |
55 | TObjArray *GetMatList() {return fMatList;} | |
56 | TObjArray *GetMatNames() {return fMatNames;} | |
57 | Int_t GetElementIndex(Int_t z) const; | |
8495a208 | 58 | Int_t RegionId() const; |
59 | void ToFlukaString(TString &str) const; | |
89125dc7 | 60 | void FlukaMatName(TString &str) const; |
9968e86c | 61 | Int_t GetPredefinedMaterialId(Int_t z) const; |
d23f4fcd | 62 | Double_t* CreateDoubleArray(Float_t* array, Int_t size) const; |
63 | void Vname(const char *name, char *vname) const; | |
8495a208 | 64 | |
89125dc7 | 65 | private: |
4aba9d66 | 66 | // Copy constructor and operator= declared but not implemented (-Weff++ flag) |
8495a208 | 67 | TFlukaMCGeometry(const TFlukaMCGeometry& rhs); |
4aba9d66 | 68 | TFlukaMCGeometry& operator=(const TFlukaMCGeometry& /*rhs*/); // {return (*this);} |
8495a208 | 69 | |
70 | static TFlukaMCGeometry* fgInstance; // singleton instance | |
2bc4c610 | 71 | Bool_t fDebug; // debug flag |
05265ca9 | 72 | Int_t fLastMaterial; // last FLUKA material index |
aae6bcdd | 73 | Int_t fDummyRegion; // index of dummy region |
d11bf3ca | 74 | Int_t fCurrentRegion; // current region number |
75 | Int_t fCurrentLattice; // current lattice history | |
05265ca9 | 76 | Int_t fNextRegion; // next region number |
77 | Int_t fNextLattice; // next lattice history | |
b1536e91 | 78 | Int_t *fRegionList; //! region list matching a given medium number |
6d184c54 | 79 | Int_t fIndmat; // material index where pemf file creation starts |
89125dc7 | 80 | TObjArray *fMatList; //! material list as known by FLUKA |
81 | TObjArray *fMatNames; //! list of FLUKA material names | |
4aba9d66 | 82 | |
8495a208 | 83 | ClassDef(TFlukaMCGeometry,1) //Virtual MonteCarlo Interface |
84 | }; | |
85 | ||
86 | #endif //ROOT_TFlukaMCGeometry |