How to run HGeant 

In order to run hgeant, a geaini.dat input file is needed. This input file contains:

  1. A list of GEANT and user keywords ended with the keyword STOP.

  2. Media and geometry files ( *.geo )

  3. A list of hit definition files ( *rich*.hit, *mdc*.hit, *shower*.hit, *tof*.hit ).

  4. The name of the field-map file ( *.map ).

  5. Event files ( *.evt ). This is the input file which have been generated with pluto or UrQMD. 

  6. A list of hit ntuples ( *kine*.tup, *rich*.tup, *mdc*.tup, *shower*.tup, *tof*.tup ). 

  7. The output ROOT file holding the event tree (*.root).

All HGeant input/output is in units of mm, MeV and ns !
The following user keywords are defined in hgeant:

FILE j [set output mode]

j = -1 : open HBOOK ntuple files specified by .tup key in geaini.dat
   = 0 : no output to file
   = 1 : open ROOT file specified by .root key in geaini.dat (default)

JVER jver(3) [set mode of vertex generation]

jver(1)=0 : emission from (0,0,0) vertex (default)

  =1 : emission from (x,y,z) vertex 

  =2 : emission from segmented target 

  =3 : emission from cubic volume 

  =4 : emission from cylindrical volume 

jver(2)=0 : emission from sharp z
    =1 : volume with uniform z distribution
    =2 : volume with exponential z distribution
    =3 : volume with discrete z distribution
jver(3)=0 : emission from sharp x,y
    =1 : volume with uniform x,y distribution
    =2 : volume with exponential x,y distribution

BEAM beampar(6) [beam parameters]

sig(X) sig(Y) Ebeam sig(Ebeam) X Y (in mm,mm,MeV,MeV,mm,mm)

PMCF pmcf [read event files]

pmcf=1: read events from .evt event files default=(1)

PMCK pmck [Root event generator]

pmck=1: get event from Root interpreter via passEvent() default=(0)

FMAP imap [specify field map to be used]

             imap=0 : use zero field
             =1 : use old magnetic field map
             =2 : use TOSCA magnetic field map (default)

FPOL fpol [control scaling and polarity of magnetic field]

             fpol = 1.0 : field polarity and scaling factor (default)
                     = -1.0 : reverse field

SECO iseco icomp [control treatment of secondary particles]

iseco = 0 : no secondary particles 
           = 1 : store in temporary stack only
           = 2 : store only secondary particles, if not produced in Shower converter
           = 3 : store all secondary particles (default)
icomp = 0 : all tracks output into kine branch (default)
             = 1 : only active tracks are output

SPLIT nsplit [define split level of ROOT tree]

nsplit = 0 : ROOT tree has 1 superbranch only (=Event)
           = 1 : each partial event makes a superbranch (default)
           = 2 : each data member makes a (browseable) branch

MXST mixev [set max. number of steps allowed in tracking]

maximum number of steps 

SWIT iswit(10) [set GEANT switches]

 iswit(1)>0 : track only particles with ID=iswit(1)

 iswit(1)<0 : do not track particles with ID= iswit(1) 

RUNG idrun idevt [run and event numbers]

idrun : run number (default = 1)
idevt : first event to analyze (default = 1)

There are three ways to run HGeant: interactively, in the background, or as a batch job. 

  1. Type e.g  . geantlogin v3_14
  2. To run Hgeant interactively copy the files: 
    1. geaini.dat
    2. menu.c
    3. rootlogin.C
    4. color.kumac
    5. hadesfrontframes.kumac
    6. cavecol.kumac
    7. hadesfront.kumac
    8. rich.kumac
    9. P_Z_frames.kumac

    to your working directory. Type

      hgeant
    it will appear to your monitor the following bar:
For exam. if you make click in Draw Color it will appear the following plot:
 
if you click the P Z Frames you will see the following plot:

  1. To run hgeant in the background or as a batch job. Type
./propagate_batch_a.sh
or
hgeant -b -c -f geaini.dat >>test.out