Files
geant4/examples/extended/electromagnetic/TestEm5
2016-06-09 12:11:21 +02:00
..
2016-06-09 10:49:58 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 11:11:55 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 10:56:29 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 11:11:55 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 12:11:21 +02:00
2016-06-09 10:15:15 +02:00

$Id: README,v 1.13 2005/03/02 17:17:57 maire Exp $
-----------------------------------------------------

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

                            TestEm5   
                            -------
 The purpose of this example is to study the transmission, absorption and
 reflexion of particles through a single, thin or thick, layer of material.
 In perticular, the effects of the multiple scattering can be easily ploted.  
	
 1- GEOMETRY DEFINITION
 
 The "absorber" is a box made of a given material.                
 	
 Three parameters define the absorber :
 - the material of the absorber,
 - the thickness of an absorber,
 - the transverse size of the absorber (the input face is a square). 
    
 A volume "World" contains the "absorber". 

 In addition a transverse uniform magnetic field can be applied.
 	
 The default geometry is constructed in DetectorConstruction class, but all the
 parameters can be changed via commands defined in the DetectorMessenger class.
 The parameters of the "World" can be changed, too.
 	
 2- AN EVENT : THE PRIMARY GENERATOR
 
 The primary kinematic consists of a single particle which hits the absorber 
 perpendicular to the input face. The type of the particle and its energy are 
 set in the PrimaryGeneratorAction class, and can be changed via the G4 build-in
 commands of ParticleGun class (see the macros provided with this example).
	
 In addition one can choose randomly the impact point of the incident particle.
 The interactive command is built in PrimaryGeneratorMessenger class.
 
 3- VISUALIZATION
 
 The Visualization Manager is set in the main().
 The initialisation of the drawing is done via the commands in vis.mac
 In interactive session:
 PreInit or Idle > /control/execute vis.mac
 	
 The example has a default view which is a longitudinal view of the detector.
 	
 The tracks are drawn at the end of event, and erased at the end of run.
 Optionaly one can choose to draw all particles, only the charged, or none.
 This command is defined in EventActionMessenger class.
 
 4- TRACKING
 
 During the tracking, one can keep or not the secondaries : see StackingAction
 class and its Messenger.
 One can also limit 'by hand' the step lenght of the particle. As an example,
 this limitation is implemented as a 'full' process : see StepMax class and its
 Messenger. The 'StepMax process' is registered in the Physics List. 
  	
 5- DETECTOR RESPONSE
  	
 At the end of a run, from the histogram(s), one can study different
 physics quantities such as :
 - energy deposit in the absorber,
 - energy spectrum of secondaries at creation, 
 - energy spectrum and angle distribution of particles at exit,
 - transmission and backscattering coefficients,
 -  ...
 
 List of the built-in histograms
 -------------------------------
        
 The test contains 16 built-in 1D histograms, which are managed by the
 HistoManager class and its Messenger. The histos can be individually activated
 with the command :
 /testem/histo/setHisto id nbBins  valMin valMax unit 
 where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
 (see the macros xxxx.mac).
 
	1	"energy deposit in absorber"
	2	"energy of charged secondaries at creation"
	3	"energy of gammas at creation (log10(Ekin/MeV))"
	4	"(transmit, charged) : kinetic energy at exit"
	5	"(transmit, charged) : space angle at exit"
	6	"(transmit, charged) : projected angle at exit"
	7	"(transmit, charged) : projected position at exit"
	8	"(transmit, neutral) : kinetic energy at exit"
	9	"(transmit, neutral) : space angle at exit"
	10	"(transmit, neutral) : projected angle at exit"
	11	"(reflect , charged) : kinetic energy at exit"
	12	"(reflect , charged) : space angle at exit"
	13	"(reflect , charged) : projected angle at exit"
	14	"(reflect , neutral) : kinetic energy at exit"
	15	"(reflect , neutral) : space angle at exit"
	16	"(reflect , neutral) : projected angle at exit"

 The histograms can be viewed using PAW. See below the note on ANAPHE+AIDA.
 
 One can control the name of the histograms file with the command:
 /testem/histo/setFileName  name  (default testem5.hbook) 
 	
 Note that, by default, histograms are disabled. To activate them, uncomment 
 the flag G4ANALYSIS_USE in GNUmakefile. 	
 				
 6- GEANT4/GEANT3/DATA COMPARISON

 A Geant4/Geant3/exp. data comparison is given here for a few cases.
 These cases can be classified as follow:
 - e-/e+ incident particles versus protons and others. 
 - 3 energy regimes : low: < 1 MeV; medium: 1MeV -> few 10 MeV; high: > 100 MeV
 
 We indicate here the corresponding macros.
 
 	      |	low energy   |	medium energy	|  high energy
	--------------------------------------------------------
	e-+   |	berger.mac   |	hanson.mac      |
	      |		     |	kulchi.mac      |
	--------------------------------------------------------
	others|	bichsel.mac  | 	vincour.mac	|  shen1.mac shen2.mac
	      | 	     |	gottsch.mac	|  tramu.mac
	--------------------------------------------------------

 The relevant part of the GEANT3 code is in the subdirectory geant3 together 
 with the xxxx.dat input files.
	
 7- HOW TO START ?
 
 - compile and link to generate an executable
 	% cd TestEm5
 	% gmake
 		
 - execute TestEm5 in 'batch' mode from macro files e.g.
 	% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm5   myMacro.mac
		
 - execute TestEm5 in 'interactive' mode with visualization e.g.
 	% $(G4INSTALL)/bin/$(G4SYSTEM)/TestEm5
	Then type your commands, for instance :
	Idle> control/execute vis.mac
	Idle> run/beamOn 5
	....

 8- USING HISTOGRAMS
	
  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 		    
  To use histograms, at least one of the AIDA implementations should be 
  available (see http://aida.freehep.org).
  
 8a - PI 

  A package including AIDA and extended interfaces also using Python is PI, 
  available from: http://cern.ch/pi

  Once installed PI or PI-Lite in a specified local area $MYPY, it is required 
  to add the installation path to $PATH, i.e. for example, for release 1.2.1 of 
  PI:
  setenv PATH ${PATH}:$MYPI/1.2.1/app/releases/PI/PI_1_2_1/rh73_gcc32/bin

  CERN users can use the PATH to the LCG area on AFS.
  Before running the example the command should be issued:
  eval `aida-config --runtime csh`

 8b -  OpenScientist
 
  OpenScientist is available at http://www.lal.in2p3.fr/OpenScientist
  
  In OpenScientist, the AIDA implementation is the Lab package. 
  You have to "setup" this package before compiling (then with G4ANALYSIS_USE) 
  and running your Geant4 application.
   
  On UNIX you setup, with a csh flavoured shell : 
	csh> setenv CMTPATH <OpenScientist install path> 
	csh> source <OpenScientist install path>/Lab/<version>/cmt/setup.csh 
  On UNIX with a sh flavoured shell : 
	sh> CMTPATH=<OpenScientist install path>;export CMTPATH 
	sh> . <OpenScientist install path>/Lab/<version>/cmt/setup.sh 
  On Windows : 
	DOS> set CMTPATH=<OpenScientist install path> 
	DOS> call <OpenScientist install path>/Lab/<version>/cmt/setup.bat 

  You have to use the XML or root file formats ; producing hbook files is not 
  supported by OpenScientist/Lab. But the three formats (hbook, AIDA-XML, root) 
  are readable by the interactive applications ; the Lab onx interactive 
  program or the OpenPAW program. 

  With OpenPAW, someone can view the histograms with : 
	OS> opaw 
	opaw> h/file 1 run0.aida   (or opaw> h/file 1 run1.root) 
	opaw> zone 2 2 
	opaw> h/plot 1 
	opaw> h/plot 2 
	opaw> h/plot 3