Warning, /geant4/examples/extended/physicslists/genericPL/README.md is written in an unsupported language. File is not indexed.
0001 \page ExamplegenericPL Example genericPL
0002
0003 \author W. Pokorski(1), I. Hrivnacova(2) \n
0004 (1) CERN \n
0005 (2) Institut de Physique Nucléaire (IPNO), Université Paris-Sud, CNRS-IN2P3
0006
0007 Examples in the physicslist category show the possible ways how to define
0008 a physics list from Geant4 physics constructors. This example demonstrates
0009 the usage of G4GenericPhysicsList to build the concrete physics list at
0010 the run time.
0011
0012 In Geant4 versions < 10.4, the generic physics list was demonstrated in the
0013 extended/hadronic/Hadr05 example.
0014
0015 The G4GenericPhysicsList class allows to build the physics list at the run
0016 time in two possible ways, either by processing a macro file
0017 containing the 'physics list' or by passing a vector of 'physics
0018 constructors' names to the constructor of the class.
0019
0020 To run the example you can call
0021
0022 ```
0023 ./genericPL -m run.mac [ -p FTFP_BERT.mac ]
0024 ```
0025
0026 where FTFP_BERT.mac is the macro file containing the 'physics list'.
0027
0028 If you run this example by calling
0029
0030 ```
0031 ./genericPL -m run.mac
0032 ```
0033
0034 the physics list will be constructed by using a vector of the names of
0035 the different physics constructor defined in the genericPL.cc file.
0036
0037 The same experimental setup is used for all examples in the physicslist category:
0038
0039 ## Detector description
0040
0041 The geometry (defined in the DetectorConstruction class) consists in a box of scintillator material (CsI) followed by a thin box of air (screen) which is used to simplify scoring.
0042
0043 ## Primary generator
0044
0045 The primary generator is defined with usage of G4ParticleGun.
0046 The default particle is proton which hits the box perpendicular to the input face.
0047 The type of the particle and its energy are set in the PrimaryGeneratorAction class, and can
0048 be changed via the G4 built-in commands of the G4ParticleGun class.
0049
0050
0051 ## Scoring (ntuples)
0052
0053 The screen volume is associated with a sensitive detector, ScreenSD,
0054 which accounts the following particle properties:
0055 - trackID
0056 - particle PDG encoding
0057 - particle kinetic energy
0058 - particle X,Y position
0059 - particle time
0060
0061 The scored quantities are filled in the Screen ntuple, which is defined using G4AnalysisManager
0062 in RunAction class. The ntuple is saved in a Root file, which name is set to be equal to the
0063 example name in main() function.
0064
0065 ## How to build
0066
0067 An additional step is needed when building the example with GNUmake
0068 due to using the extra shared directory:
0069 ```
0070 % cd path_to_example/example
0071 % gmake setup
0072 % gmake
0073 ```
0074
0075 This will copy the files from shared in the example include and src;
0076 to remove these files:
0077 ```
0078 % gmake clean_setup
0079 ```
0080