Import Geant4 10.3.1 source tree

This commit is contained in:
Gabriele Cosmo
2017-02-28 16:18:37 +01:00
parent 4597adb7c4
commit 3a5407696b
563 changed files with 0 additions and 95641 deletions
@@ -1,24 +0,0 @@
testem4/src is the geant3 equivalent of TestEm4
% cd geant3
% gmakeB to make an executable (Batch version)
% gmakeT to make an executable (inTeractive version)
To execute:
% cd geant3
% $G4SYSTEM/testem4.xb (for batch) or testem4.xt (for interactive)
The program will ask:
G3 > gives the filename of the data cards to be read:
run01.dat (runNN.dat is the equivalent of the G4 runNN.mac)
testem4 produces 1 histo saved as testem4.paw if ISWIT(2)=1
Content of this histo:
1 : energy deposit in C6F6
@@ -1,32 +0,0 @@
#
# @(#) Script to build a Batch geant executable
#
set name=testem4
set extnam=" "
if ($G4SYSTEM == AIX-AFS) set extnam=-qextname
#
mkdir $G4SYSTEM
cd $G4SYSTEM
#
# fortran compilation
#
hepf77 $extnam -c -g -Dbatch -I/cern/pro/include -I../include ../src/*.F
#
# Link
#
echo 'linking geant3+cernlib libraries ...'
#
hepf77 $extnam -g -o $name.xb *.o \
`cernlib geant321 pawlib graflib packlib mathlib kernlib`
#
#
chmod +x $name.xb
#
# cleanup
#
rm *.o
echo 'done'
exit
@@ -1,31 +0,0 @@
#
# @(#) Script to build an inTeractive geant executable
#
set name=testem4
set extnam=" "
if ($G4SYSTEM == AIX-AFS) set extnam=-qextname
#
mkdir $G4SYSTEM
cd $G4SYSTEM
#
# fortran compilation
#
hepf77 $extnam -c -g -I/cern/pro/include -I../include ../src/*.F
#
# Link
#
echo 'linking geant3+cernlib libraries...'
#
hepf77 $extnam -g -o $name.xt *.o \
`cernlib geant321 pawlib graflib packlib mathlib kernlib`
#
#
chmod +x $name.xt
#
# cleanup
#
rm *.o
echo 'done'
exit
@@ -1,2 +0,0 @@
COMMON/CELOSS/ ETOT
@@ -1,10 +0,0 @@
LIST
TRIG 100000
KINE 1 (Itype) 0.009(Ekine)
DEBUG 1 5 10000
SWIT 0 (draw) 1 (save)
CUTS 10.e-6 (cutgam) 10.e-6 (cutele) 3*10.e-3 (cutneu/had/muo)
2*10.e-6 (bcute/m) 2*428.e-6 (dcute/m)
LOSS 1
ABAN 0
TIME 2= 1.
@@ -1,34 +0,0 @@
SUBROUTINE GUKINE
*
* Generates Kinematics for primary track
*
* Data card Kine : Itype Ekine
*
#include "geant321/gconst.inc"
#include "geant321/gcflag.inc"
#include "geant321/gckine.inc"
*
DIMENSION VERTEX(3),PLAB(3)
DIMENSION RNDM(2)
*
DATA VERTEX/3*0./
*
*
CALL GSVERT(VERTEX,0,0,0,0,NVERT)
*
CALL GRNDM(RNDM,2)
cosTheta = 2*RNDM(1) - 1.
sinTheta = sqrt(1. - cosTheta**2)
Phi = TWOPI*RNDM(2)
*
PLAB(1) = PKINE(1)*sinTheta*COS(Phi)
PLAB(2) = PKINE(1)*sinTheta*SIN(Phi)
PLAB(3) = PKINE(1)*cosTheta
*
CALL GSKINE(PLAB,IKINE,NVERT,0,0,NT)
*
* *** Kinematics debug
IF (IEVENT.EQ.1.OR.IDEBUG.NE.0) CALL GPRINT('KINE',0)
*
END
@@ -1,27 +0,0 @@
SUBROUTINE GUOUT
*
* User routine called at the end of each event
*
#include "geant321/gcflag.inc"
#include "celoss.inc"
*
* *** drawing
*
#ifndef batch
IF (ISWIT(1).NE.0) THEN
CALL GDHEAD (110110,'TestEm4',0.)
CALL GDSHOW (3)
CALL GDXYZ (0)
END IF
#endif
*
* energy deposited
*
EMEV = 1000.*ETOT
CALL HFILL(1,EMEV,0.,1.)
IF (ISWIT(1).NE.0) PRINT 750,EMEV
*
750 FORMAT(1X,'Energy deposit: ',F6.3,' MeV')
*
END
@@ -1,24 +0,0 @@
SUBROUTINE GUSTEP
*
* User routine called at the end of each tracking step
*
#include "geant321/gcflag.inc"
#include "geant321/gckine.inc"
#include "geant321/gcking.inc"
#include "geant321/gctrak.inc"
#include "celoss.inc"
*
*
* *** Debug event and store tracks for drawing
IF (IDEBUG.NE.0) CALL GPCXYZ
IF ((ISWIT(1).EQ.1).AND.(CHARGE.NE.0.)) CALL GSXYZ
IF (ISWIT(1).EQ.2) CALL GSXYZ
*
* *** Something generated ?
IF(NGKINE.GT.0) CALL GSKING(0)
*
* *** Energy deposited
IF(DESTEP.GT.0.) ETOT = ETOT + DESTEP
*
END
@@ -1,13 +0,0 @@
SUBROUTINE GUTREV
*
* User routine to control tracking of one event
* Called by GRUN
*
#include "celoss.inc"
*
ETOT = 0.
*
CALL GTREVE
*
END
@@ -1,58 +0,0 @@
#ifdef batch
PROGRAM main
*
*
PARAMETER (NGBANK=100000, NHBOOK=10000)
COMMON/GCBANK/Q(NGBANK)
COMMON/PAWC /H(NHBOOK)
*
CALL GZEBRA( NGBANK)
CALL HLIMIT(-NHBOOK)
*
* *** initialize HIGZ
CALL HPLINT(0)
*
* *** GEANT initialisation
CALL UGINIT
*
* *** Start events processing
CALL GRUN
*
* *** End of RUN
CALL UGLAST
*
STOP
END
#else
PROGRAM main
*
* GEANT main program. To link with the MOTIF user interface
* the routine GPAWPP(NWGEAN,NWPAW) should be called, whereas
* the routine GPAW(NWGEAN,NWPAW) gives access to the basic
* graphics version.
*
PARAMETER (NWGEAN=3000000, NWPAW=1000000)
COMMON/GCBANK/GEANT(NWGEAN)
COMMON/PAWC /PAW (NWPAW)
*
*
CALL GPAW (NWGEAN,NWPAW)
*
END
*
SUBROUTINE qnext
END
*
SUBROUTINE czopen
END
*
SUBROUTINE cztcp
END
*
SUBROUTINE czclos
END
*
SUBROUTINE czputa
END
#endif
@@ -1,57 +0,0 @@
SUBROUTINE UGEOM
*
* *** Define user geometry set up
*
*
DIMENSION PAR(3)
DIMENSION AC6F6(2),ZC6F6(2),WC6F6(2)
*
* *** C6F6 compound parameters
DATA AC6F6/12.02, 19.01/
DATA ZC6F6/ 6. , 9. /
DATA WC6F6/ 6. , 6. /
*
CALL GSMIXT(1,'C6F6',AC6F6,ZC6F6,1.61,-2,WC6F6)
*
*
* *** Defines USER tracking media parameters
IMAT = 1
FIELDM = 0.0
IFIELD = 0
TMAXFD = 10.0
STEMAX = 1000.
DEEMAX = 0.20
EPSIL = 0.001
STMIN = 0.010
*
CALL GSTMED( 1,'C6F6',IMAT, 0 ,IFIELD,FIELDM,TMAXFD,
* STEMAX,DEEMAX,EPSIL,STMIN, 0 , 0 )
*
*
* *** Geometry
PAR(1) = 0.
PAR(2) = 5.
PAR(3) = 5.
CALL GSVOLU('C6F6','TUBE',1,PAR,3,IVOL)
*
* *** Close geometry banks. (obligatory system routine)
CALL GGCLOS
*
*
* *** dessin
CALL GSATT ('*','SEEN',1)
*
DO IX = 1,3
CALL GDOPEN (IX)
SCALE = 1.75
PAXIS = 0.
SAXIS = 1.
CALL GDRAWC ('C6F6',IX,0.,10.,9.5,SCALE,SCALE)
CALL GDAXIS (PAXIS,PAXIS,PAXIS,SAXIS)
CALL GDSCAL (10. , 0.3)
CALL GDCLOS
END DO
*
END
@@ -1,38 +0,0 @@
SUBROUTINE UGINIT
*
* To initialise GEANT/USER program and read data cards
*
CHARACTER*20 filnam
*
* *** Define the GEANT parameters
CALL GINIT
* *** read data cards
PRINT *, 'G3 > gives the filename of the data cards to be read:'
READ (*,'(A)') filnam
IF (filnam.EQ.' ') filnam = 'run01.dat'
OPEN (unit=5,file=filnam,status='unknown',form='formatted')
* *** read data cards
CALL GFFGO
*
CALL GZINIT
CALL GPART
*
CALL GDINIT
*
* *** Geometry and materials description
CALL UGEOM
*
* *** Energy loss and cross-sections initialisations
CALL GPHYSI
*
CALL GPRINT('MATE',0)
CALL GPRINT('TMED',0)
CALL GPRINT('VOLU',0)
*
* *** Define user histograms
CALL UHINIT
*
END
@@ -1,21 +0,0 @@
SUBROUTINE UGLAST
*
* Termination routine to print histograms and statistics
*
#include "geant321/gcflag.inc"
*
*
CALL GLAST
*
* *** print selected histo
*
* *** close HIGZ
CALL HPLEND
*
* *** Save selected histograms
IF (ISWIT(2).EQ.1) THEN
CALL HRPUT(0,'testem4.paw','N')
ENDIF
*
END
@@ -1,11 +0,0 @@
SUBROUTINE UHINIT
*
* To book the user's histograms
*
CALL HBOOK1(1,'total energy deposit in C6F6 (MeV)'
*,100, 0., 10., 0.)
CALL HIDOPT(0,'STAT')
*
END
@@ -1,12 +0,0 @@
macro plotHisto.kumac
*
h/file 1 testem4.hbook
*
h/list
*
opt stat
opt logy
*
h/pl 1
*
return