Back to home page

EIC code displayed by LXR

 
 

    


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

0001 \page ExampleTestEm14 Example TestEm14
0002 
0003   - How to compute cross sections from the direct evaluation of the mean
0004     free path.
0005   - How to plot final state of a process.   
0006   
0007 ## GEOMETRY DEFINITION
0008  
0009   It is a single box representing a 'semi infinite' homogeneous medium.
0010   Two parameters define the geometry :
0011   - the material of the box,
0012   - the (full) size of the box.
0013    
0014   The default geometry (100 m of water) is constructed in 
0015   DetectorConstruction, but the above parameters can be changed 
0016   interactively via the commands defined in DetectorMessenger.
0017    
0018 ## PHYSICS LIST
0019  
0020   The physics list contains the standard electromagnetic processes.
0021   In order not to introduce 'artificial' constraints on the step size, the
0022   multiple scattering is not instanciated, and all processes are
0023   registered as discrete : there is no continuous energy loss.  
0024     
0025 ## AN EVENT : THE PRIMARY GENERATOR
0026  
0027   The primary kinematic consists of a single particle starting at the edge
0028   of the box. The type of the particle and its energy are set in 
0029   PrimaryGeneratorAction (1 MeV gamma), and can be changed via the G4 
0030   build-in commands of G4ParticleGun class (see the macros provided with 
0031   this example).
0032    
0033 ## PHYSICS
0034  
0035   An event is killed at the first interaction of the incident paticle.
0036   The absorption length, also called mean free path, is computed as 
0037   the mean value of the track length of the incident particle.
0038   This is why the medium must be 'infinite' : to be sure that interaction
0039   occurs at any events.
0040   
0041   The result is compared with the 'input' data, i.e. with the cross
0042   sections stored in the PhysicsTables and used by Geant4.
0043   
0044   The energy spectrum and the angular distribution of the scattered
0045   particle (if any) and of the created secondaries are plotted (see
0046   SteppingAction).
0047    
0048   A set of macros defining various run conditions are provided.
0049   The processes are actived/inactived in order to survey the processes 
0050   individually.
0051 
0052 ## HISTOGRAMS
0053          
0054   The test contains 6 built-in 1D histograms, which are managed by the
0055   HistoManager class and its messenger, HistoMessenger. The histos can be individually 
0056   activated with the command :
0057   /analysis/h1/set id nbBins  valMin valMax unit 
0058   where unit is the desired unit for the histo (MeV or keV, etc..)
0059   (see the macros xxxx.mac).
0060  
0061    - 1 :     "scattered primary particle: energy spectrum"
0062    - 2 :     "scattered primary particle: costheta distribution"
0063    - 3 :     "charged secondaries: energy spectrum"
0064    - 4 :     "charged secondaries: costheta distribution"
0065    - 5 :     "neutral secondaries: energy spectrum"
0066    - 6 :     "neutral secondaries: costheta distribution"      
0067       
0068    The histograms are managed by the HistoManager class and its messenger, 
0069    HistoMessenger 
0070    The histos can be individually activated with the command :
0071 ```
0072 /analysis/h1/set id nbBins  valMin valMax unit 
0073 ```
0074    where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
0075    
0076    One can control the name of the histograms file with the command:
0077 ```
0078 /analysis/setFileName  name  (default testem14)
0079 ```
0080    
0081    It is possible to choose the format of the histogram file : root (default),
0082    hdf5, xml, csv, by changing the default file type in HistoManager.cc
0083        
0084    It is also possible to print selected histograms on an ascii file:
0085 ```
0086 /analysis/h1/setAscii id
0087 ```
0088    All selected histos will be written on a file name.ascii (default testem14) 
0089 
0090 ## VISUALIZATION
0091  
0092    The Visualization Manager is set in the main().
0093    The initialisation of the drawing is done via the commands
0094    /vis/... in the macro vis.mac. To get visualisation:
0095 ```
0096 > /control/execute vis.mac
0097 ```
0098    
0099    The detector has a default view which is a longitudinal view of the 
0100    box.
0101    
0102    The tracks are drawn at the end of event, and erased at the end of run.
0103   
0104 ## HOW TO START ?
0105  
0106   - Execute TestEm14 in 'batch' mode from macro files :
0107 ```
0108 % ./TestEm14   compt.mac
0109 ```
0110     
0111   - Execute TestEm14 in 'interactive mode' with visualization :
0112 ```
0113 % ./TestEm14
0114 Idle> control/execute vis.mac
0115 ....
0116 Idle> type your commands
0117 ....
0118 Idle> exit
0119 ```
0120   
0121   Macros provided in this example:
0122   - anni.mac:      e+ (100 MeV) on Aluminium
0123   - atomicDeexcitation: gamma (80 keV) on Tellurium 
0124   - compton.mac:   gamma (300 keV) on Aluminium
0125   - conv.mac:      gamma (20 MeV) on Lead
0126   - convtomu.mac:  gamma (100 TeV) on Iron  
0127   - electron.mac:  e- (100 MeV) on Aluminium
0128   - gamma.mac:     gamma (100 keV) on Water
0129   - photoelec.mac: gamma (80 keV) on Gold
0130   - proton.mac:    proton (100 MeV) on Water  
0131