]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - html/Manual.html
This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / html / Manual.html
diff --git a/html/Manual.html b/html/Manual.html
new file mode 100644 (file)
index 0000000..b10fe82
--- /dev/null
@@ -0,0 +1,2413 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+   <TITLE> cmz code description for GALICE </TITLE>
+   <!-- Changed by: Yiota Foka, 18-Mar-1999 -->
+   <META NAME="rating" CONTENT="General">
+   <META NAME="objecttype" CONTENT="Manual">
+   <META NAME="keywords" CONTENT="
+software development, oo, object oriented">
+   <META NAME="description" CONTENT="
+GALICE - Geant3 based Simulation Environment">
+   <META NAME="GENERATOR" CONTENT="
+Mozilla/3.0Gold (X11; I; HP-UX B.10.20 9000/819) [Netscape]">
+
+   <STYLE TYPE="text/css">
+      H1 {font-style: italic ; color: green ; font-size: 24pt; align: center}
+      H2 {                     color: red   ; font-size: 22pt               }
+      H3 {                     color: blue  ; font-size: 20pt               }
+      H4 {                     color: violet; font-size: 18pt               }
+      H5 {                     color: olive ; font-size: 16pt               }
+      H6 {                     color: maroon; font-size: 14pt               }
+      TABLE { font-size: 14pt }
+   </STYLE>
+   <BASEFONT SIZE=4>
+<!-- Header material -->
+<hr>
+<table border=0   cellpadding=5 cellspacing=0 width="100%">
+  <tr bgcolor=#d0ffd0>
+      <td align=left width=30%>
+      <img alt="Alice" src="gif/Logo.gif" width="60" height="60" 
+         align="absmiddle" border=1>
+         <td align=center width=40%>
+          <font size="+2">
+           Alice Off-Line Project
+      </font>
+      <td align=right width=30% valign=bottom> 
+          <font size="-1">
+          <script language="JavaScript">
+             document.write("Last modified "+ document.lastModified)
+             // end of script -->
+          </script></font>
+      </td>
+  </tr>
+</table>
+<hr>
+
+</HEAD>
+
+<BODY TEXT="#000000" BGCOLOR="#FFFFFF" 
+LINK="#0000FF" VLINK="#551A8B" ALINK="#FF0000">
+
+<!=========================================================================>
+
+<P>
+<BR>
+<H1>
+ User Manual and Reference <A HREF="history.html#V2_04">(version 2.05)</A>
+</H1>
+
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+
+<H2><FONT COLOR=BLUE>
+<A NAME="Foreword">
+Foreword</FONT>
+</A>
+</H2>
+
+<P>The new version of GALICE has assembled in few months to be used for the
+Technical Design Report exercise. This has left little time to work on
+documentation. Therefore we invite readers of this page to provide
+comments, suggestions and complaints to the Simulation Mailing <A
+HREF="mailto:alice-sim@alice-lb.cern.ch">list</A>.
+
+<H2><FONT COLOR=BLUE>
+<A NAME="Content">
+Content</FONT>
+</A>
+</H2>
+
+<OL>
+<LI><A HREF="#1">Input Data Cards</A> 
+<OL TYPE="a">
+   <LI><A HREF="#1.1">User GEANT control cards</A>
+   <LI><A HREF="#1.2">GALICE specific control cards</A>
+</OL>
+<BR>
+<LI><A HREF="#2">The Cut File</A>
+<LI><A HREF="#3">The Lego option</A>
+<LI><A HREF="#4">Code description</A>
+<OL TYPE="a">
+   <LI><A HREF="#4.1">Content of galice.cmz</A>
+   <LI><A HREF="#4.2">FORTRAN coding Conventions</A>
+   <LI><A HREF="#4.3">Numbering and Names</A>
+   <LI><A HREF="#4.4">Common Block Description</A>
+   <LI><A HREF="#4.5">Routine Description</A>
+</OL>
+<BR>
+<LI><A HREF="#5">Output Format</A>
+<LI><A HREF="#6">ROOT Interface to Galice</A>
+<LI><A HREF="#7">Magnetic Field</A>
+<LI><A HREF="#8">Version History</A>
+</UL>
+
+
+Back to: 
+<A HREF="http://www1.cern.ch/ALICE/welcome.html">ALICE home</A>,
+<A HREF="http://www1.cern.ch/ALICE/Projects/offline/AliceOffLineHomePage.html">
+Offline home</A>,
+<A HREF="galice.html">
+GALICE home</A>.
+<BR><BR>
+
+<!=========================================================================>
+
+<HR>
+<BR>
+<H2>
+<A NAME="1">1. Input Data Cards
+</A>
+</H2>
+
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+
+<P> The data card file distributed with GALICE contains three categories of
+<A HREF="http://wwwinfo.cern.ch/asdoc/WWW/ffread/ffmain/ffmain.html">
+FFREAD</A> cards:
+
+<UL>
+
+<LI> Standard <A
+HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node21.html">GEANT control
+cards </A>.
+
+<LI> User <A HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node21.html">GEANT
+control cards </A>.
+
+<LI> Generic GALICE cards defined in the routine <A
+HREF="#SXKEY"><B>SXKEY</B></A>
+
+<li> Specific GALICE module cards, described in the single module <A
+HREF="Welcome.html#Detectors">pages</a>.
+
+</UL>
+
+<H3><FONT COLOR="#FF8050"><A NAME="1.1">1.1 User GEANT control cards</A></FONT></H3>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+<DL>
+<DT><KBD><A NAME="KINE">KINE</A></KBD>
+
+<DD><P>This is a standard GEANT data card, but the meaning of the different
+field is defind by the user. The first field is integer and the others floating
+point. Note that this is a mixed data cards, and it
+mandatory to input floating point numbers with a decimal point. In
+GALICE the meaning is the following:
+
+<DL>
+<DT><P><KBD>
+KINE   1      x      y     z   theta    phi   pmom part
+</KBD>
+
+<DD><P>One particle per trigger, starting from x, y, z with angles theta and
+phi, momentum pmom and particle type NINT(part). Angles are given in
+degrees.
+
+<DT><P><KBD>
+KINE   2    thmin  thmax phimin phimax pmin   pmax part  npart
+</KBD>
+
+<DD><P>NINT(npart) particles per trigger centered at the interaction point
+(SXIPXS) with theta, phi and p in the range (thmin,thmax), (phimin,phimax),
+(pmin,pmax) and particle type NINT(part). Angles are given in degrees.
+
+<DT><P><KBD>
+KINE -2   thmin  thmax phimin phimax pmean sigma part  npart
+</KBD>
+
+<DD><P>Same as before, but with a gaussian momentum distribution with average
+pmean and standard deviation sigma. Angles are given in degrees.
+
+<DT><P><KBD>
+KINE 3  parmin parmax thmin thmax phimin phimax pmin  pmax
+</KBD>
+
+<DD><P>Source is read from an external file in <A
+HREF="http://www-subatech.in2p3.fr/Sciences/Theorie/venus/venus.html">VENUS</A>
+format. Only accept particle with part, theta, phi, pmom in the range
+(parmin, parmax), (thmin, themax), (phimin, phimax) and (pmin, pmax) where
+part is the GEANT particle code. Angles are given in degrees. This interface is
+now obsolete and has been kept for backward compatibility only.
+
+<DT><P><KBD>
+KINE 4   thmin  thmax phimin phimax pmin   pmax npart
+</KBD>
+
+<DD><P><CODE>NINT(npart)</CODE> source particles are generated per event
+according to a pt and eta distribution which is parametrised on the SHAKER
+distribution. Angular and momentum cuts are possible with the same meaning
+than the previous cards.
+
+<DT><P><KBD>
+KINE 5   thmin  thmax phimin phimax pmin   pmax part
+</KBD>
+
+<DD><P>One particle of type <code>part</code> is generated per event
+according to a pt and eta distribution which is parametrised on the <a
+href="http://www-cdf.fnal.gov/cdf.html">CDF</a> data and <a
+href="http://www.thep.lu.se/tf2/staff/torbjorn/jetset/">PYTHIA</a>
+simulation. Code provided by Andreas Morsch (see ALICE notes <a
+href="http://consult.cern.ch/alice/Internal_Notes/1995/05/abstract">95-05</a>
+and <a
+href="http://consult.cern.ch/alice/Internal_Notes/1996/31/abstract">96-31</a>);
+decay is simulated only in phase space.  Only accept particle with theta,
+phi and pmom in the range (thmin, themax), (phimin, phimax) and (pmin,
+pmax). Angles are given in degrees.  The code of the particles is the
+following:
+
+<p>
+<table align=center>
+  <tr>
+    <th><code>part</code><th>Particle
+  <tr>
+    <td>113<td>J/Psi
+  <tr>
+    <td>114<td>Upsilon
+  <tr>
+    <td>115<td>Phi
+</table>
+
+</DL>
+</DL>
+
+<H3><FONT COLOR="#FF8050"><A NAME="1.2">1.2 GALICE specific control cards</A></FONT></H3>
+
+
+<DL>
+<DT><P><KBD>
+<A NAME="SXLEGO">
+SXLEGO  thmin   thmax  phimin  phimax rmin  rmax  zmax  nthe  nphi iflego
+</KBD>
+
+<DD><P>Activates LEGO option. See below for explanation of this option.
+GEANTINOS are shot in nthe bins in theta and nphi in phi with the above
+angular limitations, and statistics on the matter traversed is accumulated
+per r in the range (rmin,rmax) and z in the range (0, zmax).  iflego has to
+be set to 1 for the card to take effect.
+
+<DT><P><KBD>
+SXEVT ifirst
+</KBD>
+
+<DD><P>First even to be used when reading from file.
+
+<DT><P><KBD>
+<A NAME="SXnnn">
+SXnnn  OnOff  Gate   Version   Debug  TrackPrint  GeomDraw TrackDraw RAW/SPC  PAW
+</KBD>
+
+<DD><P>Steers the simulation of a module. nnn can be any of the currently
+implemented module names (see above). All values are integers.
+
+
+<P><TABLE BORDER WIDTH=80% ALIGN=CENTRE>
+<TR>
+   <TH>Flag <TH>Explanation
+<TR>
+   <TH>OnOff
+   <TD>0 the module is absent from the run 1 the module is present in the run
+<TR>
+   <TH>Gate
+   <TD>time gate in nanoseconds for the module
+<TR>
+   <TH>Version
+   <TD>version of the geometry. -1 is the default version, whichever is defined in
+the program
+<TR>
+   <TH>Debug
+   <TD>debug level for a module, can be 0, 1 or 2
+<TR>
+   <TH>TrackPrint
+   <TD>print flag for tracks, can be 0 or 1
+<TR>
+   <TH>GeomDraw
+   <TD>draw flag for the geometry, can be 0 or 1
+<TR>
+   <TH>TrackDraw
+   <TD>draw flag for the tracks, can be 0 or 1
+<TR>
+   <TH>RAW/SPC
+   <TD>0 do not output raw data and space points 1 output raw data and space points
+<TR>
+   <TH>PAW
+   <TD>level of paw output (0,1,2)
+</TABLE>
+
+<P>The meaning of these cards is largely module dependent.
+
+<DT><P><KBD>
+SXDCH idraw
+</KBD>
+
+<DD><P>Select charge of tracks to be drawn: idraw=100*ineg+10*ineut*ipos, where
+the track is drawn if the flag of the corresponding charge is 1.
+
+<DT><P><KBD>
+SXHID ihid
+</KBD>
+
+<DD><P>Hidden line removal (ihid 0=off, 1=on) for drawings.
+
+<A NAME="SXLUN">
+<DT><P><KBD>
+SXLUN input zebra spc paw draw rdb raw
+</KBD>
+
+<DD><P>Fortran logical unit numbers.
+
+<P><TABLE ALIGN=CENTRE WIDTH=80% BORDER>
+<TR>
+   <TH>Parameter <TH>Explanation
+<TR>
+   <TH>input
+   <TD>input unit for the event generator file containing the events as column
+wise ntuples (CWN)
+<TR>
+   <TH>zebra
+   <TD>output unit in zebra format for the /hits
+<TR>
+   <TH>spc
+   <TD>output unit for the raw space points (explained later)
+<TR>
+   <TH>paw
+   <TD>output unit for histograms and other paw objects
+<TR>
+   <TH>draw
+   <TD>output unit for metafile
+<TR>
+   <TH>rdb
+   <TD>input/output unit for initialisation data structures in RZ format. If positive
+the initialisation structures are written to disk, and if negative they are read
+from disk.
+<TR>
+    <TH>raw
+    <TD>logical unit for writing raw data information (not used yet)
+</TABLE>
+
+<DT><P><KBD>
+SXWKS imeta
+</KBD>
+
+<DD><P>Workstation type of graphics output. See the <A
+HREF="http://wwwcn.cern.ch/asdoc/higz/HIGZMAIN.html">HIGZ</A>
+manual for more information.
+
+<DT><P><KBD>
+SXIPX  X Y Z
+</KBD>
+
+<DD><P>Sigma in (X,Y,Z) (cm) on interaction point position.
+
+<DT><P><KBD>
+<A NAME="SXFLD">SXFLD</A>  ISXFLD  ISXFMAP   SXMAGN    SXMGMX
+</KBD>
+
+<DD><P>Defines the magnetic field to be used:
+
+<P><TABLE BORDER WIDTH=80% ALIGN=CENTRE>
+<TR>
+   <TH>Flag <TH>Explanation
+<TR>
+   <TH>ISXFLD
+   <TD>Magnetic field transport flag 0=no field, 1=Runge Kutta, 2=helix
+<TR>
+   <TH>ISXFMAP
+   <TD>Magnetic field map version (see <a href="#7">later</a>)
+<TR>
+   <TH>SXMAGN
+   <TD>Scale factor for the magnetic field
+<TR>
+   <TH>SXMGMX
+   <TD>Maximum value for the magnetic field
+</TABLE>
+
+<DT><P><KBD>
+<a name="SXHACC">SXHACC</a> isxhacc
+</KBD>
+
+<DD><P>Selects acceptance of heavy particles decay in muon chambers: when
+<code>isxhacc</code> is different from zero, Galice keeps only events with
+both muons in the 2-9 degrees window.
+
+<DT><P><KBD>
+<a name="SXTREE">SXTREE</a> chtree
+</KBD>
+
+<DD><P>Selects the Root trees that are written onto the Root output file. One letter
+selects one tree:
+
+<p><table align=center border=yes>
+<tr>
+   <th> Letter <th> Tree
+<tr>
+   <td> E  <td> Event Header Tree
+<tr>
+   <td> K  <td> Event Kinematic Tree
+<tr>
+   <td> H  <td> Hits Tree
+<tr>
+   <td> D  <td> Digits Tree
+</table>
+
+<DT><P><KBD>
+SXVAC  ivac
+</KBD>
+
+<DD><P>Selects the material of the Alice mother volume (1 vacuum, 0 air).
+
+<DT><P><KBD>
+SXMAXD sxrmax sxzmax
+</KBD>
+
+<DD><P>Tracking stops if the radius is larger than SXRMA or the absolute value
+of z is larger than SXZMA.
+
+</DL>
+
+<P>Module specific control cards can be defined via the <A
+HREF="#DETMOD">nnn_FKEY</A> routines.
+
+
+<!===================================================================================>
+<P>
+<HR>
+<BR>
+<H2>
+<A NAME="2">2. The Cut file
+</A></FONT>
+</H2>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+
+<P>In the simulation of the transport of radiation in matter it is
+important to be able to change the energy cuts of the different particles
+and the physic processes
+for each tracking medium. In GEANT 3.21 this is done by setting the <A
+HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node68.html">parameters</A>
+directly in the code. To allow changing these parameters without
+recompiling, a file, if it exists, is read in at initialisation time, where
+the energy thresholds and the flags for the different physics processes
+can be specified for each tracking medium.
+
+<P>The format of the file is the following:
+
+<P><KBD>
+ITMED GAM ELE NH CH MU EBR MBR EDEL MUDEL MUPA ANNI BREM COMP DRAY
+       LOSS MULS PAIR PHOT RAYL
+</KBD>
+
+<P>Where
+
+<P><TABLE ALIGN=CENTER BORDER WIDTH=80%>
+<TR>
+   <TH>Field <TH>Meaning
+<TR>
+   <TH>ITMED
+   <TD>user tracking medium number, i.e. the position in the array
+<A HREF="#SCXDB">IDTMED</A> where the actual tracking medium number
+has been returned by the routine <A HREF="#SXSTME">SXSTME</A>.
+<TR>
+   <TH>GAM
+   <TD>(REAL) Photon transport threshold
+<TR>
+   <TH>ELE
+   <TD>(REAL) Electron/positron transport threshold
+<TR>
+   <TH>NH
+   <TD>(REAL) Neutral hadrons transport threshold
+<TR>
+   <TH>CH
+   <TD>(REAL) Charged hadrons transport threshold
+<TR>
+   <TH>MU
+   <TD>(REAL) Muon transport threshold
+<TR>
+   <TH>EBR
+   <TD>(REAL) Electron/positron energy threshold for bremstrahlung production
+<TR>
+   <TH>MUBR
+   <TD>(REAL) Muon energy threshold for bremstrahlung
+<TR>
+   <TH>EDEL
+   <TD>(REAL) Electron/positron energy threshold for delta rays production
+<TR>
+   <TH>MUDEL
+   <TD>(REAL) Muon energy threshold for delta rays production
+<TR>
+   <TH>MUPA
+   <TD>(REAL) Muon energy threshold for direct pair production
+<TR>
+   <TH>ANNI
+   <TD>(INTEGER) Positron annihilation flag
+<TR>
+   <TH>BREM
+   <TD>(INTEGER) Bremstrahlung flag
+<TR>
+   <TH>COMP
+   <TD>(INTEGER) Compton scattering flag
+<TR>
+   <TH>DRAY
+   <TD>(INTEGER) Delta Ray flag
+<TR>
+   <TH>LOSS
+   <TD>(INTEGER) Energy loss flag
+<TR>
+   <TH>MULS
+   <TD>(INTEGER) Multiple scattering flag
+<TR>
+   <TH>PAIR
+   <TD>(INTEGER) Pair production flag
+<TR>
+   <TH>PHOT
+   <TD>(INTEGER) Photelectric effect flag
+<TR>
+   <TH>RAYL
+   <TD>(INTEGER) Rayleigh scattering flag
+</TABLE>
+
+<P>The first 10 paremeters are energy cuts, and should be entered as
+floating point numbers. Energies are kinetic, and should be entered in GeV.
+The remaining 9 numbers are integers. A negative value is ignored.  The
+file name is fixed: <B>galice.cuts</B>.
+
+<P><EM>Please note</EM>: when reading the initialisation data structure
+from disk (triggered when the rdb parameter in <A HREF="#SXLUN">SXLUN</A>
+data card is negative) the galice.cuts file is not read.  So any change
+will remain ineffective. If cuts need to be changed, then the
+initialisation data structure needs to be recreated.
+
+<!===================================================================================>
+<HR>
+<BR>
+<H2><FONT COLOR=BLUE>
+<A NAME="3">3. The LEGO Option
+</A></FONT>
+</H2>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+
+<P>This transport option allows to evaluate the material budget from a
+given radius to the surface of an arbitrary cylinder along radial
+directions from the centre. When the <A HREF="#SXLEGO"><B>SXLEGO</B></A>
+data card is specified, the normal event generation and transport cycle is
+altered.  In this case Galice will produce only nthe times nphi
+events. Each event is composed by a single primary track, a <A
+HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node72.html">geantino</A>,
+corresponding to GEANT particle code 48, with unit momentum and angle at
+regular intervals between phimin and phimax and themin and
+themax.
+
+<P>Geantinos are produced at the origin and then moved at the surface
+of a cylinder of radius rmin, where they start being transported. If rmin=0
+geantinos start from the origin. Geantinos are stopped when they reach the
+surface of a cylinder of radius rmax and half length in z zmax.
+
+<P> At the beginning of the job, three double
+dimensional plots are created with nphi times nthe bins:
+
+<P><TABLE WIDTH=50% ALIGN=CENTER>
+<TR>
+   <TD>-100<TD>Radiation length map
+<TR>
+   <TD>-101<TD>Interaction length map
+<TR>
+   <TD>-102<TD>g/cm2 length map
+</TABLE>
+
+<!===================================================================================>
+<HR>
+<BR>
+<H2><FONT COLOR=BLUE>
+<A NAME="4">4. Code description
+</A></FONT>
+</H2>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+<P>The code of GALICE is composed by two parts. One is a set of FORTRAN routines
+in the framework of GEANT and the other is a set of C++ routines that constitute
+the interface with ROOT. The FORTRAN code is contained in a single 
+<A HREF="http://wwwcn.cern.ch/cmz/index.html">cmz</A> file called
+galice.cmz, while the C++ code is contained in a set of file and headers 
+that are managed by a makefile.
+
+<H3><FONT COLOR="#FF8050"><A NAME="4.1">4.1 Content of galice.cmz</A></FONT></H3>
+
+<H4><FONT COLOR="#008800">4.1.1 cmz flags</FONT></H4>
+
+<P><TABLE>
+<TR>
+   <TH>ROOTIO<TD>         Activates the ROOT interface.
+</TABLE>
+
+<H4><FONT COLOR="#008800"><A NAME="4.1.2">4.1.2 Patches in GALICE</A></FONT></H4>
+
+<P>The code is divided in modules, each one describing a part of the
+experiment. The code relevant to each module is kept in a dedicated cmz
+directory, called PATCH.  Each module is composed by one or more routines,
+which are called at different times during the execution of the program and
+perform different actions related to the module. They are contained in
+dedicated to the module DECKs which compose the corresponding PATCH, as can
+be seen for the <A HREF="gif/cmzdirectories.gif">TPC</A>.
+
+<P>The code contains the following patches:
+
+<P><TABLE WIDTH=80% ALIGN=CENTER>
+<TR>
+  <TH ALIGN=LEFT> Patch <TH ALIGN=LEFT>Content
+<TR>
+  <TH ALIGN=LEFT>$VERSION       
+  <TD>Standard cmz PATCH containing version control information.
+<TR>
+  <TH ALIGN=LEFT>WRITEUP        
+  <TD>Description of the program (this file).
+<TR>
+  <TH ALIGN=LEFT>HISTORY        
+  <TD>The modification log.
+<TR>
+  <TH ALIGN=LEFT>$KUMACS        
+  <TD>The macros needed to install the program.
+<TR>
+  <TH ALIGN=LEFT>DATA           
+  <TD>Examples of data cards and cut files.
+<TR>
+  <TH ALIGN=LEFT>EXAMPLES       
+  <TD>Examples of run decks.
+<TR>
+  <TH ALIGN=LEFT>*GALICE        
+  <TD>Pilot patch for the standalone version of GALICE.
+<TR>
+  <TH ALIGN=LEFT>*ALIROOT       
+  <TD>Pilot patch for the ROOT I/O version of GALICE.
+<TR>
+  <TH ALIGN=LEFT>GCDES          
+  <TD>GEANT common blocks
+<TR>
+  <TH ALIGN=LEFT>GALICE         
+  <TD>Main programs.
+<TR>
+  <TH ALIGN=LEFT>GUCODE         
+  <TD>GEANT user routines.
+<TR>
+  <TH ALIGN=LEFT>STEER          
+  <TD>Steering routines for GALICE.
+<TR>
+  <TH ALIGN=LEFT>ITS            
+  <TD>Description of the Inner Tracking System
+<TR>
+  <TH ALIGN=LEFT>MAG            
+  <TD>Description of the L3 magnet.
+<TR>
+  <TH ALIGN=LEFT>TPC            
+  <TD>Description of the Time Projection Chamber
+<TR>
+  <TH ALIGN=LEFT>TOF            
+  <TD>Description of the Time Of Flight apparatus
+<TR>
+  <TH ALIGN=LEFT>PMD
+  <TD>Description of the Photon Multiplicity Detector
+<TR>
+  <TH ALIGN=LEFT>PHOS           
+  <TD>Description of the Photon Detector
+<TR>
+  <TH ALIGN=LEFT>RICH           
+  <TD>Description of the HMPID Rich detector
+<TR>
+  <TH ALIGN=LEFT ALIGN=LEFT>MUON           
+  <TD>Description of the Muon Chambers in the Muon Arm
+<TR>
+  <TH ALIGN=LEFT>FRAME          
+  <TD>Description of the Support Frame for the TPC
+<TR>
+  <TH ALIGN=LEFT>CASTOR         
+  <TD>Description of the Castor detector
+<TR>
+  <TH ALIGN=LEFT>FMD            
+  <TD>Description of the Forward Multiplicity Detector
+<TR>
+  <TH ALIGN=LEFT>SUCODE         
+  <TD>Dummy user routines
+<TR>
+  <TH ALIGN=LEFT>HALL           
+  <TD>Description of the experimental hall
+<TR>
+  <TH ALIGN=LEFT>ABSO           
+  <TD>Description of the Muon Absorber
+<TR>
+  <TH ALIGN=LEFT>SHIL           
+  <TD>Description of the Muon Arm Shield
+<TR>
+  <TH ALIGN=LEFT>DIPO           
+  <TD>Description of the Dipole Magnet
+<TR>
+  <TH ALIGN=LEFT>TRD            
+  <TD>Description of the Transition Radiation Detector
+<TR>
+  <TH ALIGN=LEFT>PIPE           
+  <TD>Description of the Beam Pipe
+<TR>
+  <TH ALIGN=LEFT>LEGO           
+  <TD>Routines needed for the LEGO option
+<TR>
+  <TH ALIGN=LEFT>MISC           
+  <TD>Miscellaneous routines
+<TR>
+  <TH ALIGN=LEFT>DUMMIES        
+  <TD>Dummy routines
+<TR>
+  <TH ALIGN=LEFT>GPATCH         
+  <TD>Corrections for GEANT 3.21
+<TR>
+  <TH ALIGN=LEFT>GDEBUG         
+  <TD>Debug version of GEANT 3.21 routines
+<TR>
+  <TH ALIGN=LEFT>ROOTIO         
+  <TD>Code specific for ROOT I/O
+<TR>
+  <TH ALIGN=LEFT>LAST           
+  <TD>Last PATCH
+</TABLE>
+
+<!====================================================================================>
+
+<H3><FONT COLOR="#FF8050"><A NAME="4.2">4.2 FORTRAN Coding Conventions</A></FONT></H3>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+
+<P>Some simple coding conventions have been adopted. Only standard ANSI
+Fortran 77 is accepted with the following Fortran 90 compatible extensions:
+<UL>
+<LI> Names of SUBROUTINES and VARIABLES with a maximum of 20 characters.</LI>
+<LI> Names of COMMON blocks with a maximum of 8 characters.</LI>
+<LI> Use of DO WHILE ... ENDDO structures.</LI>
+<LI> The use of IMPLICIT NONE.</LI>
+</UL>
+
+<P>FORTRAN statements are written in CAPITALS. Comment lines start with a
+CAPITAL C or * while the rest of the comment line can be written in mixed
+case. The use of explicit type defintion in combination with <CODE>IMPLICIT
+NONE</CODE> is recommended but not enforced. In any case variable names
+should follow the implicit typing of FORTRAN:
+
+<P><TABLE ALIGN=CENTER WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT>Type <TH ALIGN=LEFT>Coding
+<TR>
+   <TH ALIGN=LEFT>INTEGER <TD>Variable name starts with I-N
+<TR>
+   <TH ALIGN=LEFT>REAL    <TD>Variable names starts with A-H or O-Z
+<TR>
+   <TH ALIGN=LEFT>CHARACTER <TD>Variable name starts with CH
+<TR>
+   <TH ALIGN=LEFT> LOGICAL  <TD>Variable name starts with L
+<TR>
+   <TH ALIGN=LEFT>DOUBLE PRECISION <TD>Variable name starts with D
+</TABLE>
+
+<P>This allows the detector space point data to be directly entered into
+the SPC data CWN and also the type of routines/functions arguments can be
+checked directly from the variable names by compiler utilities and/or CMZ.
+
+<P> We strongly encourage the users developing code to follow these rules.
+
+
+
+<!================================================================================>
+
+<H3><FONT COLOR="#FF8050"><A NAME="4.3">4.3 Numbering and Names</A></FONT></H3>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+<P>Each module has a name, a number and a one letter code:
+
+<P><TABLE ALIGN=CENTER WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT>Description <TH ALIGN=LEFT>Name <TH ALIGN=LEFT>Number <TH ALIGN=LEFT>Code
+<TR>
+   <TH ALIGN=LEFT>Inner Tracking System <TD>ITS <TD>2 <TD>I
+<TR>
+   <TH ALIGN=LEFT>L3 magnet <TD>MAG <TD>3 <TD>M
+<TR>
+   <TH ALIGN=LEFT>Time Projection Chamber <TD>TPC <TD>4 <TD>T
+<TR>
+   <TH ALIGN=LEFT>Time Of Flight apparatus <TD>TOF <TD>5 <TD>F
+<TR>
+   <TH ALIGN=LEFT>Photon Multiplicity Detector <TD>PMD <TD>6 <TD>W
+<TR>
+   <TH ALIGN=LEFT>Photon Detector <TD>PHOS <TD>7 <TD>P
+<TR>
+   <TH ALIGN=LEFT>Zero Degree Calorimeter <TD>ZDC <TD>8 <TD>Z
+<TR>
+   <TH ALIGN=LEFT>Forward Multiplicity Detector <TD>FMD      <TD>9      <TD>G
+<TR>
+   <TH ALIGN=LEFT>HMPID Rich detector <TD>RICH <TD>10 <TD>R
+<TR>
+   <TH ALIGN=LEFT>Muon Chambers in the Muon Arm <TD>MUON <TD>11 <TD>C
+<TR>
+   <TH ALIGN=LEFT>Support Frame for the TPC <TD>FRAME <TD>12 <TD>B
+<TR>
+   <TH ALIGN=LEFT>Transition Radiation Detector <TD>TRD <TD>13 <TD>U
+<TR>
+   <TH ALIGN=LEFT>Castor detector <TD>CASTOR <TD>15 <TD>S
+<TR>
+   <TH ALIGN=LEFT>Muon Absorber <TD>ABSO <TD>16 <TD>A
+<TR>
+   <TH ALIGN=LEFT>Muon Arm Shield <TD>SHIL <TD>17 <TD>Y
+<TR>
+   <TH ALIGN=LEFT>Dipole Magnet <TD>DIPO <TD>18 <TD>D
+<TR>
+   <TH ALIGN=LEFT>Experimental hall <TD>HALL <TD>19 <TD>H
+<TR>
+   <TH ALIGN=LEFT>Beam Pipe <TD>PIPE <TD>20 <TD>Q
+</TABLE>
+
+<P>The detector module  numbers are contained in PARAMETERs called <VAR> 
+ID_nnn</VAR> in sequence <A HREF="#SCXDB">SCXDB</A>.
+
+<P>To each module is assigned a range of integers:  
+
+<P><CENTER><CODE>ID_nnn*100->ID_nnn*100+99</CODE></CENTER>
+
+<P>thad is used throughout the program every time a detector identifier is
+needed.  We will refer to this range as the <EM>module range</EM>. The
+modules specific letter will be hereon indicated with <I>char</I>.
+
+<P>The ROUTINES in the different modules are called <VAR>nnn_fff</VAR>, 
+where <VAR>nnn</VAR> is the name of the module:
+ITS, MAG, TPC, TOF, PMD, PHOS, RICH, MUON, FRAME, CASTOR, FMD, HALL, 
+ABSO, SHIL, DIPO, TRD, PIPE.
+
+<P>When several version of a given module are present, a routine may act as
+a switchyard, to version-specific routines where the last letter is
+replaced by a digit. So if there are 2 version of the TPC, the routine
+TPC_GEOM would just call TPC_GEO0 or TPC_GEO1 according to the version
+chosen for the run.
+
+<P>The complete code referring to a certain detector has to be contained in
+1 patch with the structure:
+
+<PRE>
+ +PATCH,name.          Contains the code related to module 'nnn'
+ +DECK,CDES.           Contains the private KEEP sequences
+ +DECK,nnn_fff.        Contains the code of routine 'nnn_fff'
+</PRE>
+
+<P>Example:
+
+<PRE>
+
+      +PATCH,TOF.
+
+      +DECK,CDES.
+      +KEEP,T_START.
+            COMMON /S_START/ JCOUNT,MOD_FIRST
+      C
+      +KEEP,T_SPC.
+            PARAMETER (MAX6=1000)
+            COMMON /SCXSCR/ NHIT6,IROW6(MAX6),ICOL6(MAX6),IADC6(MAX6)
+      C
+
+      +DECK,TOF_INIT.
+            SUBROUTINE TOF_INIT
+      C
+      +CDE,T_START.
+      C
+      *
+            END
+
+      +DECK,TOF_DIGT.
+            SUBROUTINE TOF_DIGT
+      C
+      +CDE,T_SPC.
+      C
+      *
+            END
+</PRE>
+
+<P>These patches are in the <B>galice.cmz</B> file as described in the <A
+HREF="#4.1.2"> layout </A> of the galice.cmz file.
+
+<P>Any printout message should contain the name of the routine which produced
+it. The recommended way to produce printouts is the FORTRAN WRITE
+instruction. The nnn_INIT and nnn_END routines must printout a message with
+the name of the detector.
+
+<P>The dummy SU <A HREF="#SUCODE">routines</A> may be used to test out new
+component simulation packages.  Note that these routines are always called,
+irrespective of the FFREAD data cards selections.
+
+<P>Each module can create private histograms and/or ntuples to investigate
+its performance.  All this HBOOK/PAW activity must be under the control of
+the flags related to the <A HREF="#SXnnn">SXnnn</A> FFREAD data cards.
+
+<P>Examples of actions in the module routines are:
+
+<P><UL>
+<LI>Book the histograms/ntuples in the nnn_INIT routines into the //GALICE
+HBOOK directory with a unique identifier, e.g.:
+
+<P><CENTER>CALL HBOOKN(IDN,'...',...,'//GALICE',...,...)</CENTER>
+
+<P>where IDN stands for the HBOOK identifier with the convention:
+
+<P><TABLE ALIGN=CENTER>
+<TR>
+   <TH ALIGN=LEFT>IDN <TD>     1000*J+N
+<TR>
+   <TH ALIGN=LEFT>J   <TD>     detector identification number (0 for steerings)
+<TR>
+   <TH ALIGN=LEFT>N   <TD>     histogram number (0 <= N <= 99)
+</TABLE>
+
+<P><TABLE>
+<TR>
+<TD VALIGN=TOP>Notes:
+<TD>
+<OL>
+<LI>IDN=999 is reserved for the output SPC data CWN.
+<LI>IDN=888 is reserved for the input EVTGEN data CWN.
+</OL>
+</TABLE>
+
+<LI>Fill the histograms/ntuples in the nnn_STEP, nnn_TRKE, nnn_EVE routines
+or whatever is the most convenient.
+</UL>
+
+<P>PAW file opening, directory setting and writing out of the ntuples
+etc... is done by the general steering routines.
+
+
+
+<!================================================================================>
+
+<H3><FONT COLOR="#FF8050"><A NAME="4.4">4.4 Common Block Description</A></FONT></H3>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+<P>The COMMONS of the various detectors are called <B>char_uuuuuu</B>,
+uuuuuu = Left free to the user.  An exception on this are the STEERING
+commons which are called <B>SCXuuuuu</B>
+
+<P><TABLE WIDTH=80%>
+<TR>
+<TH VALIGN=TOP>
+Note:
+<TD>
+<OL>
+<LI>The KEEP sequence MUST have the same name as the (first)
+COMMON in that sequence and the use of BLOCKDATA must be
+omitted (all initialisation in name_INIT).
+<LI>Executable statements or DATA statements are NOT allowed
+in a KEEP sequence.
+</OL>
+</TABLE>
+
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXIO">SCXIO</A></FONT></H4>
+<PRE>
++KEEP,SCXIO.------------------------------------------------------------------------
+C --- Common which contains the units for the various I/O streams ---
+      INTEGER LUNIN,LUNZEB,LUNSPC,LUNPAW,LUNDRW,LUNRDB,LUNRAW
+     $,       NKEYS,JRECO
+C
+      COMMON /SCXIO/ LUNIN,LUNZEB,LUNSPC,LUNPAW,LUNDRW,LUNRDB,LUNRAW
+     $,              NKEYS,JRECO
+      CHARACTER*4 KEYS
+      COMMON /SCXIO2/ KEYS(4)
+C
+
+      LUNIN     Logical input unit for the generator data file in case
+                IKINE=3 (see card KINE).
+      LUNZEB    Logical input unit for writing ZEBRA data structures.
+      LUNSPC    Logical unit for writing Alice space point Column Wise
+                Ntuples.
+      LUNPAW    Logical unit for PAW Ntuple output
+      LUNDRW    Logical unit for graphic metafil
+      LUNRDB    Logical unit for initial data structure file
+      NKEYS     Number of structures to save every event on LUNZEB
+      KEYS      Name of the structures to save every event on LUNZEB
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXDB">SCXDB</A></FONT></H4>
+<PRE>
++KEEP,SCXDB.------------------------------------------------------------------------
+C --- Common which contains debug flags for the various detectors ---
+C IDBUGF(J) = Debug level (0,1,2) for detector "J"
+C --- Also control flags (JPAWF,JVERF,JOUTF) for each detector added ---
+      INTEGER NDBMAX
+      PARAMETER (NDBMAX=20)
+C
+      INTEGER       ID_ITS,ID_MAG,ID_TPC,ID_TOF,ID_PMD,ID_PHOS
+     $,       ID_ZDC,ID_FMD,ID_RICH,ID_STEE,ID_MUON,ID_FRAME,ID_TRD
+     $,       ID_CASTOR,ID_ABSO,ID_SHIL,ID_DIPO,ID_HALL,ID_PIPE
+     $,       ID_ALICE
+C
+      PARAMETER (ID_ALICE=0,        ID_ITS=2,ID_MAG=3,ID_TPC=4,ID_TOF=5
+     $,          ID_PMD=6,ID_PHOS=7,ID_ZDC=8,ID_FMD=9,ID_RICH=10
+     $,          ID_MUON=11,ID_FRAME=12,ID_TRD=13,ID_CASTOR=15
+     $,          ID_ABSO=16,ID_SHIL=17,ID_DIPO=18,ID_HALL=19,ID_PIPE=20
+     $,          ID_STEE=NDBMAX+1)
+C
+      INTEGER IDBUGF,JPAWF,JVERF,JOUTF,IDTMED,ILTMED
+C
+      INTEGER MMEDIA
+      CHARACTER*6 CHNVOL
+      PARAMETER (MMEDIA=1000)
+      COMMON /SCXDB/ IDBUGF(NDBMAX+1),JPAWF(NDBMAX+1),JVERF(NDBMAX+1)
+     $,              JOUTF(NDBMAX+1)
+     $,              IDTMED(100*(NDBMAX+1))
+     $,              ILTMED(2,0:NDBMAX)
+     $,              IMEDIA(MMEDIA),CHNVOL(0:NDBMAX)
+C
+
+      IDBUGF         Debug flag for all modules (0->2). The storing of the hits
+                     requires a value >0 of this flag.
+      JPAWF          PAW flag for all modules (0->2). This flag triggers
+                     booking and filling of histograms.
+      JVERF          Version chosen for all modules.
+      JOUTF          Raw data (digits) output flag for modules (0, 1).
+      IDTMED         Translation array between tracking media codes and
+                     GEANT numbers.
+      ILTMED         Tracking media id ranges for different modules. The
+                     tracking media identifiers (ID) of module I are such
+                     that ILTMED(1,I)<ID<ILTMED(2,I)
+      IMEDIA         Correspondence between tracking media number and 
+                     module identifier. A particle in tracking media II
+                     is in the module whose ID is IMEDIA(II)
+      CHNVOL         Names of the different modules.
+C
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXFF">SCXFF</A></FONT></H4>
+<PRE>
++KEEP,SCXFF.------------------------------------------------------------------------
+C --- Common which contains FFREAD stuff for the GALICE package ---
+C --- as well as the total processed event counter ---
+      INTEGER NSXDET,NLUNS,NPARS
+     $,       JDETF,JTRAF,JDRGF,JDRTF,IFDRAT,ISXDCH,JDCHM,JDCHN,JDCHP
+     $,       ISXWKS,ISXVAC,NSXEVT,IFPART,IFVOLU,IFMATE
+     $,       IFTMED,IFVERT,IFKINE,IFSETS,IFHITS,IFDIGI,IFSECS
+     $,       IFXSEC,IFLOSS,ISXEVT,ISXHID,ISXFLD,ISXFMAP
+     $,       ISXITS,ISXMAG,ISXTPC,ISXTOF,ISXPMD,ISXPHOS
+     $,       ISXZDC,ISXFMD,ISXRICH,ISXMUON,ISXFRAME,ISXTRD,ISXCASTOR
+     $,       ISXSTEE,ISXABSO,ISXSHIL,ISXDIPO,ISXHALL,ISXPIPE
+     $,       ISXHACC
+      REAL SXGATE,SXMAGN,SXIPXS,SXMGMX,SXRMAX,SXZMAX
+C
+      PARAMETER (NSXDET=20,NLUNS=7,NPARS=9)
+      COMMON /SCXFF/ JDETF(NSXDET+1),JTRAF(NSXDET+1)
+     $,              JDRGF(NSXDET+1),JDRTF(NSXDET+1),IFDRAT
+     $,              ISXDCH,JDCHM,JDCHN,JDCHP
+     $,              SXGATE(NSXDET)
+     $,              ISXWKS,ISXVAC,NSXEVT
+     $,              IFPART,IFVOLU,IFMATE,IFTMED,IFVERT,IFKINE
+     $,              IFSETS,IFHITS,IFDIGI,IFSECS
+     $,              IFXSEC,IFLOSS
+     $,              ISXEVT,SXIPXS(3),ISXHID
+     $,              ISXFLD,ISXFMAP,SXMAGN,SXMGMX
+     $,              ISXITS(NPARS),ISXMAG(NPARS)
+     $,              ISXTPC(NPARS),ISXTOF(NPARS),ISXPMD(NPARS)
+     $,              ISXPHOS(NPARS),ISXZDC(NPARS),ISXFMD(NPARS)
+     $,              ISXRICH(NPARS),ISXMUON(NPARS),ISXFRAME(NPARS)
+     $,              ISXTRD(NPARS),ISXCASTOR(NPARS)
+     $,              ISXABSO(NPARS),ISXSHIL(NPARS),ISXDIPO(NPARS)
+     $,              ISXHALL(NPARS),ISXPIPE(NPARS)
+     $,              ISXSTEE(NPARS),SXRMAX,SXZMAX
+     $,              ISXHACC
+C
+      JDETF          0 if the module does not exist, 1 otherwise
+      JTRAF          Step by step printing for the module if not 0
+      JDRGF          Draw in the view bank for the module if not 0
+      JDRTF          Store the track points in memory for the module 
+                     if not 0
+      IFDRAT         Not 0 if at least one module is drawn. Then every
+                     event is drawn superinposed to the modules in the view
+                     banks.
+      ISXDCH         Charge of particles drawn (100*NEG+10*NEUT+ICHAR,
+                     where NEG, NEUT and ICHAR can be 0 or 1)
+      JDCHM          1 if negative particles are drawn
+      JDCHN          1 if neutral particles are drawn
+      JDCHP          1 if positive particles are drawn
+      SXGATE         Time gate for the each module
+      ISXWKS         Graphics metafile code
+      ISXVAC         If 1 Alice will be filled with vacuum, if 0 with air
+      NSXEVT         Global event counter
+      IFPART         If 1 PART data structure is printed
+      IFVOLU         If 1 VOLU data structure is printed
+      IFMATE         If 1 MATE data structure is printed
+      IFTMED         If 1 TMED data structure is printed
+      IFVERT         If 1 VERT data structure is printed
+      IFKINE         If 1 KINE data structure is printed
+      IFSETS         If 1 SETS data structure is printed
+      IFHITS         If 1 HITS data structure is printed
+      IFDIGI         If 1 DIGI data structure is printed
+      IFSECS         If 1 Secondary statistic is printed
+      IFXSEC         If 1 hadronic cross section is printed
+      IFLOSS         If 1 energy loss information is printed
+      ISXEVT         Start event number when reading from a file
+      SXIPXS         Interaction point
+      ISXHID         If 1 turns on HIDE option for drawing
+      ISXFLD         Magnetic field transport flag 0=no field, 2=helix, 3=Runge Kutta
+      ISXFMAP        Magnetic field map version (1, 2 see <a href="#7">later</a>)
+      SXMAGN         Scale factor for the magnetic field
+      SXMGMX         Maximum value for the magnetic field
+      ISXITS         Input array of flags for ITS
+      ISXMAG         Input array of flags for MAG
+      ISXTPC         Input array of flags for TPC
+      ISXTOF         Input array of flags for TOF
+      ISXPMD         Input array of flags for PMD
+      ISXPHOS        Input array of flags for PHOS
+      ISXZDC         Input array of flags for ZDC
+      ISXFMD         Input array of flags for FMD
+      ISXRICH        Input array of flags for RICH
+      ISXMUON        Input array of flags for MUON
+      ISXFRAME       Input array of flags for FRAME
+      ISXTRD         Input array of flags for TRD
+      ISXCASTOR      Input array of flags for CASTOR
+      ISXABSO        Input array of flags for ABSO
+      ISXSHIL        Input array of flags for SHIL
+      ISXDIPO        Input array of flags for DIPO
+      ISXHALL        Input array of flags for HALL
+      ISXPIPE        Input array of flags for PIPE
+      ISXSTEE        Input array of flags for STEE
+      SXRMAX         Maximum radius for transport
+      SXZMAX         Maximum value of z for transport
+      ISXHACC        Accept heavy particle decays within mu-chambers acceptance
+C
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXGOE">SCXGEO</A></FONT></H4>
+<PRE>
++KEEP,SCXGEO.-----------------------------------------------------------------------
+C --- Common which contains some general geometry parameters ---
+      REAL DALIC
+C
+      COMMON /SCXGEO/ DALIC(3)
+C
+       
+      DALIC          Dimension of the Alice mother volume
+
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXPAW">SCXPAW</A></FONT></H4>
+<PRE>
++KEEP,SCXPAW.-----------------------------------------------------------------------
+C --- Common which contains the NTUPLE info for the steerings ---
+      INTEGER NVRS1
+      REAL VALS1
+C
+      PARAMETER (NVRS1=2)
+      CHARACTER*6 VARS1
+      COMMON /SCXPAW/ VALS1(NVRS1)
+      COMMON /SCXPW2/ VARS1(NVRS1)
+C
+
+      VALS1          Names of the NTUPLE variables for the steering
+      VARS1          Values of the NTUPLE variables for the steering
+
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXPST">SCXPST</A></FONT></H4>
+<PRE>
++KEEP,SCXPST.-----------------------------------------------------------------------
+C --- Common which contains secondary particle statistics ---
+      INTEGER IPCNT
+C
+      COMMON /SCXPST/ IPCNT(100)
+      CHARACTER*20 NAME,NAMES
+      COMMON /SCXPS2/ NAME,NAMES(100)
+C
+      SAVE /SCXPST/
+      SAVE /SCXPS2/
+C
+
+      IPCNT          Number of secondaries for each particle species
+      NAME           Temporary storage for the name of the particle
+      NAMES          Names of the particles
+
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXEVT">SCXEVT</A></FONT></H4>
+<PRE>
++KEEP,SCXEVT.-----------------------------------------------------------------------
+C --- Common which contains standard event parameters ---
+      INTEGER JSXRUN,JSXEVT,JSXNPA,JSXZB,JSXZT,NSXPIN,IPX,IPY,IPZ
+      REAL RSXIMP,RSXPNU,RSXECM
+C
+      COMMON /SCXEVT/ JSXRUN,JSXEVT,JSXNPA,JSXZB,JSXZT
+     $,               RSXIMP,RSXPNU,RSXECM,NSXPIN(48)
+     $,               IPX,IPY,IPZ
+C
+      JSXRUN
+      JSXEVT
+      JSXNPA
+      JSXZB
+      JSXZT
+      RSXIMP
+      RSXPNU
+      RSXECM
+      NSXPIN(48)
+      IPX
+      IPY
+      IPZ
+
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXSCR">SCXSCR</A></FONT></H4>
+<PRE>
++KEEP,SCXSCR.-----------------------------------------------------------------------
+C --- Common containing scratch space for detector SPC/RAW arrays ---
+      INTEGER NSCR,IARR
+C
+      PARAMETER (NSCR=100000)
+      COMMON /SCXSCR/ IARR(NSCR)
+C
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SLATE">SLATE</A></FONT></H4>
+<PRE>
++KEEP,SLATE.
+C --- CERNLIB common with additional info for the DATIME package ---
+      INTEGER ISL
+      REAL DUMMY
+C
+      COMMON /SLATE/ ISL(6),DUMMY(34)
+C
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="QUEST">QUEST</A></FONT></H4>
+<PRE>
++KEEP,QUEST.
+C --- CERNLIB common for communication with the ZEBRA package ---
+      INTEGER IQUEST
+C
+      COMMON /QUEST/ IQUEST(100)
+C
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXGEN">SCXGEN</A></FONT></H4>
+<PRE>
++KEEP,SCXGEN.
+C --- Common containing event generator data ---
+      INTEGER NIHMAX,NRHMAX,NRGEN,JRGEN,JTKGEN,NIHEAD,IHEAD,NRHEAD,IPAR
+      REAL RHEAD,THETA,PHI,PMOM,E
+C
+      PARAMETER (NIHMAX=12,NRHMAX=6)
+      COMMON /SCXGEN/ NRGEN,JRGEN,JTKGEN
+     $,               NIHEAD,IHEAD(NIHMAX),NRHEAD,RHEAD(NRHMAX)
+     $,               IPAR,THETA,PHI,PMOM,E
+C
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXZLN">SCXZLN</A></FONT></H4>
+<PRE>
++KEEP,SCXZLN
+C --- Alice permanent links for ZEBRA banks
+      INTEGER NALINK, JALINK, JLEDEP
+      PARAMETER (NALINK=1)
+      COMMON / SCXZLN / JALINK(NALINK)
+      EQUIVALENCE (JLEDEP,JALINK(1))
+
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCKINE">SCKINE</A></FONT></H4>
+<PRE>
++KEEP,SCKINE,IF=ROOTIO
+      CHARACTER*4 CHTREE
+      COMMON / SCKINE / MTRACK, MPRIMA
+     +,                 CHTREE(2)
+
+C     MTRACK     Track number in the Root stack
+C     MPRIMA     Number of primaries generated
+C     CHTREE     Root trees to be created in memory
+
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXMFD">SCXMFD</A></FONT></H4>
+<PRE>
++KEEP,SCXMFD,IF=-ROOTIO.
+C --- Common containing magnetic field map data
+      REAL DZ,DX,DY,UDX,UDY,UDZ
+     $,XMBEG,YMBEG,ZMBEG,XMEND,YMEND,ZMEND
+     $,BV
+      INTEGER NX,NY,NZ
+
+      PARAMETER(MAXFLD=250000)
+      COMMON /SCXMFD/ NX,NY,NZ,DZ,DX,DY,UDX,UDY,UDZ
+     $,XMBEG,YMBEG,ZMBEG,XMEND,YMEND,ZMEND
+     $,BV(MAXFLD)
+C
+C       NX, NY, NZ    Number of map points
+C       DX, DY, DZ    Map cell side
+C       XMBEG, XMEND  Map extension in X
+C       YMBEG, YMEND  Map extension in Y
+C       ZMBEG, ZMEND  Map extension in Z
+C       BV            Array of field values (BX,BY,BZ)(IX,IY,IZ)
+C
+C       
+</pre>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCXLEGO">SCXLEGO</A></FONT></H4>
+<PRE>
++KEEP,SCXLEGO
+C --- LEGO option for calculating material traversed
+C
+C       THEMIN   Minimum generation theta
+C       THEMAX   Maximum generation theta
+C       PHIMIN   Minimum generation phi
+C       PHIMAX   Maximum generation phi
+C       RLMIN    Generation radius
+C       RLMAX    Maximum tracking radius
+C       ZLMAX    Maximum tracking Z
+C       NLTHE    Number of bins in Theta
+C       NLPHI    Numner of bins in Phi
+C       IFLEGO   Lego Flag
+C       ICTHE    Current theta bin
+C       ICPHI    Current phi bin
+C       CURTHE   Current theta of track
+C       CURPHI   Current phi of track
+C       TOTRADL  Total Radiation length
+C       TOTABSO  Total absorption length
+C       TOTGCM2  Total G/CM2 traversed
+C
+      COMMON / SCXLEGO / THEMIN, THEMAX, PHIMIN, PHIMAX, RLMIN, RLMAX,
+     $ZLMAX, NLTHE, NLPHI, IFLEGO, ICTHE, ICPHI, TOTRADL, TOTABSO,
+     $TOTGCM2, CURPHI, CURTHE
+
+</PRE>
+
+<H4><FONT COLOR="#cc5050"><A NAME="SCCPROTO">SCCPROTO</A></FONT></H4>
+<PRE>
++KEEP,SCCPROTO,IF=ROOTIO
+//
+//  Prototypes for Galice
+//
+#ifdef WIN32
+#define sxsrot SXSROT
+#define type_of_call _stdcall
+#else
+#define sxsrot sxsrot_
+#define type_of_call
+#endif
+
+extern "C" void type_of_call
+     sxsrot(int &nmat, const float &theta1, const float &phi1,
+                       const float &theta2, const float &phi2,
+                       const float &theta3, const float &phi3);
+</PRE>
+</pre>
+
+
+<!================================================================================>
+
+<H3><A NAME="4.5">4.5 Routine Description</A></H3>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+<H4><A NAME="GALICE">PATCH GALICE</A></H4>
+<P>Contains the main programs for the standalone FORTRAN version:
+
+<P><TABLE>
+<TR>
+   <TH ALIGN=LEFT>$GALIBAT <TD> Batch main program.
+<TR>
+   <TH ALIGN=LEFT>$GALINT  <TD> Interactive main program.
+</TABLE>
+
+<P>These are obsolete.
+
+<H4><A NAME="DUMMIES">PATCH DUMMIES</A></H4>
+<P>Contains dummy routines needed to satisfy all externals. These are called
+internally from CERNLIB routines.
+
+<H4><A NAME="LEGO">PATCH LEGO</A></H4>
+<P>Contains the routines to calculate the material budget maps when the
+<A HREF="#3">LEGO</A> option is activated by the <A HREF="#SXLEGO">SXLEGO</A>
+data card.
+
+<DL>
+<P><DT><A NAME="SXLGCY"><B>SXLGCY(X,V,R,Z,T)</B></A>
+<DD>Routine to propagate a track to the boundary of a cylinder from the
+inside. The cylinder is centered in the origin and has the axis along z.
+Called by SXLGST.
+
+<P><TABLE>
+<TR>
+   <TH ALIGN=LEFT>X(3)
+   <TD>Current position
+<TR>
+   <TH ALIGN=LEFT>V(3)
+   <TD>Current direction (unnormalised)
+<TR>
+   <TH ALIGN=LEFT>R
+   <TD>Radius of the cylinder
+<TR>
+   <TH ALIGN=LEFT>Z
+   <TD>half length of the cylinder
+<TR>
+   <TH ALIGN=LEFT>T
+   <TD>distance to the boundary
+</TABLE>
+
+<P><DT><A NAME="SXLGIN"><B>SXLGIN</B></A>
+<DD>Initialises LEGO calculations. Called by UGINIT.
+
+<P><DT><A NAME="SXLGKI"><B>SXLGKI</B></A>
+<DD>Generates kinematic for lego calculation. Called by GUKINE.
+
+<P><DT><A NAME="SXLGOU"><B>SXLGOU</B></A>
+<DD>End of event routine for LEGO option. Called by GUOUT.
+
+<P><DT><A NAME="SXLGST"><B>SXLGST</B></A>
+<DD>Step routine for the LEGO option. Called by GUSTEP.
+</DL> 
+<H4><A NAME="MISC">PATCH MISC</A></H4>
+<DL>
+<DT><A NAME="fpe"><B>fpe</B></A>
+<DD>Thanks to <A HREF="mailto:billm@suburbia.net"> W. Metzenthen</A>, 22
+Parker St, Ormond, Vic 3163, Australia, This code implements floating point
+trap for the Linux g77/egcs FORTRAN compilers.
+</DL>
+
+<H4><A NAME="GPATCH">PATCH GPATCH</A></H4>
+<P>Contains corrections for GEANT 3.21
+
+<DL>
+<P><DT><A NAME="CGHPLA"><B>CGHPLA</B></A>
+<DD>Precision problem corrected in case of volumes with very disuniform
+dimensions.
+
+<P><DT><A NAME="GGPERP"><B>GGPERP</B></A>
+<DD>Correction in error message.
+
+<P><DT><A NAME="GGPPAR"><B>GGPPAR</B></A>
+<DD>Modified to support TRD1 in TRD1 with negative parameters.
+
+<P><DT><A NAME="GRFILE"><B>GRFILE</B></A>
+Modified to support I/O of ZEBRA linear structures.
+
+<P><DT><A NAME="GROUT"><B>GROUT</B></A>
+<DD>Modified to support I/O of ZEBRA linear structures.
+</DL>
+
+<H4><A NAME="ROOTIO">PATCH ROOTIO</A></H4>
+
+<DL>
+<P><DT><A NAME="GTREVE"><B>GTREVE</B></A>
+<DD>Modified version of the original GEANT routine. Particles are fetched from
+the ROOT stack by the routine RXGTRAK and loaded into the JKINE/JVERT
+structure as track N 1 and vertex N 1. From there on the
+
+<P><DT><A NAME="GTRIGI"><B>GTRIGI</B></A>
+<DD>Modified version of the original GEANT routine. It calls a RXSTIN to
+initialise the ROOT stack.
+</DL>
+
+<H4><A NAME="DETMOD">Routines for Detector Modules</A></H4>
+
+The routines in the different modules are called nnn_fff, where nnn is
+the name of the module, which can be:
+
+<P><CENTER>
+ITS, MAG, TPC, TOF, PMD, PHOS, RICH, MUON, FRAME, CASTOR, FMD, HALL, 
+ABSO, SHIL, DIPO, TRD, PIPE</CENTER>
+
+<P>and fff is:
+
+<P><TABLE ALIGN=CENTER WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT>nnn_FKEY
+   <TD>Definition of the FFREAD data cards specific for a given module.
+<TR>
+   <TH ALIGN=LEFT>nnn_INIT
+   <TD>Initialisation routine for a given module.
+<TR>
+   <TH ALIGN=LEFT>nnn_MEDIA
+   <TD> Definition of materials and tracking media
+<TR>
+   <TH ALIGN=LEFT>nnn_GEOM
+   <TD>  Definition of geometry
+<TR>
+   <TH ALIGN=LEFT>nnn_SENS
+   <TD>  Definition of hits and digit structure
+<TR>
+   <TH ALIGN=LEFT>nnn_DRAW
+   <TD>  Drawing routine
+<TR>
+   <TH ALIGN=LEFT>nnn_STEP
+   <TD>  Specific routine called at each step
+<TR>
+   <TH ALIGN=LEFT>nnn_TRKI
+   <TD>  Routine called at the beginning of each new track
+<TR>
+   <TH ALIGN=LEFT>nnn_TRKE
+   <TD>  Routine called at the end of each new track
+<TR>
+   <TH ALIGN=LEFT>nnn_DIGT
+   <TD>  Digitisation routine called at the end of each track
+<TR>
+   <TH ALIGN=LEFT>nnn_DIGE
+   <TD>  Digitisation routine called after each event
+<TR>
+   <TH ALIGN=LEFT>nnn_EVE
+   <TD>   Termination routine called after each event
+<TR>
+   <TH ALIGN=LEFT>nnn_END
+   <TD>   Termination routine called at the end of the run
+</TABLE>
+
+<P>When several version of a given module are present, a routine may act as
+a switchyard, to version-specific routines where the last letter is
+replaced by a digit. So if there are 2 version of the TPC, the routine
+TPC_GEOM would just call TPC_GEO0 or TPC_GEO1 according to the version
+chosen for the run.
+
+<H4><A NAME="STEER">PATCH STEER</A></H4>
+<P>This patch contains the GALICE Steering Routines
+
+<DL>
+<P><DT><A NAME="SXACCUT"><B>SXACCUT</B></A>
+<DD>Selects the particles from heavy resonances decay that are within
+the acceptance of the muon chambers (2-9 degrees).
+
+<P><DT><A NAME="SXCOLOR"><B>SXCOLOR</B></A>
+<DD>Defines the color attribute for the different elements of the setup. Only
+the first seven colors are used to allow the possibility to make drawing
+with shading. The algorithm assigns the same color to volumes that are
+filled with the same tracking medium (modulo 6).
+
+<P><DT><A NAME="SXCUTS"><B>SXCUTS</B></A>
+<DD>Reads the file <A HREF="#2"><B>galice.cuts</B></A> and sets the cuts
+for a specific tracking medium. Called by UGINIT.
+
+<P><DT><A NAME="SXDIGT"><B>SXDIGT</B></A>
+<DD>Digitising and recording of hits after each track. This routine is
+called from SXTRKE for tracks saved in the JKINE bank after the calls to
+the nnn_TRKE routines. This routine in turn calls the nnn_DIGT routines for
+each module, but ONLY in case that the detector <A HREF="#SXLUN">spc</A>
+flag has been selected.
+
+<P>In the nnn_DIGT routines the detector specific SPC data arrays contained
+in the <char>_SPC KEEP sequence are filled and written onto the SPC data
+CWN by a call to HFNTB with the corresponding block name. <char>_SPC should
+contain the common /SCXSCR/ which serves as a scratch space buffer for all
+detector raw data. Note that all SPC data consist of INTEGER values. As an
+example consider the PHOS SPC data structure.
+
+<P><EM><FONT COLOR="RED">Note that this code has not yet been developed for
+all detectors and it implies that the CWN I/O instead that the ROOT I/O is
+used. CWN output is not supported and will be discontinued soon.  When
+using the ROOT I/O, the digitisation is performed after the simulation in a
+separate pass with a ROOT macro or a C++ program.</FONT></EM>
+
+<P><DT><A NAME="SXDRAW"><B>SXDRAW</B></A>
+<DD>Drawing of the layout of the various detectors. Called from UGINIT.
+This routine calls the nnn_DRAW routines of the various detectors.  In case
+view banks are used in the nnn_xxxx routines, then the identifiers of these
+view banks have to be in the module range.  Actual drawing (GDRAW, GDSHOW
+etc...) may only take place in the SuDRAW routines, and the view banks
+created have to be deleted (GDELET) at the end of the name_DRAW routines.
+
+<P><DT><A NAME="SXEDIN"><B>SXEDIN</B></A>
+<DD>Initialises the recording of the deposited energy in all
+volumes. Called by GUKINE.
+
+<P><DT><A NAME="SXEDOU"><B>SXEDOU</B></A>
+<DD>Updates the statistics for the deposited energy at the end of each
+event. Called by GUOUT.
+
+<P><DT><A NAME="SXEDSU"><B>SXEDSU</B></A>
+<DD>Prints the summary of the energy deposited in all volumes. Called by
+UGLAST.
+
+<P><DT><A NAME="SXFMAP"><B>SXFMAP</B></A>
+<DD>Routine to read the field map in case the map 2 is chosen. This     
+routine is called by <a href="#UGINIT">UGINIT</a> and it stores the
+field map either in the common block <a href="#SCXMFD">SCXMFD</a>
+for the standalone Galice, or in the class AliMagFCM in the
+version interfaced with Root.
+
+<P><DT><A NAME="SXGEOM"><B>SXGEOM</B></A>
+<DD>Defines the geometry of the complete setup. Called from UGINIT. This
+routine calls the nnn_GEOM routines of the various modules. SXGEOM defines
+the Alice mother volume, ALIC, which is a rectangular box filled with air
+containing the various detectors.  All the volumes defined by a module
+should start with the letter specific to the detector to avoid name
+clashes. Unfortunately this rule has not been followed entirely, and we
+reserve the possibility to enforce it in a future version of the program.
+
+<P><DT><A NAME="SXKEY"><B>SXKEY</B></A>
+<DD>Defines the <A
+HREF="http://wwwcn.cern.ch/asdoc/WWW/ffread/ffmain/ffmain.html">FFREAD</A>
+data cards. Called by UGINIT.
+
+<P><DT><A NAME="SXMECA"><B>SXMECA(MEC,CHMECA)</B></A>
+<DD>Returns the name of a GEANT interaction mechanism.
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT>MEC
+   <TD>Mechanism code.
+<TR>
+   <TH ALIGN=LEFT>CHMECA
+   <TD>(CHARACTER*4) Mechanism name.
+</TABLE>
+
+
+<P><DT><A NAME="SXMEDIA"><B>SXMEDIA</B></A>
+<DD>Steers the definition of materials and tracking media for the whole
+setup. Called by UGINIT. The routines acts as a switchyard calling all
+the nnn_MEDIA routines for each module. Tracking media identifiers are
+stored into the IDTMED array in common <A HREF="#SCXDB">SCXDB</A>
+in the
+appropriate module range. For instance, all tracking media of the TPC
+are stored in IDTMED(400:499). They do not need to be stored contiguously.
+
+<P><DT><A NAME="SXMULO"><B>SXMULO</B></A>
+<DD>Routine to save and restore information that is needed when reading the
+initialisation structures from disk. Called by UGINIT. 
+
+<P>For a detector complex as Alice the creation of the permanent ZEBRA data
+structures (DRAW, MATE, PART, ROTM, RUNG, SETS, TMED, VOLU and SCAN) can be
+quite a long process. This is not disturbing in long production runs, but
+can hit badly a debug cycle. The structures can be saved on disk and
+reread, but in the standard version of GEANT the common /GCMULO/ is not
+saved and restored. This implies that a call to the GPHYSI routine is
+always needed, which can be very time-consuming. The routine SXMULO save
+and restores this common together with the arrays IDTMED and IMEDIA in
+common <A HREF="#SCXDB"> SCXDB</A>.
+
+<P>Not to alter the generality of the standard GEANT I/O routines this
+information is attached as a next bank to the JRUNG bank, that in the
+original version of GEANT does not have a next bank. Unfortunately the
+standard I/O routines of GEANT do not read or write linear structures, so
+we had to introduce modified I/O routines in <A HREF="#GPATCH">GPATCH</A>.
+
+<P><DT><A NAME="SXOUT"><B>SXOUT</B></A>
+<DD>Termination routine called by GUOUT. It perform various I/O operations
+under user control.
+
+<P><DT><A NAME="SXPART"><B>SXPART</B></A>
+<DD>Defines additional particles and their decay modes. Called by
+UGINIT. The particles defined are: OMEGA(783), PHI(1020), D+, D-, D0, ANTI
+D0 RHO+, RHO- and RHO0 and the related decay modes. This routine has mainly
+been kept for backward compatibility. GEANT 3.21 decays particles according
+to phase space, which is not correct for these particles. The decay of
+heavy particles should be performed via some specialised routine such as
+the ones found in the LUND MonteCarlo library.
+
+<P><DT><A NAME="SXPMAT"><B>SXPMAT(IMATE,IPART,MECA)</B></A>
+<DD>Called by UGLAST, it provides material and particle information for
+phyisics mechanisms in GEANT. Arguments:
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT>IMATE
+   <TD>Material number. 0 means all materials.
+<TR>
+   <TH ALIGN=LEFT VALIGN=TOP>IPART
+   <TD>Particle number. 0 means Electron, Positron, Gamma,
+                 Pi+, Pi-, Neutron, Proton, Alpha.
+<TR>
+   <TH ALIGN=LEFT VALIGN=TOP>MECHA
+   <TD>(CHARACTER*4) the mechanism for which the information is
+                 requested. It can be 'LOSS', 'PHOT', 'ANNI', 'COMP', 
+                 'MUNU', 'BREM', 'PAIR', 'DRAY', 'PFIS', 'HADT', 'HADG',
+                 'ALL'
+</TABLE>
+
+
+<P><DT><A NAME="SXPSTA"><B>SXPSTA(IPAR)</B></A>
+<DD>Secondary particle statistics called by GUSTEP, UGINIT, UGLAST.
+
+<P><TABLE WIDTH=60%>
+<TR>
+   <TH ALIGN=LEFT VALIGN=TOP>IPAR
+   <TD VALIGN=TOP>Action flag:
+   <TD VALIGN=TOP>
+   <TABLE>
+      <TR> 
+      <TD>1
+      <TD>initialisation
+      <TR>
+      <TD>2
+      <TD>updating statistics
+      <TR>
+      <TD>3
+      <TD>printout of statistics.
+   </TABLE>
+</TABLE>
+
+
+<P><DT><A NAME="SXSATS"><B>SXSATS(EDEP,DEDX,RKB,C)</B></A>
+<DD>Apply Birk's saturation law to energy deposition. Called by the
+user. This routine does practically the same as GBIRK but it returns the
+parameters used instead the visible energy alone.
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT VALIGN=TOP>MODE
+   <TD VALIGN=TOP> Attenuation mode.
+   <TD VALIGN=TOP><TABLE>
+   <TR><TD>1 <TD>organic scintillator
+   <TR><TD>2 <TD>Liquid (Not yet implemented)
+   <TR><TD>3 <TD>for Gas (Not yet implemented).
+   </TABLE>
+</TABLE>
+
+<P>The material is assumed ideal, which means that impurities and aging
+effects are not taken into account. The algorithm for MODE=1, the only one
+implemented is:
+
+<P><CENTER>EDEP = DESTEP / (1. + RKB*DE/DX +C*(DE/DX)**2)</CENTER>
+
+<P>The values of MODE, RKB and C can be entered via
+<A HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node71.html">GSTPAR</A>:
+
+      <P><CODE>CALL GSTPAR(IMATE,'BIRK1',VALUE)</CODE> to set MODE
+      <BR><CODE>CALL GSTPAR(IMATE,'BIRK2',VALUE)</CODE> to set RKB
+      <BR><CODE>CALL GSTPAR(IMATE,'BIRK3',VALUE)</CODE> to set C
+
+<P>The basic units of the coefficient are g/(MeV*cm<SUP>2</SUP>) because the DE/DX
+is expressed in MeV/cm Exp. values from NIM 80 (1970) 239-244 are:
+
+
+         <P>RKB = 0.013 g/MeV*cm<SUP>2</SUB>
+         <BR>C   = 9.6 10<SUP>-6</SUP> g<SUP>2</SUP>/(MeV<SUP>2</SUP>)(cm<SUP>4</SUP>)
+
+<P><DT><A NAME="SXSENS"><B>SXSENS</B></A>
+<DD>Steers the definition of the sensitive module elements. Called from
+UGINIT.  This routine calls the nnn_SENS routines of the various modules.
+The nnn_SENS routines don't have any arguments.  The names used in the
+nnn_SENS routines to define (sets of) sensitive module elements have to
+start with the pre-defined character as specified for the geometry
+volumes. Again this use has been lost during evolution of the program and
+it should probably be reinforced. In case user identifiers (IDTYPE) are
+used for various module elements (GSDET), these identifiers have to
+be in the module range.
+
+<P><DT><A NAME="SXSMAT"><B>SXSMAT(IMAT,NAMATE,A,Z,DENS,RADL,ABSL,UBUF,NWBUF)</B></A>
+<DD>Defines a material. This routine is the same as
+<A HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node50.html">GSMATE</A>
+with the difference
+that the material identifier IMAT is an output parameter. The next free
+material identifier is returned.
+
+<P><DT><A NAME="SXSMIX"><B>SXSMIX(IMAT,NAMATE,A,Z,DENS,NLMAT,WMAT)</B></A>
+<DD>Defines a mixture or a compound. This routine is the same as
+<A HREF="http://wwwcn.cern.ch/asdoc/geant/H2GEANTCONS110.html">GSMIXT</A>
+with the difference
+that the material identifier IMAT is an output parameter. The next free
+material identifier is returned.
+
+<P><DT><A NAME="SXSROT"><B>SXSROT(NMAT,THETA1,PHI1,THETA2,PHI2,THETA3,PHI3)</B></A>
+<DD>Defines a rotation matrix. This routine is the same as
+<A HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node118.html"> GSROTM </A>
+with the difference
+that the matrix identifier NMAT is an output parameter. The next free
+matrix identifier is returned.
+
+<P><DT><A NAME="SXSTME"><B>
+SXSTME(KTMED,NATMED,NMAT,ISVOL,IFIELD,FIELDM,TMAXFD,
+<BR>     +        STEMAX,DEEMAX,EPSIL,STMIN,UBUF,NWBUF)
+</B></A>
+<DD>Defines a tracking media. This routine is the same as GSTMED
+<A HREF="<http://wwwcn.cern.ch/asdoc/geant/H2GEANTCONS200.html#GSTMED">
+GSTMED</A>
+with the
+difference that the tracking medium identifier KTMED is an output
+parameter. The next free matrix identifier is returned.
+
+<P><DT><A NAME="SXTRKE"><B>SXTRKE</B></A>
+<DD>End statistics after tracking for each track.  Called from GUTRAK.  This
+routine calls the nnn_TRKE routines of the various detectors.  The
+nnn_TRKE routines have 1 argument (IFLAG) to denote primary (1) and
+secondary (2) tracks.
+
+<P><DT><A NAME="SXTRKI"><B>SXTRKI</B></A>
+<DD>Initialisation before tracking for each track.  Called from GUTRAK.  This
+routine calls the nnn_TRKI routines of the various detectors.  The
+nnn_TRKI routines have 1 argument (IFLAG) to denote primary (1) and
+secondary (2) tracks.  Note : The name_TRKI routines are THE location to
+reset the detector specific hit statistics arrays for a certain track.
+
+<P><DT><A NAME="SXWSIM"><B>SXWSIM(X,Y,Z,PX,PY,PZ,JTK,IPA,JSTACK)</B></A>
+<DD>Handles track information for pattern recognition development. Called by
+user.
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT>X,Y,Z<TD>         Position of the particle;
+<TR>
+   <TH ALIGN=LEFT>PX,PY,PZ<TD>      Momentum of the particle;
+<TR>
+   <TH ALIGN=LEFT>JTK<TD>           Track number;
+<TR>
+   <TH ALIGN=LEFT>IPA<TD>           Particle code;
+<TR>
+   <TH ALIGN=LEFT>JSTACK<TD>        Stack number;
+</TABLE>
+
+<P><DT><A NAME="SXZINI"><B>SXZINI</B></A> 
+<DD>Initialises the Alice Zebra structure. Called by UGINIT. The Alice Zebra
+structure contains the scratch space for recording the energy deposition
+in all volumes, and it depends on the link JLEDEP in common /SCXZLN/.
+</DL>
+
+<H4><A NAME="SUCODE">PATCH SUCODE</A></H4>
+<P>User Steering Routines
+
+<DL>
+<P><DT><A NAME="SUDIGE"><B>SUDIGE</B></A>
+<DD>User entry to digitise and record raw data after each event. Called by
+GUDIGI.
+
+<P><DT><A NAME="SUDIGT"><B>SUDIGT</B></A>
+<DD>User entry to digitise and record hits after each track. Called by SXDIGT.
+
+<P><DT><A NAME="SUDRAW"><B>SUDRAW</B></A>
+<DD>User entry to draw detector layout. Called by SXDRAW.
+
+<P><DT><A NAME="SUEND"><B>SUEND</B></A>
+<DD>User entry for a termination routine at end of a run. Called by SXEND.
+
+<P><DT><A NAME="SUEVE"><B>SUEVE</B></A>
+<DD>User entry called at the end of each event. Called by SXEVE.
+
+<P><DT><A NAME="SUGEOM"><B>SUGEOM</B></A>
+<DD>User entry for geometry definition. Called SXGEOM.
+
+<P><DT><A NAME="SUINIT"><B>SUINIT</B></A>
+<DD>User entry for initialisation. Called UGINIT.
+
+<P><DT><A NAME="SUMEDIA"><B>SUMEDIA</B></A>
+<DD>User entry for material and tracking media definition. Called by SXMEDIA.
+
+<P><DT><A NAME="SUSENS"><B>SUSENS</B></A>
+<DD>User entry for sensitive detector definition. Called by SXSENS.
+
+<P><DT><A NAME="SUSTEP"><B>SUSTEP</B></A>
+<DD>User entry at each step. Called by GUSTEP.
+
+<P><DT><A NAME="SUTRKE"><B>SUTRKE</B></A>
+<DD>User entry called at the end of eack track. Called by SXTRKE.
+
+<P><DT><A NAME="SUTRKI"><B>SUTRKI</B></A>
+<DD>User entry called at the beginning of eack track. Called by SXTRKI.
+</DL>
+
+
+<H4><A NAME="GUCODE">PATCH GUCODE</A></H4>
+<P>Description of Geant User Routines
+
+<DL>
+<P><DT><A NAME="GUDIGI"><B>GUDIGI</B></A> 
+<DD>Digitising and recording of raw data after each event.  This routine calls
+the nnn_DIGE routines of the various detectors ONLY in case that detector
+has been selected for writing out the RAW data.  In the nnn_DIGE routines
+the detector specific RAW data arrays as specified in +KEEP,char_RAW is
+filled and written onto the RAW data output stream.  Here char stands for
+the detector specific identification character as specified above.  The
+sequence +KEEP,char_RAW however should actually contain the common /SCXSCR/
+which serves as a scratch space buffer for all detector raw data.  Note
+that all RAW data consist of INTEGER values.  However, the RAW format still
+has to be defined at the moment.
+
+<P><DT><A NAME="GUFLD"><B>GUFLD(VECT,B)</B></A> 
+<DD>User routine to return the magnetic field. The field model is controlled
+by the FFREAD card <A HREF="#SXFLD">SXFLD</A>. This routine has a FORTRAN 
+version, selected when the standalone version of GALICE is compiled, and a
+C++ version to be used with the version of GALICE interfaced with ROOT.
+
+
+<P><DT><A NAME="GUPHAD"></A><A NAME="GUHADR"><B>GUHADR and GUPHAD</B></A>
+<DD>User routines to steer the hadronic package used. If the IHADR flag (FFKEY
+card or tracking media parameter) is 4, the GEANT FLUKA92 interface is
+called, while if IHADR is 1 GHEISHA is called.
+
+<P><DT><A NAME="GUKINE"><B>GUKINE</B></A>
+<DD>Event generation routine. It is steered by the <A HREF="#KINE">KINE</A> card.
+See <A HREF="gif/galice1cards.gif">galice data cards</A> as an example.
+
+<P><DT><A NAME="GUOUT"><B>GUOUT</B></A>                        
+<DD>Termination routine after each event.  This routine calls the nnn_EVE
+routines of the various detectors.
+
+<P><DT><A NAME="GUSTEP"><B>GUSTEP</B></A>                        
+<DD>Records possible hits after each step.  This routine calls the nnn_STEP
+routines of the various detectors.
+
+<P><DT><A NAME="GUTRAK"><B>GUTRAK</B></A>                        
+<DD>User routine called for each primary track.
+
+<P><DT><A NAME="GUTREV"><B>GUTREV</B></A>                        
+<DD>User routine called for each event.
+
+<P><DT><A NAME="UGINIT"><B>UGINIT</B></A>                        
+<DD>Initialisation at the beginning of a simulation run called from the main
+program GALICE.  This routine calls the nnn_INIT routines of the various
+modules. For example the initialization of the PHOS is in PHOS_INIT
+These nnn_INIT routines perform module specific initialisations (if
+needed) and also specify the content of the module SPC data block in case
+the SPC data CWN is used. The name of the SPC data block should be the same
+as the module name (i.e. PHOS, ZDC etc.).  As the names of the variables
+within the SPC data block have to be unique, each variable has to have as
+the last character the module specific identification number (see before).
+ Each nnn_INIT should to produce a short printout indicating the routine
+name, so that from the log file of a certain run it can be directly seen
+which detectors were invoked and correctly initialised.
+
+<P><DT><A NAME="UGLAST"><B>UGLAST</B></A>                        
+<DD>Termination at the end of a simulation run.  This routine calls the
+nnn_END routines of the various detectors.  The nnn_END routines don't have
+any arguments.
+
+</DL>
+
+
+<!=======================================================================>
+
+<HR>
+<BR>
+<H2>
+<A NAME="5">5. Output Format
+</A>
+</H2>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+<P>There are currently two options for the output format of GALICE:
+<UL>
+<LI> HBOOK CWN, GEANT HITS and DIGI structures all based on ZEBRA
+<LI> ROOT Object I/O
+</UL>
+
+<P>The FORTRAN/ZEBRA output format has been kept for backward compatiblity
+and may be removed in the near future if there are no requests to maintain
+it. It is described in the galice.cmz file in the DECK FORMAT of the different
+patches, and the reader is referred to the code for more information.
+
+<P>The ROOT Object I/O is described together with the rest of the ROOT interface
+to Galice in the next chapter.
+
+<HR>
+<BR>
+<H2>
+<A NAME="6">6. ROOT Interface to Galice
+</A>
+</H2>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+
+<P> During 1998 GALICE has been upgraded and modified to provide
+a simulation tool for the Technical Design
+Reports.  Those <A HREF="history.html"> upgrades</A> lead to two releases
+of the package in June 1998 and are detailed <A HREF="history.html">
+elsewhere</A>.  <B>Version 2.02</B> of GALICE is the first version of the
+package that includes the ROOT interface.
+
+<P>
+<B>The main reasons for that were to: </B> 
+<UL>
+<LI> Provide a particle stack within GEANT which is capable to hold 
+     the complete particle 
+     history without inherent limitations. The current GEANT stack
+     does not save full particle history and is limited to 65K tracks
+     which is not enough for the process of an ALICE event.</LI>
+<BR><BR>
+<LI> Provide output services more advanced than the traditional GEANT
+     HITS structure based on ZEBRA 
+     and more flexible than the
+     <A HREF="http://wwwcn.cern.ch/asdoc/hbook_html3/hboomain.html">
+     Column Wise Ntuple (CWN)</A> and which can hold the amount of data
+     of ALICE detectors. 
+     The new I/O
+     can accomodate complex hit structures without inherent space
+     limitations. The standard CWN are limited to 50,000 events per
+     column.</LI>
+<BR><BR>
+<LI> Provide an evolutive framework, where reconstruction and analysis
+     programs can be prototyped via ROOT macros, which are nothing else
+     than C++ fragments. The advantage of the fact that the coding and 
+     scripting language are the same is that these macros can evolve into 
+     compiled libraries
+     and later reconstruction and analysis packages seamlessly. At the
+     moment of writing the Alice Offline framework is being defined,
+     but we already know it will be based on OO technology. This approach
+     avoids the creation of legacy code, and allow us to reuse whatever
+     work is done for the TDR's in the final Alice Offline framework.</LI>
+</UL>
+
+<P>
+<H3>6.1 The traditional GEANT3.21 </H3>
+
+<P>The old galice 1.05 program uses GEANT3.21 in the standard way, with
+KUIP as the interactive interface and the FFREAD cards to specify at run
+time the source of primary tracks in one event, to select the detectors
+taking part in the simulation and to switch on or off the sensitive media
+of the detectors that produce hits that are written out as PAW ntuples. The
+user routine UGINIT initializes the package and calls UGEOM that sets up
+the geometry.
+
+<BR>
+
+<TABLE BORDER="0" CELLSPACING="1" WIDTH="100%">
+<TR>
+ <TD ALIGN=left ROWSPAN="2">
+ <IMG ALT="Logical Diagram of OLD GALICE" ALIGN=left 
+  SRC="htmlgif/oldg.gif"  
+  width="750" height="630" VSPACE="5" HSPACE="2.5" BORDER="0">
+ </TD>
+</TR>
+</TABLE>
+
+<P>To process an event GUKINE takes an event from the event generator or
+generates the primary tracks internally, creating the Geant stacks JVERTEX
+and JKINE. These stacks are too small to contain a full ALICE event, then
+secondary tracks are added to them as the tracks are followed though the
+setup and produce secondaries, overflowing at 65K tracks.
+
+<P> The Geometry of the setup and the Hits in the sensitive parts of the
+detectors are coded by the users in FORTRAN.
+
+
+
+<H3><A NAME="6.2">6.2 The ROOT interface in GALICE</A></H3>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+<P> To move to the Object Oriented world and to be able to handle
+simulations of the ALICE detectors in an efficient way for the work being
+done for the Technical Design Reports (TDRs), it was decided to provide
+GALICE with a ROOT output. This was done in a way almost transparent to the
+galice users, keeping the KUIP and FFCARDS steering and the definition of
+the Geometry and Hits with the same user routines in FORTRAN. A future
+version in which the steering is done within ROOT and the Geometry and Hits
+can be defined by users in C++ is in preparation.
+
+<P>The code of this C++ interface is entirely documented <A
+HREF="html/USER_Index.html">here</A>.
+
+
+<P><TABLE>
+<TR>
+ <TD ALIGN=left ROWSPAN="2">
+ <IMG ALT="Logical Diagram of NEW GALICE" ALIGN=left 
+  SRC="htmlgif/newg.gif"  
+  width="750" height="630" VSPACE="5" HSPACE="2.5" BORDER="0">
+ </TD>
+</TR>
+</TABLE>
+
+<P> The GEANT routines GUKINE, GTREVE and GUSTEP have been modified so that
+the GEANT engine only follows one particle at a time and the output objects
+of the kinematics and hits are stored in ROOT Tree structures. The
+advantage of treating one particle at a time is that even if in one full
+ALICE event hundred of thousands of particles are followed, the program
+runs in less than 20 MBytes of memory.
+
+<P> GUKINE when given an event to simulate, sets up a ROOT stack:
+fParticles, in which all particles are inserted, which will not overflow
+and which also keeps all the history of all the particles so that if in a
+later generation a particle crosses a sensitive detector and the hit is
+written out, one can know from what type of primary it originates and which
+processes and in which materials gave rise to it.
+
+<P> When simulating one event, GUKINE takes one particle at a time and
+inserts it in the GEANT stack JKINE which is taken by GTREVE and followed
+through the setup. If in a given tracking step new particles are produced,
+GUSTEP inserts in the ROOT stack the kinematics of the secondary vertex and
+all the produced particles which will be fed eventually one by one to the
+GEANT 3 engine.
+
+<P> An ALICE <A HREF="html/USER_Index.html">class library</A> has been
+created that contains classes corresponding to the Hits defined for each
+detector in the Fortran routines.
+
+<P> The Hits are written out after each track in a ROOT Tree structure
+TreeH, of the file galice.root. There is one such tree per event. The
+kinematics of all the particles that produce hits, together with their
+genealogy up to the primary tracks is stared in the galice.root file in an
+other tree TreeK of which exists one per event. An additional tree of
+digits called TreeD is written out at each event. This tree contains
+information which is relative to the whole event and not track per track,
+as for instance the energy clusters in the TPC and PHOS. Finally the
+information of the events in the run is stored in the same file in the tree
+TreeE, containing the run and event number, the number of vertices, tracks
+and primary tracks in the event.
+
+<P>
+
+<H3>The class AliRun</H3>
+
+<P>Control class for Alice C++
+  Only one single instance of this class exists.
+  The object is created in main program aliroot
+  and is pointed by the global gAlice.                                     
+                 
+<UL>
+<LI>Supports the list of all Alice Detectors (fDetectors).
+<LI>Supports the list of particles (fParticles).
+<LI>Supports the Trees.
+<LI>Supports the geometry.
+<LI>Supports the event display.
+</UL>
+
+<TABLE>
+<TR>
+ <TD ALIGN=left ROWSPAN="2">
+ <IMG ALT="Logical Diagram of OLD GALICE" ALIGN=left 
+  SRC="htmlgif/alirun.gif"  
+  width="750" height="900" VSPACE="5" HSPACE="2.5" BORDER="0">
+ </TD>
+</TR>
+</TABLE>
+
+<H3>FORTRAN / C++ Interface routines</H3>
+
+<P>To be able to communicate between the FORTRAN code of GEANT and the ROOT
+data structure, a number of interface routines have been developed. These
+are in the source file <A
+HREF="html/examples/aliroot.cxx.html">aliroot.cxx</A>.
+
+<!=============================================================================>
+
+<DL>
+
+<P><DT><A NAME="RXSTMG"><B>RXSTMG</B></A>
+<DD>C++ step manager dispatcher. This is a direct interface to the <A
+HREF="html/AliRun.html">AliRun</A> step manager routine. It is called
+by the default version of GUSTEP and allows the user to handle directly the 
+data structures from C++ instead that via the FORTRAN interface.
+
+<P><DT><A NAME="RXAHIT"><B>RXAHIT(IDET, MTRACK, NUMBV, HITS)</B></A>
+
+<DD>Stores a hit in the ROOT structure. This routine is supposed to be called
+by the nnn_step routines.
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT>IDET
+   <TD>detector number as found in GEANT common block
+   <A HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node384.html#SECTION0138000000000000000000000">GCSETS</A>.
+<TR>
+   <TH ALIGN=LEFT>MTRACK
+   <TD>Number of the track generting the hit. The ROOT stack track number is found
+       in common block <A HREF="#SCKINE">SCKINE</A>
+<TR>
+   <TH ALIGN=LEFT>NUMBV
+   <TD>Array of voume numbers as found in common block 
+   <A HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node384.html#SECTION0138000000000000000000000">GCSETS</A>.
+<TR>
+   <TH ALIGN=LEFT>HITS
+   <TD>Array of user defined hits.
+</TABLE>
+
+<P><DT><A NAME="RXDINI"><B>RXDINI</B></A>
+<DD>Initialises all detectors. This routine is called by UGINIT.
+
+<P><DT><A NAME="RXGTRAK"><B>RXGTRAK (MTRACK, IPART, PMOM, E, VPOS, TOF)</B></A>
+<DD>Fetches next track from the ROOT stack for transport. Called by the modified
+version of <A HREF="#GTREVE">GTREVE</A>.
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT>MTRACK
+   <TD>Track number in the ROOT stack. If MTRACK=0 no more tracks are left in the
+   stack to be transported.
+<TR>
+   <TH ALIGN=LEFT>IPART
+   <TD>Particle code in the 
+<A HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node72.html#SECTION024000000000000000000000">GEANT conventions</A>.
+<TR>
+   <TH ALIGN=LEFT>PMOM(3)
+   <TD>Particle momentum in GeV/c
+<TR>
+   <TH ALIGN=LEFT>E
+   <TD>Particle energy in GeV
+<TR>
+   <TH ALIGN=LEFT>VPOS(3)
+   <TD>Particle position
+<TR>
+   <TH ALIGN=LEFT>TOF
+   <TD>Particle time of flight in seconds
+</TABLE>
+
+<P><DT><A NAME="RXSTRAK"><B>RXSTRAK (IDONE, IPARENT, IPART, PMOM, VPOS, TOF, CHMECA, NT)</B></A>
+<DD>Fetches next track from the ROOT stack for transport. Called by <A HREF="#GUKINE">
+GUKINE</A> and <A HREF="#GUSTEP">GUSTEP</A>.
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT>IDONE
+   <TD>Status of the track. If IDONE=0 the track is put on the ROOT stack but it
+   is not fetched for transport.
+<TR>
+   <TH ALIGN=LEFT VALIGN=TOP>IPARENT
+   <TD>Parent track. If IPARENT=0 the track is a primary. In GUSTEP the routine
+is normally called to store secondaries generated by the current track whose
+ROOT stack number is MTRACK (common <A HREF="#SCKINE">SCKINE</A>.
+<TR>
+   <TH ALIGN=LEFT>IPART
+   <TD>Particle code in the 
+<A HREF="http://wwwcn.cern.ch/asdoc/geant_html3/node72.html#SECTION024000000000000000000000">GEANT conventions</A>.
+<TR>
+   <TH ALIGN=LEFT>PMOM(3)
+   <TD>Particle momentum in GeV/c
+<TR>
+   <TH ALIGN=LEFT>VPOS(3)
+   <TD>Particle position
+<TR>
+   <TH ALIGN=LEFT>TOF
+   <TD>Particle time of flight in seconds
+<TR>
+   <TH ALIGN=LEFT>CHMECA
+   <TD>(CHARACTER*10) Particle origin. This field is user defined and it is
+not used inside the GALICE code.
+<TR>
+   <TH ALIGN=LEFT>NT
+   <TD>Number assigned to the particle in the ROOT stack.
+</TABLE>
+
+<P><DT><A NAME="RXSTIN"><B>RXSTIN(IRUN,IDEVT)</B></A>
+<DD> Called by GTRIGI at the beginning of each event.
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=TOP>IRUN
+   <TD>Current run number
+<TR>
+   <TH ALIGN=TOP>IDEVT
+   <TD>Current user event number
+</TABLE>
+
+<P><DT><A NAME="RXFILE"><B>RXFILE (CHFILE)</B></A>
+<DD>Opens the ROOT output file. Called by UGINIT.
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=TOP>CHFILE
+   <TD>(CHARACTER*(*)) file name to be opened.
+</TABLE>
+
+<P><DT><A NAME="RXOUTH"><B>RXOUTH</B></A>
+<DD>Called by GTREVE at the end of each primary track.
+
+<P><DT><A NAME="RXOUTK"><B>RXOUTK(IEVENT)</B></A>
+<DD>Called by GUOUT to write out kinematics at the end of the event:
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=TOP>IEVENT
+   <TD>Number of the current event.
+</TABLE>
+
+<P><DT><A NAME="RXFEND"><B>RXFEND</B></A>
+<DD>Called by UGLAST to write out everything and close down.
+</DL>
+
+<HR>
+<BR>
+<H2>
+<A NAME="7">7. Magnetic Field
+</A>
+</H2>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+<P>At the moment there are two magnetic field maps supported.
+
+<p><b>Map 1</b>
+
+<br>This is a constant field map for the L3 magnet and a parametrised
+dipole field with the following features:
+
+
+<P><TABLE WIDTH=80%>
+<TR>
+   <TH ALIGN=LEFT>position <TH ALIGN=LEFT>field
+<TR>
+   <TD>z  (725,1225) <TD>                    {7*(1-1E-5*(975-z)**2), 0, 0) 
+<TR>
+    <TD>z (-700,700) and sqrt(x**2+(y+30)**2)<560 <TD>           {0,0,2)
+<TR>
+    <TD>                elsewhere      <TD>                        {0,0,0}
+</TABLE>
+
+<p><b>Map 2</b>
+
+<br>This is a constant field map for the L3 magnet and a field map for
+the dipole. The data are contained in the file field01.dat in the same 
+directory than the rest of the files.
+
+<HR>
+<BR>
+<H2>
+<A NAME="8">8. Version history
+</A>
+</H2>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+<P>The detailed history of the changes to the fortran code can be found in
+the CMZ <A HREF="history.html">history file</A>. A general description of
+the modifications including those in the C++ code can be found in the <A
+HREF="Introduction.html">introduction</A>.
+
+<!=============================================================================>
+<!======================================================================>
+<H3><IMG src=gif/act.gif> page under construction </H3>
+<P> 
+please send comments to: <A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+</P>
+<HR>
+<!======================================================================>
+<BR><BR>
+<HR>
+page maintained by :
+<A HREF="mailto:Yiota.Foka@cern.ch">Yiota Foka</A>
+<BR>
+Back to: 
+<A HREF="http://www1.cern.ch/ALICE/welcome.html"> ALICE home, </A>
+<A HREF="http://www1.cern.ch/ALICE/Projects/offline/AliceOffLineHomePage.html">
+Offline home</A>
+
+</BODY>
+</HTML>
+
+
+
+
+
+