User Tools

Site Tools


software:g4simulation:config_commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
software:g4simulation:config_commands [2019/02/15 16:37] himusersoftware:g4simulation:config_commands [2019/02/15 16:42] (current) – removed himuser
Line 1: Line 1:
-==== Simulation configuration ==== 
-To set the general behaviour of a simulation, a config file mechanism is used. The singleton class ''PRIMASimulationConfig'' is responsible for reading the config file and providing the other classes with the specified config settings. 
- 
-=== How to define a new command === 
-  - Add the variable(s) containing the settings information to class ''PRIMASimulationConfig'', implementing the corresponding "get" method. 
-  - Initialise these variables in the constructor using their default values.  
-  - Add an ''if'' block in the ''while'' loop inside method ''PRIMASimulationConfig::ReadConfFile'', e.g. <code> 
-if(key == "macro-file"){ 
- macroFileName = value; 
- macroSpecified = 1; 
- cout<<"macro file name set to: "<<macroFileName<<endl; 
-      }</code> 
-   - Document the new command in this wiki page. 
- 
- 
-\\ 
-=== List of commands === 
-  * Specify the root file where the geometry (''TGeoManager'' object) to be used in the simulation is saved.     <code> 
-geometry-file <filename> 
-</code> 
- 
- 
-  * Specify the geant4 macro file to be executed. If this command is not used the geant4 interactive shell will be loaded. <code> 
-macro-file <geant4 macro file> 
-</code> 
- 
- 
-  * Specify the root file where the simulation output is written. **Attention!** The specified file will be overwritten.<code> 
-root-output-file test_bwec.root 
-</code>  
- 
- 
-  * Specify the primary generator to be used <code> 
-primary-generator <generator> 
-</code> Until now, the following options are available: 
-    * ''particleGun'': uses the geant4 particle gun which can be set in the macro file 
-    * ''p16uniform'': generates electron over the surface of proto16, placed at 1.2 m from the particle source. The electron energy is uniformly distributed between 100 MeV and 1500 MeV 
  
software/g4simulation/config_commands.1550245023.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki