GRAS Examples¶
Different GRAS examples are provided in the directory gras/examples. These examples are run by GRAS is called as a typical Geant4 application by typing gras gras_example_macro_file_name from the example directory.
Examples gras/examples/gras_in_external_application¶
The two examples N01_with_GRAS and NO4_with_GRAS located in the directory examples/gras_in_external_application illustrate how existing Geant4 applications can be modified to be linked with and use the GRAS library (analysis modules, physics list, primary generator). These examples are extensions of the novice examples N01 and N04 distributed within Geant4.
The modifications of the initial novice examples consists into: - Replacing the creation and use of G4RunManager by GRASRunManager in the main - Removing the declaration of the user physics list and primary generation action to the run manager in the main. The physics list and primary generator action provided with GRAS will be used. - Modification of the CMakeLists.txt file provided with the example in order to compile correctly the example codes and link their executable with the gras library.
The following step should be done in order to compile an example : - source the GRAS_INSTALL_PREFIX/bin/gras-env.sh(csh) file (if not already done in bash(csh) configure scripts) - create an example_build directory where to build the example - from this directory type
cmake path_to_the_example_directory
make After the compilation the executable of the code is located in the example_build directory.
Examples gras/examples/magfield¶
The two examples example1 and example2 located in the directory examples/magfield illustrate the use of the magnetic field model manager that allows to define a magnetic field with interactive macros commands. Use of the examples and of the magnetic field model manager is described in the document gras/examples/magfield/doc/user_manual_bfield_manager.pdf.
Examples gras/examples/mulassis_geometry_biasing¶
Examples gras/examples/normalisation/automatic_normalisation¶
This example presents the different automatic normalisation modes available in GRAS. Thsse normalisation modes are described under the [wiki:UserGuide#normalisation section normalisation] of the user guide.
Run of the example in the no normalisation mode¶
In this mode no normalisation is considered. This run mode is executed by typing:
gras nonormalisation.g4mac
The results of the run are saved in the file nonormalisation.csv.
Run of the example in the per event normalisation mode¶
This run mode is executed by typing:
gras perevent_normalisation.g4mac
The results of the run are saved in the file perevent_normalisation.csv.
Run of the example in the geometric factor normalisation mode¶
This run mode is executed by typing:
gras geofactor_normalisation.g4mac
The results of the run are saved in the file geofactor_normalisation.csv.
Run of the example in the to fluence normalisation mode¶
This run mode is executed by typing:
gras tofluence_normalisation.g4mac
The results of the run are saved in the file tofluence_normalisation.csv.
Example gras/examples/radioprotection/ICRU_sphere¶
Example gras/examples/reverse_mc/simple_geometry¶
GRAS/trunk/r2242