Warning, /geant4/examples/extended/physicslists/extensibleFactory/README.md is written in an unsupported language. File is not indexed.
0001 \page ExampleextensibleFactory Example extensibleFactory
0002
0003 \author R. Hatcher \n
0004 Fermilab \n
0005 (based on Hadr00 by V. Ivantchenko, CERN)
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 g4alt::G4PhysListFactory to build a concrete physics list.
0010
0011 Physics List can be defined by its name given by the -p argument of the of the
0012 run command or by the PHYSLIST environment variable.
0013
0014 ```
0015 ./extensibleFactory -m my.macro [ -p QGSP_BERT ] \
0016 [ -v | --verbose ] [ -h | --help ]
0017 ```
0018
0019 By default, FTFP_BERT Physics List will be instantiated if
0020 -p argument is not set and the PHYSLIST environment variable is not defined.
0021 This is the system default, but can be overridden using the
0022 SetDefaultReferencePhysList() method on the factory (see the code).
0023
0024 The extensible factory allows users to define and register their own physics
0025 lists. This example shows the addtional a new list "MySpecialPhysList".
0026
0027 ```
0028 ./extensibleFactory -m run.mac -p MySpecialPhysList
0029 ```
0030
0031 The extensible factory also allows for the extension of lists by adding
0032 (using "+" as a separator) or replacing (using "_" as a separator)
0033 specific physics constructors. These can be specified by
0034 pre-defining a short name (e.g. RADIO for G4RadioactiveDecayPhysics) or
0035 providing the full class name.
0036
0037 ```
0038 ./extensibleFactory -m run.mac -p FTFP_BERT_EMX+G4OpticalPhysics+RADIO
0039 ```
0040
0041 uses the FTFP_BERT physics list as a base
0042 - replaces the list's standard EM portion with
0043 G4EmStandardPhysics_option2 ( standard EMX extension )
0044 - adds G4OpticalPhysics
0045 - adds G4RadioactiveDecayPhysics (RADIO defined in code to map to this)
0046
0047 The same experimental setup is used for all examples in the physicslist category:
0048
0049 ## Detector description
0050
0051 The geometry (defined in the DetectorConstruction class) consists in a box
0052 of scintillator material (CsI) followed by a thin box of air (screen) which is used
0053 to simplify scoring.
0054
0055 ## Primary generator
0056
0057 The primary generator is defined with usage of G4ParticleGun.
0058 The default particle is proton which hits the box perpendicular to the input face.
0059 The type of the particle and its energy are set in the PrimaryGeneratorAction class, and can
0060 be changed via the G4 built-in commands of the G4ParticleGun class.
0061
0062
0063 ## Scoring (ntuples)
0064
0065 The screen volume is associated with a sensitive detector, ScreenSD,
0066 which accounts the following particle properties:
0067 - trackID
0068 - particle PDG encoding
0069 - particle kinetic energy
0070 - particle X,Y position
0071 - particle time
0072
0073 The scored quantities are filled in the Screen ntuple, which is defined using G4AnalysisManager
0074 in RunAction class. The ntuple is saved in a Root file, which name is set to be equal to the
0075 example name in main() function.
0076
0077 ## How to build
0078
0079 An additional step is needed when building the example with GNUmake
0080 due to using the extra shared directory:
0081 ```
0082 % cd path_to_example/example
0083 % gmake setup
0084 % gmake
0085 ```
0086
0087 This will copy the files from shared in the example include and src;
0088 to remove these files:
0089 ```
0090 % gmake clean_setup
0091 ```