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/gconst.inc"
9 #include "geant321/gcflag.inc"
10 #include "geant321/gckine.inc"
11 *
12  dimension vertex(3),plab(3)
13  dimension rndm(2)
14 *
15  DATA vertex/3*0./
16 *
17 *
18  CALL gsvert(vertex,0,0,0,0,nvert)
19 *
20  CALL grndm(rndm,2)
21  costheta = 2*rndm(1) - 1.
22  sintheta = sqrt(1. - costheta**2)
23  phi = twopi*rndm(2)
24 *
25  plab(1) = pkine(1)*sintheta*cos(phi)
26  plab(2) = pkine(1)*sintheta*sin(phi)
27  plab(3) = pkine(1)*costheta
28 *
29  CALL gskine(plab,ikine,nvert,0,0,nt)
30 *
31 * *** Kinematics debug
32  IF (ievent.EQ.1.OR.idebug.NE.0) CALL gprint('KINE',0)
33 *
34  END