Back to home page

EIC code displayed by LXR

 
 

    


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

0001 \page ExampleTestEm1 Example TestEm1
0002 
0003   - How to count processes.
0004   - How to activate/inactivate processes.
0005   - How to survey the tracking, in particular the range of charged particles.
0006   - How to define a maximum step size.
0007         
0008 ## GEOMETRY DEFINITION
0009  
0010   It is a simple box which represents a 'semi infinite' homogeneous medium.
0011         
0012   Two parameters define the geometry :
0013    - the material of the box,
0014    - the full size of the box.
0015                 
0016   In addition a transverse uniform magnetic field can be applied.
0017         
0018   The default geometry is constructed in DetectorConstruction class, but all of 
0019   the above parameters can be changed interactively via the commands defined in 
0020   the DetectorMessenger class.
0021         
0022 ## PHYSICS LIST
0023 
0024   Physics lists are based on modular design. Several modules are instantiated:
0025   1. Transportation
0026   2. EM physics
0027   3. Decays
0028   4. StepMax - for step limitation
0029 
0030   EM physics builders can be local (eg. in this example) or from G4 kernel
0031   physics_lists subdirectory.
0032 
0033   Local physics builder:         
0034    - "local"      standard EM physics with current 'best' options setting.
0035                   these options are explicited in PhysListEmStandard
0036     
0037   From geant4/source/physics_lists/builders:     
0038    - "emstandard_opt0" recommended standard EM physics for LHC
0039    - "emstandard_opt1" best CPU performance standard physics for LHC
0040    - "emstandard_opt2" similar fast simulation
0041    - "emstandard_opt3" best standard EM options - analog to "local" above
0042    - "emstandard_opt4" best current advanced EM options standard + lowenergy
0043    - "emstandardSS"  standard EM physics and single scattering model
0044    - "emlivermore"  low-energy EM physics using Livermore data
0045    - "empenelope"   low-energy EM physics implementing Penelope models
0046    - "emlowenergy"  low-energy EM physics implementing experimental
0047                     low-energy models
0048              
0049   Physics lists and options can be (re)set with UI commands
0050     
0051   A few commands have been added to PhysicsList, in order to set the production
0052   threshold for secondaries for gamma and e-/e+.
0053   
0054 ## AN EVENT : THE PRIMARY GENERATOR
0055  
0056   The primary kinematic consists of a single particle starting at the left face 
0057   of the box. The type of the particle and its energy are set in the 
0058   PrimaryGeneratorAction class, and can be changed via the G4 build-in commands 
0059   of G4ParticleGun class (see the macros provided with this example).
0060         
0061   In addition one can choose randomly the impact point of the incident particle.
0062   The corresponding interactive command is built in PrimaryGeneratorMessenger.  
0063                                 
0064 ## VISUALIZATION
0065  
0066   The Visualization Manager is set in the main().
0067   The initialisation of the drawing is done via the commands /vis/... in the 
0068   macro vis.mac. To get visualisation:
0069 ```
0070 > /control/execute vis.mac
0071 ```
0072         
0073   The detector has a default view which is a longitudinal view of the box.
0074         
0075   The tracks are drawn at the end of event, and erased at the end of run.
0076         
0077 ## PHYSICS SURVEY
0078  
0079   The particle's type and the physics processes which will be available in this 
0080   example are set in PhysicsList class.
0081         
0082   A set of macros defining various run conditions are provided. The processes 
0083   are actived/inactivated together with differents cuts, in order to survey the
0084   processes one by one.
0085 
0086   The number of produced secondaries are counted, the number of steps, and the 
0087   number of process calls responsible of the step.
0088         
0089 ## HOW TO START ?
0090  
0091   - Execute TestEm1 in 'batch' mode from macro files
0092 ```
0093 % ./TestEm1   runs.mac
0094 ```
0095                 
0096   - Execute TestEm1 in 'interactive mode' with visualization
0097 ```
0098 % ./TestEm1
0099 ....
0100 Idle> type your commands
0101 ....
0102 Idle> exit
0103 ```
0104 
0105   Macros provided in this example:
0106   - brems.mac: Bremsstrahlung only
0107   - erange.mac: compute the csda range of primary particle
0108   - geantino.mac: geantino as primary particle
0109   - ionis.mac: Ionisation only
0110   - photoelec.mac: 100 keV photon photoelectric effect
0111   - radioactive.mac: use radioactive ion as primary particle
0112   - range.mac: compute the csda range of the primary particle
0113                with or without fluctuations
0114   - erange.mac, pRange.mac, alphaRange.mac, ionRange.mac: variants of range.mac
0115                to play with StepFunction()                     
0116   - runs.mac: electron 100 MeV; all processes
0117 
0118   Macros to be run interactively:
0119   - annihil.mac: To visualise 100 MeV e+ annihilation
0120   - decayinfly.mac: To visualise decay in fly of N16
0121   - etaDecay.mac: to visualise decay of eta particle
0122   - gammaconversion.mac: To visualise gamma conversion and e+ annihilation
0123   - photon.mac: To visualiza p300 keV photon beam
0124   - stepMax.mac: to test command /testem/stepMax
0125   - vis.mac: To activate visualization
0126 
0127 ## TRACKING : StepMax
0128  
0129   In order to control the accuracy of the deposition, the user can limit
0130   'by hand' the maximum  step size of charged particles.
0131   As an example, this limitation is implemented as a 'full' process :
0132   see StepMax class and its Messenger. The 'StepMax process' is registered
0133   in the Physics List. 
0134         
0135 ## HISTOGRAMS
0136  
0137   Testem1 produces several histo which are saved as testem1.root by default.
0138   Content of these histo:  
0139       - 1 : track length of primary particle
0140       - 2 : number of steps primary particle
0141       - 3 : step size of primary particle
0142       - 4 : total energy deposit
0143       - 5 : energy of charged secondaries at creation
0144       - 6 : energy of neutral secondaries at creation
0145       - 7 : NIEL energy
0146       - 8 : energy leakage
0147       - 9 : energy deposit + leakage
0148       
0149    The histograms are managed by G4AnalysisManager class and its Messenger. 
0150    The histos can be individually activated with the command :
0151    /analysis/h1/set id nbBins  valMin valMax unit 
0152    where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
0153    
0154    One can control the name of the histograms file with the command:
0155 ```
0156    /analysis/setFileName  name  (default testem1)
0157 ```
0158    
0159    It is possible to choose the format of the histogram file : root (default),
0160    hdf5, xml, csv, by changing the default file type in HistoManager.cc
0161      
0162    It is also possible to print selected histograms on an ascii file:
0163    /analysis/h1/setAscii id
0164    All selected histos will be written on a file name.ascii  (default testem1)