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 x0 y0 z0 ux uy uz 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/gckine.inc"
13 #include "calor.inc"
14 #include "histo.inc"
15 *
16  dimension vertex(3),plab(3)
17  dimension rndm(2)
18 *
19  data amev /1.e-3/
20 *
21 * *** set/reset default kinematic
22  IF ((ikine.LT.0).or.(abs(pkine(2)).GT.0.5*worldx)) THEN
23  ikine = abs(ikine)
24  pkine(2) = -0.5*worldx
25  pkine(3) = 0.
26  pkine(4) = 0.
27  pkine(5) = 1.
28  pkine(6) = 0.
29  pkine(7) = 0.
30  ENDIF
31 *
32 * random in YZ ?
33  if ((pkine(8).lt.0.).or.(pkine(8).gt.1.)) pkine(8) = 0.
34  rbeam = pkine(8)*0.5*caloryz
35  call grndm(rndm,2)
36 *
37  vertex(1) = pkine(2)
38  vertex(2) = pkine(3) + (2*rndm(1)-1.)*rbeam
39  vertex(3) = pkine(4) + (2*rndm(2)-1.)*rbeam
40 *
41  CALL gsvert(vertex,0,0,0,0,nvert)
42 *
43 *
44  jpa = lq(jpart-ikine)
45  xmass = q(jpa+7)
46  pmom = sqrt(pkine(1)*(pkine(1)+2*xmass))
47  plab(1) = pmom*pkine(5)
48  plab(2) = pmom*pkine(6)
49  plab(3) = pmom*pkine(7)
50 *
51  CALL gskine(plab,ikine,nvert,0,0,nt)
52 *
53 * *** Kinematics debug
54  IF (ievent.EQ.1.OR.idebug.NE.0) CALL gprint('KINE',0)
55 *
56  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