| Rev | Line | |
|---|
| [807] | 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
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.