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 theta phi rbeam
7 *
8 * rbeam : size of the random beam extension in fraction of 0.5*calorYZ
9 *
10 #include "geant321/gcbank.inc"
11 #include "geant321/gcflag.inc"
12 #include "geant321/gconst.inc"
13 #include "geant321/gckine.inc"
14 *
15 #include "geomate.inc"
16 #include "runinfo.inc"
17 *
18  dimension vertex(3),plab(3)
19  dimension rndm(2)
20 *
21 * random in YZ ?
22  if ((pkine(4).lt.0.).or.(pkine(4).gt.1.)) pkine(4) = 0.
23  rbeam = pkine(4)*0.5*yzabso
24  call grndm(rndm,2)
25 *
26  vertex(1)=xvert
27  vertex(2)=yvert + (2*rndm(1)-1.)*rbeam
28  vertex(3)=zvert + (2*rndm(2)-1.)*rbeam
29 *
30  CALL gsvert(vertex,0,0,0,0,nvert)
31 *
32  jpa = lq(jpart-ikine)
33  xmass = q(jpa+7)
34  pmom = sqrt(pkine(1)*(pkine(1)+2*xmass))
35  theta = pkine(2)*degrad
36  phi = pkine(3)*degrad
37 C
38  plab(1)=pmom*sin(theta)*cos(phi)
39  plab(2)=pmom*sin(theta)*sin(phi)
40  plab(3)=pmom*cos(theta)
41 *
42 * store the charge of primary particle in a free location
43  pkine(10) = q(jpa+8)
44 C
45  CALL gskine(plab,ikine,nvert,0,0,nt)
46 *
47 * *** Kinematics debug
48  IF (ievent.EQ.1.OR.idebug.NE.0) CALL gprint('KINE',0)
49 *
50  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