QwGeant4
QweakSimGeometry Class Reference

main class of QweakSim. All passive elements are are read from the GDML files. More...

#include <QweakSimGeometry.hh>

+ Collaboration diagram for QweakSimGeometry:

Public Member Functions

 QweakSimGeometry ()
 
 ~QweakSimGeometry ()
 
void SetWorldVolume (G4VPhysicalVolume *worldvolume)
 
void SetReadFile (const G4String &file)
 
void SetWriteFile (const G4String &file)
 
void SetWriteModuleDepth (const G4int &depth)
 
void SetWriteModuleUser (const G4bool &flag)
 
void AddModule (G4VPhysicalVolume *physvol)
 
G4VPhysicalVolume * Read ()
 
void Write ()
 

Private Attributes

G4VPhysicalVolume * fWorldVolume
 
G4int fModuleDepth
 
G4bool fModuleUser
 
G4bool fStoreReferences
 
G4String fReadFile
 
G4String fWriteFile
 
QweakSimGeometryMessengerfGeometryMessenger
 

Detailed Description

main class of QweakSim. All passive elements are are read from the GDML files.

Definition at line 59 of file QweakSimGeometry.hh.

Constructor & Destructor Documentation

QweakSimGeometry::QweakSimGeometry ( )

Definition at line 32 of file QweakSimGeometry.cc.

References fGeometryMessenger, fModuleDepth, fModuleUser, fReadFile, and fWriteFile.

33 : fStoreReferences(true)
34 {
35  G4cout << G4endl << "###### Calling QweakSimGeometry::QweakSimGeometry() " << G4endl << G4endl;
36 
37  // Filenames
38  fReadFile = "GDML/qweak.gdml";
39  fWriteFile = "GDML/qweak_out.gdml";
40 
41  // Modules
42  fModuleDepth = -1;
43  fModuleUser = false;
44 
45 #ifdef G4LIB_USE_GDML
46 #else
47  G4cout << "No support for GDML geometry!" << G4endl;
48 #endif
49 
51 
52  G4cout << G4endl << "###### Leaving QweakSimGeometry::QweakSimGeometry() " << G4endl << G4endl;
53 }
Scans the input file for /GDML/ commands.
QweakSimGeometryMessenger * fGeometryMessenger
QweakSimGeometry::~QweakSimGeometry ( )

Definition at line 57 of file QweakSimGeometry.cc.

References fGeometryMessenger.

58 {
59  G4cout << G4endl << "###### Calling QweakSimGeometry::~QweakSimGeometry() " << G4endl << G4endl;
60 
62 
63  G4cout << G4endl << "###### Leaving QweakSimGeometry::~QweakSimGeometry() " << G4endl << G4endl;
64 }
QweakSimGeometryMessenger * fGeometryMessenger

Member Function Documentation

void QweakSimGeometry::AddModule ( G4VPhysicalVolume *  physvol)
inline

Definition at line 81 of file QweakSimGeometry.hh.

References fModuleUser.

Referenced by QweakSimDetectorConstruction::ConstructQweak().

81  {
82  if (fModuleUser) {
83  if (physvol) {
84  #ifdef G4LIB_USE_GDML
85  fGDMLParser.AddModule(physvol);
86  #endif
87  }
88  }
89  }

+ Here is the caller graph for this function:

G4VPhysicalVolume * QweakSimGeometry::Read ( )

Definition at line 87 of file QweakSimGeometry.cc.

References fReadFile.

88 {
89  G4cout << G4endl << "###### Calling QweakSimGeometry::Read() " << G4endl << G4endl;
90 
91 #ifdef G4LIB_USE_GDML
92  fGDMLParser.SetOverlapCheck(true);
93  fGDMLParser.Read(fReadFile);
94  fGDMLParser.StripNamePointers();
95 
96  G4cout << *(G4Element::GetElementTable()) << G4endl;
97  G4cout << *(G4Material::GetMaterialTable()) << G4endl;
98 
99  G4VPhysicalVolume* worldvolume = fGDMLParser.GetWorldVolume();
100 #else
101  G4cout << "No support for GDML geometry!" << G4endl;
102  G4VPhysicalVolume* worldvolume = NULL;
103 #endif
104 
105  G4cout << G4endl << "###### Leaving QweakSimGeometry::Read() " << G4endl << G4endl;
106 
107  return worldvolume;
108 }
void QweakSimGeometry::SetReadFile ( const G4String &  file)
inline

