QwGeant4
QweakSimGeometry.hh
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 /**
7 
8  \file QweakSimGeometry.hh
9  $Revision: 0.1 $
10  $Date: 2009/09/02 19:37:26 $
11  \author Wouter Deconinck
12 
13 */
14 //=============================================================================
15 //
16 //=============================================================================
17 //
18 // ---------------------------
19 // | Doxygen Class Information |
20 // ---------------------------
21 /**
22  \class QweakSimGeometry
23 
24  \brief main class of QweakSim.
25  All passive elements are are read from the GDML files.
26 
27  */
28 //=============================================================================
29 //
30 //=============================================================================
31 // -----------------------
32 // | CVS File Information |
33 // -----------------------
34 //
35 // Last Update: $Author: wdconinc $
36 // Update Date: $Date: 2009/09/02 19:37:26 $
37 // CVS/RCS Revision: $Revision: 1.0 $
38 // Status: $State: Exp $
39 //
40 //=============================================================================
41 
42 #ifndef QweakSimGeometry_h
43 #define QweakSimGeometry_h 1
44 
45 // geant4 includes
46 #include "G4VPhysicalVolume.hh"
47 #ifdef G4LIB_USE_GDML
48 #include "G4GDMLParser.hh"
49 #endif
50 
51 // user includes
53 
54 // user classes
56 
57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58 
60 {
61  public:
62 
65 
66  // Set world volume
67  //
68  void SetWorldVolume(G4VPhysicalVolume* worldvolume) { fWorldVolume = worldvolume; };
69 
70  // Reading and writing file name
71  //
72  void SetReadFile(const G4String& file) { fReadFile = file; };
73  void SetWriteFile(const G4String& file) { fWriteFile = file; };
74 
75  // Writing user or automatic modules
76  //
77  void SetWriteModuleDepth(const G4int& depth) { fModuleDepth = depth; };
78  void SetWriteModuleUser(const G4bool& flag) { fModuleUser = flag; };
79 
80  // Adding modules
81  void AddModule(G4VPhysicalVolume* physvol) {
82  if (fModuleUser) {
83  if (physvol) {
84  #ifdef G4LIB_USE_GDML
85  fGDMLParser.AddModule(physvol);
86  #endif
87  }
88  }
89  }
90 
91  // Read and write GDML files
92  //
93  G4VPhysicalVolume* Read();
94  void Write();
95 
96  private:
97 
98  // World volume
99  //
100  G4VPhysicalVolume* fWorldVolume;
101 
102  // Modules
103  //
105  G4bool fModuleUser;
106 
107  // Append pointer address to names
109 
110  // Read and write file names
111  //
112  G4String fReadFile;
113  G4String fWriteFile;
114 
115 #ifdef G4LIB_USE_GDML
116  // GDMLparser
117  //
118  G4GDMLParser fGDMLParser;
119 #endif
120 
121  // Geometry Messenger
122  //
124 };
125 
126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
127 
128 #endif
void SetWriteModuleUser(const G4bool &flag)
void SetReadFile(const G4String &file)
Scans the input file for /GDML/ commands.
G4VPhysicalVolume * Read()
void SetWriteFile(const G4String &file)
main class of QweakSim. All passive elements are are read from the GDML files.
QweakSimGeometryMessenger * fGeometryMessenger
void SetWriteModuleDepth(const G4int &depth)
void SetWorldVolume(G4VPhysicalVolume *worldvolume)
void AddModule(G4VPhysicalVolume *physvol)
G4VPhysicalVolume * fWorldVolume