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 xbeam rbeam
7 *
8 #include "geant321/gcbank.inc"
9 #include "geant321/gcflag.inc"
10 #include "geant321/gckine.inc"
11 #include "calor.inc"
12 *
13  dimension vertex(3),plab(3)
14  dimension rndm(3)
15 *
16  DATA vertex/3*0./
17  DATA plab /3*0./
18 *
19  IF (pkine(2).NE.0.) vertex(1) = -0.5*boxsize
20 *
21 * random in YZ ?
22  if ((pkine(3).lt.0.).or.(pkine(3).gt.1.)) pkine(3) = 0.
23  rbeam = pkine(3)*0.5*boxsize
24  call grndm(rndm,2)
25 *
26  vertex(2) = (2*rndm(1)-1.)*rbeam
27  vertex(3) = (2*rndm(2)-1.)*rbeam
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