]> git.uio.no Git - u/mrichter/AliRoot.git/blob - Flugg/source/Wrappers/src/WrapInit.cc
Removing unnecessary files for new the new Flugg
[u/mrichter/AliRoot.git] / Flugg / source / Wrappers / src / WrapInit.cc
1 // $Id$
2 // Flugg tag $Name$
3
4 ///////////////////////////////////////////////////////////////////
5 //
6 // WrapInit.hh - Sara Vanini
7 //
8 // Wrapper for geometry initialisation.
9 //
10 // modified 12-IV-2000
11 // modified 24.10.01: by I. Hrivnacova
12 //   functions declarations separated from implementation
13 //   (moved to Wrappers.hh);
14 //
15 //////////////////////////////////////////////////////////////////
16
17
18 #include "Wrappers.hh"
19 #include "FGeometryInit.hh"
20 #include "G4PhysicalVolumeStore.hh"
21 #include "G4VPhysicalVolume.hh"
22 #include "globals.hh"
23
24 void jomiwr(const G4int & nge, const G4int& lin, const G4int& lou,
25             G4int& flukaReg)
26 {
27 //flag
28 #ifdef G4GEOMETRY_DEBUG
29         G4cout<<"================== JOMIWR ================="<<G4endl;
30 #endif 
31
32        
33 //Geoinit Pointer
34         FGeometryInit * ptrGeoInit=FGeometryInit::GetInstance();
35         
36 //initialize geometry:construct detector and set world volume
37         ptrGeoInit->setDetector();
38         ptrGeoInit->setMotherVolume(); 
39
40 #ifdef G4GEOMETRY_DEBUG
41         G4cout << "settings1 " << G4endl;
42 #endif
43
44 //close geometry for optimization
45         ptrGeoInit->closeGeometry();
46
47 #ifdef G4GEOMETRY_DEBUG
48         G4cout << "close geometry "<< flukaReg << G4endl;
49 #endif
50
51 //initialize wrappers utility histories at the beginning of run and set flag
52
53         ptrGeoInit->InitHistories();
54
55 #ifdef G4GEOMETRY_DEBUG
56         G4cout << " InitHistories" << G4endl;
57 #endif
58
59 //initialize lattice array
60         ptrGeoInit->InitJrLtGeantArray();
61
62 #ifdef G4GEOMETRY_DEBUG
63         G4cout << "InitJrLtGeantArray " << G4endl;
64 #endif
65
66 //initialize debug-array
67         ptrGeoInit->InitHistArray();
68
69 #ifdef G4GEOMETRY_DEBUG
70         G4cout << "InitHistArray " << G4endl;
71 #endif
72
73
74 //create Fluka material cards in flukaMat.inp file
75         ptrGeoInit->createFlukaMatFile();
76
77 #ifdef G4GEOMETRY_DEBUG
78         G4cout<<"createFlukaMatFile "<<flukaReg<<G4endl;
79 #endif
80
81 //returns number of volumes + 1
82         G4PhysicalVolumeStore * pVolStore = G4PhysicalVolumeStore::GetInstance();
83         G4int numVol = G4int(pVolStore->size());
84         flukaReg = numVol + 1;
85         
86 #ifdef G4GEOMETRY_DEBUG
87         G4cout<<"Number of volumes + 1: "<<flukaReg<<G4endl;
88 #endif
89 }
90
91
92