Back to home page

EIC code displayed by LXR

 
 

    


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

0001 \page ExampleHadr03 Example Hadr03
0002 
0003    - How to compute total cross section from the direct evaluation of the 
0004    mean free path ( see below, item Physics).
0005    - How to identify nuclear reactions.
0006    - How to plot energy spectrum of secondary particles.         
0007         
0008 ## GEOMETRY DEFINITION
0009  
0010    It is a single box representing a 'semi infinite' homogeneous medium.
0011    Two parameters define the geometry :
0012         - the material of the box,
0013         - the (full) size of the box.
0014         
0015    The default geometry (10 m of molybdenum) is built in DetectorConstruction,
0016    but the above parameters can be changed interactively via commands defined
0017    in DetectorMessenger.
0018         
0019 ## PHYSICS LIST
0020  
0021    The PhysicsList contains builders for hadronic interactions.
0022    Predefined G4 PhysicsConstructors or 'local' PhysicsConstructors can be used 
0023    (see geant4/source/physics_lists or example runAndEvent/RE04).
0024    
0025    In order not to introduce 'artificial' constraints on the step size,
0026    electromagnetic processes are not registered: there is no continuous energy 
0027    loss.  
0028  
0029    Several hadronic physics options are controlled by environment variables.
0030    To select them, see Hadr03.cc
0031          
0032 ## AN EVENT : THE PRIMARY GENERATOR
0033  
0034    The primary kinematic consists of a single particle starting at the edge
0035    of the box. The type of the particle and its energy are set in 
0036    PrimaryGeneratorAction (neutron 1 MeV), and can be changed via the G4 
0037    build-in commands of ParticleGun class (see the macros provided with 
0038    this example).
0039         
0040 ## PHYSICS
0041  
0042    An event is killed at the first interaction of the incident particle.
0043    The absorption length, also called mean free path, is computed as 
0044    the mean value of the track length of the incident particle.
0045    This is why the medium must be 'infinite' : to be sure that interaction
0046    occurs at any events.
0047         
0048    The result is compared with the 'input' value, i.e. with the cross sections
0049    given by G4HadronicProcessStore and used by Geant4.
0050    
0051    The list of nuclear reactions that occured is printed. 
0052    (the number of gamma of deexcitation is not printed).
0053       
0054    Then, comes the total list of generated particles and ions.  
0055    The energy spectrum of the scattered particle (if any) and of the created 
0056    secondaries are plotted (see SteppingAction).
0057    
0058    Momentum conservation is checked as :
0059 ```
0060    momentum balance = modulus(P_out - P_in)
0061 ```
0062         
0063    A set of macros defining various run conditions are provided.
0064    The processes can be actived/inactived in order to survey the processes 
0065    individually.
0066 
0067 ## HISTOGRAMS
0068          
0069    The test contains 13 built-in 1D histograms, which are managed by
0070    G4AnalysisManager and its Messenger. The histos can be individually 
0071    activated with the command :
0072    /analysis/h1/set id nbBins  valMin valMax unit 
0073    where unit is the desired unit for the histo (MeV or keV, etc..)
0074    (see the macros xxxx.mac).
0075    ```
0076      1    "kinetic energy of scattered primary particle"
0077      2    "kinetic energy of gamma"
0078      3    "kinetic energy of e-"   
0079      4    "kinetic energy of neutrons"
0080      5    "kinetic energy of protons"
0081      6    "kinetic energy of deuterons"
0082      7    "kinetic energy of alphas"
0083      8    "kinetic energy of nuclei"
0084      9    "kinetic energy of mesons"
0085      10   "kinetic energy of baryons"
0086      11   "Q = Ekin out - Ekin in"              
0087      12   "Pbalance = mag(P_out - P_in)"
0088      13   "atomic mass of nuclei"               
0089    ```   
0090    The histograms are managed by the HistoManager class and its Messenger. 
0091    The histos can be individually activated with the command :
0092 ```
0093 /analysis/h1/set id nbBins  valMin valMax unit 
0094 ```
0095    where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
0096    
0097    One can control the name of the histograms file with the command:
0098 ```
0099 /analysis/setFileName  name  (default Hadr03)
0100 ```
0101    
0102    It is possible to choose the format of the histogram file : root (default),
0103    xml, csv, by using namespace in HistoManager.hh
0104        
0105    It is also possible to print selected histograms on an ascii file:
0106 ```
0107 /analysis/h1/setAscii id
0108 ```
0109    All selected histos will be written on a file name.ascii (default Hadr03) 
0110                                         
0111 ## VISUALIZATION
0112  
0113    The Visualization Manager is set in the main().
0114    The initialisation of the drawing is done via the commands
0115    /vis/... in the macro vis.mac. To get visualisation:
0116 ```
0117 > /control/execute vis.mac
0118 ```
0119         
0120    The detector has a default view which is a longitudinal view of the box.
0121    The tracks are drawn at the end of event, and erased at the end of run.
0122         
0123 ## HOW TO START ?
0124  
0125    Execute Hadr03 in 'batch' mode from macro files :
0126 ```
0127 % ./Hadr03 inelastic.mac
0128 ```
0129                 
0130    Execute Hadr03 in 'interactive mode' with visualization :
0131 ```
0132 % ./Hadr03
0133 Idle> control/execute vis.mac
0134 ....
0135 Idle> type your commands
0136 ....
0137 Idle> exit
0138 ```
0139         
0140  Macros provided in this example:
0141   - hadr03.in: macro used in Geant4 testing
0142   - Au196.mac: neutron (1 MeV) on Au195
0143   - elastic.mac: proton (10 MeV) on Mo100. Elastic collisions alone
0144   - fusion.mac: deuteron (400 keV) on tritium  
0145   - gamma.mac: gamma (10 MeV) on Au196
0146   - inelastic.mac: proton (10 MaV) on Mo98. Inelastic interactions alone
0147   - ion.mac: Li7 (140 MeV) on Be9
0148   - nCapture.mac: neutron (1 eV) on Boron. Capture process alone
0149   - nFission.mac: neutron (1 eV) on U235.  Fission process alone
0150   - neutron.mac: neutron (1 MeV) on Boron 
0151     
0152  Macros to be run interactively:
0153   - debug.mac: proton (10 MeV) on Boron
0154   - vis.mac: To activate visualization