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