Geant4 Cross Reference |
1 ---------------------------------------------- 2 3 ========================================= 4 Geant4 - an Object-Oriented Toolkit for S 5 ========================================= 6 7 TestEm4 8 ------- 9 10 Plot energy deposited by 9 MeV photon beam in 11 12 1- GEOMETRY DEFINITION 13 14 It is a cylinder of 5 cm radius filled with 15 16 2- PHYSICS LIST 17 18 The particle list contains only gamma, elect 19 The physics list contains the 'standard' ele 20 21 3- AN EVENT : THE PRIMARY GENERATOR 22 23 The primary kinematic is a single 9 MeV gamm 24 middle of the cylinder. 25 26 4- VISUALIZATION 27 28 The Visualization Manager is set in the main 29 The initialisation of the drawing is done vi 30 /vis/.. in the macro vis.mac. This macro is 31 automatically read from the main in case of 32 33 The detector has a default view which is a t 34 cylinder. 35 36 The tracks are drawn at the end of event, an 37 Optionaly one can choose to draw all particl 38 or none. This command is defined in EventAct 39 40 5- PHYSICS SURVEY 41 42 The energy deposited in C6F6 is histogramed 43 44 6- HOW TO START ? 45 46 - execute TestEm4 in 'batch' mode from macro 47 % TestEm4 TestEm4.in 48 49 - execute TestEm4 in 'interactive mode' with 50 % TestEm4 51 .... 52 Idle> type your commands 53 .... 54 Idle> exit 55 56 macro verbose.mac illustrate capabili 57 58 7- USING HISTOGRAMS 59 60 The format of the histogram file can be : roo 61 xml, csv, by selecting g4nnn.hh in RunAction. 62 63 8- RANDOM NUMBERS HANDLING 64 65 CLHEP provides several random number engine 66 engine is choosen at beginning of the main 67 68 By default, G4RunManager does not save the 69 To do so the user must set in BeginOfRunAct 70 G4RunManager::GetRunManager()->SetRandomNum 71 72 Then the rndm seed is systematically saved 73 (currentRun.rndm) and beginning of event (c 74 Therefore, in case of abnormal end, the see 75 is available in currentEvent.rndm 76 77 Even in case of normal run processing, the 78 rndm seed of selected events. At any time i 79 following statement: 80 if (condition) G4RunManager::GetRunManager( 81 currentEvent.rndm will be copied to runXXev 82 (see SteppingAction::UserSteppingAction() ) 83 84 To restart a run from a given rndm seed, us 85 /random/resetEngineFrom fileName 86 87 The macro rndmSeed.mac shows how to save an 88 seed between runs, from UI commands.