GGS(GenericGEANT4Simulation)Software
2.6.0
|
Abstract class needed to load GGS geometry. More...
#include <GGSVGeometryConstruction.h>
Public Member Functions | |
GGSVGeometryConstruction () | |
Constructor. | |
virtual | ~GGSVGeometryConstruction () |
Destructor. | |
virtual G4VPhysicalVolume * | Construct ()=0 |
Construct the detector - virtual method. More... | |
virtual G4VPhysicalVolume * | GetVolume ()=0 |
Get the detector VPhysicalVolume - virtual method. More... | |
virtual bool | IsInsideAcceptance (const G4ThreeVector &, const G4ThreeVector &) const |
Checks if a particle is inside the instrument's acceptance. More... | |
void | SetGeoDataCard (const G4String &dataCard) |
Sets the geometry configuration datacard. More... | |
void | SetVerboseLevel (int verboseLevel) |
Sets the verbosity level. More... | |
virtual const std::string | GetVersion () |
Getter method for geometry version. More... | |
virtual bool | ExportParameters () |
Function for exporting the geometry parameters. More... | |
const std::map< std::string, int > & | GetIntParameters () |
Getter method for integer geometry parameters. More... | |
const std::map< std::string, bool > & | GetBoolParameters () |
Getter method for boolean geometry parameters. More... | |
const std::map< std::string, double > & | GetRealParameters () |
Getter method for real geometry parameters. More... | |
const std::map< std::string, std::string > & | GetStringParameters () |
Getter method for string geometry parameters. More... | |
Protected Member Functions | |
bool | ExportIntParameter (std::string name, int value) |
Sets the value of an integer parameter. More... | |
bool | ExportBoolParameter (std::string name, bool value) |
Sets the value of a boolean parameter. More... | |
bool | ExportRealParameter (std::string name, double value) |
Sets the value of a real parameter. More... | |
bool | ExportStringParameter (std::string name, std::string value) |
Sets the value of a string parameter. More... | |
Protected Attributes | |
G4String | _geoDataCard |
The geometry datacard file. | |
int | _verboseLevel |
Verbosity level. | |
std::map< std::string, int > | _intParams |
std::map< std::string, bool > | _boolParams |
std::map< std::string, double > | _realParams |
std::map< std::string, std::string > | _stringParams |
Abstract class needed to load GGS geometry.
Abstract class needed to load run time the GGSGeometryConstruction library without the need for linking to the executable GGSWolowitz
Definition at line 24 of file GGSVGeometryConstruction.h.
|
pure virtual |
Construct the detector - virtual method.
|
protected |
Sets the value of a boolean parameter.
The parameter values set by this function are NOT used for geometry construction. They are just stored for being subsequently retrieved.
name | The name of the parameter. |
value | The value of the parameter. |
Definition at line 34 of file GGSVGeometryConstruction.cpp.
|
protected |
Sets the value of an integer parameter.
The parameter values set by this function are NOT used for geometry construction. They are just stored for being subsequently retrieved.
name | The name of the parameter. |
value | The value of the parameter. |
Definition at line 30 of file GGSVGeometryConstruction.cpp.
|
inlinevirtual |
Function for exporting the geometry parameters.
This function is called by the framework AFTER Construct. Users can re-implement it to export the values of the geometry parameters used for geometry construction, which can be later fetched e.g. to be saved in the output file. A typical re-implementation of this method consists of a series of calls to ExportIntParameter, ExportRealParameter and ExportStringParameter. Exported parameters are internally stored in maps which can be retrieved by calling GetIntParameters, GetRealParameters and GetStringParameters.
Do not call this function explicitly.
Definition at line 109 of file GGSVGeometryConstruction.h.
|
protected |
Sets the value of a real parameter.
The parameter values set by this function are NOT used for geometry construction. They are just stored for being subsequently retrieved.
name | The name of the parameter. |
value | The value of the parameter. |
Definition at line 38 of file GGSVGeometryConstruction.cpp.
|
protected |
Sets the value of a string parameter.
The parameter values set by this function are NOT used for geometry construction. They are just stored for being subsequently retrieved.
name | The name of the parameter. |
value | The value of the parameter. |
Definition at line 41 of file GGSVGeometryConstruction.cpp.
const std::map< std::string, bool > & GGSVGeometryConstruction::GetBoolParameters | ( | ) |
Getter method for boolean geometry parameters.
This method returns a map of the exported boolean parameters describing the geometry. The parameters and their value can be set by calling ExportBoolParameter in the override of ExportParameters.
Definition at line 18 of file GGSVGeometryConstruction.cpp.
const std::map< std::string, int > & GGSVGeometryConstruction::GetIntParameters | ( | ) |
Getter method for integer geometry parameters.
This method returns a map of the exported integer parameters describing the geometry. The parameters and their value can be set by calling ExportIntParameter in the override of ExportParameters.
Definition at line 14 of file GGSVGeometryConstruction.cpp.
const std::map< std::string, double > & GGSVGeometryConstruction::GetRealParameters | ( | ) |
Getter method for real geometry parameters.
This method returns a map of the exported real parameters describing the geometry. The parameters and their value can be set by calling ExportRealParameter in the override of ExportParameters.
Definition at line 22 of file GGSVGeometryConstruction.cpp.
const std::map< std::string, std::string > & GGSVGeometryConstruction::GetStringParameters | ( | ) |
Getter method for string geometry parameters.
This method returns a map of the exported string parameters describing the geometry. The parameters and their value can be set by calling ExportStringParameter in the override of ExportParameters.
Definition at line 26 of file GGSVGeometryConstruction.cpp.
|
inlinevirtual |
Getter method for geometry version.
Definition at line 93 of file GGSVGeometryConstruction.h.
|
pure virtual |
Get the detector VPhysicalVolume - virtual method.
|
inlinevirtual |
Checks if a particle is inside the instrument's acceptance.
This method checks if a particle shot from generationPoint towards direction is inside the acceptance of the instrument. In this abstract class it always returns true; concrete implementations may override this method to perform geometry-specific acceptance checks, otherwise this default implementation will be used and the acceptance check will never fail.
Definition at line 57 of file GGSVGeometryConstruction.h.
|
inline |
Sets the geometry configuration datacard.
The concrete implementations of this class must implement a messenger who will interpret the datacard and configure the geometry accordingly.
dataCard | Name of the datacard file.. |
Definition at line 68 of file GGSVGeometryConstruction.h.
|
inline |
Sets the verbosity level.
The meaning of verbosity levels is left to specific geometry implementations. However, a proposed scheme is: verboseLevel = 1: general geometry construction info (materials, sub-detectors placements etc.) verboseLevel = 2: specific sub-detector construction info (defined by each eventual sub-detector, like positions of its elements). verboseLevel = 3: both
Note that this is only a proposed behavior; different behaviors can be implemented if needed. Other levels can be defined by using verboseLevel as a binary mask (eg., define a verbose level associated to 4 and combine it with verbose level 2 by using verboseLevel = 6 = 4+2).
verboseLevel | The verbosity level. |
Definition at line 85 of file GGSVGeometryConstruction.h.