GGS(GenericGEANT4Simulation)Software  2.6.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
GGSVGeometryConstruction.h
Go to the documentation of this file.
1 
10 #ifndef GGSVGEOMETRYCONSTRUCTION_H
11 #define GGSVGEOMETRYCONSTRUCTION_H
12 
13 #include "G4VUserDetectorConstruction.hh"
14 #include "G4ThreeVector.hh"
15 #include "globals.hh"
16 
17 #include <map>
18 
24 class GGSVGeometryConstruction: public G4VUserDetectorConstruction {
25 public:
26 
29  _geoDataCard(""), _verboseLevel(0) {
30  }
31 
34  }
35 
40  virtual G4VPhysicalVolume* Construct()= 0;
41 
46  virtual G4VPhysicalVolume* GetVolume() = 0;
47 
57  virtual bool IsInsideAcceptance(const G4ThreeVector &, const G4ThreeVector &) const {
58  return true;
59  }
60 
68  void SetGeoDataCard(const G4String &dataCard) {
69  _geoDataCard = dataCard;
70  }
71 
85  void SetVerboseLevel(int verboseLevel) {
86  _verboseLevel = verboseLevel;
87  }
88 
93  virtual const std::string GetVersion() {
94  return "";
95  }
96 
109  virtual bool ExportParameters() {
110  return true;
111  }
112 
121  const std::map<std::string, int> &GetIntParameters();
122 
131  const std::map<std::string, bool> &GetBoolParameters();
132 
141  const std::map<std::string, double> &GetRealParameters();
142 
151  const std::map<std::string, std::string> &GetStringParameters();
152 
153 protected:
154 
164  bool ExportIntParameter(std::string name, int value);
165 
175  bool ExportBoolParameter(std::string name, bool value);
176 
186  bool ExportRealParameter(std::string name, double value);
187 
197  bool ExportStringParameter(std::string name, std::string value);
198 
199  G4String _geoDataCard;
201 
202  std::map<std::string, int> _intParams;
203  std::map<std::string, bool> _boolParams;
204  std::map<std::string, double> _realParams;
205  std::map<std::string, std::string> _stringParams;
206 
207 private:
208 
209 };
210 
211 #endif // GGSVGEOMETRYCONSTRUCTION_H
bool ExportBoolParameter(std::string name, bool value)
Sets the value of a boolean parameter.
const std::map< std::string, int > & GetIntParameters()
Getter method for integer geometry parameters.
const std::map< std::string, double > & GetRealParameters()
Getter method for real geometry parameters.
Abstract class needed to load GGS geometry.
bool ExportRealParameter(std::string name, double value)
Sets the value of a real parameter.
virtual G4VPhysicalVolume * Construct()=0
Construct the detector - virtual method.
const std::map< std::string, std::string > & GetStringParameters()
Getter method for string geometry parameters.
virtual const std::string GetVersion()
Getter method for geometry version.
const std::map< std::string, bool > & GetBoolParameters()
Getter method for boolean geometry parameters.
bool ExportStringParameter(std::string name, std::string value)
Sets the value of a string parameter.
G4String _geoDataCard
The geometry datacard file.
bool ExportIntParameter(std::string name, int value)
Sets the value of an integer parameter.
virtual bool ExportParameters()
Function for exporting the geometry parameters.
virtual ~GGSVGeometryConstruction()
Destructor.
int _verboseLevel
Verbosity level.
virtual G4VPhysicalVolume * GetVolume()=0
Get the detector VPhysicalVolume - virtual method.
void SetVerboseLevel(int verboseLevel)
Sets the verbosity level.
virtual bool IsInsideAcceptance(const G4ThreeVector &, const G4ThreeVector &) const
Checks if a particle is inside the instrument&#39;s acceptance.
void SetGeoDataCard(const G4String &dataCard)
Sets the geometry configuration datacard.