Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/electromagnetic/TestEm4/README is written in an unsupported language. File is not indexed.

0001 -------------------------------------------------------------------
0002 
0003      =========================================================
0004      Geant4 - an Object-Oriented Toolkit for Simulation in HEP
0005      =========================================================
0006 
0007                             TestEm4
0008                             -------
0009 
0010  Plot energy deposited by 9 MeV photon beam in an homogeneous medium.
0011         
0012  1- GEOMETRY DEFINITION
0013  
0014         It is a cylinder of 5 cm radius filled with C6F6.
0015         
0016  2- PHYSICS LIST
0017  
0018         The particle list contains only gamma, electron,positron.
0019         The physics list contains the 'standard' electromagnetic processes.
0020          
0021  3- AN EVENT : THE PRIMARY GENERATOR
0022  
0023         The primary kinematic is a single 9 MeV gamma randomly shooted at the
0024         middle of the cylinder. 
0025                                         
0026  4- VISUALIZATION
0027  
0028         The Visualization Manager is set in the main().
0029         The initialisation of the drawing is done via the commands
0030         /vis/.. in the macro vis.mac. This macro is
0031         automatically read from the main in case of interactive running mode.
0032         
0033         The detector has a default view which is a transversal view of the 
0034         cylinder.
0035         
0036         The tracks are drawn at the end of event, and erased at the end of run.
0037         Optionaly one can choose to draw all particles, only the charged one,
0038         or none. This command is defined in EventActionMessenger class.
0039         
0040  5- PHYSICS SURVEY
0041  
0042    The energy deposited in C6F6 is histogramed.
0043         
0044  6- HOW TO START ?
0045  
0046         - execute TestEm4 in 'batch' mode from macro files
0047                 % TestEm4   TestEm4.in
0048                 
0049         - execute TestEm4 in 'interactive mode' with visualization
0050                 % TestEm4
0051                 ....
0052                 Idle> type your commands
0053                 ....
0054                 Idle> exit
0055                 
0056          macro verbose.mac illustrate capability of verbosity           
0057 
0058  7- USING HISTOGRAMS
0059 
0060  The format of the histogram file can be : root (default),
0061  xml, csv, by selecting g4nnn.hh in RunAction.hh
0062 
0063  8- RANDOM NUMBERS HANDLING
0064  
0065    CLHEP provides several random number engines. In this example the Ranecu
0066    engine is choosen at beginning of the main (TestEm4.cc).
0067         
0068    By default, G4RunManager does not save the rndm seed.
0069    To do so the user must set in BeginOfRunAction:
0070    G4RunManager::GetRunManager()->SetRandomNumberStore(true);
0071         
0072    Then the rndm seed is systematically saved at beginning of run
0073    (currentRun.rndm) and beginning of event (currentEvent.rndm)
0074    Therefore, in case of abnormal end, the seed of the last event processed
0075    is available in currentEvent.rndm
0076         
0077    Even in case of normal run processing, the user may wish to preserve the
0078    rndm seed of selected events. At any time in the event, put the
0079    following statement:
0080    if (condition) G4RunManager::GetRunManager()->rndmSaveThisEvent();
0081    currentEvent.rndm will be copied to runXXevntYY.rndm
0082    (see SteppingAction::UserSteppingAction() )
0083         
0084    To restart a run from a given rndm seed, use the UI command :
0085    /random/resetEngineFrom  fileName 
0086         
0087    The macro rndmSeed.mac shows how to save and reset the random number
0088    seed between runs, from UI commands.