-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdvcs_ini.f
441 lines (328 loc) · 9.96 KB
/
dvcs_ini.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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
*CMZ : 05/10/2004 13.26.59 by H1 Saclay
*-- Author : Unknown 17/12/2003
******************************************************************
*
subroutine dvcs_ini(mfail)
*
******************************************************************
implicit double precision (a-h,o-z)
include 'dvcs.common'
external fdvcs
external dmy
* --- Common for steering, read via FFKEY
REAL*4 SPACE
COMMON /CFREAD/SPACE(1000)
real*4 rndm
logical Angle_Integ
common/dvcs_IN/spin,Z,A,s,tchar,xlaml,xlamp,
> Angle_Integ,iord,icount,nx,nq,IPRO
common/dvcs_OUT/res
common/dvcs_VAR/x_main,q_main,phi_main,t_main,ym_main
real elepi,EGAMR,sweight,srad,elepin,ehadi
common /RADGEN/ elepi,EGAMR,sweight,srad,elepin,ehadi
logical stFIXED_save
common /FIXED/ stFIXED_save
PARAMETER (MXDIM = 50 )
COMMON /BPARM1/ XL(MXDIM),XU(MXDIM),NDIM,NWILD,IG(MXDIM),NCALL
COMMON /BPARM2/ ACC1,ACC2,ITMX1,ITMX2
REAL*4 SIGMATOT,DSIGMATOT
COMMON/XSECTOT/SIGMATOT,DSIGMATOT
COMMON/STEP/ISTEP
integer debug
common/debug/idebug
integer i_outrange
common/out_of_range/i_outrange
real*8 mp
real*8 it_form
real*8 bnew_q,bnew_g,xdel_s,bnew_slopeq,bnew_slopeg,q20
common/form_factors/it_form,bnew_q,bnew_g,xdel_s,q20,
+ bnew_slopeq,bnew_slopeg
integer isel_twist3
common /isel_twist3/ isel_twist3
integer isel_asym
common /isel_asym/ isel_asym
integer isel_interf
common /isel_interf/ isel_interf
integer isel_realpart
common /isel_realpart/ isel_realpart
integer isel_tintin
common /isel_tintin/ isel_tintin,isel_f2qcd,isel_dipole
real*8 bti,rti
common /tintin/ SIGN,bti,rti
integer igen_exp
common /genexp/ igen_exp
* => COMMON FOR PAW :
REAL hmemor
PARAMETER( NWPAWC=500000 )
COMMON/pawc/hmemor(NWPAWC)
common /order/ iiord
common /counter1/ icountxq,icountt
common /setting/ nset
COMMON/QUEST/IQUEST(100)
parameter(mx=300)
dimension f(mx),f1(mx),res(100),f2(mx),f3(mx)
dimension f4(mx),f5(mx),f6(mx),f7(mx),f8(mx),f9(mx),resut(2,mx)
dimension f10(mx),f11(mx)
character*2 temp,temp0
character*78 temp1,temp2
mfail = 0
call readsteer
C --------------------------------------------------------
if (stIPRO.eq.1) isel_asym = 0 !stASYM
if (stIPRO.eq.2) isel_asym = 0 !stASYM
if (stIPRO.eq.3) isel_asym = 0 !stASYM
if (stIPRO.eq.4) isel_asym = 1 !stASYM
if (stIPRO.eq.5) isel_asym = 1 !stASYM
Cls---------------------------------------new
isel_realpart = 1 ! 0:from Freund param ; 1:from lambda ; 2:Re=0
Cls---------------------------------------new
isel_interf = 0
igen_exp = stEXP
ccc print *,'isel_asym,igen_exp=',isel_asym,igen_exp
C --------------------------------------------------------
C --------------------------------------------------------
if (stFIXED) stETARG = 0.93827
elepin = abs(stELEP)
elepi = abs(stELEP)
ehadi = abs(stETARG)
EGAMR = 0.
sweight = 1.
srad = real(stIRAD)
C --------------------------------------------------------
C --------------------------------------------------------
if (stTINTIN) then
isel_tintin = 1
else
isel_tintin = 0
endif
SIGN = -dble(stLCHAR) !dble(stSIGN)
bti = dble(stBTIN)
rti = dble(stRTIN)
if (stF2QCD) then
isel_f2qcd = 1
else
isel_f2qcd = 0
endif
if (stDIPOLE) then
isel_dipole = 1
else
isel_dipole = 0
endif
C --------------------------------------------------------
C --------------------------------------------------------
it_form = dble(real(stITFORM))
bnew_q = dble(stBQ)
bnew_slopeq = dble(stBQ_SLOPE)
bnew_g = dble(stBG)
bnew_slopeg = dble(stBG_SLOPE)
xdel_s = dble(stX0)
q20 = dble(stQ02)
c... it_form = 0 : exp(bt) dependence for DVCS-xsection
c... with b = b_u+b_slopeu * log(q2/2)
c... it_form = 2 : Pauli/Dirac form factors
c... it_form = 4 : exp(bt) for x<xdel_s, P/D otherwise
C --------------------------------------------------------
idebug = stIDEBUG
C --------------------------------------------------------
istep = stIGEN
c... istep = 0 : 1st run for grid calculation
c... istep = 2 : 2nd step for grid
c... istep = 4 : generation only
C --------------------------------------------------------
*---initialize HBOOK:
CALL HLIMIT(NWPAWC)
*---Open the HBOOK file:
LUNNT = 31
LRECL = 1024
c LRECL = 4096
cc REAL IQUEST
cc COMMON/QUEST/IQUEST(100)
c IQUEST(10)=64000
IQUEST(10)=256000
CALL HROPEN(LUNNT, 'toto','15x50_dvcs.ntp',
+ 'NQE', LRECL, ISTAT)
cc CALL HROPEN(LUNNT, 'toto','bookhis_form_modif.ntp',
cc + 'N', LRECL, ISTAT)
IF (ISTAT.NE. 0) THEN
PRINT * ,'*** ERROR ',ISTAT,' DURING OPEN OF FILE 31'
CLOSE(LUNNT)
mfail = 1
GOTO 998
ENDIF
* -> Initialize the HBOOK file
CALL NTINIT
NTID= 1
LUN = 23
if (istep.ne.0) then
open(LUN,file='bases.data',status='old',
+ form='unformatted')
else
open(LUN,file='bases.data',status='unknown',
+ form='unformatted')
endif
*=========================================================
* Initialization of BASES by calling BSINIT
*=========================================================
* -------------
CALL BSINIT
* -------------
if (istep.ne.0) then
call bsread(lun)
endif
*=========================================================
* Initialization of BASES parameters
*=========================================================
if (srad.eq.0)then
NDIM = 3
NWILD = 3
else
NDIM = 4
NWILD = 4
endif
NCALL = stNCALL
ITMX1 = stITMX1
ACC1 = 0.05
ITMX2 = stITMX2
ACC2 = 0.01
* X(1) -> x
xmin=dble(stXMIN)
xmax=dble(stXMAX)
if (igen_exp.eq.1) then
XL(1) = dlog(xmin)
XU(1) = dlog(xmax)
else
XL(1) = xmin
XU(1) = xmax
endif
* X(2) -> q
qmin=dble(stQMIN)
qmax=dble(stQMAX)
if (igen_exp.eq.1) then
XL(2) = dlog(qmin)
XU(2) = dlog(qmax)
else
xl(2) = qmin
xu(2) = qmax
endif
* X(3) -> t
tmax = dble(stTMAX)
tmin = dble(stTMIN)
XL(3) = tmax
XU(3) = tmin
* X(4) -> Egamma
XL(4) = dble(stEIMIN) !0.00001
! XU(4) = dble(abs(stELEP))-5.d0
! TPB 21/04/10
! ELEP = incident electron energy
! Changed the upper limit as EIC needs beam energies < 5!
XU(4) = dble(abs(stELEP))-1.d0
*=========================================================
* Initialization of Histograms
*=========================================================
* CALL XHINIT(1,XL(1),XU(1),40,'log(x)')
* CALL XHINIT(2,XL(2),XU(2),40,'log(q)')
CALL XHINIT(1,XL(1),XU(1),40,'x')
CALL XHINIT(2,XL(2),XU(2),40,'q')
CALL XHINIT(3,XL(3),XU(3),40,'t')
CALL XHINIT(4,XL(4),XU(4),40,'Egam radie')
c ipro = 1 : BH
c ipro = 2 : DVCS
c ipro = 3 : BH + DVCS
ipro = stIPRO
C
C initalize value for dvcs subroutine
C
spin = dble(stSPIN)
Z = dble(stZTAR)
A = dble(stATAR)
C
C # of points in x and Q^2
C
nx = stNX
nq = stNQ
C
C initializing flags
C
icount = 1
icountxq = 1
icountt = 1
nset = stNSET
Angle_Integ = .false.
if (nset.eq.2) Angle_Integ=.true.
C------- An EIC setting (electron = 5 GeV, target = 200 GeV)
ccc s = 4.*5.*200.
C------- HERMES setting
ccc s = 2.*27.55*0.938272D0
C------- HERA setting with 920 GEV protons
ccc s = 4.*27.55*920.
C------- CLAS setting: CLAS I = 4.3 GEV, CLAS II = 5.75 GeV
ccc s = 2.*4.3D0*0.938272D0
stFIXED_save = stFIXED
mp = 0.93827d0
if (stFIXED) then
s = 2.*abs(stELEP) * mp
else
s = 4.*abs(stELEP) * stETARG
endif
C
C dummy settings for the angles at the moment
C
phi = 0.0
pphi = 0.0
theta = 0.0
C
C charge, polarization and order in alpha_s
C
tchar = dble(stLCHAR)
xlaml = dble(stLPOL)
xlamp = dble(stTPOL)
C
C ORDER
C
iord = stIORD
iiord = iord
icountt = 1
icountxq = 1
C
C TWIST 3
C
if (stTWIST3) then
isel_twist3 = 1
else
isel_twist3 = 0
endif
if (istep.ne.4) then
********************************************************************
* Nimerical Integration by BASES V5.1
********************************************************************
if (stIELAS.eq.0) then
weight_inel = dgausskeps(dmy,dble(stMYMIN),
+ dble(stMYMAX),1.d-8)
else
weight_inel = 1.d0
endif
WRITE(6,*) 'weight_inel=',weight_inel
CALL BASES( FDVCS, ESTIM, SIGMA, CTIME, IT1, IT2 )
lu = 66
open(66,file='bases_ele_ipro2_5x50.out',
+ status='unknown')
CALL BSINFO( LU )
CALL BHPLOT( LU )
WRITE(66,*) '*************************************'
WRITE(66,*) '* INTEGRATION TERMINATED *'
WRITE(66,*) '*************************************'
WRITE(6,*) ' '
SUM = ESTIM*weight_inel
ERR = SIGMA*weight_inel
WRITE(66,*) 'Total cross-section (nb) : ',SNGL(SUM)
WRITE(66,*) 'Error : ',SNGL(ERR)
SIGMATOT = SNGL(SUM)
DSIGMATOT = SNGL(ERR)
*==================================================
* Save the probability information to the file
*==================================================
CALL BSWRIT( LUN )
endif
998 continue
return
end