// The purpose of this tutorial is to show you how to use the physics lists,
// and to use geant4 to get insight into the nature of electromagnetic
// and hadronic showers.

// download physics lists QGSP, QGSP_GN, and the Packaging library, and modify the makefiles
// to work with a central installation, or simply use the code in this distribution as is.

// use tcsh, since the tutorial was tested with this.

tcsh

// Set the enironment; replace 'hpwell' directories wit therponding
// dirctories in your own user area.

setenv G4SYSTEM Linux-g++
setenv CLHEP_BASE_DIR /products/CLHEP/v1.8/spec/i386_linux24/
setenv G4VIS_USE 1
setenv G4VIS_USE_OPENGLX 1
setenv G4VIS_BUILD 1
setenv G4VIS_BUILD_OPENGLX 1
setenv G4VIS_BUILD_OPENGLX_DRIVER 1
setenv OGLHOME /usr/X11R6

setenv G4INSTALL /products/geant4/geant4.5.2/
// replace hpwell
setenv LISTS_BASE /afs/desy.de/user/h/hpwell/WorkSpace

// untar the tutorial

cd lists
cd QGSP;      gmake
cd Packaging; gmake
cd QGSP_GN;   gmake

// replace hpwell
setenv G4WORKDIR /afs/desy.de/user/h/hpwell/WorkSpace/hadronics

cd hadronics 
gmake

setenv G4LEVELGAMMADATA /products/geant4/data/G4PhotonEvap.2.0/PhotonEvaporation/
setenv DrawAll 1
$G4WORKDIR/bin/Linux-g++/myMain

/gun/particle gamma
/gun/energy 25 GeV
/run/beamOn 10

exit
cd src
nedit MyEventAction.cc

// gamma at 25 GeV
unsetenv DrawAll 
setenv DrawElectron 1
$G4WORKDIR/bin/Linux-g++/myMain
/gun/particle gamma
/gun/energy 25 GeV
/run/beamOn 10

setenv DrawGamma 1
$G4WORKDIR/bin/Linux-g++/myMain
/gun/particle gamma
/gun/energy 25 GeV
/run/beamOn 10

unsetenv DrawGamma
setenv DrawNeutron 1
$G4WORKDIR/bin/Linux-g++/myMain
/gun/particle gamma
/gun/energy 25 GeV
/run/beamOn 10
/run/beamOn 15

unsetenv DrawElectron
$G4WORKDIR/bin/Linux-g++/myMain
/gun/particle gamma
/gun/energy 25 GeV
/run/beamOn 10
/run/beamOn 15

// pi- at 25 GeV
unsetenv DrawNeutron
setenv DrawAll 1
$G4WORKDIR/bin/Linux-g++/myMain
/gun/particle pi-
/gun/energy 25 GeV
/run/beamOn 10
/run/beamOn 15

unsetenv DrawAll
setenv DrawPion 1
$G4WORKDIR/bin/Linux-g++/myMain
/gun/particle pi-
/gun/energy 25 GeV
/run/beamOn 10
/run/beamOn 15

setenv DrawElectron 1
$G4WORKDIR/bin/Linux-g++/myMain
/gun/particle pi-
/gun/energy 25 GeV
/run/beamOn 10
/run/beamOn 15

setenv DrawNeutron 1
$G4WORKDIR/bin/Linux-g++/myMain
/gun/particle pi-
/gun/energy 25 GeV
/run/beamOn 10
/run/beamOn 15

setenv DrawGamma 1
$G4WORKDIR/bin/Linux-g++/myMain
/gun/particle pi-
/gun/energy 25 GeV
/run/beamOn 10
/run/beamOn 15



