GGS(GenericGEANT4Simulation)Software  2.7.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 "G4ThreeVector.hh"
14 #include "G4VUserDetectorConstruction.hh"
15 #include "globals.hh"
16 
17 #include <map>
18 
24 class GGSVGeometryConstruction : public G4VUserDetectorConstruction {
25 public:
28 
31 
36  virtual G4VPhysicalVolume *Construct() = 0;
37 
42  virtual G4VPhysicalVolume *GetVolume() = 0;
43 
53  virtual bool IsInsideAcceptance(const G4ThreeVector &, const G4ThreeVector &) const { return true; }
54 
62  void SetGeoDataCard(const G4String &dataCard) { _geoDataCard = dataCard; }
63 
77  void SetVerboseLevel(int verboseLevel) { _verboseLevel = verboseLevel; }
78 
83  virtual const std::string GetVersion() { return ""; }
84 
102  virtual bool ExportParameters() { return true; }
103 
112  const std::map<std::string, int> &GetIntParameters();
113 
122  const std::map<std::string, bool> &GetBoolParameters();
123 
132  const std::map<std::string, double> &GetRealParameters();
133 
142  const std::map<std::string, std::string> &GetStringParameters();
143 
152  const std::map<std::string, std::vector<int>> &GetVectIntParameters();
153 
162  const std::map<std::string, std::vector<bool>> &GetVectBoolParameters();
163 
172  const std::map<std::string, std::vector<double>> &GetVectRealParameters();
173 
182  const std::map<std::string, std::vector<std::string>> &GetVectStringParameters();
183 
184 protected:
197  bool ExportIntParameter(std::string name, int value);
198 
211  bool ExportBoolParameter(std::string name, bool value);
212 
225  bool ExportRealParameter(std::string name, double value);
226 
239  bool ExportStringParameter(std::string name, std::string value);
240 
253  bool ExportVectIntParameter(std::string name, std::vector<int> value);
254 
267  bool ExportVectBoolParameter(std::string name, std::vector<bool> value);
268 
278  bool ExportVectRealParameter(std::string name, std::vector<double> value);
279 
292  bool ExportVectStringParameter(std::string name, std::vector<std::string> value);
293 
294  G4String _geoDataCard;
296 
297  std::map<std::string, int> _intParams;
298  std::map<std::string, bool> _boolParams;
299  std::map<std::string, double> _realParams;
300  std::map<std::string, std::string> _stringParams;
301  std::map<std::string, std::vector<int>> _vectIntParams;
302  std::map<std::string, std::vector<double>> _vectRealParams;
303  std::map<std::string, std::vector<std::string>> _vectStringParams;
304  std::map<std::string, std::vector<bool>> _vectBoolParams;
305 
306 private:
307 };
308 
309 #endif // GGSVGEOMETRYCONSTRUCTION_H
bool ExportBoolParameter(std::string name, bool value)
Sets the value of a boolean parameter.
const std::map< std::string, std::vector< bool > > & GetVectBoolParameters()
Getter method for vector-of-booleans geometry parameters.
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.
const std::map< std::string, std::vector< std::string > > & GetVectStringParameters()
Getter method for vector-of-strings geometry parameters.
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::vector< int > > & GetVectIntParameters()
Getter method for vector-of-integers geometry parameters.
const std::map< std::string, std::string > & GetStringParameters()
Getter method for string geometry parameters.
bool ExportVectBoolParameter(std::string name, std::vector< bool > value)
Sets the value of a vector-of-booleans parameter.
const std::map< std::string, std::vector< double > > & GetVectRealParameters()
Getter method for vector-of-reals geometry parameters.
virtual const std::string GetVersion()
Getter method for geometry version.
bool ExportVectRealParameter(std::string name, std::vector< double > value)
Sets the value of a vector-of-reals parameter.
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.
bool ExportVectIntParameter(std::string name, std::vector< int > value)
Sets the value of a vector-of-integers parameter.
int _verboseLevel
Verbosity level.
virtual G4VPhysicalVolume * GetVolume()=0
Get the detector VPhysicalVolume - virtual method.
bool ExportVectStringParameter(std::string name, std::vector< std::string > value)
Sets the value of a vector-of-strings parameter.
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.