$Id: README,v 1.2 2010-09-17 11:21:45 maire Exp $
-------------------------------------------------------------------

     =========================================================
     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
     =========================================================

                            rdecay01 
                            --------
			    
 Survey G4RadioactiveDecay process. See Physics Reference Manual, chapter 36.
 See also http://ie.lbl.gov/decay.html
 	
 1- Geometry construction
    ---------------------

 It is a simple box which represente an 'infinite' homogeneous medium.
  
 2- Physics list
    ------------

 PhysicsList.cc defines only G4RadioactiveDecay, Transportation processes,
 and relevant particle definitions.
 Therefore, once created, particles or ions travel as geantino.
         	
 3- Primary generator
    -----------------
 
 Default kinematic is an ion (Ne24), at rest, at coordinate origin.
 Can be changed with particleGun commands.
         	
 4- Physics
    -------
 As said above, all particles and ions behave as geantino, eg. no energy loss.
     
 A flag, /rdecay01/fullChain (false or true), allows to limit to
 single decay (default) or full decay chain.
 
 In case of full decay chain, TrackStatus of ions is set to fStopButAlive
 in order to force decay at rest.  
   
 At each decay, one counts and plots energy spectrum of created particles and
 ions, and energy-momentum balance of that decay.
 
 Total time of life of decay chain is plotted. Activity is computed.
 
 Few macros are given in example. Debug.mac is to be run in interactive mode. 
  	
 5- Visualisation
    -------------
 
 Visualization Manager is set in the main().
 Initialisation of the drawing is done via the commands
 /vis/.. in the macro vis.mac. This macro is automatically read from the main 
 in case of interactive running mode.
 
 e- red
 e+ blue
 nu_e white
 anti_nu_e white
 gamma green
 alpha yellow
 GenericIon grey
 
 6- How to start ?
    --------------
 
  - compile and link to generate an executable
 	% cd rdecay01
 	% gmake
 		
  - execute rdecay01 in 'batch' mode from macro files
 	% rdecay01   singleDecay.mac
 		
  - execute rdecay01 in 'interactive mode' with visualization
 	% rdecay01
 	....
 	Idle>   ---> type your commands. For instance:
	Idle> /control/execute debug.mac 
	....
	Idle> /run/beamOn 1
	....				
 	Idle> exit
	
 7- Histograms
    ----------
 
  rdecay01 produces several 1D histograms which are saved as
  rdecay01.root by default.

      1 : energy spectrum: e+ e-
      2 : energy spectrum: nu_e anti_nu_ev
      3 : energy spectrum: gamma
      4 : energy spectrum: alpha
      5 : energy spectrum: ions
      6 : total kinetic energy (Q)
      7 : momentum balance
      8 : total time of life of decay chain          
                            
   The histograms are managed by the HistoManager class and its Messenger. 
   The histos can be individually activated with the command :
   /rdecay1/histo/setHisto id nbBins  valMin valMax unit 
   where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
   
   One can control the name of the histograms file with the command:
   /rdecay1/histo/setFileName  name  (default particleGun)
   
   It is possible to choose the format of the histogram file (hbook, root, XML)
   with the command /rdecay1/histo/setFileType (root by default)
   
   It is also possible to print selected histograms on an ascii file:
   /rdecay1/histo/printHisto id
   All selected histos will be written on a file name.ascii (default RDecay1)

  Note that, by default, histograms are disabled. To activate them, uncomment
  the flag G4ANALYSIS_USE in GNUmakefile.
 
  Before compilation of the example it is optimal to clean up old files:
  	gmake histclean
  	gmake 

 8- Using histograms
    ---------------- 

  To use histograms, at least one of the AIDA implementations should be 
  available. See the file InstallAida.txt
  
