$Id: README,v 1.6 2006/11/08 16:43:57 gunter Exp $
-------------------------------------------------------------------

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

                            ExampleN04
                            ----------

 ExampleN04 has a simplified collider detector geometry. This example
demonstrates the following features.

1. PYTHIA primary events.

 ExN04PrimaryGeneratorAction has G4HEPEvtInterface as the generator.
G4HEPEvtInterface accesses to "pythia_event.data", which contains three
events of Higgs generation produced by PYTHIA. "pythia_main.f" is an
example FORTRAN code of PYTHIA for generating this event sample.

2. Readout geometry

 ExN04DetectorConstruction defines a simplified collider detecor
geometry, tracker made of cylindrical tubes, calorimeter made of
cylindrical tubes, and muon trackers made of planes.
 Cylindrical calorimeter is made of tubes of lead and scintirator
without cut in phi nor z direction. Energy deposition in scintirator
is accumurated by ExN04CalorimeterSD sensitive detector, which has
a readout geometry to find the phi-z cell.

3. Physics processes

 The example uses the QGSP 'Educated guess physics list', which 
includes electro-magnetic and hadronic interactions. 

3.1 Compilation of the Hadronic Physics lists

 The compilation of the example N04 requires the previous compilation of 
the hadronic physics lists, they ARE automatically compiled together with 
the standard Geant4 libraries; you may disable building the physics lists 
by setting G4LIB_BUILD_LISTS to NO.
If you try to compile the example without the lists, you might probably 
get an error message during the linking phase, similar to the following:
"Linking exampleN04 ...
/usr/bin/ld: cannot find -lQGSP"

If they are not compiled, then you (or your Geant4 administrator)
can do it with the following steps:
a. Make sure the Geant4 environment variables G4LIB_BUILD_lists is NOT defined 
b. cd $G4INSTALL/source/physics_lists
c. gmake

4. Event filtering by the stacking mechanism.

 Higgs events in "pythia_event.data" have two lepton pairs produced
by the Higgs decay via Z0. At the first stage of each event, only the
primary muons are tracked without tracking secondaries. then the number
of hits on the muon trackers are examined. At the next stage, only
the primary charged particles are tracked only inside the barrel
tracking area and the isolation of the primary muons are examined.
At the third stage, all particles in the RoI (Region of Interest) along
the isolated muons are tracked. All these examinations are applied in
ExN04StackingAction.
  	
5. How to start
 
- compile and link to generate an executable
	% cd N04
	% gmake
	
- execute N04 in 'batch' mode from macro files
	% exampleN04   exampleN04.in
 		
- execute N04 in 'interactive mode' with visualization
	% exampleN04
	....
	Idle> type your commands. For instance:
	Idle> /run/beamOn 3
	....
	Idle> exit
