
///\file "persistency/P03/.README.txt"
///\brief ExampleP03  README page

/*! \page ExampleP03  Example P03

This example illustrates the use of the text geometry. 

\section P03_s1 GEOMETRY EXAMPLES

Several examples of text geometries are provided:

g4geom_simple.txt :
- Simple construction of materials and single placements 

g4geom_matemixt.txt :
- Isotopes, elements and materials

g4geom_boolean.txt :
- Boolean solids
 
g4geom_reflections.txt :
- Reflections

g4geom_replicas.txt :
- Replicas

g4geom_divisions.txt :
- Divisions

g4geom_paramLinear.txt :
- Linear parameterisations

g4geom_paramSquare.txt :
- Square parameterisations

g4geom_assembly.txt : 
- Assembly placements

     	
\section P03_s2 HOW TO START ?
 
Execute textGeom in 'batch' mode from macro file 
\verbatim
% textGeom run.mac
\endverbatim
 		
It will read the geometry from a file named 'g4geom.txt', and it will create a
VRML2 file to visualise the geometry.
Therefore if you want to try any of the above-mentioned files, copy it to a
file with this name,

 	
\section P03_s3 DEFINING A SENSITIVE DETECTOR

The detector construction class ExTGDetectorConstructionWithSD shows how to
access a volume of the text geometry and assign to it a sensitive detector.
To use it, replace at exampleTextGeom.cc the line

\verbatim
runManager->SetUserInitialization(new ExTGDetectorConstruction);
\endverbatim

by

\verbatim
runManager->SetUserInitialization(new ExTGDetectorConstructionWithSD);
\endverbatim

and recompile.

It will use the geometry from the file 'g4geom_SD.txt'


\section P03_s4 MIXING TEXT AND C++ GEOMETRIES   

The detector construction class ExTGDetectorConstructionWithCpp shows how to
create a volume with C++ and place it in the world or inside a volume defined
in the text geometry.
To use it, replace at exampleTextGeom.cc the line

\verbatim
runManager->SetUserInitialization(new ExTGDetectorConstruction);
\endverbatim

by

\verbatim
runManager->SetUserInitialization(new ExTGDetectorConstructionWithCpp);
\endverbatim

and recompile.

It will use the geometry from the file 'g4geom_simple.txt'


\section P03_s5 CREATING NEW TAGS IN THE TEXT GEOMETRY: DEFINING CUTS PER REGION 

The detector construction class ExTGDetectorConstructionWithCuts, together with
ExTGRCLineProcessor, ExTGRCDetectorBuilder, ExTGRCRegionCutsMgr and
ExTGRCRegionData show how to add a couple of tags, ':REGION' and ':CUT', that
allow to define cuts per region in your input geometry text file. 
To use it, replace at exampleTextGeom.cc the line

\verbatim
runManager->SetUserInitialization(new ExTGDetectorConstruction);
\endverbatim

by

\verbatim
runManager->SetUserInitialization(new ExTGDetectorConstructionWithCuts);
\endverbatim

and recompile.

It will use the geometry from the file 'g4geom_cutsPerRegion.txt'


\section P03_s6 DUMP THE IN-MEMORY GEOMETRY TO TEXT FILE

The run action, ExTGRunAction, triggers the writing of the in-memory Geant4
geometry to a text file. 
To use it you just have to uncomment in exampleTextGeom.cc the line

\verbatim
runManager->SetUserAction(new ExTGRunAction);
\endverbatim

and it will read the geometry from the file 'g4geom.txt' and will write the
geometry in a file named 'geom.txt'

*/
