4 ///////////////////////////////////////////////////////////////////
6 // WrapInit.hh - Sara Vanini
8 // Wrapper for geometry initialisation.
10 // modified 12-IV-2000
11 // modified 24.10.01: by I. Hrivnacova
12 // functions declarations separated from implementation
13 // (moved to Wrappers.hh);
15 //////////////////////////////////////////////////////////////////
18 #include "Wrappers.hh"
19 #include "FGeometryInit.hh"
20 #include "G4PhysicalVolumeStore.hh"
21 #include "G4VPhysicalVolume.hh"
24 void jomiwr(const G4int & nge, const G4int& lin, const G4int& lou,
28 #ifdef G4GEOMETRY_DEBUG
29 G4cout << "================== JOMIWR =================" << G4endl;
34 #ifdef G4GEOMETRY_DEBUG
35 G4cout << "\t *==> JOMIWR: Getting FGeometry..." << G4endl;
37 FGeometryInit * ptrGeoInit=FGeometryInit::GetInstance();
39 //initialize geometry:construct detector and set world volume
40 #ifdef G4GEOMETRY_DEBUG
41 G4cout << "\t *==> JOMIWR: Setting the detector..." << G4endl;
43 // ptrGeoInit->setDetector();
44 #ifdef G4GEOMETRY_DEBUG
45 G4cout << "\t *==> JOMIWR: Setting mother volume..." << G4endl;
47 // ptrGeoInit->setMotherVolume();
49 //close geometry for optimization
50 #ifdef G4GEOMETRY_DEBUG
51 G4cout << "\t *==> JOMIWR: Closing geometry..." << G4endl;
53 // ptrGeoInit->closeGeometry();
55 //initialize wrappers utility histories at the beginning of run and set flag
56 #ifdef G4GEOMETRY_DEBUG
57 G4cout << "\t *==> JOMIWR: InitHistories..." << G4endl;
59 // ptrGeoInit->InitHistories();
61 //initialize lattice array
62 #ifdef G4GEOMETRY_DEBUG
63 G4cout << "\t *==> JOMIWR: Init lattice array..." << G4endl;
65 // ptrGeoInit->InitJrLtGeantArray();
67 //initialize debug-array
68 #ifdef G4GEOMETRY_DEBUG
69 G4cout << "\t *==> JOMIWR: Init debug array..." << G4endl;
71 // ptrGeoInit->InitHistArray();
73 //create Fluka material cards in flukaMat.inp file
74 #ifdef G4GEOMETRY_DEBUG
75 G4cout << "\t *==> JOMIWR: Init fluka materials..." << G4endl;
77 // ptrGeoInit->createFlukaMatFile();
79 //returns number of volumes + 1
80 #ifdef G4GEOMETRY_DEBUG
81 G4cout << "\t *==> JOMIWR: Returning..." << G4endl;
83 G4PhysicalVolumeStore * pVolStore = G4PhysicalVolumeStore::GetInstance();
84 G4int numVol = G4int(pVolStore->size());
85 flukaReg = numVol + 1;
87 #ifdef G4GEOMETRY_DEBUG
88 G4cout << "Number of volumes + 1: " << flukaReg << G4endl;
89 G4cout << "================== Out of JOMIWR =================" << G4endl;