2 *===program dpmjet=====================================================*
6 IMPLICIT DOUBLE PRECISION (A-H,O-Z)
9 EXTERNAL BDANDI, BDEMFL, BDEVAP, BDMULS, BDNOPT, BDPHFL, BDPWXS,
10 & BDRNDM, BDSQZI, BLKDT1, BLKDT2, BLKDT3, BLKDT4, BLKDT5,
11 & BLKDT6, BLKDT7, COUNTR, ELPROI, HADINI, BDPREE
16 COMMON /DTEVNO/ NEVENT,ICASCA
18 *-----------------------------------------------------------------------
21 * the following statement provides a call to DT_USRHIS(MODE=1) for
22 * histogram initialization etc.
23 CALL DT_DTUINI(NEVTS,EPN,NPMASS,NPCHAR,NTMASS,NTCHAR,IDP,IEMU)
25 *-----------------------------------------------------------------------
26 * generation of events
30 * some defaults, do not change!
34 * uncomment if dpmjet3 is linked to particle transport code
37 ************************************************************************
38 * The following lines show how to select the target nucleus for runs
39 * with composite targets (and fixed projectile and energy!).
41 * Sampling of the target nucleus (mass number NTMASS, charge NTCHAR)
42 * according to the fractions defined with EMULSION input-cards.
43 * The different nuclei are numbered as KKMAT = 1,2,3,... according to
44 * their appearance in the input-file.
46 * Replace this selection by your own one if needed.
47 CALL DT_GETEMU(NTMASS,NTCHAR,KKMAT,0)
48 * Kkmat has to be negative for composite targets!
51 ************************************************************************
53 ************************************************************************
54 * The following lines show how to define projectile, target and energy
55 * for this event in runs with Glauber-data file pre-initialized for a
56 * certain range of projectiles, targets and energies. The definitions
57 * have to be within the pre-initialized parameter range.
59 * projectile-id (for hadron projectiles)
61 * projectile mass and charge numbers
64 * target mass and charge numbers
69 ************************************************************************
71 ************************************************************************
72 * If an energy-range has been defined with the ENERGY input-card the
73 * laboratory energy ELAB can be set to any value within that range. For
77 C ELAB = DT_RNDM(ELAB)*(EHI-ELO)+ELO
78 ************************************************************************
80 * sampling of one event
81 CALL DT_KKINC(NPMASS,NPCHAR,NTMASS,NTCHAR,IDP,ELAB,KKMAT,IREJ)
84 * the following statement provides a call to DT_USRHIS(MODE=2) from
85 * where the final state particles can be obtained
87 CALL PHO_PHIST(2000,DUM)
91 *-----------------------------------------------------------------------
92 * output, statistics etc.
94 * the following statement provides a call to DT_USRHIS(MODE=3) in
95 * order to calculate histograms etc.
100 *===usrhis=============================================================*
103 SUBROUTINE DT_USRHIS(MODE)
105 IMPLICIT DOUBLE PRECISION (A-H,O-Z)
109 * NHKK number of entries in common block
110 * NEVHKK number of the event
111 * ISTHKK(i) status code for entry i
112 * IDHKK(i) identifier for the entry
113 * (for particles: identifier according
114 * to the PDG numbering scheme)
115 * JMOHKK(1,i) pointer to the entry of the first mother
117 * JMOHKK(2,i) pointer to the entry of the second mother
119 * JDAHKK(1,i) pointer to the entry of the first daughter
121 * JDAHKK(2,i) pointer to the entry of the second daughter
123 * PHKK(1..3,i) 3-momentum
129 PARAMETER (NMXHKK=200000)
131 COMMON /DTEVT1/ NHKK,NEVHKK,ISTHKK(NMXHKK),IDHKK(NMXHKK),
132 & JMOHKK(2,NMXHKK),JDAHKK(2,NMXHKK),
133 & PHKK(5,NMXHKK),VHKK(4,NMXHKK),WHKK(4,NMXHKK)
134 * extended event history
135 COMMON /DTEVT2/ IDRES(NMXHKK),IDXRES(NMXHKK),NOBAM(NMXHKK),
136 & IDBAM(NMXHKK),IDCH(NMXHKK),NPOINT(10),
141 *------------------------------------------------------------------
147 * Called with MODE=1 once at the beginning of the run.
151 *------------------------------------------------------------------
155 * scoring of the present event
157 * Called with MODE=2 every time one event has been finished.
159 * The final state particles from the actual event (number NEVHKK)
160 * can be found in DTEVT1 and identified by their status:
162 * ISTHKK(i) = 1 final state particle produced in
163 * photon-/hadron-/nucleon-nucleon collisions or
164 * in intranuclear cascade processes
165 * -1 nucleons, deuterons, H-3, He-3, He-4 evaporated
166 * from excited nucleus and
167 * photons produced in nuclear deexcitation processes
168 * 1001 residual nucleus (ground state)
170 * The types of these particles/nuclei are given in IDHKK as follows
172 * all final state part. except nuclei :
173 * IDHKK(i)=particle identifier according to PDG numbering scheme
174 * nuclei (evaporation products, and residual nucleus) :
175 * IDHKK(i)=80000, IDRES(i)=mass number, IDXRES(i)=charge number
177 * The 4-momenta and masses can be found in PHKK (target nucleus rest frame):
178 * PHKK(1..3,i) 3-momentum (p_x,p_y,p_z)
184 * Pick out the final state particles from DTEVT1 in each event for
185 * instance by the following loop (NHKK=number of entries in the present
186 * event) and fill your histograms
189 C IF (ABS(ISTHKK(I)).NE. -1 .AND. ABS(ISTHKK(I)) .NE. 1001 ) THEN
190 IF (ABS(ISTHKK(I)).EQ. 1) THEN
196 C IF (ABS(ISTHKK(I)).NE. -1 .AND. ABS(ISTHKK(I)) .NE. 1001 ) THEN
197 IF (ABS(ISTHKK(I)).EQ. 1) THEN
199 & i, isthkk(i), idhkk(i),
200 & phkk(1,i), phkk(2,i), phkk(3,i), phkk(4,i), phkk(5,i),
201 & jmohkk(1,i), jmohkk(2,i), jdahkk(1,i), jdahkk(2,i)
202 ELSEIF (ABS(ISTHKK(I)).EQ.1001) THEN
205 100 FORMAT(3i6, 5e13.5, 4i7)
206 * At any time during the run a list of the actual entries in DTEVT1 and
207 * DTEVT2 can be obtained (output unit 6) by the following statement:
212 *------------------------------------------------------------------
216 * output/statistics/histograms etc.
218 * Called with MODE=3 once after all events have been sampled.