-
Notifications
You must be signed in to change notification settings - Fork 0
/
user3.0-5F.f
214 lines (185 loc) · 7.06 KB
/
user3.0-5F.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
*$ CREATE DPMJET.FOR
*COPY DPMJET
*
*===program dpmjet=====================================================*
*
PROGRAM DPMJET
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
SAVE
EXTERNAL BDANDI, BDINPT, BDEVAP, BDMULS, BDNOPT, BDPHFL, BDPWXS,
& BDRNDM, BDSQZI, BDHDR1, BDHDR2, BDHDR3, BDPART, BDPRDC,
& BDTRNS, COUNTR, ELPROI, HADINI, BDPREE, BDSPDC, BDGTFR
C EXTERNAL PYDATA
* event flag
COMMON /DTEVNO/ NEVENT,ICASCA
*-----------------------------------------------------------------------
* initialization
* the following statement provides a call to DT_USRHIS(MODE=1) for
* histogram initialization etc.
CALL DT_DTUINI(NEVTS,EPN,NPMASS,NPCHAR,NTMASS,NTCHAR,IDP,IEMU)
*-----------------------------------------------------------------------
* generation of events
DO 1 IEVT=1,NEVTS
* some defaults, do not change!
NEVENT = IEVT
KKMAT = -1
ELAB = EPN
* uncomment if dpmjet3 is linked to particle transport code
ICASCA = 1
************************************************************************
* The following lines show how to select the target nucleus for runs
* with composite targets (and fixed projectile and energy!).
*
* Sampling of the target nucleus (mass number NTMASS, charge NTCHAR)
* according to the fractions defined with EMULSION input-cards.
* The different nuclei are numbered as KKMAT = 1,2,3,... according to
* their appearance in the input-file.
IF (IEMU.GT.0) THEN
* Replace this selection by your own one if needed.
CALL DT_GETEMU(NTMASS,NTCHAR,KKMAT,0)
* Kkmat has to be negative for composite targets!
KKMAT = -KKMAT
ENDIF
************************************************************************
************************************************************************
* The following lines show how to define projectile, target and energy
* for this event in runs with Glauber-data file pre-initialized for a
* certain range of projectiles, targets and energies. The definitions
* have to be within the pre-initialized parameter range.
*
* projectile-id (for hadron projectiles)
C IDP = 1
* projectile mass and charge numbers
C NPMASS = 12
C NPCHAR = 6
* target mass and charge numbers
C NTMASS = 16
C NTCHAR = 8
* lab energy
C ELAB = 200.0D0
************************************************************************
************************************************************************
* If an energy-range has been defined with the ENERGY input-card the
* laboratory energy ELAB can be set to any value within that range. For
* example:
C ELO = 10.0D0
C EHI = 1000.0D0
C ELAB = DT_RNDM(ELAB)*(EHI-ELO)+ELO
************************************************************************
* sampling of one event
CALL DT_KKINC(NPMASS,NPCHAR,NTMASS,NTCHAR,IDP,ELAB,KKMAT,IREJ)
IF (IREJ.NE.0) GOTO 1
* the following statement provides a call to DT_USRHIS(MODE=2) from
* where the final state particles can be obtained
CALL PHO_PHIST(2000,DUM)
1 CONTINUE
*-----------------------------------------------------------------------
* output, statistics etc.
* the following statement provides a call to DT_USRHIS(MODE=3) in
* order to calculate histograms etc.
CALL DT_DTUOUT
END
*$ CREATE DT_USRHIS.FOR
*COPY DT_USRHIS
*
*===usrhis=============================================================*
*
SUBROUTINE DT_USRHIS(MODE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
SAVE
*
* COMMON /DTEVT1/ :
* NHKK number of entries in common block
* NEVHKK number of the event
* ISTHKK(i) status code for entry i
* IDHKK(i) identifier for the entry
* (for particles: identifier according
* to the PDG numbering scheme)
* JMOHKK(1,i) pointer to the entry of the first mother
* of entry i
* JMOHKK(2,i) pointer to the entry of the second mother
* of entry i
* JDAHKK(1,i) pointer to the entry of the first daughter
* of entry i
* JDAHKK(2,i) pointer to the entry of the second daughter
* of entry i
* PHKK(1..3,i) 3-momentum
* PHKK(4,i) energy
* PHKK(5,i) mass
*
* event history
PARAMETER (NMXHKK=200000)
COMMON /DTEVT1/ NHKK,NEVHKK,ISTHKK(NMXHKK),IDHKK(NMXHKK),
& JMOHKK(2,NMXHKK),JDAHKK(2,NMXHKK),
& PHKK(5,NMXHKK),VHKK(4,NMXHKK),WHKK(4,NMXHKK)
* extended event history
COMMON /DTEVT2/ IDRES(NMXHKK),IDXRES(NMXHKK),NOBAM(NMXHKK),
& IDBAM(NMXHKK),IDCH(NMXHKK),NPOINT(10),
& IHIST(2,NMXHKK)
GOTO (1,2,3) MODE
*------------------------------------------------------------------
*
1 CONTINUE
*
* initializations
*
* Called with MODE=1 once at the beginning of the run.
*
RETURN
*
*------------------------------------------------------------------
*
2 CONTINUE
*
* scoring of the present event
*
* Called with MODE=2 every time one event has been finished.
*
* The final state particles from the actual event (number NEVHKK)
* can be found in DTEVT1 and identified by their status:
*
* ISTHKK(i) = 1 final state particle produced in
* photon-/hadron-/nucleon-nucleon collisions or
* in intranuclear cascade processes
* -1 nucleons, deuterons, H-3, He-3, He-4 evaporated
* from excited nucleus and
* photons produced in nuclear deexcitation processes
* 1001 residual nucleus (ground state)
*
* The types of these particles/nuclei are given in IDHKK as follows
*
* all final state part. except nuclei :
* IDHKK(i)=particle identifier according to PDG numbering scheme
* nuclei (evaporation products, and residual nucleus) :
* IDHKK(i)=80000, IDRES(i)=mass number, IDXRES(i)=charge number
*
* The 4-momenta and masses can be found in PHKK (target nucleus rest frame):
* PHKK(1..3,i) 3-momentum (p_x,p_y,p_z)
* PHKK(4,i) energy
* PHKK(5,i) mass
*
*
*
* Pick out the final state particles from DTEVT1 in each event for
* instance by the following loop (NHKK=number of entries in the present
* event) and fill your histograms
C DO 20 I=1,NHKK
C IF (ABS(ISTHKK(I)).EQ.1) THEN
C ELSEIF (ABS(ISTHKK(I)).EQ.1001) THEN
C ENDIF
C 20 CONTINUE
* At any time during the run a list of the actual entries in DTEVT1 and
* DTEVT2 can be obtained (output unit 6) by the following statement:
C CALL DT_EVTOUT(4)
RETURN
*
*------------------------------------------------------------------
*
3 CONTINUE
*
* output/statistics/histograms etc.
*
* Called with MODE=3 once after all events have been sampled.
*
RETURN
END