Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gukine.F
Go to the documentation of this file.
1 
2  SUBROUTINE gukine
3 *
4 * Generates Kinematics for primary track
5 *
6 * Data card Kine : Itype Ekine
7 *
8 #include "geant321/gcbank.inc"
9 #include "geant321/gcflag.inc"
10 #include "geant321/gckine.inc"
11 *
12 #include "detector.inc"
13 *
14  dimension vertex(3),plab(3)
15  dimension rndm(2)
16 *
17  DATA vertex/3*0./
18  DATA plab /3*0./
19 *
20  vertex(1) = -0.5*boxsize
21 *
22 * random in YZ
23  beam = 0.4*boxsize
24  call grndm(rndm,2)
25 *
26  vertex(2) = (2*rndm(1)-1.)*beam
27  vertex(3) = (2*rndm(2)-1.)*beam
28 *
29  CALL gsvert(vertex,0,0,0,0,nvert)
30 *
31  jpa = lq(jpart-ikine)
32  xmass = q(jpa+7)
33  plab(1) = sqrt(pkine(1)*(pkine(1)+2*xmass))
34 *
35  CALL gskine(plab,ikine,nvert,0,0,nt)
36 *
37 * *** Kinematics debug
38  IF (ievent.EQ.1.OR.idebug.NE.0) CALL gprint('KINE',0)
39 *
40  END