First implementation. Needs cleanup.
[u/mrichter/AliRoot.git] / Flugg / FGeometryInit.hh
1
2 // Flugg tag 
3
4 // modified 10/IX/99 for including preStepPoint
5 // modified 28/IX/99 for delating allocated memory
6 // modified 4/X/99 function FreeMemory
7 // modified 2/III/00 base class G4TransportationManager included   
8 // modified 20/III/00 PrintHistories() included
9
10  
11 #ifndef FGeometryInit_h
12 #define FGeometryInit_h 1
13
14 //#include "g4std/fstream"
15 //#include "g4std/iomanip"
16 //#include "g4rw/cstring.h"
17 #include "globals.hh"
18
19 #include "G4LogicalVolume.hh"
20 #include "G4PhysicalVolumeStore.hh"
21 #include "G4VPhysicalVolume.hh"
22 #include "G4Material.hh"
23 #include "G4MaterialTable.hh"
24 #include "G4Isotope.hh"
25 #include "G4VUserDetectorConstruction.hh"
26 #include "G4TouchableHistory.hh"
27 #include "G4GeometryManager.hh"
28 #include "G4FieldManager.hh"
29 #include "G4UniformMagField.hh"
30 #include "G4TransportationManager.hh"
31
32
33 class FluggNavigator;
34
35 class FGeometryInit : public G4TransportationManager
36 {
37    public:
38         ~FGeometryInit();       //destructor
39         static FGeometryInit *GetInstance();
40         inline FluggNavigator *getNavigatorForTracking();
41         inline G4FieldManager * getFieldManager();
42         inline void setDetConstruction(G4VUserDetectorConstruction* detector);
43         inline void setDetector();
44         inline void setMotherVolume();
45         void createFlukaMatFile();
46         void closeGeometry();
47
48         void PrintHistories();
49         void InitHistories();
50         void DeleteHistories();
51         void UpdateHistories(const G4NavigationHistory *, G4int);
52         inline G4TouchableHistory * GetTouchableHistory();
53         inline G4TouchableHistory * GetOldNavHist();
54         inline G4TouchableHistory * GetTempNavHist();
55
56         void InitHistArray();
57         inline void DelHistArray();
58         inline G4int * GetHistArray();
59
60         void InitJrLtGeantArray();
61         inline G4int * GetJrLtGeantArray();
62         inline G4int GetLttcFlagGeant();
63         void SetLttcFlagGeant(G4int);
64         void PrintJrLtGeant(); 
65
66    private:    
67         FGeometryInit();        //costructor
68         G4VUserDetectorConstruction * fDetector;
69         G4FieldManager * fFieldManager; 
70         G4TransportationManager * fTransportationManager;
71         static FGeometryInit *flagInstance;
72         G4VPhysicalVolume * myTopNode;
73         G4GeometryManager * ptrGeoMan;
74         G4int * ptrArray;
75         G4TouchableHistory * ptrTouchHist;
76         G4TouchableHistory * ptrOldNavHist;
77         G4TouchableHistory * ptrTempNavHist;
78         G4int * ptrJrLtGeant;
79         G4int flagLttcGeant;
80 };
81
82
83 //Include the file with the inline methods
84 #include "FGeometryInit.icc"
85
86 #endif