Geant4_10
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
DOUBLE PRECISION function rndm(RDUMMY)
Definition: dpm25nulib.f:1460
subroutine gukine
Definition: gukine.F:2
TTree * nt
Definition: plotHisto.C:21
static c2_sqrt_p< float_type > & sqrt()
make a *new object
Definition: c2_factory.hh:142
static c2_cos_p< float_type > & cos()
make a *new object
Definition: c2_factory.hh:134
static c2_sin_p< float_type > & sin()
make a *new object
Definition: c2_factory.hh:132