Definition at line 72 of file QweakSimGeometry.hh.

References fReadFile.

Referenced by QweakSimGeometryMessenger::SetNewValue().

72 { fReadFile = file; };

+ Here is the caller graph for this function:

void QweakSimGeometry::SetWorldVolume ( G4VPhysicalVolume *  worldvolume)
inline

Definition at line 68 of file QweakSimGeometry.hh.

References fWorldVolume.

Referenced by QweakSimDetectorConstruction::ConstructQweak().

68 { fWorldVolume = worldvolume; };
G4VPhysicalVolume * fWorldVolume

+ Here is the caller graph for this function:

void QweakSimGeometry::SetWriteFile ( const G4String &  file)
inline

Definition at line 73 of file QweakSimGeometry.hh.

References fWriteFile.

Referenced by QweakSimGeometryMessenger::SetNewValue().

73 { fWriteFile = file; };

+ Here is the caller graph for this function:

void QweakSimGeometry::SetWriteModuleDepth ( const G4int &  depth)
inline

Definition at line 77 of file QweakSimGeometry.hh.

References fModuleDepth.

Referenced by QweakSimGeometryMessenger::SetNewValue().

77 { fModuleDepth = depth; };

+ Here is the caller graph for this function:

void QweakSimGeometry::SetWriteModuleUser ( const G4bool &  flag)
inline

Definition at line 78 of file QweakSimGeometry.hh.

References fModuleUser.

Referenced by QweakSimGeometryMessenger::SetNewValue().

78 { fModuleUser = flag; };

+ Here is the caller graph for this function:

void QweakSimGeometry::Write ( )

Definition at line 68 of file QweakSimGeometry.cc.

References fModuleDepth, fStoreReferences, fWorldVolume, and fWriteFile.

Referenced by QweakSimGeometryMessenger::SetNewValue().

69 {
70  G4cout << G4endl << "###### Calling QweakSimGeometry::Write() " << G4endl << G4endl;
71 
72 #ifdef G4LIB_USE_GDML
73  // If the module depth is non-negative, split according to this depth
74  if (fModuleDepth >= 0)
75  fGDMLParser.AddModule(fModuleDepth);
76  // Write all geometry starting from the world volume
77  fGDMLParser.Write(fWriteFile, fWorldVolume, fStoreReferences);
78 #else
79  G4cout << "No support for GDML geometry!" << G4endl;
80 #endif
81 
82  G4cout << G4endl << "###### Leaving QweakSimGeometry::Write() " << G4endl << G4endl;
83 }
G4VPhysicalVolume * fWorldVolume

+ Here is the caller graph for this function:

Field Documentation

QweakSimGeometryMessenger* QweakSimGeometry::fGeometryMessenger
private

Definition at line 123 of file QweakSimGeometry.hh.

Referenced by QweakSimGeometry(), and ~QweakSimGeometry().

G4int QweakSimGeometry::fModuleDepth
private

Definition at line 104 of file QweakSimGeometry.hh.

Referenced by QweakSimGeometry(), SetWriteModuleDepth(), and Write().

G4bool QweakSimGeometry::fModuleUser
private

Definition at line 105 of file QweakSimGeometry.hh.

Referenced by AddModule(), QweakSimGeometry(), and SetWriteModuleUser().

G4String QweakSimGeometry::fReadFile
private

Definition at line 112 of file QweakSimGeometry.hh.

Referenced by QweakSimGeometry(), Read(), and SetReadFile().

G4bool QweakSimGeometry::fStoreReferences
private

Definition at line 108 of file QweakSimGeometry.hh.

Referenced by Write().

G4VPhysicalVolume* QweakSimGeometry::fWorldVolume
private

Definition at line 100 of file QweakSimGeometry.hh.

Referenced by SetWorldVolume(), and Write().

G4String QweakSimGeometry::fWriteFile
private

Definition at line 113 of file QweakSimGeometry.hh.

Referenced by QweakSimGeometry(), SetWriteFile(), and Write().


The documentation for this class was generated from the following files: