2 *===program crint======================================================*
4 C OPTIONS/ EXTEND_SOURCE
6 SUBROUTINE DT_PRODUCEEVENT(ENERGY_SL, NPARTICLES)
9 IMPLICIT DOUBLE PRECISION (A-H,O-Z)
12 REAL ne,etest,prob,slump
15 * Call the init sub routine in the first event
18 PARAMETER (NMXHKK=200000)
20 COMMON /DTIONT/ LINP,LOUT,LDAT
22 COMMON /DTEVT1/ NHKK,NEVHKK,ISTHKK(NMXHKK),IDHKK(NMXHKK),
23 & JMOHKK(2,NMXHKK),JDAHKK(2,NMXHKK),
24 & PHKK(5,NMXHKK),VHKK(4,NMXHKK),WHKK(4,NMXHKK)
27 COMMON /DTEVNO/ NEVENT, ICASCA
30 OPEN (UNIT = 50, file = "my.input")
32 CALL DT_DTUINI(NEVTS,EPN,NPMASS,NPCHAR,NTMASS,NTCHAR,IDP,IEMU)
33 * Init called, make sure it's not called again
36 *-----------------------------------------------------------------------
37 * generation of one event
41 * If an energy-range has been defined with the ENERGY input-card the
42 * laboratory energy ELAB can be set to any value within that range,..
43 C ELAB = DT_RNDM(EPN)*(EPN-0.5D7)+0.5D7
45 * ..otherwise it has to coincide with EPN.
50 * sampling of one event
54 CALL DT_KKINC(NPMASS,NPCHAR,NTMASS,NTCHAR,IDP,ELAB,KKMAT,IREJ)
58 c Return the number of particles produced
60 c Fill the particle info
61 CALL DT_GETPARTICLES(NPARTICLES)
66 SUBROUTINE DT_GETPARTICLES(NPARTICLES)
68 IMPLICIT DOUBLE PRECISION (A-H,O-Z)
69 INTEGER pid,qch,q_sum,Ntpc,Nfinal,NACCEPT,IPART,RES
70 DOUBLE PRECISION yrap,pt,mass,mt,etot
71 DOUBLE PRECISION pt_cut_tpc
72 PARAMETER(pt_cut_tpc=0.050)
77 * NHKK number of entries in common block
78 * NEVHKK number of the event
79 * ISTHKK(i) status code for entry i
80 * IDHKK(i) identifier for the entry
81 * (for particles: identifier according
82 * to the PDG numbering scheme)
83 * JMOHKK(1,i) pointer to the entry of the first mother
85 * JMOHKK(2,i) pointer to the entry of the second mother
87 * JDAHKK(1,i) pointer to the entry of the first daughter
89 * JDAHKK(2,i) pointer to the entry of the second daughter
91 * PHKK(1..3,i) 3-momentum
97 PARAMETER (NMXHKK=200000)
99 COMMON /DTEVT1/ NHKK,NEVHKK,ISTHKK(NMXHKK),IDHKK(NMXHKK),
100 & JMOHKK(2,NMXHKK),JDAHKK(2,NMXHKK),
101 & PHKK(5,NMXHKK),VHKK(4,NMXHKK),WHKK(4,NMXHKK)
103 * extended event history
104 COMMON /DTEVT2/ IDRES(NMXHKK),IDXRES(NMXHKK),NOBAM(NMXHKK),
105 & IDBAM(NMXHKK),IDCH(NMXHKK),NPOINT(10),
108 DOUBLE PRECISION SLPX, SLPY, SLPZ, SLE, SLM
109 INTEGER SLPID, SLCHARGE
110 COMMON /DPMJETPARTICLE/ SLPX(NMXHKK), SLPY(NMXHKK), SLPZ(NMXHKK),
111 & SLE(NMXHKK), SLM(NMXHKK), SLPID(NMXHKK), SLCHARGE(NMXHKK)
114 C >> Set Counter to Zero
121 CC >> Remove all non-final-state particles
122 IF(.not.(ISTHKK(I).eq.1.or.ISTHKK(I).eq.-1.or.
123 $ISTHKK(I).eq.1001)) GOTO 42
125 C >> Find Particle Charge, qch
126 IF((ABS(ISTHKK(I)).eq.1).and.(IDHKK(I).ne.80000))THEN
127 C >> final state ptcles except nuclei
129 qch=IPHO_CHR3(IDHKK(I),1)/3
130 ELSEIF(IDHKK(I).eq.80000)THEN
131 C >> final state nuclei
134 C >> not a final state particle, qch not interesting
139 SLPX(Nfinal) = PHKK(1,I)
140 SLPY(Nfinal) = PHKK(2,I)
141 SLPZ(Nfinal) = PHKK(3,I)
142 SLE(Nfinal) = PHKK(4,I)
143 SLM(Nfinal) = PHKK(5,I)
144 SLPID(Nfinal) = IDHKK(I)
145 SLCHARGE(Nfinal) = qch
152 SUBROUTINE DT_USRHIS(MODE)
153 c Dummy to make the linker happy