//$Id$

///\file "parameterisations/gflash/.README.txt"
///\brief Example gflash README page

/*! \page Examplegflash Example gflash

This examples demonstrates the use of the GFLASH parameterisation library.
It uses the GFLASH equations (hep-ex/0001020, Grindhammer & Peters) 
to parametrise electromagnetic showers in matter. 
In this example the calorimeter is a simple cube,
which consists of 10 x 10 crystals of PbWO4 (CMS like).
The Geant4 shower framework is used (see also extended/parameterisation/Par01 example).

Geometry, sensitive detector, hits and fast simulation process are defined respectively in:
- ExGflashDetectorConstruction
- ExGflashSensitiveDetector
- ExGflashHit
- ExGflashPhysics

Briefly, whenever a e-/e+  enters the calorimeter, it is parametrised if it 
has a minimum energy and the shower is expected to be contained 
in the calorimeter(so called " parameterisation envelope").
If this is fullfilled the particle is killed, as well as all secondaries,
and the energy is deposited according to the GFLASH equations.

The example shows how to interface GFLASH to your application.
The simulation time is measured, so the user can see immiadiatly 
the speed up by using GFLASH. 
 
To use GFLASH the user has to implement the following:

- ExGflashPhysics::Construct(): \n
the parameterisation has to be added to the processmanager.
Don't forget it, since than gflash is never triggered.	
	
- ExGflashDetectorConstruction	: \n
Here GFLASH has to be initialized and assigend to the envelope,  
where it should be active (here our calorimeter = fCalo_log )
\verbatim
// **********************************************
// * Initializing shower modell
// ***********************************************
G4cout << "Creating shower parameterization models" << G4endl;
fFastShowerModel = new GFlashShowerModel("fFastShowerModel", fRegion);
fParameterisation = new GFlashHomoShowerParameterisation(pbWO4);
fFastShowerModel->SetParameterisation(*fParameterisation);
fParticleBounds = new GFlashParticleBounds();
fFastShowerModel->SetParticleBounds(*fParticleBounds);
fHitMaker = new GFlashHitMaker();
fFastShowerModel->SetHitMaker(*fHitMaker);
G4cout<<"end shower parameterization."<<G4endl;
// **********************************************
\endverbatim

- ExGflashSensitiveDetector: \n
It is mandatory to use G4VGFlashSensitiveDetector as (additionl) 
base class for the sensitive detector.
Here it is necessary to implement a seperate 
interface, where the GFlash spots are processed.
(ProcessHits(G4GFlashSpot*aSpot ,G4TouchableHistory* ROhist))
The separate interface is used, because the GFLASH spots contains
(naturally) less information than the full simulation. 
	
Note: Instead of particle gun the gps class is used here for
particle generation. 

*/  
