Geant4 Cross Reference |
1 ========================================= 2 Geant4 - an Object-Oriented Toolkit for S 3 ========================================= 4 5 6 Example extensibleFactory 7 8 R. Hatcher 9 Fermilab 10 (based on Hadr00 by V. Ivantchenko, CERN) 11 12 Examples in the physicslist category show the 13 a physics list from Geant4 physics constructor 14 the usage of g4alt::G4PhysListFactory to build 15 16 Physics List can be defined by its name given 17 run command or by the PHYSLIST environment var 18 19 ./extensibleFactory -m my.macro [ -p QGSP_B 20 [ -v | --verbose ] [ -h | --help ] 21 22 By default, FTFP_BERT Physics List will be ins 23 -p argument is not set and the PHYSLIST enviro 24 This is the system default, but can be overrid 25 SetDefaultReferencePhysList() method on the fa 26 27 The extensible factory allows users to define 28 lists. This example shows the addtional a new 29 30 ./extensibleFactory -m run.mac -p MySpecial 31 32 The extensible factory also allows for the ext 33 (using "+" as a separator) or replacing (using 34 specific physics constructors. These can be s 35 pre-defining a short name (e.g. RADIO for G4Ra 36 providing the full class name. 37 38 ./extensibleFactory -m run.mac -p FTFP_BERT 39 40 uses the FTFP_BERT physics list as a base 41 * replaces the list's standard EM portion wi 42 G4EmStandardPhysics_option2 ( standard 43 * adds G4OpticalPhysics 44 * adds G4RadioactiveDecayPhysics (RADIO defi 45 46 The same experimental setup is used for all ex 47 category: 48 49 1- Detector description 50 ----------------------- 51 52 The geometry (defined in the DetectorConstruct 53 scintillator material (CsI) followed by a thin 54 to simplify scoring. 55 56 57 2- Primary generator 58 -------------------- 59 60 The primary generator is defined with usage of 61 The default particle is proton which hits the 62 The type of the particle and its energy are se 63 be changed via the G4 built-in commands of the 64 65 66 3- Scoring (ntuples) 67 -------------------- 68 69 The screen volume is associated with a sensiti 70 which accounts the following particle properti 71 - trackID 72 - particle PDG encoding 73 - particle kinetic energy 74 - particle X,Y position 75 - particle time 76 77 The scored quantities are filled in the Screen 78 in RunAction class. The ntuple is saved in a R 79 example name in main () function. 80 81 4- How to build 82 ---------------- 83 84 An additional step is needed when building the 85 due to using the extra shared directory: 86 % cd path_to_example/example 87 % gmake setup 88 % gmake 89 90 This will copy the files from shared in the ex 91 to remove these files: 92 % gmake clean_setup 93