Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/electromagnetic/TestEm18/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                             TestEm18
0008                             --------
0009     This example allows to study the various contributions of the energy lost 
0010     by a charged particle in a single layer of an homogeneous material.
0011     See any textbook of interactions of charged particles with matter, in particular :
0012       1- geant4.web.cern.ch --> UserSupport --> Physics Reference Manual
0013       2- lappweb.in2p3.fr/~maire/tutorials/index.html
0014         
0015  1- GEOMETRY DEFINITION
0016  
0017     It is a simple cubic box of homogeneous material.
0018     Two parameters define the geometry :
0019         - the material of the box,
0020         - the thickness of the box.
0021         
0022     The default geometry (1 cm of water) is constructed in DetectorConstruction,
0023     but the above parameters can be changed interactively via the commands
0024     defined in DetectorMessenger.
0025         
0026  2- PHYSICS
0027  
0028     The physics list contains the 'standard' electromagnetic processes.
0029     However the MultipleScattering is not registered, in order to focuse on
0030     fluctuations of to energy loss alone.
0031                  
0032  3- BEAM
0033  
0034     The primary kinematic is a single particle starting at the edge
0035     of the box. The type of the particle and its energy are set in 
0036     PrimaryGeneratorAction (e- 10 MeV), and can be changed via the G4 
0037     build-in commands of ParticleGun class.
0038         
0039  4- RUN
0040  
0041     During the tracking of the incident particle, by default, the secondary 
0042     particles are immediately killed, after that their energy has been registered
0043     (see SteppingAction and StackingAction).
0044     Therefore, we study here the various components of the total energy lost
0045     by the incident particle, not the energy deposited in a layer of finite
0046     thickness.
0047     With the option /testEm/trackSecondaries one can compute and plot the energy
0048     deposited in the layer. See edep.mac
0049     
0050     At EndOfRun, the above results are compared with 'reference' values,
0051     i.e. the input data read from EnergyLoss and Range tables.
0052     See reference 2 : Energy-Range relation, slide 4.
0053 
0054  5- HISTOGRAMS
0055          
0056     The test contains 13 built-in 1D histograms, which are managed by
0057     G4AnalysisManager and its Messenger.
0058 
0059            1  step size of primary track
0060            2  energy continuously deposited along primary track
0061            3  energy transfered to secondaries by ionisation
0062            4  energy transfered to secondaries by Bremsstrahlung
0063            5  energy transfered to secondaries by (e+,e-) production
0064            6  total energy transfered to secondaries
0065            7  total energy lost by primary track
0066            8  total energy lost by primary track from energy balance
0067            9  energy continuously deposited along secondary tracks
0068           10  total energy deposited
0069           11  energy spectrum of gamma
0070           12  energy spectrum of e-
0071           13  energy spectrum of e+
0072 
0073     The histograms are defined in HistoManager.
0074         
0075     The histos can be activated individually with the command :
0076     /analysis/h1/set id nbBins valMin valMax unit
0077     where 'unit' is the desired unit for the histo (MeV or KeV, cm or mm, etc..)
0078                                                                   
0079     One can control the name of the histograms file with the command:
0080     /analysis/setFileName  name  (default testem18)
0081    
0082     It is possible to choose the format of the histogram file : root (default),
0083     xml, csv, by using namespace in HistoManager.hh
0084     For convenience, few simple Root macros are provided : plotHisto.C pixe.C             
0085     It is also possible to print selected histograms on an ascii file:
0086     /analysis/h1/setAscii id
0087     All selected histos will be written on a file name.ascii  (default testem18)
0088                                         
0089  6- VISUALIZATION
0090  
0091     The Visualization Manager is set in the main().
0092     The initialisation of the drawing is done via the commands
0093     /vis/... in the macro vis.mac. To get visualisation:
0094     > /control/execute vis.mac
0095         
0096     The detector has a default view which is a longitudinal view of the box.
0097     The tracks are drawn at the end of event, and erased at the end of run.
0098         
0099  7- HOW TO START ?
0100  
0101     execute TestEm18 in 'batch' mode from macro files :
0102         % TestEm18   electron.mac
0103                 
0104     execute TestEm18 in 'interactive mode' with visualization :
0105         % TestEm18
0106         Idle> control/execute vis.mac
0107         ....
0108         Idle> type your commands
0109         ....
0110         Idle> exit
0111         
0112  Macros provided in this example:
0113   - csda.mac: test independance of user step max
0114   - edep.mac: track secondary particles and plot energy deposited
0115   - electron.mac: e- (10 MeV) on 1 cm of water
0116   - ion.mac: ion C12 (4 GeV) on 1 cm of water
0117   - muon.mac: mu+ (1 TeV) on 1 m of water 
0118   - pixe.mac: proton (20 MeV) on 50 um of gold. Plot gamma pixe
0119   - proton.mac: proton (1 GeV) on 10 cm of water
0120   - plotHisto.C, pixe.C: Root macros 
0121 
0122   Macros to be run interactively:
0123   - vis.mac: To activate visualization