Merge lp:~maddevelopers/mg5amcnlo/2.6.5_ewa into lp:mg5amcnlo/lts

Proposed by Olivier Mattelaer
Status: Work in progress
Proposed branch: lp:~maddevelopers/mg5amcnlo/2.6.5_ewa
Merge into: lp:mg5amcnlo/lts
Diff against target: 4346 lines (+2585/-250)
58 files modified
MadSpin/interface_madspin.py (+25/-0)
Template/LO/Cards/pythia8_card_default.dat (+2/-0)
Template/LO/Cards/run_card.dat (+1/-1)
Template/LO/Source/PDF/ElectroweakFlux.f (+1484/-0)
Template/LO/Source/PDF/ElectroweakFlux.inc (+38/-0)
Template/LO/Source/PDF/PhotonFlux.f (+18/-13)
Template/LO/Source/PDF/makefile (+4/-3)
Template/LO/Source/PDF/pdf.f (+3/-3)
Template/LO/Source/PDF/pdg2pdf.f (+111/-17)
Template/LO/Source/PDF/pdg2pdf_lhapdf6.f (+111/-11)
Template/LO/Source/kin_functions.f (+5/-3)
Template/LO/Source/setrun.f (+17/-2)
Template/LO/SubProcesses/genps.f (+3/-0)
Template/LO/SubProcesses/reweight.f (+2/-2)
Template/LO/SubProcesses/unwgt.f (+10/-1)
Template/MadWeight/src/setrun.f (+8/-0)
UpdateNotes.txt (+18/-0)
aloha/aloha_writers.py (+7/-4)
madgraph/core/base_objects.py (+3/-2)
madgraph/interface/common_run_interface.py (+30/-5)
madgraph/interface/madevent_interface.py (+3/-2)
madgraph/interface/madgraph_interface.py (+1/-1)
madgraph/interface/reweight_interface.py (+26/-15)
madgraph/iolibs/export_v4.py (+83/-18)
madgraph/iolibs/template_files/auto_dsig_v4.inc (+15/-0)
madgraph/iolibs/template_files/loop_optimized/check_sa_all.py.inc (+4/-4)
madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc (+12/-3)
madgraph/iolibs/template_files/makefile_sa_f2py (+15/-7)
madgraph/iolibs/template_files/matrix_madevent_group_v4.inc (+2/-15)
madgraph/iolibs/template_files/matrix_madevent_v4.inc (+2/-14)
madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc (+7/-2)
madgraph/loop/loop_exporters.py (+28/-18)
madgraph/various/banner.py (+109/-23)
madgraph/various/cluster.py (+68/-4)
mg5decay/decay_objects.py (+21/-2)
tests/acceptance_tests/test_cmd_reweight.py (+11/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f (+12/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f (+12/-3)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/auto_dsig.f (+30/-0)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f (+3/-0)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f (+8/-2)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/auto_dsig.f (+30/-0)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f (+4/-0)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f (+12/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f (+12/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f (+12/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f (+12/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f (+12/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f (+12/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f (+12/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f (+12/-3)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f (+12/-3)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f (+12/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f (+12/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f (+12/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f (+12/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f (+12/-3)
tests/test_manager.py (+11/-1)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/2.6.5_ewa
Reviewer Review Type Date Requested Status
Olivier Mattelaer Pending
Review via email: mp+388892@code.launchpad.net

Commit message

only for the convenient diff for the moment

To post a comment you must log in.
307. By olivier-mattelaer

merge with 2.7.4

Unmerged revisions

307. By olivier-mattelaer

merge with 2.7.4

306. By olivier-mattelaer

merge with 2.7.2

305. By olivier-mattelaer

merge with latest 2.6.7

304. By olivier-mattelaer

fix the helicity factor for the Z boson in EWA

303. By olivier-mattelaer

allow lhapdf + EWA for pW initial state

302. By olivier-mattelaer

merge with latest 2.6.6

301. By olivier-mattelaer

fixing some tests

300. By olivier-mattelaer

merge with latest 2.6.6

299. By olivier-mattelaer

implement EWA for proton collision --thanks to xiaoran

298. By olivier-mattelaer

allow EWA for proton

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MadSpin/interface_madspin.py'
2--- MadSpin/interface_madspin.py 2020-06-16 19:24:01 +0000
3+++ MadSpin/interface_madspin.py 2020-08-13 08:01:43 +0000
4@@ -150,6 +150,7 @@
5 self.mg5cmd = master_interface.MasterCmd()
6 self.seed = None
7 self.err_branching_ratio = 0
8+ self.me_run_name = "" # Events diretory name where to stotre the events (used by madevent) not use internally
9
10
11 if event_path:
12@@ -580,11 +581,35 @@
13 decay go > sq j
14 launch
15 '''
16+
17+ self.parser_launch.print_help()
18+
19+ def parser_launch(self):
20+ usage = """launch [-n RUN_NAME]
21+ """
22+ parser = misc.OptionParser(usage=usage)
23+ parser.add_option("-n", "--name",
24+ default="",
25+ help="When NOT run in standalone instruct MG5aMC where to store the events file")
26+ return parser
27+
28+ def parse_launch(self, line):
29+
30+ args = self.split_arg(line)
31+ return self.parser_launch().parse_args(args)
32+
33
34 @misc.mute_logger()
35 def do_launch(self, line):
36 """end of the configuration launched the code"""
37
38+ (options, args) = self.parse_launch(line)
39+
40+ if options.name:
41+ self.me_run_name = options.name # Only use by MG5aMC
42+ else:
43+ self.me_run_name = ''
44+
45 if self.options["spinmode"] in ["none"]:
46 return self.run_bridge(line)
47 elif self.options["spinmode"] == "onshell":
48
49=== modified file 'Template/LO/Cards/pythia8_card_default.dat'
50--- Template/LO/Cards/pythia8_card_default.dat 2017-02-06 18:35:42 +0000
51+++ Template/LO/Cards/pythia8_card_default.dat 2020-08-13 08:01:43 +0000
52@@ -12,6 +12,8 @@
53 ! -------------------------------------------------------------------
54 ! Specify the HEPMC output of the Pythia8 shower. You can set it to:
55 ! auto : MG5aMC will automatically place it the run_<i> directory
56+! autoremove: MG5aMC will automatically remove the file at the end of the run.
57+! (usefull when running with Delphes)
58 ! /dev/null : to turn off the HEPMC output.
59 ! <path> : to select where the HEPMC file must written. It will
60 ! therefore not be placed in the run_<i> directory. The
61
62=== modified file 'Template/LO/Cards/run_card.dat'
63--- Template/LO/Cards/run_card.dat 2020-05-27 07:52:34 +0000
64+++ Template/LO/Cards/run_card.dat 2020-08-13 08:01:43 +0000
65@@ -28,7 +28,7 @@
66 #*********************************************************************
67 # Collider type and energy *
68 # lpp: 0=No PDF, 1=proton, -1=antiproton, 2=photon from proton, *
69-# 3=photon from electron *
70+# 3=photon from electron, 4=photon from muon *
71 #*********************************************************************
72 %(lpp1)s = lpp1 ! beam 1 type
73 %(lpp2)s = lpp2 ! beam 2 type
74
75=== added file 'Template/LO/Source/PDF/ElectroweakFlux.f'
76--- Template/LO/Source/PDF/ElectroweakFlux.f 1970-01-01 00:00:00 +0000
77+++ Template/LO/Source/PDF/ElectroweakFlux.f 2020-08-13 08:01:43 +0000
78@@ -0,0 +1,1484 @@
79+c/* ********************************************************* */
80+c/* Effective W Approximation Splitting Functions */
81+c/* Pulled from Barger and Phillips, pg 276 */
82+c/* ********************************************************* */
83+c
84+c List of functions:
85+c ewa_wX_ByPID,ewa_wX,ewa_wT,ewa_w0
86+c ewa_zX_ByPID,ewa_zT,ewa_z0
87+c
88+c Input for ewa_vX_ByPID:
89+c x: longitudinal momentum fraction carried by boson v
90+c q2max: scale^2 of v boson pdf
91+c pol: polarization of v boson (pol = +1,-1,0)
92+c ppid: pid of v boson's parent fermion
93+c/* ********************************************************* */
94+
95+c/* ********************************************************* */
96+c return ewa splitting function for w boson by parent PID
97+ double precision function ewa_wX_ByPID(x,q2max,pol,ppid)
98+ implicit none
99+ integer pol,ppid
100+ double precision x,q2max
101+ double precision ewa_wX
102+ double precision ewa_wp_p, ewa_wm_p
103+ external ewa_wX, ewa_wp_p, ewa_wm_p
104+
105+ include 'ElectroweakFlux.inc'
106+
107+ if(q2max.lt.ewa_mw2) then
108+c write (*,*) 'ERROR: q2max below MW2',q2max,ewa_mw2
109+ ewa_wX_ByPID = 0d0
110+ return
111+ endif
112+ if(x.lt.eps .or. x.gt.(1.d0-eps)) then
113+c write (*,*) 'ERROR: x out of range',x
114+ ewa_wX_ByPID =0d0
115+ return
116+ endif
117+
118+c is parent a proton (unbroken)
119+ if(ppid.eq.2212) then
120+ ewa_wX_ByPID = ewa_wp_p(x,q2max,pol)
121+ return
122+ else if(ppid.eq.-2212) then
123+ ewa_wX_ByPID = ewa_wm_p(x,q2max,pol)
124+ return
125+c other particle
126+ else
127+ ewa_wX_ByPID = ewa_wX(x,q2max,pol)
128+ endif
129+ return
130+ end
131+c/* ********************************************************* */
132+c return ewa splitting function for w boson
133+ double precision function ewa_wX(x,q2max,pol)
134+ implicit none
135+ integer pol
136+ double precision x,q2max
137+ double precision ewa_wT,ewa_w0
138+ external ewa_wT,ewa_w0
139+
140+ if(abs(pol).gt.0) then
141+ ewa_wX = ewa_wT(x,q2max,pol)
142+ else
143+ ewa_wX = ewa_w0(x)
144+ endif
145+ return
146+ end
147+c/* ********************************************************* */
148+c return ewa splitting function for z boson by parent PID
149+ double precision function ewa_zX_ByPID(x,q2max,pol,ppid)
150+ implicit none
151+ integer pol,ppid
152+ double precision x,q2max
153+ double precision ewa_zT,ewa_z0, ewa_z_p
154+ external ewa_zT,ewa_z0,ewa_z_p
155+
156+ include 'ElectroweakFlux.inc'
157+
158+ if(q2max.lt.ewa_mz2) then
159+c write (*,*) 'ERROR: q2max below MZ2',q2max,ewa_mz2
160+ ewa_zX_ByPID = 0d0
161+ return
162+ endif
163+ if(x.lt.eps .or. x.gt.(1.d0-eps))then
164+c write (*,*) 'ERROR: x out of range',x
165+ ewa_zX_ByPID = 0d0
166+ return
167+ endif
168+
169+c is parent a charged lepton?
170+ if( abs(ppid).eq.11
171+ & .or. abs(ppid).eq.13
172+ & .or. abs(ppid).eq.15) then
173+ if(abs(pol).gt.0) then
174+ ewa_zX_ByPID = ewa_zT(x,q2max,pol,ewa_gVl,ewa_gAl)
175+ else
176+ ewa_zX_ByPID = ewa_z0(x,ewa_gVl,ewa_gAl)
177+ endif
178+ return
179+c is parent a proton (unbroken)
180+ elseif(ppid.eq.2212) then
181+ ewa_zX_ByPID = ewa_Z_p(x,q2max,pol)
182+ return
183+c is parent a neutrino?
184+ elseif( abs(ppid).eq.12
185+ & .or. abs(ppid).eq.14
186+ & .or. abs(ppid).eq.16) then
187+ if(abs(pol).gt.0) then
188+ ewa_zX_ByPID = ewa_zT(x,q2max,pol,ewa_gVv,ewa_gAv)
189+ else
190+ ewa_zX_ByPID = ewa_z0(x,ewa_gVv,ewa_gAv)
191+ endif
192+ return
193+c is parent an up-type quark?
194+ elseif( abs(ppid).eq.2
195+ & .or. abs(ppid).eq.4
196+ & .or. abs(ppid).eq.6) then
197+ if(abs(pol).gt.0) then
198+ ewa_zX_ByPID = ewa_zT(x,q2max,pol,ewa_gVu,ewa_gAu)
199+ else
200+ ewa_zX_ByPID = ewa_z0(x,ewa_gVu,ewa_gAu)
201+ endif
202+ return
203+c is parent a down-type quark?
204+ elseif( abs(ppid).eq.1
205+ & .or. abs(ppid).eq.3
206+ & .or. abs(ppid).eq.5) then
207+ if(abs(pol).gt.0) then
208+ ewa_zX_ByPID = ewa_zT(x,q2max,pol,ewa_gVd,ewa_gAd)
209+ else
210+ ewa_zX_ByPID = ewa_z0(x,ewa_gVd,ewa_gAd)
211+ endif
212+ return
213+c or something else?
214+ else
215+ ewa_zX_ByPID = 0d0
216+ return
217+ endif
218+ end
219+c/* ********************************************************* */
220+c w boson splitting function: longitudinal polarization
221+ double precision function ewa_w0(x)
222+ implicit none
223+ double precision x
224+ double precision coup
225+
226+ include 'ElectroweakFlux.inc'
227+
228+c P_W(x,lambda=0) = (gW/4pi)**2 (1-x)/x
229+ coup = ewa_gW2/(16d0*pi2)
230+ ewa_w0 = coup * (1d0-x)/x
231+ return
232+ end
233+c/* ********************************************************* */
234+c z boson splitting function: longitudinal polarization
235+ double precision function ewa_z0(x,gV,gA)
236+ implicit none
237+ double precision x,gV,gA
238+ double precision coup
239+
240+ include 'ElectroweakFlux.inc'
241+
242+c P_Z(x,lambda=0) = (gW2/cw2*4pi2) * (gV2 + gA2) (1-x)/x
243+ coup = ewa_gW2/(ewa_cw2*4d0*pi2) * (gV**2 + gA**2)
244+ ewa_z0 = coup * (1d0-x)/x
245+ return
246+ end
247+c/* ********************************************************* */
248+c w boson splitting function: transverse polarization
249+ double precision function ewa_wT(x,q2max,pol)
250+ implicit none
251+ integer pol
252+ double precision x,q2max
253+ double precision coup,numer
254+
255+ include 'ElectroweakFlux.inc'
256+
257+c P_W(x,lambda=\pm) = coup * [(gV \mp gA)^2 + (gV \pm gA)^2 (1-x)^2] * log(Q2/MV2)
258+ coup = ewa_gW2/(8d0*16d0*pi2)
259+ numer = (ewa_gV-pol*ewa_gA)**2
260+ & + (ewa_gV+pol*ewa_gA)**2 * (1d0-x)**2
261+ ewa_wT = coup * numer * log(q2max/ewa_mw2) / x
262+ return
263+ end
264+c/* ********************************************************* */
265+c z boson splitting function: transverse polarization
266+ double precision function ewa_zT(x,q2max,pol,gV,gA)
267+ implicit none
268+ integer pol
269+ double precision x,q2max,gV,gA
270+ double precision coup,numer
271+
272+ include 'ElectroweakFlux.inc'
273+
274+c P_Z(x,lambda=\pm) = coup * [(gV \mp gA)^2 + (gV \pm gA)^2 (1-x)^2] * log(Q2/MV2)
275+ coup = ewa_gW2/(ewa_cw2*16d0*pi2)
276+ numer = (gV-pol*gA)**2
277+ & + (gV+pol*gA)**2 * (1d0-x)**2
278+ ewa_zT = coup * numer * log(q2max/ewa_mz2) / x
279+ return
280+ end
281+ FUNCTION dFINT(NARG,ARG,NENT,ENT,TABLE)
282+C
283+C INTERPOLATION ROUTINE. AUTHOR C. LETERTRE.
284+C MODIFIED BY B. SCHORR, 1.07.1982.
285+C
286+ implicit real * 8 (a-h,o-z)
287+ INTEGER NENT(*)
288+ REAL*8 ARG(*), ENT(*), TABLE(*)
289+ INTEGER INDEX(32)
290+ REAL*8 WEIGHT(32)
291+ LOGICAL MFLAG, RFLAG
292+ DFINT = 0.
293+ IF(NARG .LT. 1 .OR. NARG .GT. 5) GOTO 300
294+ LMAX = 0
295+ ISTEP = 1
296+ KNOTS = 1
297+ INDEX(1) = 1
298+ WEIGHT(1) = 1.
299+ DO 100 N = 1, NARG
300+ X = ARG(N)
301+ NDIM = NENT(N)
302+ LOCA = LMAX
303+ LMIN = LMAX + 1
304+ LMAX = LMAX + NDIM
305+ IF(NDIM .GT. 2) GOTO 10
306+ IF(NDIM .EQ. 1) GOTO 100
307+ H = X - ENT(LMIN)
308+ IF(H .EQ. 0.) GOTO 90
309+ ISHIFT = ISTEP
310+ IF(X-ENT(LMIN+1) .EQ. 0.) GOTO 21
311+ ISHIFT = 0
312+ ETA = H / (ENT(LMIN+1) - ENT(LMIN))
313+ GOTO 30
314+ 10 LOCB = LMAX + 1
315+ 11 LOCC = (LOCA+LOCB) / 2
316+ IF(X-ENT(LOCC)) 12, 20, 13
317+ 12 LOCB = LOCC
318+ GOTO 14
319+ 13 LOCA = LOCC
320+ 14 IF(LOCB-LOCA .GT. 1) GOTO 11
321+ LOCA = MIN0( MAX0(LOCA,LMIN), LMAX-1 )
322+ ISHIFT = (LOCA - LMIN) * ISTEP
323+ ETA = (X - ENT(LOCA)) / (ENT(LOCA+1) - ENT(LOCA))
324+ GOTO 30
325+ 20 ISHIFT = (LOCC - LMIN) * ISTEP
326+ 21 DO 22 K = 1, KNOTS
327+ INDEX(K) = INDEX(K) + ISHIFT
328+ 22 CONTINUE
329+ GOTO 90
330+ 30 DO 31 K = 1, KNOTS
331+ INDEX(K) = INDEX(K) + ISHIFT
332+ INDEX(K+KNOTS) = INDEX(K) + ISTEP
333+ WEIGHT(K+KNOTS) = WEIGHT(K) * ETA
334+ WEIGHT(K) = WEIGHT(K) - WEIGHT(K+KNOTS)
335+ 31 CONTINUE
336+ KNOTS = 2*KNOTS
337+ 90 ISTEP = ISTEP * NDIM
338+ 100 CONTINUE
339+ DO 200 K = 1, KNOTS
340+ I = INDEX(K)
341+ DFINT = DFINT + WEIGHT(K) * TABLE(I)
342+ 200 CONTINUE
343+ RETURN
344+ 300 CALL KERMTR('E104.1',LGFILE,MFLAG,RFLAG)
345+ IF(MFLAG) THEN
346+ IF(LGFILE .EQ. 0) THEN
347+ WRITE(*,1000) NARG
348+ ELSE
349+ WRITE(LGFILE,1000) NARG
350+ ENDIF
351+ ENDIF
352+ IF(.NOT. RFLAG) CALL ABEND
353+ RETURN
354+1000 FORMAT( 7X, 25HFUNCTION DFINT ... NARG =,I6,
355+ + 17H NOT WITHIN RANGE)
356+ END
357+ SUBROUTINE KERSET(ERCODE,LGFILE,LIMITM,LIMITR)
358+ PARAMETER(KOUNTE = 28)
359+ CHARACTER*6 ERCODE, CODE(KOUNTE)
360+ LOGICAL MFLAG, RFLAG
361+ INTEGER KNTM(KOUNTE), KNTR(KOUNTE)
362+ DATA LOGF / 0 /
363+ DATA CODE(1), KNTM(1), KNTR(1) / 'C204.1', 100, 100 /
364+ DATA CODE(2), KNTM(2), KNTR(2) / 'C204.2', 100, 100 /
365+ DATA CODE(3), KNTM(3), KNTR(3) / 'C204.3', 100, 100 /
366+ DATA CODE(4), KNTM(4), KNTR(4) / 'C205.1', 100, 100 /
367+ DATA CODE(5), KNTM(5), KNTR(5) / 'C205.2', 100, 100 /
368+ DATA CODE(6), KNTM(6), KNTR(6) / 'C205.3', 100, 100 /
369+ DATA CODE(7), KNTM(7), KNTR(7) / 'C305.1', 100, 100 /
370+ DATA CODE(8), KNTM(8), KNTR(8) / 'C308.1', 100, 100 /
371+ DATA CODE(9), KNTM(9), KNTR(9) / 'C312.1', 100, 100 /
372+ DATA CODE(10),KNTM(10),KNTR(10) / 'C313.1', 100, 100 /
373+ DATA CODE(11),KNTM(11),KNTR(11) / 'C336.1', 100, 100 /
374+ DATA CODE(12),KNTM(12),KNTR(12) / 'C337.1', 100, 100 /
375+ DATA CODE(13),KNTM(13),KNTR(13) / 'C341.1', 100, 100 /
376+ DATA CODE(14),KNTM(14),KNTR(14) / 'D103.1', 100, 100 /
377+ DATA CODE(15),KNTM(15),KNTR(15) / 'D106.1', 100, 100 /
378+ DATA CODE(16),KNTM(16),KNTR(16) / 'D209.1', 100, 100 /
379+ DATA CODE(17),KNTM(17),KNTR(17) / 'D509.1', 100, 100 /
380+ DATA CODE(18),KNTM(18),KNTR(18) / 'E100.1', 100, 100 /
381+ DATA CODE(19),KNTM(19),KNTR(19) / 'E104.1', 100, 100 /
382+ DATA CODE(20),KNTM(20),KNTR(20) / 'E105.1', 100, 100 /
383+ DATA CODE(21),KNTM(21),KNTR(21) / 'E208.1', 100, 100 /
384+ DATA CODE(22),KNTM(22),KNTR(22) / 'E208.2', 100, 100 /
385+ DATA CODE(23),KNTM(23),KNTR(23) / 'F010.1', 100, 0 /
386+ DATA CODE(24),KNTM(24),KNTR(24) / 'F011.1', 100, 0 /
387+ DATA CODE(25),KNTM(25),KNTR(25) / 'F012.1', 100, 0 /
388+ DATA CODE(26),KNTM(26),KNTR(26) / 'F406.1', 100, 0 /
389+ DATA CODE(27),KNTM(27),KNTR(27) / 'G100.1', 100, 100 /
390+ DATA CODE(28),KNTM(28),KNTR(28) / 'G100.2', 100, 100 /
391+ LOGF = LGFILE
392+ IF(ERCODE .EQ. ' ') THEN
393+ L = 0
394+ ELSE
395+ DO 10 L = 1, 6
396+ IF(ERCODE(1:L) .EQ. ERCODE) GOTO 12
397+ 10 CONTINUE
398+ 12 CONTINUE
399+ ENDIF
400+ DO 14 I = 1, KOUNTE
401+ IF(L .EQ. 0) GOTO 13
402+ IF(CODE(I)(1:L) .NE. ERCODE(1:L)) GOTO 14
403+ 13 KNTM(I) = LIMITM
404+ KNTR(I) = LIMITR
405+ 14 CONTINUE
406+ RETURN
407+ ENTRY KERMTR(ERCODE,LOG,MFLAG,RFLAG)
408+ LOG = LOGF
409+ DO 20 I = 1, KOUNTE
410+ IF(ERCODE .EQ. CODE(I)) GOTO 21
411+ 20 CONTINUE
412+ WRITE(*,1000) ERCODE
413+ CALL ABEND
414+ RETURN
415+ 21 RFLAG = KNTR(I) .GE. 1
416+ IF(RFLAG .AND. (KNTR(I) .LT. 100)) KNTR(I) = KNTR(I) - 1
417+ MFLAG = KNTM(I) .GE. 1
418+ IF(MFLAG .AND. (KNTM(I) .LT. 100)) KNTM(I) = KNTM(I) - 1
419+ IF(.NOT. RFLAG) THEN
420+ IF(LOGF .LT. 1) THEN
421+ WRITE(*,1001) CODE(I)
422+ ELSE
423+ WRITE(LOGF,1001) CODE(I)
424+ ENDIF
425+ ENDIF
426+ IF(MFLAG .AND. RFLAG) THEN
427+ IF(LOGF .LT. 1) THEN
428+ WRITE(*,1002) CODE(I)
429+ ELSE
430+ WRITE(LOGF,1002) CODE(I)
431+ ENDIF
432+ ENDIF
433+ RETURN
434+1000 FORMAT(' KERNLIB LIBRARY ERROR. ' /
435+ + ' ERROR CODE ',A6,' NOT RECOGNIZED BY KERMTR',
436+ + ' ERROR MONITOR. RUN ABORTED.')
437+1001 FORMAT(/' ***** RUN TERMINATED BY CERN LIBRARY ERROR ',
438+ + 'CONDITION ',A6)
439+1002 FORMAT(/' ***** CERN LIBRARY ERROR CONDITION ',A6)
440+ END
441+ SUBROUTINE ABEND
442+C
443+C CERN PROGLIB# Z035 ABEND .VERSION KERNVAX 1.10 811126
444+
445+ STOP '*** ABEND ***'
446+ END
447+ function ewa_wp_p(x,Q2,pol)
448+ implicit none
449+ real*8 ewa_wp_p
450+ real*8 x,Q2
451+ integer pol
452+ real*8 tmp
453+ real*8 y,z
454+ real*8 ylow,yupp,zlow,zupp
455+ parameter (ylow=-16.1181,yupp=-1e-07)
456+ parameter (zlow=4.38683,zupp=13.8155)
457+ real*8 ewa_wp_p_1p
458+ real*8 ewa_wp_p_1m
459+ real*8 ewa_wp_p_0
460+ y=log(x)
461+ z=0.5*log(Q2)
462+ if(pol.eq.1)then
463+ tmp=ewa_wp_p_1p(y,z)
464+ else if(pol.eq.-1)then
465+ tmp=ewa_wp_p_1m(y,z)
466+ else
467+ tmp=ewa_wp_p_0(y,z)
468+ endif
469+ ewa_wp_p=tmp/x*y*y
470+ end
471+ function ewa_wp_p_1p(y,z)
472+ implicit none
473+ real*8 ewa_wp_p_1p,y,z
474+ integer narg,nny,nnz
475+ parameter (narg=2)
476+ parameter (nny=32)
477+ parameter (nnz=8)
478+ integer iny,inz,nent(narg)
479+ real*8 tmp,dfint,ymap,zmap
480+ real*8 arg(narg),ent(nny+nnz)
481+ real*8 yv(nny),zv(nnz),gridv(nny,nnz)
482+ logical firsttime
483+ external dfint,ymap,zmap
484+ data yv/
485+ # -1.6118096e+01, -1.5094991e+01, -1.4105430e+01, -1.3149414e+01,
486+ # -1.2226943e+01, -1.1338015e+01, -1.0482632e+01, -9.6607941e+00,
487+ # -8.8725001e+00, -8.1177506e+00, -7.3965455e+00, -6.7088848e+00,
488+ # -6.0547686e+00, -5.4341967e+00, -4.8471693e+00, -4.2936863e+00,
489+ # -3.7737478e+00, -3.2873536e+00, -2.8345039e+00, -2.4151986e+00,
490+ # -2.0294377e+00, -1.6772213e+00, -1.3585493e+00, -1.0734217e+00,
491+ # -8.2183848e-01, -6.0379973e-01, -4.1930540e-01, -2.6835549e-01,
492+ # -1.5095001e-01, -6.7088947e-02, -1.6772312e-02, -1.0000000e-07/
493+ data zv/
494+ # 4.3868276e+00, 5.7337823e+00, 7.0807370e+00, 8.4276917e+00,
495+ # 9.7746464e+00, 1.1121601e+01, 1.2468556e+01, 1.3815511e+01/
496+ data (gridv(iny, 1),iny=1,32)/
497+ # 3.5423305e-07, 2.8295336e-07, 2.2903220e-07, 1.8758200e-07,
498+ # 1.5559163e-07, 1.3038773e-07, 1.1025515e-07, 9.4027921e-08,
499+ # 8.0829168e-08, 7.0061706e-08, 6.1294211e-08, 5.4182560e-08,
500+ # 4.8450890e-08, 4.3888687e-08, 4.0319491e-08, 3.7580596e-08,
501+ # 3.5520713e-08, 3.3952301e-08, 3.2625426e-08, 3.1187707e-08,
502+ # 2.9181849e-08, 2.6154236e-08, 2.1900372e-08, 1.6640020e-08,
503+ # 1.1099066e-08, 6.2780040e-09, 2.8842540e-09, 1.0025616e-09,
504+ # 2.4219639e-10, 3.2430180e-11, 1.7122412e-12, 4.1237372e-12/
505+ data (gridv(iny, 2),iny=1,32)/
506+ # 9.6800285e-03, 7.5895745e-03, 6.0144129e-03, 4.8116391e-03,
507+ # 3.8906828e-03, 3.1743361e-03, 2.6106310e-03, 2.1637757e-03,
508+ # 1.8068388e-03, 1.5208169e-03, 1.2917371e-03, 1.1084546e-03,
509+ # 9.6221855e-04, 8.4652524e-04, 7.5595982e-04, 6.8586986e-04,
510+ # 6.3206533e-04, 5.8999236e-04, 5.5430903e-04, 5.1815672e-04,
511+ # 4.7362998e-04, 4.1384517e-04, 3.3686600e-04, 2.4790947e-04,
512+ # 1.5951917e-04, 8.6605399e-05, 3.7927081e-05, 1.2444648e-05,
513+ # 2.7972986e-06, 3.3735215e-07, 1.3499999e-08, 3.8170248e-08/
514+ data (gridv(iny, 3),iny=1,32)/
515+ # 2.6802909e-02, 2.0666858e-02, 1.6084293e-02, 1.2619023e-02,
516+ # 9.9957736e-03, 7.9819494e-03, 6.4206742e-03, 5.2026236e-03,
517+ # 4.2458765e-03, 3.4918949e-03, 2.8976082e-03, 2.4290655e-03,
518+ # 2.0601111e-03, 1.7714145e-03, 1.5472491e-03, 1.3744754e-03,
519+ # 1.2417664e-03, 1.1376810e-03, 1.0498817e-03, 9.6384193e-04,
520+ # 8.6434504e-04, 7.3958460e-04, 5.8805171e-04, 4.2143198e-04,
521+ # 2.6317925e-04, 1.3808501e-04, 5.8100243e-05, 1.8168748e-05,
522+ # 3.8451248e-06, 4.2503569e-07, 1.2748665e-08, 4.3387870e-08/
523+ data (gridv(iny, 4),iny=1,32)/
524+ # 5.2421053e-02, 3.9824965e-02, 3.0512558e-02, 2.3545386e-02,
525+ # 1.8330098e-02, 1.4377269e-02, 1.1354532e-02, 9.0302263e-03,
526+ # 7.2316381e-03, 5.8351965e-03, 4.7504014e-03, 3.9068753e-03,
527+ # 3.2509450e-03, 2.7436667e-03, 2.3536072e-03, 2.0551591e-03,
528+ # 1.8269264e-03, 1.6483845e-03, 1.4987780e-03, 1.3553122e-03,
529+ # 1.1959351e-03, 1.0052207e-03, 7.8338419e-04, 5.4881055e-04,
530+ # 3.3404786e-04, 1.7020660e-04, 6.9197187e-05, 2.0763953e-05,
531+ # 4.1724093e-06, 4.2803444e-07, 9.3531305e-09, 3.9817765e-08/
532+ data (gridv(iny, 5),iny=1,32)/
533+ # 8.7314473e-02, 6.5462234e-02, 4.9470387e-02, 3.7629031e-02,
534+ # 2.8860417e-02, 2.2292410e-02, 1.7332180e-02, 1.3567321e-02,
535+ # 1.0692431e-02, 8.4897045e-03, 6.8007137e-03, 5.5036549e-03,
536+ # 4.5068644e-03, 3.7444546e-03, 3.1638216e-03, 2.7231011e-03,
537+ # 2.3880260e-03, 2.1270240e-03, 1.9097372e-03, 1.7046592e-03,
538+ # 1.4833082e-03, 1.2275453e-03, 9.4002916e-04, 6.4560015e-04,
539+ # 3.8423698e-04, 1.9081605e-04, 7.5273640e-05, 2.1785061e-05,
540+ # 4.1829038e-06, 4.0198589e-07, 6.0711799e-09, 3.4349528e-08/
541+ data (gridv(iny, 6),iny=1,32)/
542+ # 1.3235511e-01, 9.8047579e-02, 7.3187600e-02, 5.4960335e-02,
543+ # 4.1600160e-02, 3.1701979e-02, 2.4311750e-02, 1.8768166e-02,
544+ # 1.4585527e-02, 1.1418854e-02, 9.0192598e-03, 7.1973844e-03,
545+ # 5.8123298e-03, 4.7637364e-03, 3.9726338e-03, 3.3768371e-03,
546+ # 2.9266403e-03, 2.5776574e-03, 2.2889023e-03, 2.0198147e-03,
547+ # 1.7358250e-03, 1.4167343e-03, 1.0680290e-03, 7.2056798e-04,
548+ # 4.2032019e-04, 2.0398263e-04, 7.8308169e-05, 2.1899198e-05,
549+ # 4.0241531e-06, 3.6414048e-07, 3.7675413e-09, 2.9031813e-08/
550+ data (gridv(iny, 7),iny=1,32)/
551+ # 1.9057983e-01, 1.3957407e-01, 1.0297250e-01, 7.6391524e-02,
552+ # 5.7105084e-02, 4.2965226e-02, 3.2523923e-02, 2.4779895e-02,
553+ # 1.9003972e-02, 1.4680964e-02, 1.1442346e-02, 9.0104755e-03,
554+ # 7.1810453e-03, 5.8100245e-03, 4.7852651e-03, 4.0196945e-03,
555+ # 3.4450331e-03, 3.0020034e-03, 2.6377816e-03, 2.3022876e-03,
556+ # 1.9551214e-03, 1.5745712e-03, 1.1692227e-03, 7.7537535e-04,
557+ # 4.4359770e-04, 2.1050710e-04, 7.8557363e-05, 2.0871834e-05,
558+ # 3.5743974e-06, 2.9762988e-07, 2.7844229e-09, 2.2782149e-08/
559+ data (gridv(iny, 8),iny=1,32)/
560+ # 2.6712405e-01, 1.9341146e-01, 1.4102973e-01, 1.0336364e-01,
561+ # 7.6305708e-02, 5.6682239e-02, 4.2352056e-02, 3.1846115e-02,
562+ # 2.4101065e-02, 1.8371384e-02, 1.4128575e-02, 1.0978416e-02,
563+ # 8.6341061e-03, 6.8955860e-03, 5.6086588e-03, 4.6555113e-03,
564+ # 3.9452818e-03, 3.4012072e-03, 2.9571084e-03, 2.5527100e-03,
565+ # 2.1419401e-03, 1.7020208e-03, 1.2447953e-03, 8.1123628e-04,
566+ # 4.5515586e-04, 2.1111600e-04, 7.6224092e-05, 1.8396998e-05,
567+ # 2.7018652e-06, 1.8403044e-07, 1.1449565e-09, 1.2394449e-08/
568+ data firsttime/.true./
569+ save
570+ if(firsttime)then
571+ firsttime=.false.
572+ nent(1)=nny
573+ nent(2)=nnz
574+ do iny=1,nny
575+ ent(iny)=(yv(iny))
576+ enddo
577+ do inz=1,nnz
578+ ent(nny+inz)=(zv(inz))
579+ enddo
580+ endif
581+ arg(1)=(y)
582+ arg(2)=(z)
583+ tmp=dfint(narg,arg,nent,ent,gridv)
584+ ewa_wp_p_1p=tmp
585+ return
586+ end
587+ function ewa_wp_p_1m(y,z)
588+ implicit none
589+ real*8 ewa_wp_p_1m,y,z
590+ integer narg,nny,nnz
591+ parameter (narg=2)
592+ parameter (nny=32)
593+ parameter (nnz=8)
594+ integer iny,inz,nent(narg)
595+ real*8 tmp,dfint,ymap,zmap
596+ real*8 arg(narg),ent(nny+nnz)
597+ real*8 yv(nny),zv(nnz),gridv(nny,nnz)
598+ logical firsttime
599+ external dfint,ymap,zmap
600+ data yv/
601+ # -1.6118096e+01, -1.5094991e+01, -1.4105430e+01, -1.3149414e+01,
602+ # -1.2226943e+01, -1.1338015e+01, -1.0482632e+01, -9.6607941e+00,
603+ # -8.8725001e+00, -8.1177506e+00, -7.3965455e+00, -6.7088848e+00,
604+ # -6.0547686e+00, -5.4341967e+00, -4.8471693e+00, -4.2936863e+00,
605+ # -3.7737478e+00, -3.2873536e+00, -2.8345039e+00, -2.4151986e+00,
606+ # -2.0294377e+00, -1.6772213e+00, -1.3585493e+00, -1.0734217e+00,
607+ # -8.2183848e-01, -6.0379973e-01, -4.1930540e-01, -2.6835549e-01,
608+ # -1.5095001e-01, -6.7088947e-02, -1.6772312e-02, -1.0000000e-07/
609+ data zv/
610+ # 4.3868276e+00, 5.7337823e+00, 7.0807370e+00, 8.4276917e+00,
611+ # 9.7746464e+00, 1.1121601e+01, 1.2468556e+01, 1.3815511e+01/
612+ data (gridv(iny, 1),iny=1,32)/
613+ # 2.2352243e-07, 1.7777182e-07, 1.4298652e-07, 1.1622085e-07,
614+ # 9.5328508e-08, 7.8759840e-08, 6.5499586e-08, 5.4802442e-08,
615+ # 4.6136489e-08, 3.9104599e-08, 3.3386967e-08, 2.8725277e-08,
616+ # 2.4905274e-08, 2.1731925e-08, 1.9030359e-08, 1.6631364e-08,
617+ # 1.4386235e-08, 1.2169804e-08, 9.9111740e-09, 7.6254325e-09,
618+ # 5.4230477e-09, 3.4799784e-09, 1.9601523e-09, 9.3903981e-10,
619+ # 3.6862928e-10, 1.1297902e-10, 2.5188758e-11, 3.6724956e-12,
620+ # 2.9351639e-13, 8.1701272e-15, 7.6912480e-17, 6.8729255e-27/
621+ data (gridv(iny, 2),iny=1,32)/
622+ # 5.9726888e-03, 4.6455606e-03, 3.6455128e-03, 2.8853282e-03,
623+ # 2.3012642e-03, 1.8468005e-03, 1.4906859e-03, 1.2098779e-03,
624+ # 9.8764085e-04, 8.1150430e-04, 6.7166904e-04, 5.6040282e-04,
625+ # 4.7152850e-04, 3.9983688e-04, 3.4081959e-04, 2.9051542e-04,
626+ # 2.4549043e-04, 2.0307075e-04, 1.6177240e-04, 1.2167096e-04,
627+ # 8.4473943e-05, 5.2813192e-05, 2.8909650e-05, 1.3417511e-05,
628+ # 5.0832560e-06, 1.4959648e-06, 3.1801753e-07, 4.3791104e-08,
629+ # 3.2498348e-09, 8.1063886e-11, 6.0039546e-13, 6.3617388e-23/
630+ data (gridv(iny, 3),iny=1,32)/
631+ # 1.6219214e-02, 1.2379365e-02, 9.5193091e-03, 7.3739795e-03,
632+ # 5.7510065e-03, 4.5098861e-03, 3.5553416e-03, 2.8172455e-03,
633+ # 2.2446775e-03, 1.7999287e-03, 1.4539007e-03, 1.1841462e-03,
634+ # 9.7322588e-04, 8.0691077e-04, 6.7339686e-04, 5.6275965e-04,
635+ # 4.6677178e-04, 3.7925827e-04, 2.9674760e-04, 2.1907115e-04,
636+ # 1.4910620e-04, 9.1228668e-05, 4.8765008e-05, 2.2043195e-05,
637+ # 8.1072382e-06, 2.3064166e-06, 4.7120345e-07, 6.1862016e-08,
638+ # 4.3153587e-09, 9.8155908e-11, 5.5917625e-13, 7.2313499e-23/
639+ data (gridv(iny, 4),iny=1,32)/
640+ # 3.1188696e-02, 2.3420186e-02, 1.7702079e-02, 1.3467734e-02,
641+ # 1.0309782e-02, 7.9318460e-03, 6.1325773e-03, 4.7646388e-03,
642+ # 3.7215358e-03, 2.9251760e-03, 2.3161962e-03, 1.8496758e-03,
643+ # 1.4912341e-03, 1.2139639e-03, 9.9569551e-04, 8.1869337e-04,
644+ # 6.6868465e-04, 5.3525022e-04, 4.1252936e-04, 2.9977979e-04,
645+ # 2.0061564e-04, 1.2049765e-04, 6.3112103e-05, 2.7890159e-05,
646+ # 1.0000143e-05, 2.7633522e-06, 5.4561380e-07, 6.8754820e-08,
647+ # 4.5477918e-09, 9.5512862e-11, 4.0175364e-13, 6.6363321e-23/
648+ data (gridv(iny, 5),iny=1,32)/
649+ # 5.1182299e-02, 3.7889407e-02, 2.8215137e-02, 2.1136435e-02,
650+ # 1.5925131e-02, 1.2054633e-02, 9.1677464e-03, 7.0050385e-03,
651+ # 5.3803216e-03, 4.1584009e-03, 3.2378903e-03, 2.5431829e-03,
652+ # 2.0176932e-03, 1.6173071e-03, 1.3073170e-03, 1.0602661e-03,
653+ # 8.5475523e-04, 6.7549247e-04, 5.1388835e-04, 3.6836179e-04,
654+ # 2.4290493e-04, 1.4356363e-04, 7.3865824e-05, 3.2002011e-05,
655+ # 1.1221536e-05, 3.0227536e-06, 5.7924224e-07, 7.0416470e-08,
656+ # 4.4455239e-09, 8.7027993e-11, 2.5174163e-13, 5.7249565e-23/
657+ data (gridv(iny, 6),iny=1,32)/
658+ # 7.6557895e-02, 5.5955076e-02, 4.1120172e-02, 3.0385490e-02,
659+ # 2.2576036e-02, 1.6847439e-02, 1.2629288e-02, 9.5105660e-03,
660+ # 7.1985244e-03, 5.4827229e-03, 4.2072308e-03, 3.2573133e-03,
661+ # 2.5483598e-03, 2.0155007e-03, 1.6086767e-03, 1.2891809e-03,
662+ # 1.0274915e-03, 8.0291084e-04, 6.0382880e-04, 4.2759547e-04,
663+ # 2.7827791e-04, 1.6211285e-04, 8.2090171e-05, 3.4938634e-05,
664+ # 1.2008139e-05, 3.1607346e-06, 5.8901727e-07, 6.9129330e-08,
665+ # 4.1796650e-09, 7.6790396e-11, 1.4801921e-13, 4.8386670e-23/
666+ data (gridv(iny, 7),iny=1,32)/
667+ # 1.0885701e-01, 7.8595632e-02, 5.7044003e-02, 4.1606207e-02,
668+ # 3.0510595e-02, 2.2464186e-02, 1.6611725e-02, 1.2338586e-02,
669+ # 9.2105421e-03, 6.9185264e-03, 5.2361582e-03, 3.9989670e-03,
670+ # 3.0873318e-03, 2.4109199e-03, 1.9013023e-03, 1.5064199e-03,
671+ # 1.1876339e-03, 9.1812852e-04, 6.8290918e-04, 4.7797892e-04,
672+ # 3.0715516e-04, 1.7645732e-04, 8.7991353e-05, 3.6807315e-05,
673+ # 1.2399813e-05, 3.1850040e-06, 5.7189229e-07, 6.3166456e-08,
674+ # 3.5998373e-09, 6.0994275e-11, 1.0798487e-13, 3.7970497e-23/
675+ data (gridv(iny, 8),iny=1,32)/
676+ # 1.5068353e-01, 1.0749621e-01, 7.7041842e-02, 5.5476031e-02,
677+ # 4.0143008e-02, 2.9160969e-02, 2.1271437e-02, 1.5583408e-02,
678+ # 1.1472391e-02, 8.4985083e-03, 6.3433700e-03, 4.7785683e-03,
679+ # 3.6402566e-03, 2.8065350e-03, 2.1865589e-03, 1.7127763e-03,
680+ # 1.3356279e-03, 1.0214490e-03, 7.5140048e-04, 5.1978083e-04,
681+ # 3.2977123e-04, 1.8681197e-04, 9.1728471e-05, 3.7697570e-05,
682+ # 1.2430821e-05, 3.1016518e-06, 5.2367878e-07, 5.0603141e-08,
683+ # 2.5423963e-09, 3.4635376e-11, 4.1186342e-14, 2.0657555e-23/
684+ data firsttime/.true./
685+ save
686+ if(firsttime)then
687+ firsttime=.false.
688+ nent(1)=nny
689+ nent(2)=nnz
690+ do iny=1,nny
691+ ent(iny)=(yv(iny))
692+ enddo
693+ do inz=1,nnz
694+ ent(nny+inz)=(zv(inz))
695+ enddo
696+ endif
697+ arg(1)=(y)
698+ arg(2)=(z)
699+ tmp=dfint(narg,arg,nent,ent,gridv)
700+ ewa_wp_p_1m=tmp
701+ return
702+ end
703+ function ewa_wp_p_0(y,z)
704+ implicit none
705+ real*8 ewa_wp_p_0,y,z
706+ integer narg,nny,nnz
707+ parameter (narg=2)
708+ parameter (nny=32)
709+ parameter (nnz=8)
710+ integer iny,inz,nent(narg)
711+ real*8 tmp,dfint,ymap,zmap
712+ real*8 arg(narg),ent(nny+nnz)
713+ real*8 yv(nny),zv(nnz),gridv(nny,nnz)
714+ logical firsttime
715+ external dfint,ymap,zmap
716+ data yv/
717+ # -1.6118096e+01, -1.5094991e+01, -1.4105430e+01, -1.3149414e+01,
718+ # -1.2226943e+01, -1.1338015e+01, -1.0482632e+01, -9.6607941e+00,
719+ # -8.8725001e+00, -8.1177506e+00, -7.3965455e+00, -6.7088848e+00,
720+ # -6.0547686e+00, -5.4341967e+00, -4.8471693e+00, -4.2936863e+00,
721+ # -3.7737478e+00, -3.2873536e+00, -2.8345039e+00, -2.4151986e+00,
722+ # -2.0294377e+00, -1.6772213e+00, -1.3585493e+00, -1.0734217e+00,
723+ # -8.2183848e-01, -6.0379973e-01, -4.1930540e-01, -2.6835549e-01,
724+ # -1.5095001e-01, -6.7088947e-02, -1.6772312e-02, -1.0000000e-07/
725+ data zv/
726+ # 4.3868276e+00, 5.7337823e+00, 7.0807370e+00, 8.4276917e+00,
727+ # 9.7746464e+00, 1.1121601e+01, 1.2468556e+01, 1.3815511e+01/
728+ data (gridv(iny, 1),iny=1,32)/
729+ # 3.5187008e-03, 2.8034859e-03, 2.2605790e-03, 1.8430659e-03,
730+ # 1.5186478e-03, 1.2616393e-03, 1.0560624e-03, 8.9012320e-04,
731+ # 7.5538508e-04, 6.4582892e-04, 5.5671967e-04, 4.8420795e-04,
732+ # 4.2519673e-04, 3.7700036e-04, 3.3717825e-04, 3.0339543e-04,
733+ # 2.7329402e-04, 2.4447706e-04, 2.1469168e-04, 1.8222898e-04,
734+ # 1.4664818e-04, 1.0943422e-04, 7.3828376e-05, 4.3723959e-05,
735+ # 2.1983802e-05, 9.0102753e-06, 2.8448697e-06, 6.3299117e-07,
736+ # 8.7487931e-08, 5.2831049e-09, 1.1568847e-10, 1.8415286e-15/
737+ data (gridv(iny, 2),iny=1,32)/
738+ # 5.2548138e-03, 4.0999760e-03, 3.2295174e-03, 2.5667153e-03,
739+ # 2.0584664e-03, 1.6625476e-03, 1.3517402e-03, 1.1060358e-03,
740+ # 9.1078460e-04, 7.5538896e-04, 6.3160108e-04, 5.3288902e-04,
741+ # 4.5415547e-04, 3.9119341e-04, 3.4038971e-04, 2.9850573e-04,
742+ # 2.6252377e-04, 2.2960220e-04, 1.9724634e-04, 1.6373150e-04,
743+ # 1.2870167e-04, 9.3622734e-05, 6.1405954e-05, 3.5240336e-05,
744+ # 1.7102418e-05, 6.7317976e-06, 2.0267789e-06, 4.2595999e-07,
745+ # 5.4725748e-08, 2.9719851e-09, 4.8981810e-11, 9.4455659e-16/
746+ data (gridv(iny, 3),iny=1,32)/
747+ # 7.1876070e-03, 5.5076672e-03, 4.2546965e-03, 3.3120537e-03,
748+ # 2.5990113e-03, 2.0524391e-03, 1.6307512e-03, 1.3034276e-03,
749+ # 1.0481689e-03, 8.4882548e-04, 6.9291048e-04, 5.7083971e-04,
750+ # 4.7522642e-04, 4.0016654e-04, 3.4076979e-04, 2.9285118e-04,
751+ # 2.5271536e-04, 2.1707747e-04, 1.8321030e-04, 1.4933939e-04,
752+ # 1.1513883e-04, 8.2005502e-05, 5.2541044e-05, 2.9373325e-05,
753+ # 1.3840817e-05, 5.2672006e-06, 1.5241105e-06, 3.0542392e-07,
754+ # 3.6915891e-08, 1.8347912e-09, 2.2114402e-11, 5.3685066e-16/
755+ data (gridv(iny, 4),iny=1,32)/
756+ # 9.2731430e-03, 6.9948236e-03, 5.3144732e-03, 4.0652903e-03,
757+ # 3.1328132e-03, 2.4282484e-03, 1.8929862e-03, 1.4841263e-03,
758+ # 1.1704474e-03, 9.2943341e-04, 7.4399977e-04, 6.0109301e-04,
759+ # 4.9092271e-04, 4.0580385e-04, 3.3953903e-04, 2.8700023e-04,
760+ # 2.4383801e-04, 2.0634913e-04, 1.7159359e-04, 1.3773971e-04,
761+ # 1.0446314e-04, 7.3071554e-05, 4.5887405e-05, 2.5084061e-05,
762+ # 1.1524443e-05, 4.2604502e-06, 1.1914778e-06, 2.2920043e-07,
763+ # 2.6286612e-08, 1.2107299e-09, 1.0080946e-11, 3.2845426e-16/
764+ data (gridv(iny, 5),iny=1,32)/
765+ # 1.1477138e-02, 8.5381747e-03, 6.3939961e-03, 4.8178867e-03,
766+ # 3.6556258e-03, 2.7887348e-03, 2.1392407e-03, 1.6500181e-03,
767+ # 1.2800074e-03, 9.9975891e-04, 7.8717888e-04, 6.2562654e-04,
768+ # 5.0280633e-04, 4.0921770e-04, 3.3736136e-04, 2.8121172e-04,
769+ # 2.3579394e-04, 1.9702349e-04, 1.6176823e-04, 1.2814066e-04,
770+ # 9.5802895e-05, 6.5966820e-05, 4.0705648e-05, 2.1818543e-05,
771+ # 9.8043554e-06, 3.5336308e-06, 9.5911504e-07, 1.7800578e-07,
772+ # 1.9496528e-08, 8.4002050e-10, 4.3204403e-12, 2.1251138e-16/
773+ data (gridv(iny, 6),iny=1,32)/
774+ # 1.3802612e-02, 1.0141026e-02, 7.4971127e-03, 5.5741476e-03,
775+ # 4.1720271e-03, 3.1386776e-03, 2.3737894e-03, 1.8049673e-03,
776+ # 1.3802137e-03, 1.0625971e-03, 8.2471236e-04, 6.4617450e-04,
777+ # 5.1210721e-04, 4.1120934e-04, 3.3467950e-04, 2.7561780e-04,
778+ # 2.2846603e-04, 1.8878732e-04, 1.5327653e-04, 1.1999194e-04,
779+ # 8.8573452e-05, 6.0136140e-05, 3.6529669e-05, 1.9238247e-05,
780+ # 8.4746327e-06, 2.9853000e-06, 7.8837418e-07, 1.4128313e-07,
781+ # 1.4820095e-08, 6.0070190e-10, 1.7185758e-12, 1.4369011e-16/
782+ data (gridv(iny, 7),iny=1,32)/
783+ # 1.6432308e-02, 1.1930946e-02, 8.7133575e-03, 6.3970356e-03,
784+ # 4.7264435e-03, 3.5091707e-03, 2.6187361e-03, 1.9645111e-03,
785+ # 1.4819077e-03, 1.1254264e-03, 8.6166780e-04, 6.6606423e-04,
786+ # 5.2091794e-04, 4.1296488e-04, 3.3203523e-04, 2.7031018e-04,
787+ # 2.2163224e-04, 1.8120725e-04, 1.4555330e-04, 1.1266604e-04,
788+ # 8.2152609e-05, 5.5024591e-05, 3.2922540e-05, 1.7044970e-05,
789+ # 7.3639505e-06, 2.5349841e-06, 6.4817141e-07, 1.0938699e-07,
790+ # 1.0789142e-08, 4.0267815e-10, 9.9738412e-13, 9.3965182e-17/
791+ data (gridv(iny, 8),iny=1,32)/
792+ # 1.9588443e-02, 1.4054534e-02, 1.0140342e-02, 7.3511754e-03,
793+ # 5.3617513e-03, 3.9285711e-03, 2.8927241e-03, 2.1409034e-03,
794+ # 1.5930991e-03, 1.1934393e-03, 9.0134688e-04, 6.8734040e-04,
795+ # 5.3043871e-04, 4.1513075e-04, 3.2970284e-04, 2.6531895e-04,
796+ # 2.1516289e-04, 1.7405250e-04, 1.3830950e-04, 1.0585100e-04,
797+ # 7.6238215e-05, 5.0368640e-05, 2.9681423e-05, 1.5103253e-05,
798+ # 6.3960840e-06, 2.1473293e-06, 5.2444493e-07, 7.7848289e-08,
799+ # 6.7448840e-09, 2.0379331e-10, 2.3209743e-13, 4.3818080e-17/
800+ data firsttime/.true./
801+ save
802+ if(firsttime)then
803+ firsttime=.false.
804+ nent(1)=nny
805+ nent(2)=nnz
806+ do iny=1,nny
807+ ent(iny)=(yv(iny))
808+ enddo
809+ do inz=1,nnz
810+ ent(nny+inz)=(zv(inz))
811+ enddo
812+ endif
813+ arg(1)=(y)
814+ arg(2)=(z)
815+ tmp=dfint(narg,arg,nent,ent,gridv)
816+ ewa_wp_p_0=tmp
817+ return
818+ end
819+ function ewa_wm_p(x,Q2,pol)
820+ implicit none
821+ real*8 ewa_wm_p
822+ real*8 x,Q2
823+ integer pol
824+ real*8 tmp
825+ real*8 y,z
826+ real*8 ylow,yupp,zlow,zupp
827+ parameter (ylow=-16.1181,yupp=-1e-07)
828+ parameter (zlow=4.38683,zupp=13.8155)
829+ real*8 ewa_wm_p_1p
830+ real*8 ewa_wm_p_1m
831+ real*8 ewa_wm_p_0
832+ y=log(x)
833+ z=0.5*log(Q2)
834+ if(pol.eq.1)then
835+ tmp=ewa_wm_p_1p(y,z)
836+ else if(pol.eq.-1)then
837+ tmp=ewa_wm_p_1m(y,z)
838+ else
839+ tmp=ewa_wm_p_0(y,z)
840+ endif
841+ ewa_wm_p=tmp/x*y*y
842+ end
843+ function ewa_wm_p_1p(y,z)
844+ implicit none
845+ real*8 ewa_wm_p_1p,y,z
846+ integer narg,nny,nnz
847+ parameter (narg=2)
848+ parameter (nny=32)
849+ parameter (nnz=8)
850+ integer iny,inz,nent(narg)
851+ real*8 tmp,dfint,ymap,zmap
852+ real*8 arg(narg),ent(nny+nnz)
853+ real*8 yv(nny),zv(nnz),gridv(nny,nnz)
854+ logical firsttime
855+ external dfint,ymap,zmap
856+ data yv/
857+ # -1.6118096e+01, -1.5094991e+01, -1.4105430e+01, -1.3149414e+01,
858+ # -1.2226943e+01, -1.1338015e+01, -1.0482632e+01, -9.6607941e+00,
859+ # -8.8725001e+00, -8.1177506e+00, -7.3965455e+00, -6.7088848e+00,
860+ # -6.0547686e+00, -5.4341967e+00, -4.8471693e+00, -4.2936863e+00,
861+ # -3.7737478e+00, -3.2873536e+00, -2.8345039e+00, -2.4151986e+00,
862+ # -2.0294377e+00, -1.6772213e+00, -1.3585493e+00, -1.0734217e+00,
863+ # -8.2183848e-01, -6.0379973e-01, -4.1930540e-01, -2.6835549e-01,
864+ # -1.5095001e-01, -6.7088947e-02, -1.6772312e-02, -1.0000000e-07/
865+ data zv/
866+ # 4.3868276e+00, 5.7337823e+00, 7.0807370e+00, 8.4276917e+00,
867+ # 9.7746464e+00, 1.1121601e+01, 1.2468556e+01, 1.3815511e+01/
868+ data (gridv(iny, 1),iny=1,32)/
869+ # 3.5423305e-07, 2.8295336e-07, 2.2903220e-07, 1.8758200e-07,
870+ # 1.5559163e-07, 1.3038773e-07, 1.1025515e-07, 9.4027921e-08,
871+ # 8.0829168e-08, 7.0061706e-08, 6.1294211e-08, 5.4182560e-08,
872+ # 4.8450890e-08, 4.3888687e-08, 4.0319491e-08, 3.7580596e-08,
873+ # 3.5520713e-08, 3.3952301e-08, 3.2625426e-08, 3.1187707e-08,
874+ # 2.9181849e-08, 2.6154236e-08, 2.1900372e-08, 1.6640020e-08,
875+ # 1.1099066e-08, 6.2780040e-09, 2.8842540e-09, 1.0025616e-09,
876+ # 2.4219639e-10, 3.2430180e-11, 1.7122412e-12, 4.1237372e-12/
877+ data (gridv(iny, 2),iny=1,32)/
878+ # 9.6800285e-03, 7.5895745e-03, 6.0144129e-03, 4.8116391e-03,
879+ # 3.8906828e-03, 3.1743361e-03, 2.6106310e-03, 2.1637757e-03,
880+ # 1.8068388e-03, 1.5208169e-03, 1.2917371e-03, 1.1084546e-03,
881+ # 9.6221855e-04, 8.4652524e-04, 7.5595982e-04, 6.8586986e-04,
882+ # 6.3206533e-04, 5.8999236e-04, 5.5430903e-04, 5.1815672e-04,
883+ # 4.7362998e-04, 4.1384517e-04, 3.3686600e-04, 2.4790947e-04,
884+ # 1.5951917e-04, 8.6605399e-05, 3.7927081e-05, 1.2444648e-05,
885+ # 2.7972986e-06, 3.3735215e-07, 1.3499999e-08, 3.8170248e-08/
886+ data (gridv(iny, 3),iny=1,32)/
887+ # 2.6802909e-02, 2.0666858e-02, 1.6084293e-02, 1.2619023e-02,
888+ # 9.9957736e-03, 7.9819494e-03, 6.4206742e-03, 5.2026236e-03,
889+ # 4.2458765e-03, 3.4918949e-03, 2.8976082e-03, 2.4290655e-03,
890+ # 2.0601111e-03, 1.7714145e-03, 1.5472491e-03, 1.3744754e-03,
891+ # 1.2417664e-03, 1.1376810e-03, 1.0498817e-03, 9.6384193e-04,
892+ # 8.6434504e-04, 7.3958460e-04, 5.8805171e-04, 4.2143198e-04,
893+ # 2.6317925e-04, 1.3808501e-04, 5.8100243e-05, 1.8168748e-05,
894+ # 3.8451248e-06, 4.2503569e-07, 1.2748665e-08, 4.3387870e-08/
895+ data (gridv(iny, 4),iny=1,32)/
896+ # 5.2421053e-02, 3.9824965e-02, 3.0512558e-02, 2.3545386e-02,
897+ # 1.8330098e-02, 1.4377269e-02, 1.1354532e-02, 9.0302263e-03,
898+ # 7.2316381e-03, 5.8351965e-03, 4.7504014e-03, 3.9068753e-03,
899+ # 3.2509450e-03, 2.7436667e-03, 2.3536072e-03, 2.0551591e-03,
900+ # 1.8269264e-03, 1.6483845e-03, 1.4987780e-03, 1.3553122e-03,
901+ # 1.1959351e-03, 1.0052207e-03, 7.8338419e-04, 5.4881055e-04,
902+ # 3.3404786e-04, 1.7020660e-04, 6.9197187e-05, 2.0763953e-05,
903+ # 4.1724093e-06, 4.2803444e-07, 9.3531305e-09, 3.9817765e-08/
904+ data (gridv(iny, 5),iny=1,32)/
905+ # 8.7314473e-02, 6.5462234e-02, 4.9470387e-02, 3.7629031e-02,
906+ # 2.8860417e-02, 2.2292410e-02, 1.7332180e-02, 1.3567321e-02,
907+ # 1.0692431e-02, 8.4897045e-03, 6.8007137e-03, 5.5036549e-03,
908+ # 4.5068644e-03, 3.7444546e-03, 3.1638216e-03, 2.7231011e-03,
909+ # 2.3880260e-03, 2.1270240e-03, 1.9097372e-03, 1.7046592e-03,
910+ # 1.4833082e-03, 1.2275453e-03, 9.4002916e-04, 6.4560015e-04,
911+ # 3.8423698e-04, 1.9081605e-04, 7.5273640e-05, 2.1785061e-05,
912+ # 4.1829038e-06, 4.0198589e-07, 6.0711799e-09, 3.4349528e-08/
913+ data (gridv(iny, 6),iny=1,32)/
914+ # 1.3235511e-01, 9.8047579e-02, 7.3187600e-02, 5.4960335e-02,
915+ # 4.1600160e-02, 3.1701979e-02, 2.4311750e-02, 1.8768166e-02,
916+ # 1.4585527e-02, 1.1418854e-02, 9.0192598e-03, 7.1973844e-03,
917+ # 5.8123298e-03, 4.7637364e-03, 3.9726338e-03, 3.3768371e-03,
918+ # 2.9266403e-03, 2.5776574e-03, 2.2889023e-03, 2.0198147e-03,
919+ # 1.7358250e-03, 1.4167343e-03, 1.0680290e-03, 7.2056798e-04,
920+ # 4.2032019e-04, 2.0398263e-04, 7.8308169e-05, 2.1899198e-05,
921+ # 4.0241531e-06, 3.6414048e-07, 3.7675413e-09, 2.9031813e-08/
922+ data (gridv(iny, 7),iny=1,32)/
923+ # 1.9057983e-01, 1.3957407e-01, 1.0297250e-01, 7.6391524e-02,
924+ # 5.7105084e-02, 4.2965226e-02, 3.2523923e-02, 2.4779895e-02,
925+ # 1.9003972e-02, 1.4680964e-02, 1.1442346e-02, 9.0104755e-03,
926+ # 7.1810453e-03, 5.8100245e-03, 4.7852651e-03, 4.0196945e-03,
927+ # 3.4450331e-03, 3.0020034e-03, 2.6377816e-03, 2.3022876e-03,
928+ # 1.9551214e-03, 1.5745712e-03, 1.1692227e-03, 7.7537535e-04,
929+ # 4.4359770e-04, 2.1050710e-04, 7.8557363e-05, 2.0871834e-05,
930+ # 3.5743974e-06, 2.9762988e-07, 2.7844229e-09, 2.2782149e-08/
931+ data (gridv(iny, 8),iny=1,32)/
932+ # 2.6712405e-01, 1.9341146e-01, 1.4102973e-01, 1.0336364e-01,
933+ # 7.6305708e-02, 5.6682239e-02, 4.2352056e-02, 3.1846115e-02,
934+ # 2.4101065e-02, 1.8371384e-02, 1.4128575e-02, 1.0978416e-02,
935+ # 8.6341061e-03, 6.8955860e-03, 5.6086588e-03, 4.6555113e-03,
936+ # 3.9452818e-03, 3.4012072e-03, 2.9571084e-03, 2.5527100e-03,
937+ # 2.1419401e-03, 1.7020208e-03, 1.2447953e-03, 8.1123628e-04,
938+ # 4.5515586e-04, 2.1111600e-04, 7.6224092e-05, 1.8396998e-05,
939+ # 2.7018652e-06, 1.8403044e-07, 1.1449565e-09, 1.2394449e-08/
940+ data firsttime/.true./
941+ save
942+ if(firsttime)then
943+ firsttime=.false.
944+ nent(1)=nny
945+ nent(2)=nnz
946+ do iny=1,nny
947+ ent(iny)=(yv(iny))
948+ enddo
949+ do inz=1,nnz
950+ ent(nny+inz)=(zv(inz))
951+ enddo
952+ endif
953+ arg(1)=(y)
954+ arg(2)=(z)
955+ tmp=dfint(narg,arg,nent,ent,gridv)
956+ ewa_wm_p_1p=tmp
957+ return
958+ end
959+ function ewa_wm_p_1m(y,z)
960+ implicit none
961+ real*8 ewa_wm_p_1m,y,z
962+ integer narg,nny,nnz
963+ parameter (narg=2)
964+ parameter (nny=32)
965+ parameter (nnz=8)
966+ integer iny,inz,nent(narg)
967+ real*8 tmp,dfint,ymap,zmap
968+ real*8 arg(narg),ent(nny+nnz)
969+ real*8 yv(nny),zv(nnz),gridv(nny,nnz)
970+ logical firsttime
971+ external dfint,ymap,zmap
972+ data yv/
973+ # -1.6118096e+01, -1.5094991e+01, -1.4105430e+01, -1.3149414e+01,
974+ # -1.2226943e+01, -1.1338015e+01, -1.0482632e+01, -9.6607941e+00,
975+ # -8.8725001e+00, -8.1177506e+00, -7.3965455e+00, -6.7088848e+00,
976+ # -6.0547686e+00, -5.4341967e+00, -4.8471693e+00, -4.2936863e+00,
977+ # -3.7737478e+00, -3.2873536e+00, -2.8345039e+00, -2.4151986e+00,
978+ # -2.0294377e+00, -1.6772213e+00, -1.3585493e+00, -1.0734217e+00,
979+ # -8.2183848e-01, -6.0379973e-01, -4.1930540e-01, -2.6835549e-01,
980+ # -1.5095001e-01, -6.7088947e-02, -1.6772312e-02, -1.0000000e-07/
981+ data zv/
982+ # 4.3868276e+00, 5.7337823e+00, 7.0807370e+00, 8.4276917e+00,
983+ # 9.7746464e+00, 1.1121601e+01, 1.2468556e+01, 1.3815511e+01/
984+ data (gridv(iny, 1),iny=1,32)/
985+ # 2.2352243e-07, 1.7777182e-07, 1.4298652e-07, 1.1622085e-07,
986+ # 9.5328508e-08, 7.8759840e-08, 6.5499586e-08, 5.4802442e-08,
987+ # 4.6136489e-08, 3.9104599e-08, 3.3386967e-08, 2.8725277e-08,
988+ # 2.4905274e-08, 2.1731925e-08, 1.9030359e-08, 1.6631364e-08,
989+ # 1.4386235e-08, 1.2169804e-08, 9.9111740e-09, 7.6254325e-09,
990+ # 5.4230477e-09, 3.4799784e-09, 1.9601523e-09, 9.3903981e-10,
991+ # 3.6862928e-10, 1.1297902e-10, 2.5188758e-11, 3.6724956e-12,
992+ # 2.9351639e-13, 8.1701272e-15, 7.6912480e-17, 6.8729255e-27/
993+ data (gridv(iny, 2),iny=1,32)/
994+ # 5.9726888e-03, 4.6455606e-03, 3.6455128e-03, 2.8853282e-03,
995+ # 2.3012642e-03, 1.8468005e-03, 1.4906859e-03, 1.2098779e-03,
996+ # 9.8764085e-04, 8.1150430e-04, 6.7166904e-04, 5.6040282e-04,
997+ # 4.7152850e-04, 3.9983688e-04, 3.4081959e-04, 2.9051542e-04,
998+ # 2.4549043e-04, 2.0307075e-04, 1.6177240e-04, 1.2167096e-04,
999+ # 8.4473943e-05, 5.2813192e-05, 2.8909650e-05, 1.3417511e-05,
1000+ # 5.0832560e-06, 1.4959648e-06, 3.1801753e-07, 4.3791104e-08,
1001+ # 3.2498348e-09, 8.1063886e-11, 6.0039546e-13, 6.3617388e-23/
1002+ data (gridv(iny, 3),iny=1,32)/
1003+ # 1.6219214e-02, 1.2379365e-02, 9.5193091e-03, 7.3739795e-03,
1004+ # 5.7510065e-03, 4.5098861e-03, 3.5553416e-03, 2.8172455e-03,
1005+ # 2.2446775e-03, 1.7999287e-03, 1.4539007e-03, 1.1841462e-03,
1006+ # 9.7322588e-04, 8.0691077e-04, 6.7339686e-04, 5.6275965e-04,
1007+ # 4.6677178e-04, 3.7925827e-04, 2.9674760e-04, 2.1907115e-04,
1008+ # 1.4910620e-04, 9.1228668e-05, 4.8765008e-05, 2.2043195e-05,
1009+ # 8.1072382e-06, 2.3064166e-06, 4.7120345e-07, 6.1862016e-08,
1010+ # 4.3153587e-09, 9.8155908e-11, 5.5917625e-13, 7.2313499e-23/
1011+ data (gridv(iny, 4),iny=1,32)/
1012+ # 3.1188696e-02, 2.3420186e-02, 1.7702079e-02, 1.3467734e-02,
1013+ # 1.0309782e-02, 7.9318460e-03, 6.1325773e-03, 4.7646388e-03,
1014+ # 3.7215358e-03, 2.9251760e-03, 2.3161962e-03, 1.8496758e-03,
1015+ # 1.4912341e-03, 1.2139639e-03, 9.9569551e-04, 8.1869337e-04,
1016+ # 6.6868465e-04, 5.3525022e-04, 4.1252936e-04, 2.9977979e-04,
1017+ # 2.0061564e-04, 1.2049765e-04, 6.3112103e-05, 2.7890159e-05,
1018+ # 1.0000143e-05, 2.7633522e-06, 5.4561380e-07, 6.8754820e-08,
1019+ # 4.5477918e-09, 9.5512862e-11, 4.0175364e-13, 6.6363321e-23/
1020+ data (gridv(iny, 5),iny=1,32)/
1021+ # 5.1182299e-02, 3.7889407e-02, 2.8215137e-02, 2.1136435e-02,
1022+ # 1.5925131e-02, 1.2054633e-02, 9.1677464e-03, 7.0050385e-03,
1023+ # 5.3803216e-03, 4.1584009e-03, 3.2378903e-03, 2.5431829e-03,
1024+ # 2.0176932e-03, 1.6173071e-03, 1.3073170e-03, 1.0602661e-03,
1025+ # 8.5475523e-04, 6.7549247e-04, 5.1388835e-04, 3.6836179e-04,
1026+ # 2.4290493e-04, 1.4356363e-04, 7.3865824e-05, 3.2002011e-05,
1027+ # 1.1221536e-05, 3.0227536e-06, 5.7924224e-07, 7.0416470e-08,
1028+ # 4.4455239e-09, 8.7027993e-11, 2.5174163e-13, 5.7249565e-23/
1029+ data (gridv(iny, 6),iny=1,32)/
1030+ # 7.6557895e-02, 5.5955076e-02, 4.1120172e-02, 3.0385490e-02,
1031+ # 2.2576036e-02, 1.6847439e-02, 1.2629288e-02, 9.5105660e-03,
1032+ # 7.1985244e-03, 5.4827229e-03, 4.2072308e-03, 3.2573133e-03,
1033+ # 2.5483598e-03, 2.0155007e-03, 1.6086767e-03, 1.2891809e-03,
1034+ # 1.0274915e-03, 8.0291084e-04, 6.0382880e-04, 4.2759547e-04,
1035+ # 2.7827791e-04, 1.6211285e-04, 8.2090171e-05, 3.4938634e-05,
1036+ # 1.2008139e-05, 3.1607346e-06, 5.8901727e-07, 6.9129330e-08,
1037+ # 4.1796650e-09, 7.6790396e-11, 1.4801921e-13, 4.8386670e-23/
1038+ data (gridv(iny, 7),iny=1,32)/
1039+ # 1.0885701e-01, 7.8595632e-02, 5.7044003e-02, 4.1606207e-02,
1040+ # 3.0510595e-02, 2.2464186e-02, 1.6611725e-02, 1.2338586e-02,
1041+ # 9.2105421e-03, 6.9185264e-03, 5.2361582e-03, 3.9989670e-03,
1042+ # 3.0873318e-03, 2.4109199e-03, 1.9013023e-03, 1.5064199e-03,
1043+ # 1.1876339e-03, 9.1812852e-04, 6.8290918e-04, 4.7797892e-04,
1044+ # 3.0715516e-04, 1.7645732e-04, 8.7991353e-05, 3.6807315e-05,
1045+ # 1.2399813e-05, 3.1850040e-06, 5.7189229e-07, 6.3166456e-08,
1046+ # 3.5998373e-09, 6.0994275e-11, 1.0798487e-13, 3.7970497e-23/
1047+ data (gridv(iny, 8),iny=1,32)/
1048+ # 1.5068353e-01, 1.0749621e-01, 7.7041842e-02, 5.5476031e-02,
1049+ # 4.0143008e-02, 2.9160969e-02, 2.1271437e-02, 1.5583408e-02,
1050+ # 1.1472391e-02, 8.4985083e-03, 6.3433700e-03, 4.7785683e-03,
1051+ # 3.6402566e-03, 2.8065350e-03, 2.1865589e-03, 1.7127763e-03,
1052+ # 1.3356279e-03, 1.0214490e-03, 7.5140048e-04, 5.1978083e-04,
1053+ # 3.2977123e-04, 1.8681197e-04, 9.1728471e-05, 3.7697570e-05,
1054+ # 1.2430821e-05, 3.1016518e-06, 5.2367878e-07, 5.0603141e-08,
1055+ # 2.5423963e-09, 3.4635376e-11, 4.1186342e-14, 2.0657555e-23/
1056+ data firsttime/.true./
1057+ save
1058+ if(firsttime)then
1059+ firsttime=.false.
1060+ nent(1)=nny
1061+ nent(2)=nnz
1062+ do iny=1,nny
1063+ ent(iny)=(yv(iny))
1064+ enddo
1065+ do inz=1,nnz
1066+ ent(nny+inz)=(zv(inz))
1067+ enddo
1068+ endif
1069+ arg(1)=(y)
1070+ arg(2)=(z)
1071+ tmp=dfint(narg,arg,nent,ent,gridv)
1072+ ewa_wm_p_1m=tmp
1073+ return
1074+ end
1075+ function ewa_wm_p_0(y,z)
1076+ implicit none
1077+ real*8 ewa_wm_p_0,y,z
1078+ integer narg,nny,nnz
1079+ parameter (narg=2)
1080+ parameter (nny=32)
1081+ parameter (nnz=8)
1082+ integer iny,inz,nent(narg)
1083+ real*8 tmp,dfint,ymap,zmap
1084+ real*8 arg(narg),ent(nny+nnz)
1085+ real*8 yv(nny),zv(nnz),gridv(nny,nnz)
1086+ logical firsttime
1087+ external dfint,ymap,zmap
1088+ data yv/
1089+ # -1.6118096e+01, -1.5094991e+01, -1.4105430e+01, -1.3149414e+01,
1090+ # -1.2226943e+01, -1.1338015e+01, -1.0482632e+01, -9.6607941e+00,
1091+ # -8.8725001e+00, -8.1177506e+00, -7.3965455e+00, -6.7088848e+00,
1092+ # -6.0547686e+00, -5.4341967e+00, -4.8471693e+00, -4.2936863e+00,
1093+ # -3.7737478e+00, -3.2873536e+00, -2.8345039e+00, -2.4151986e+00,
1094+ # -2.0294377e+00, -1.6772213e+00, -1.3585493e+00, -1.0734217e+00,
1095+ # -8.2183848e-01, -6.0379973e-01, -4.1930540e-01, -2.6835549e-01,
1096+ # -1.5095001e-01, -6.7088947e-02, -1.6772312e-02, -1.0000000e-07/
1097+ data zv/
1098+ # 4.3868276e+00, 5.7337823e+00, 7.0807370e+00, 8.4276917e+00,
1099+ # 9.7746464e+00, 1.1121601e+01, 1.2468556e+01, 1.3815511e+01/
1100+ data (gridv(iny, 1),iny=1,32)/
1101+ # 3.5187008e-03, 2.8034859e-03, 2.2605790e-03, 1.8430659e-03,
1102+ # 1.5186478e-03, 1.2616393e-03, 1.0560624e-03, 8.9012320e-04,
1103+ # 7.5538508e-04, 6.4582892e-04, 5.5671967e-04, 4.8420795e-04,
1104+ # 4.2519673e-04, 3.7700036e-04, 3.3717825e-04, 3.0339543e-04,
1105+ # 2.7329402e-04, 2.4447706e-04, 2.1469168e-04, 1.8222898e-04,
1106+ # 1.4664818e-04, 1.0943422e-04, 7.3828376e-05, 4.3723959e-05,
1107+ # 2.1983802e-05, 9.0102753e-06, 2.8448697e-06, 6.3299117e-07,
1108+ # 8.7487931e-08, 5.2831049e-09, 1.1568847e-10, 1.8415286e-15/
1109+ data (gridv(iny, 2),iny=1,32)/
1110+ # 5.2548138e-03, 4.0999760e-03, 3.2295174e-03, 2.5667153e-03,
1111+ # 2.0584664e-03, 1.6625476e-03, 1.3517402e-03, 1.1060358e-03,
1112+ # 9.1078460e-04, 7.5538896e-04, 6.3160108e-04, 5.3288902e-04,
1113+ # 4.5415547e-04, 3.9119341e-04, 3.4038971e-04, 2.9850573e-04,
1114+ # 2.6252377e-04, 2.2960220e-04, 1.9724634e-04, 1.6373150e-04,
1115+ # 1.2870167e-04, 9.3622734e-05, 6.1405954e-05, 3.5240336e-05,
1116+ # 1.7102418e-05, 6.7317976e-06, 2.0267789e-06, 4.2595999e-07,
1117+ # 5.4725748e-08, 2.9719851e-09, 4.8981810e-11, 9.4455659e-16/
1118+ data (gridv(iny, 3),iny=1,32)/
1119+ # 7.1876070e-03, 5.5076672e-03, 4.2546965e-03, 3.3120537e-03,
1120+ # 2.5990113e-03, 2.0524391e-03, 1.6307512e-03, 1.3034276e-03,
1121+ # 1.0481689e-03, 8.4882548e-04, 6.9291048e-04, 5.7083971e-04,
1122+ # 4.7522642e-04, 4.0016654e-04, 3.4076979e-04, 2.9285118e-04,
1123+ # 2.5271536e-04, 2.1707747e-04, 1.8321030e-04, 1.4933939e-04,
1124+ # 1.1513883e-04, 8.2005502e-05, 5.2541044e-05, 2.9373325e-05,
1125+ # 1.3840817e-05, 5.2672006e-06, 1.5241105e-06, 3.0542392e-07,
1126+ # 3.6915891e-08, 1.8347912e-09, 2.2114402e-11, 5.3685066e-16/
1127+ data (gridv(iny, 4),iny=1,32)/
1128+ # 9.2731430e-03, 6.9948236e-03, 5.3144732e-03, 4.0652903e-03,
1129+ # 3.1328132e-03, 2.4282484e-03, 1.8929862e-03, 1.4841263e-03,
1130+ # 1.1704474e-03, 9.2943341e-04, 7.4399977e-04, 6.0109301e-04,
1131+ # 4.9092271e-04, 4.0580385e-04, 3.3953903e-04, 2.8700023e-04,
1132+ # 2.4383801e-04, 2.0634913e-04, 1.7159359e-04, 1.3773971e-04,
1133+ # 1.0446314e-04, 7.3071554e-05, 4.5887405e-05, 2.5084061e-05,
1134+ # 1.1524443e-05, 4.2604502e-06, 1.1914778e-06, 2.2920043e-07,
1135+ # 2.6286612e-08, 1.2107299e-09, 1.0080946e-11, 3.2845426e-16/
1136+ data (gridv(iny, 5),iny=1,32)/
1137+ # 1.1477138e-02, 8.5381747e-03, 6.3939961e-03, 4.8178867e-03,
1138+ # 3.6556258e-03, 2.7887348e-03, 2.1392407e-03, 1.6500181e-03,
1139+ # 1.2800074e-03, 9.9975891e-04, 7.8717888e-04, 6.2562654e-04,
1140+ # 5.0280633e-04, 4.0921770e-04, 3.3736136e-04, 2.8121172e-04,
1141+ # 2.3579394e-04, 1.9702349e-04, 1.6176823e-04, 1.2814066e-04,
1142+ # 9.5802895e-05, 6.5966820e-05, 4.0705648e-05, 2.1818543e-05,
1143+ # 9.8043554e-06, 3.5336308e-06, 9.5911504e-07, 1.7800578e-07,
1144+ # 1.9496528e-08, 8.4002050e-10, 4.3204403e-12, 2.1251138e-16/
1145+ data (gridv(iny, 6),iny=1,32)/
1146+ # 1.3802612e-02, 1.0141026e-02, 7.4971127e-03, 5.5741476e-03,
1147+ # 4.1720271e-03, 3.1386776e-03, 2.3737894e-03, 1.8049673e-03,
1148+ # 1.3802137e-03, 1.0625971e-03, 8.2471236e-04, 6.4617450e-04,
1149+ # 5.1210721e-04, 4.1120934e-04, 3.3467950e-04, 2.7561780e-04,
1150+ # 2.2846603e-04, 1.8878732e-04, 1.5327653e-04, 1.1999194e-04,
1151+ # 8.8573452e-05, 6.0136140e-05, 3.6529669e-05, 1.9238247e-05,
1152+ # 8.4746327e-06, 2.9853000e-06, 7.8837418e-07, 1.4128313e-07,
1153+ # 1.4820095e-08, 6.0070190e-10, 1.7185758e-12, 1.4369011e-16/
1154+ data (gridv(iny, 7),iny=1,32)/
1155+ # 1.6432308e-02, 1.1930946e-02, 8.7133575e-03, 6.3970356e-03,
1156+ # 4.7264435e-03, 3.5091707e-03, 2.6187361e-03, 1.9645111e-03,
1157+ # 1.4819077e-03, 1.1254264e-03, 8.6166780e-04, 6.6606423e-04,
1158+ # 5.2091794e-04, 4.1296488e-04, 3.3203523e-04, 2.7031018e-04,
1159+ # 2.2163224e-04, 1.8120725e-04, 1.4555330e-04, 1.1266604e-04,
1160+ # 8.2152609e-05, 5.5024591e-05, 3.2922540e-05, 1.7044970e-05,
1161+ # 7.3639505e-06, 2.5349841e-06, 6.4817141e-07, 1.0938699e-07,
1162+ # 1.0789142e-08, 4.0267815e-10, 9.9738412e-13, 9.3965182e-17/
1163+ data (gridv(iny, 8),iny=1,32)/
1164+ # 1.9588443e-02, 1.4054534e-02, 1.0140342e-02, 7.3511754e-03,
1165+ # 5.3617513e-03, 3.9285711e-03, 2.8927241e-03, 2.1409034e-03,
1166+ # 1.5930991e-03, 1.1934393e-03, 9.0134688e-04, 6.8734040e-04,
1167+ # 5.3043871e-04, 4.1513075e-04, 3.2970284e-04, 2.6531895e-04,
1168+ # 2.1516289e-04, 1.7405250e-04, 1.3830950e-04, 1.0585100e-04,
1169+ # 7.6238215e-05, 5.0368640e-05, 2.9681423e-05, 1.5103253e-05,
1170+ # 6.3960840e-06, 2.1473293e-06, 5.2444493e-07, 7.7848289e-08,
1171+ # 6.7448840e-09, 2.0379331e-10, 2.3209743e-13, 4.3818080e-17/
1172+ data firsttime/.true./
1173+ save
1174+ if(firsttime)then
1175+ firsttime=.false.
1176+ nent(1)=nny
1177+ nent(2)=nnz
1178+ do iny=1,nny
1179+ ent(iny)=(yv(iny))
1180+ enddo
1181+ do inz=1,nnz
1182+ ent(nny+inz)=(zv(inz))
1183+ enddo
1184+ endif
1185+ arg(1)=(y)
1186+ arg(2)=(z)
1187+ tmp=dfint(narg,arg,nent,ent,gridv)
1188+ ewa_wm_p_0=tmp
1189+ return
1190+ end
1191+ function ewa_z_p(x,Q2,pol)
1192+ implicit none
1193+ real*8 ewa_z_p
1194+ real*8 x,Q2
1195+ integer pol
1196+ real*8 tmp
1197+ real*8 y,z
1198+ real*8 ylow,yupp,zlow,zupp
1199+ parameter (ylow=-16.1181,yupp=-1e-07)
1200+ parameter (zlow=4.38683,zupp=13.8155)
1201+ real*8 ewa_z_p_1p
1202+ real*8 ewa_z_p_1m
1203+ real*8 ewa_z_p_0
1204+ y=log(x)
1205+ z=0.5*log(Q2)
1206+ if(pol.eq.1)then
1207+ tmp=ewa_z_p_1p(y,z)
1208+ else if(pol.eq.-1)then
1209+ tmp=ewa_z_p_1m(y,z)
1210+ else
1211+ tmp=ewa_z_p_0(y,z)
1212+ endif
1213+ ewa_z_p=tmp/x*y*y
1214+ end
1215+ function ewa_z_p_1p(y,z)
1216+ implicit none
1217+ real*8 ewa_z_p_1p,y,z
1218+ integer narg,nny,nnz
1219+ parameter (narg=2)
1220+ parameter (nny=32)
1221+ parameter (nnz=8)
1222+ integer iny,inz,nent(narg)
1223+ real*8 tmp,dfint,ymap,zmap
1224+ real*8 arg(narg),ent(nny+nnz)
1225+ real*8 yv(nny),zv(nnz),gridv(nny,nnz)
1226+ logical firsttime
1227+ external dfint,ymap,zmap
1228+ data yv/
1229+ # -1.6118096e+01, -1.5094991e+01, -1.4105430e+01, -1.3149414e+01,
1230+ # -1.2226943e+01, -1.1338015e+01, -1.0482632e+01, -9.6607941e+00,
1231+ # -8.8725001e+00, -8.1177506e+00, -7.3965455e+00, -6.7088848e+00,
1232+ # -6.0547686e+00, -5.4341967e+00, -4.8471693e+00, -4.2936863e+00,
1233+ # -3.7737478e+00, -3.2873536e+00, -2.8345039e+00, -2.4151986e+00,
1234+ # -2.0294377e+00, -1.6772213e+00, -1.3585493e+00, -1.0734217e+00,
1235+ # -8.2183848e-01, -6.0379973e-01, -4.1930540e-01, -2.6835549e-01,
1236+ # -1.5095001e-01, -6.7088947e-02, -1.6772312e-02, -1.0000000e-07/
1237+ data zv/
1238+ # 4.3868276e+00, 5.7337823e+00, 7.0807370e+00, 8.4276917e+00,
1239+ # 9.7746464e+00, 1.1121601e+01, 1.2468556e+01, 1.3815511e+01/
1240+ data (gridv(iny, 1),iny=1,32)/
1241+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1242+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1243+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1244+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1245+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1246+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1247+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1248+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00/
1249+ data (gridv(iny, 2),iny=1,32)/
1250+ # 3.7303045e-03, 2.9227921e-03, 2.3141955e-03, 1.8493581e-03,
1251+ # 1.4933843e-03, 1.2162782e-03, 9.9810630e-04, 8.2501787e-04,
1252+ # 6.8659282e-04, 5.7544120e-04, 4.8609674e-04, 4.1418784e-04,
1253+ # 3.5626496e-04, 3.0973606e-04, 2.7244727e-04, 2.4257706e-04,
1254+ # 2.1854792e-04, 1.9876081e-04, 1.8151373e-04, 1.6480475e-04,
1255+ # 1.4652391e-04, 1.2495404e-04, 9.9767621e-05, 7.2413235e-05,
1256+ # 4.6189116e-05, 2.4986033e-05, 1.0981613e-05, 3.6318686e-06,
1257+ # 8.2837802e-07, 1.0232602e-07, 4.9850666e-09, 1.2419766e-08/
1258+ data (gridv(iny, 3),iny=1,32)/
1259+ # 1.0860874e-02, 8.3686491e-03, 6.5072730e-03, 5.1000356e-03,
1260+ # 4.0344753e-03, 3.2163074e-03, 2.5819036e-03, 2.0867745e-03,
1261+ # 1.6975997e-03, 1.3904974e-03, 1.1478197e-03, 9.5566048e-04,
1262+ # 8.0324203e-04, 6.8259459e-04, 5.8722232e-04, 5.1178459e-04,
1263+ # 4.5182361e-04, 4.0308935e-04, 3.6137523e-04, 3.2211460e-04,
1264+ # 2.8093250e-04, 2.3463440e-04, 1.8303741e-04, 1.2940501e-04,
1265+ # 8.0128195e-05, 4.1902153e-05, 1.7698447e-05, 5.5786779e-06,
1266+ # 1.1982518e-06, 1.3567906e-07, 5.1862975e-09, 1.4921624e-08/
1267+ data (gridv(iny, 4),iny=1,32)/
1268+ # 2.1582709e-02, 1.6384815e-02, 1.2542453e-02, 9.6686760e-03,
1269+ # 7.5174482e-03, 5.8869725e-03, 4.6402349e-03, 3.6814614e-03,
1270+ # 2.9392736e-03, 2.3625196e-03, 1.9136197e-03, 1.5633551e-03,
1271+ # 1.2894368e-03, 1.0755569e-03, 9.0867962e-04, 7.7828223e-04,
1272+ # 6.7581905e-04, 5.9350250e-04, 5.2402918e-04, 4.5996420e-04,
1273+ # 3.9470912e-04, 3.2387169e-04, 2.4768512e-04, 1.7121604e-04,
1274+ # 1.0335642e-04, 5.2501923e-05, 2.1430744e-05, 6.4822592e-06,
1275+ # 1.3222258e-06, 1.3895999e-07, 4.1233808e-09, 1.3983723e-08/
1276+ data (gridv(iny, 5),iny=1,32)/
1277+ # 3.6225205e-02, 2.7139223e-02, 2.0491247e-02, 1.5570792e-02,
1278+ # 1.1927494e-02, 9.1990020e-03, 7.1389947e-03, 5.5752406e-03,
1279+ # 4.3810786e-03, 3.4655687e-03, 2.7625306e-03, 2.2211128e-03,
1280+ # 1.8030325e-03, 1.4806433e-03, 1.2320561e-03, 1.0399620e-03,
1281+ # 8.9058578e-04, 7.7179147e-04, 6.7267988e-04, 5.8270496e-04,
1282+ # 4.9308080e-04, 3.9840200e-04, 2.9945131e-04, 2.0297089e-04,
1283+ # 1.1982930e-04, 5.9340172e-05, 2.3506889e-05, 6.8579981e-06,
1284+ # 1.3368364e-06, 1.3162902e-07, 2.9711215e-09, 1.2215759e-08/
1285+ data (gridv(iny, 6),iny=1,32)/
1286+ # 5.5154342e-02, 4.0827860e-02, 3.0449006e-02, 2.2843096e-02,
1287+ # 1.7269263e-02, 1.3140804e-02, 1.0059401e-02, 7.7483419e-03,
1288+ # 6.0046554e-03, 4.6839966e-03, 3.6820525e-03, 2.9195345e-03,
1289+ # 2.3374414e-03, 1.8936267e-03, 1.5550949e-03, 1.2961420e-03,
1290+ # 1.0966733e-03, 9.3947224e-04, 8.0960033e-04, 6.9320130e-04,
1291+ # 5.7933366e-04, 4.6170562e-04, 3.4169800e-04, 2.2756193e-04,
1292+ # 1.3169713e-04, 6.3745564e-05, 2.4577867e-05, 6.9293186e-06,
1293+ # 1.2930488e-06, 1.1992460e-07, 2.0948206e-09, 1.0413998e-08/
1294+ data (gridv(iny, 7),iny=1,32)/
1295+ # 7.9641332e-02, 5.8283390e-02, 4.2961224e-02, 3.1840880e-02,
1296+ # 2.3773251e-02, 1.7861019e-02, 1.3496990e-02, 1.0261222e-02,
1297+ # 7.8482212e-03, 6.0415388e-03, 4.6867971e-03, 3.6676358e-03,
1298+ # 2.8981380e-03, 2.3178462e-03, 1.8798546e-03, 1.5481330e-03,
1299+ # 1.2949777e-03, 1.0972312e-03, 9.3539626e-04, 7.9205439e-04,
1300+ # 6.5410473e-04, 5.1445082e-04, 3.7509234e-04, 2.4557633e-04,
1301+ # 1.3941666e-04, 6.6000870e-05, 2.4739779e-05, 6.6282306e-06,
1302+ # 1.1538853e-06, 9.8657074e-08, 1.5984130e-09, 8.2433190e-09/
1303+ data (gridv(iny, 8),iny=1,32)/
1304+ # 1.1184163e-01, 8.0917333e-02, 5.8950236e-02, 4.3164542e-02,
1305+ # 3.1828151e-02, 2.3609789e-02, 1.7611453e-02, 1.3215123e-02,
1306+ # 9.9748771e-03, 7.5776696e-03, 5.8010863e-03, 4.4800093e-03,
1307+ # 3.4937519e-03, 2.7582893e-03, 2.2091448e-03, 1.7974773e-03,
1308+ # 1.4863368e-03, 1.2455380e-03, 1.0503765e-03, 8.7953603e-04,
1309+ # 7.1769738e-04, 5.5700142e-04, 4.0005545e-04, 2.5742663e-04,
1310+ # 1.4335613e-04, 6.6352481e-05, 2.4061846e-05, 5.8581041e-06,
1311+ # 8.7686172e-07, 6.1694293e-08, 7.6078967e-10, 4.5762876e-09/
1312+ data firsttime/.true./
1313+ save
1314+ if(firsttime)then
1315+ firsttime=.false.
1316+ nent(1)=nny
1317+ nent(2)=nnz
1318+ do iny=1,nny
1319+ ent(iny)=(yv(iny))
1320+ enddo
1321+ do inz=1,nnz
1322+ ent(nny+inz)=(zv(inz))
1323+ enddo
1324+ endif
1325+ arg(1)=(y)
1326+ arg(2)=(z)
1327+ tmp=dfint(narg,arg,nent,ent,gridv)
1328+ ewa_z_p_1p=tmp
1329+ return
1330+ end
1331+ function ewa_z_p_1m(y,z)
1332+ implicit none
1333+ real*8 ewa_z_p_1m,y,z
1334+ integer narg,nny,nnz
1335+ parameter (narg=2)
1336+ parameter (nny=32)
1337+ parameter (nnz=8)
1338+ integer iny,inz,nent(narg)
1339+ real*8 tmp,dfint,ymap,zmap
1340+ real*8 arg(narg),ent(nny+nnz)
1341+ real*8 yv(nny),zv(nnz),gridv(nny,nnz)
1342+ logical firsttime
1343+ external dfint,ymap,zmap
1344+ data yv/
1345+ # -1.6118096e+01, -1.5094991e+01, -1.4105430e+01, -1.3149414e+01,
1346+ # -1.2226943e+01, -1.1338015e+01, -1.0482632e+01, -9.6607941e+00,
1347+ # -8.8725001e+00, -8.1177506e+00, -7.3965455e+00, -6.7088848e+00,
1348+ # -6.0547686e+00, -5.4341967e+00, -4.8471693e+00, -4.2936863e+00,
1349+ # -3.7737478e+00, -3.2873536e+00, -2.8345039e+00, -2.4151986e+00,
1350+ # -2.0294377e+00, -1.6772213e+00, -1.3585493e+00, -1.0734217e+00,
1351+ # -8.2183848e-01, -6.0379973e-01, -4.1930540e-01, -2.6835549e-01,
1352+ # -1.5095001e-01, -6.7088947e-02, -1.6772312e-02, -1.0000000e-07/
1353+ data zv/
1354+ # 4.3868276e+00, 5.7337823e+00, 7.0807370e+00, 8.4276917e+00,
1355+ # 9.7746464e+00, 1.1121601e+01, 1.2468556e+01, 1.3815511e+01/
1356+ data (gridv(iny, 1),iny=1,32)/
1357+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1358+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1359+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1360+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1361+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1362+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1363+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1364+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00/
1365+ data (gridv(iny, 2),iny=1,32)/
1366+ # 2.4722465e-03, 1.9238378e-03, 1.5105106e-03, 1.1960749e-03,
1367+ # 9.5450636e-04, 7.6644980e-04, 6.1891326e-04, 5.0238454e-04,
1368+ # 4.0993066e-04, 3.3642652e-04, 2.7788916e-04, 2.3119738e-04,
1369+ # 1.9389505e-04, 1.6397539e-04, 1.3974473e-04, 1.1973970e-04,
1370+ # 1.0268876e-04, 8.7531986e-05, 7.3507411e-05, 6.0200203e-05,
1371+ # 4.7561978e-05, 3.5825675e-05, 2.5363959e-05, 1.6554077e-05,
1372+ # 9.6919422e-06, 4.9066425e-06, 2.0356874e-06, 6.4136541e-07,
1373+ # 1.3870147e-07, 1.5934953e-08, 3.8134239e-10, 1.5583767e-09/
1374+ data (gridv(iny, 3),iny=1,32)/
1375+ # 7.0798337e-03, 5.4081649e-03, 4.1625029e-03, 3.2271346e-03,
1376+ # 2.5192925e-03, 1.9775657e-03, 1.5603254e-03, 1.2371174e-03,
1377+ # 9.8575176e-04, 7.8989545e-04, 6.3703740e-04, 5.1756292e-04,
1378+ # 4.2407586e-04, 3.5069124e-04, 2.9260099e-04, 2.4581210e-04,
1379+ # 2.0699146e-04, 1.7346123e-04, 1.4331114e-04, 1.1548538e-04,
1380+ # 8.9728440e-05, 6.6379120e-05, 4.6055769e-05, 2.9366897e-05,
1381+ # 1.6731521e-05, 8.2008648e-06, 3.2726090e-06, 9.8342622e-07,
1382+ # 2.0024596e-07, 2.1085367e-08, 3.1115922e-10, 1.8414779e-09/
1383+ data (gridv(iny, 4),iny=1,32)/
1384+ # 1.3868555e-02, 1.0425215e-02, 7.8892735e-03, 6.0089146e-03,
1385+ # 4.6057219e-03, 3.5480566e-03, 2.7464613e-03, 2.1359653e-03,
1386+ # 1.6689984e-03, 1.3114613e-03, 1.0371878e-03, 8.2648300e-04,
1387+ # 6.6446546e-04, 5.3953412e-04, 4.4244464e-04, 3.6574043e-04,
1388+ # 3.0339116e-04, 2.5068534e-04, 2.0431482e-04, 1.6241791e-04,
1389+ # 1.2441356e-04, 9.0628951e-05, 6.1799132e-05, 3.8623433e-05,
1390+ # 2.1495349e-05, 1.0246602e-05, 3.9545153e-06, 1.1410065e-06,
1391+ # 2.2060684e-07, 2.1556121e-08, 1.5852146e-10, 1.6987942e-09/
1392+ data (gridv(iny, 5),iny=1,32)/
1393+ # 2.2986936e-02, 1.7037927e-02, 1.2705430e-02, 9.5306823e-03,
1394+ # 7.1915567e-03, 5.4521722e-03, 4.1524897e-03, 3.1768102e-03,
1395+ # 2.4418608e-03, 1.8873270e-03, 1.4682359e-03, 1.1510039e-03,
1396+ # 9.1077042e-04, 7.2826552e-04, 5.8860114e-04, 4.7999193e-04,
1397+ # 3.9314928e-04, 3.2098035e-04, 2.5857717e-04, 2.0315066e-04,
1398+ # 1.5370454e-04, 1.1046511e-04, 7.4187115e-05, 4.5556559e-05,
1399+ # 2.4836768e-05, 1.1553471e-05, 4.3299295e-06, 1.2055759e-06,
1400+ # 2.2273199e-07, 2.0385221e-08, 2.5365287e-11, 1.4614457e-09/
1401+ data (gridv(iny, 6),iny=1,32)/
1402+ # 3.4607710e-02, 2.5329231e-02, 1.8643112e-02, 1.3797244e-02,
1403+ # 1.0268406e-02, 7.6763540e-03, 5.7640388e-03, 4.3470540e-03,
1404+ # 3.2936565e-03, 2.5093254e-03, 1.9243527e-03, 1.4874209e-03,
1405+ # 1.1607380e-03, 9.1588915e-04, 7.3097517e-04, 5.8910398e-04,
1406+ # 4.7722044e-04, 3.8555267e-04, 3.0742488e-04, 2.3902283e-04,
1407+ # 1.7886336e-04, 1.2700213e-04, 8.4135064e-05, 5.0853622e-05,
1408+ # 2.7216172e-05, 1.2384960e-05, 4.5198910e-06, 1.2164900e-06,
1409+ # 2.1505007e-07, 1.8520572e-08, -5.3697542e-11, 1.2296759e-09/
1410+ data (gridv(iny, 7),iny=1,32)/
1411+ # 4.9445135e-02, 3.5757010e-02, 2.5994493e-02, 1.8993674e-02,
1412+ # 1.3952679e-02, 1.0293089e-02, 7.6258392e-03, 5.6738387e-03,
1413+ # 4.2408262e-03, 3.1872474e-03, 2.4113098e-03, 1.8389250e-03,
1414+ # 1.4163575e-03, 1.1035738e-03, 8.7029523e-04, 6.9356210e-04,
1415+ # 5.5597102e-04, 4.4470895e-04, 3.5113742e-04, 2.7029621e-04,
1416+ # 2.0013417e-04, 1.4045648e-04, 9.1828197e-05, 5.4657353e-05,
1417+ # 2.8729898e-05, 1.2794546e-05, 4.5409281e-06, 1.1613608e-06,
1418+ # 1.9109911e-07, 1.5092145e-08, -5.2811872e-11, 9.5507973e-10/
1419+ data (gridv(iny, 8),iny=1,32)/
1420+ # 6.8709761e-02, 4.9096606e-02, 3.5253307e-02, 2.5432125e-02,
1421+ # 1.8440272e-02, 1.3424173e-02, 9.8127739e-03, 7.2026791e-03,
1422+ # 5.3106334e-03, 3.9371633e-03, 2.9384004e-03, 2.2109274e-03,
1423+ # 1.6805250e-03, 1.2928794e-03, 1.0073789e-03, 7.9380317e-04,
1424+ # 6.2964750e-04, 4.9861161e-04, 3.8984865e-04, 2.9710009e-04,
1425+ # 2.1764892e-04, 1.5095775e-04, 9.7391148e-05, 5.7072702e-05,
1426+ # 2.9454329e-05, 1.2827026e-05, 4.4049387e-06, 1.0235568e-06,
1427+ # 1.4395353e-07, 9.1928386e-09, -5.1047909e-11, 4.9741292e-10/
1428+ data firsttime/.true./
1429+ save
1430+ if(firsttime)then
1431+ firsttime=.false.
1432+ nent(1)=nny
1433+ nent(2)=nnz
1434+ do iny=1,nny
1435+ ent(iny)=(yv(iny))
1436+ enddo
1437+ do inz=1,nnz
1438+ ent(nny+inz)=(zv(inz))
1439+ enddo
1440+ endif
1441+ arg(1)=(y)
1442+ arg(2)=(z)
1443+ tmp=dfint(narg,arg,nent,ent,gridv)
1444+ ewa_z_p_1m=tmp
1445+ return
1446+ end
1447+ function ewa_z_p_0(y,z)
1448+ implicit none
1449+ real*8 ewa_z_p_0,y,z
1450+ integer narg,nny,nnz
1451+ parameter (narg=2)
1452+ parameter (nny=32)
1453+ parameter (nnz=8)
1454+ integer iny,inz,nent(narg)
1455+ real*8 tmp,dfint,ymap,zmap
1456+ real*8 arg(narg),ent(nny+nnz)
1457+ real*8 yv(nny),zv(nnz),gridv(nny,nnz)
1458+ logical firsttime
1459+ external dfint,ymap,zmap
1460+ data yv/
1461+ # -1.6118096e+01, -1.5094991e+01, -1.4105430e+01, -1.3149414e+01,
1462+ # -1.2226943e+01, -1.1338015e+01, -1.0482632e+01, -9.6607941e+00,
1463+ # -8.8725001e+00, -8.1177506e+00, -7.3965455e+00, -6.7088848e+00,
1464+ # -6.0547686e+00, -5.4341967e+00, -4.8471693e+00, -4.2936863e+00,
1465+ # -3.7737478e+00, -3.2873536e+00, -2.8345039e+00, -2.4151986e+00,
1466+ # -2.0294377e+00, -1.6772213e+00, -1.3585493e+00, -1.0734217e+00,
1467+ # -8.2183848e-01, -6.0379973e-01, -4.1930540e-01, -2.6835549e-01,
1468+ # -1.5095001e-01, -6.7088947e-02, -1.6772312e-02, -1.0000000e-07/
1469+ data zv/
1470+ # 4.3868276e+00, 5.7337823e+00, 7.0807370e+00, 8.4276917e+00,
1471+ # 9.7746464e+00, 1.1121601e+01, 1.2468556e+01, 1.3815511e+01/
1472+ data (gridv(iny, 1),iny=1,32)/
1473+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1474+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1475+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1476+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1477+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1478+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1479+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00,
1480+ # 0.0000000e+00, 0.0000000e+00, 0.0000000e+00, 0.0000000e+00/
1481+ data (gridv(iny, 2),iny=1,32)/
1482+ # 2.2972746e-03, 1.7917254e-03, 1.4105851e-03, 1.1202991e-03,
1483+ # 8.9758753e-04, 7.2401692e-04, 5.8765422e-04, 4.7973220e-04,
1484+ # 3.9382732e-04, 3.2529169e-04, 2.7051159e-04, 2.2663375e-04,
1485+ # 1.9144281e-04, 1.6313368e-04, 1.4017673e-04, 1.2123763e-04,
1486+ # 1.0509369e-04, 9.0611789e-05, 7.6817182e-05, 6.3022584e-05,
1487+ # 4.9058611e-05, 3.5418441e-05, 2.3106352e-05, 1.3215971e-05,
1488+ # 6.4045348e-06, 2.5232862e-06, 7.6274114e-07, 1.6120969e-07,
1489+ # 2.0920899e-08, 1.1554945e-09, 2.1846051e-11, 3.8164747e-16/
1490+ data (gridv(iny, 3),iny=1,32)/
1491+ # 3.1443709e-03, 2.4086938e-03, 1.8599149e-03, 1.4469692e-03,
1492+ # 1.1345306e-03, 8.9494004e-04, 7.0998827e-04, 5.6630210e-04,
1493+ # 4.5410728e-04, 3.6631536e-04, 2.9748449e-04, 2.4339831e-04,
1494+ # 2.0085187e-04, 1.6729924e-04, 1.4065172e-04, 1.1916159e-04,
1495+ # 1.0130455e-04, 8.5745522e-05, 7.1384433e-05, 5.7493734e-05,
1496+ # 4.3890462e-05, 3.1023010e-05, 1.9770186e-05, 1.1015777e-05,
1497+ # 5.1834875e-06, 1.9746473e-06, 5.7369065e-07, 1.1562072e-07,
1498+ # 1.4116885e-08, 7.1378361e-10, 1.0286193e-11, 2.1760568e-16/
1499+ data (gridv(iny, 4),iny=1,32)/
1500+ # 4.0583782e-03, 3.0604630e-03, 2.3243967e-03, 1.7771165e-03,
1501+ # 1.3685115e-03, 1.0596807e-03, 8.2496027e-04, 6.4554632e-04,
1502+ # 5.0775614e-04, 4.0172285e-04, 3.1996314e-04, 2.5677121e-04,
1503+ # 2.0788121e-04, 1.6996988e-04, 1.4037525e-04, 1.1693715e-04,
1504+ # 9.7839570e-05, 8.1555616e-05, 6.6877295e-05, 5.3032557e-05,
1505+ # 3.9820348e-05, 2.7642036e-05, 1.7265954e-05, 9.4071798e-06,
1506+ # 4.3162443e-06, 1.5974573e-06, 4.4856401e-07, 8.6784619e-08,
1507+ # 1.0054849e-08, 4.7125287e-10, 5.0055779e-12, 1.3353325e-16/
1508+ data (gridv(iny, 5),iny=1,32)/
1509+ # 5.0242808e-03, 3.7368538e-03, 2.7975112e-03, 2.1069870e-03,
1510+ # 1.5976618e-03, 1.2178011e-03, 9.3297051e-04, 7.1829351e-04,
1511+ # 5.5582318e-04, 4.3260555e-04, 3.3896481e-04, 2.6762365e-04,
1512+ # 2.1321911e-04, 1.7163549e-04, 1.3964927e-04, 1.1469329e-04,
1513+ # 9.4678118e-05, 7.7901482e-05, 6.3058870e-05, 4.9337909e-05,
1514+ # 3.6517503e-05, 2.4952978e-05, 1.5315618e-05, 8.1824913e-06,
1515+ # 3.6722130e-06, 1.3251079e-06, 3.6114078e-07, 6.7413213e-08,
1516+ # 7.4593247e-09, 3.2711613e-10, 2.4150815e-12, 8.6646158e-17/
1517+ data (gridv(iny, 6),iny=1,32)/
1518+ # 6.0434242e-03, 4.4393078e-03, 3.2809706e-03, 2.4384204e-03,
1519+ # 1.8240018e-03, 1.3711741e-03, 1.0357484e-03, 7.8624158e-04,
1520+ # 5.9978597e-04, 4.6020082e-04, 3.5548403e-04, 2.7671910e-04,
1521+ # 2.1741591e-04, 1.7266372e-04, 1.3867688e-04, 1.1250016e-04,
1522+ # 9.1784840e-05, 7.4666871e-05, 5.9754966e-05, 4.6199819e-05,
1523+ # 3.3759746e-05, 2.2745966e-05, 1.3743797e-05, 7.2147556e-06,
1524+ # 3.1743092e-06, 1.1196153e-06, 2.9689509e-07, 5.3518235e-08,
1525+ # 5.6721821e-09, 2.3409415e-10, 1.1787607e-12, 5.8729404e-17/
1526+ data (gridv(iny, 7),iny=1,32)/
1527+ # 7.1959867e-03, 5.2238170e-03, 3.8140515e-03, 2.7991324e-03,
1528+ # 2.0670251e-03, 1.5335081e-03, 1.1431466e-03, 8.5620909e-04,
1529+ # 6.4440376e-04, 4.8779317e-04, 3.7174709e-04, 2.8552072e-04,
1530+ # 2.2138742e-04, 1.7357728e-04, 1.3770573e-04, 1.1041226e-04,
1531+ # 8.9081969e-05, 7.1687010e-05, 5.6748485e-05, 4.3377928e-05,
1532+ # 3.1310191e-05, 2.0811054e-05, 1.2385981e-05, 6.3920772e-06,
1533+ # 2.7583999e-06, 9.5083600e-07, 2.4412955e-07, 4.1454456e-08,
1534+ # 4.1336315e-09, 1.5732057e-10, 7.2362906e-13, 3.8540532e-17/
1535+ data (gridv(iny, 8),iny=1,32)/
1536+ # 8.5794573e-03, 6.1549995e-03, 4.4395854e-03, 3.2173803e-03,
1537+ # 2.3455029e-03, 1.7173947e-03, 1.2632918e-03, 9.3357781e-04,
1538+ # 6.9319431e-04, 5.1766046e-04, 3.8920495e-04, 2.9492776e-04,
1539+ # 2.2566512e-04, 1.7466681e-04, 1.3686160e-04, 1.0845033e-04,
1540+ # 8.6522845e-05, 6.8873718e-05, 5.3928273e-05, 4.0752757e-05,
1541+ # 2.9053811e-05, 1.9048548e-05, 1.1165828e-05, 5.6636607e-06,
1542+ # 2.3959922e-06, 8.0553030e-07, 1.9753531e-07, 2.9524070e-08,
1543+ # 2.5899490e-09, 8.0207162e-11, 2.5018623e-13, 1.8180313e-17/
1544+ data firsttime/.true./
1545+ save
1546+ if(firsttime)then
1547+ firsttime=.false.
1548+ nent(1)=nny
1549+ nent(2)=nnz
1550+ do iny=1,nny
1551+ ent(iny)=(yv(iny))
1552+ enddo
1553+ do inz=1,nnz
1554+ ent(nny+inz)=(zv(inz))
1555+ enddo
1556+ endif
1557+ arg(1)=(y)
1558+ arg(2)=(z)
1559+ tmp=dfint(narg,arg,nent,ent,gridv)
1560+ ewa_z_p_0=tmp
1561+ return
1562+ end
1563
1564=== added file 'Template/LO/Source/PDF/ElectroweakFlux.inc'
1565--- Template/LO/Source/PDF/ElectroweakFlux.inc 1970-01-01 00:00:00 +0000
1566+++ Template/LO/Source/PDF/ElectroweakFlux.inc 2020-08-13 08:01:43 +0000
1567@@ -0,0 +1,38 @@
1568+ double precision pi, pi2, sqrt2, eps
1569+ double precision ewa_mw2, ewa_mz2, ewa_gf
1570+ double precision ewa_qu,ewa_qd,ewa_qv,ewa_ql,ewa_t3u,ewa_t3d
1571+ double precision ewa_cw2,ewa_sw2,ewa_gW2
1572+ double precision ewa_gV,ewa_gVu,ewa_gVd,ewa_gVv,ewa_gVl
1573+ double precision ewa_gA,ewa_gAu,ewa_gAd,ewa_gAv,ewa_gAl
1574+c Math
1575+ parameter (pi=3.141592653589793d0)
1576+ parameter (pi2=9.869604401089358d0)
1577+ parameter (sqrt2=1.4142135623730951d0)
1578+ parameter (eps=1d-16)
1579+c Input EW parameters
1580+ parameter (ewa_mw2 = 80.379d0**2) ! [GeV]^2 PDG 2018
1581+ parameter (ewa_mz2 = 91.1876d0**2) ! [GeV]^2 PDG 2018
1582+ parameter (ewa_gf = 1.1663787d-5) ! [GeV]^-2 PDG 2018
1583+ parameter (ewa_qu = 2d0/3d0)
1584+ parameter (ewa_qd = -1d0/3d0)
1585+ parameter (ewa_qv = 0d0)
1586+ parameter (ewa_ql = -1d0)
1587+ parameter (ewa_t3u = 0.5d0)
1588+ parameter (ewa_t3d = -0.5d0)
1589+c Derived EW parameters
1590+ parameter (ewa_cw2 = ewa_mw2/ewa_mz2)
1591+ parameter (ewa_sw2 = 1d0 - ewa_mw2/ewa_mz2)
1592+ parameter (ewa_gW2 = sqrt2*4d0*ewa_gf*ewa_mw2)
1593+c Weak Vector Couplings
1594+ parameter (ewa_gV = 1d0)
1595+ parameter (ewa_gVu = 0.5d0*ewa_t3u - ewa_qu*ewa_sw2)
1596+ parameter (ewa_gVd = 0.5d0*ewa_t3d - ewa_qd*ewa_sw2)
1597+ parameter (ewa_gVv = 0.5d0*ewa_t3u)
1598+ parameter (ewa_gVl = 0.5d0*ewa_t3d - ewa_ql*ewa_sw2)
1599+c Weak Axialvector Couplings
1600+ parameter (ewa_gA = -1d0)
1601+ parameter (ewa_gAu = -0.5d0*ewa_t3u)
1602+ parameter (ewa_gAd = -0.5d0*ewa_t3d)
1603+ parameter (ewa_gAv = -0.5d0*ewa_t3u)
1604+ parameter (ewa_gAl = -0.5d0*ewa_t3d)
1605+c
1606\ No newline at end of file
1607
1608=== modified file 'Template/LO/Source/PDF/PhotonFlux.f'
1609--- Template/LO/Source/PDF/PhotonFlux.f 2020-03-27 13:59:33 +0000
1610+++ Template/LO/Source/PDF/PhotonFlux.f 2020-08-13 08:01:43 +0000
1611@@ -1,30 +1,35 @@
1612 c/* ********************************************************* */
1613-c/* Equivalent photon approximation structure function. * */
1614-c/* V.M.Budnev et al., Phys.Rep. 15C (1975) 181 * */
1615-c/* Improved Weizsaecker-Williams formula * */
1616-c/* http://inspirehep.net/record/359425 * */
1617+c/* Equivalent photon approximation structure function. * */
1618+c/* V.M.Budnev et al., Phys.Rep. 15C (1975) 181 * */
1619+c/* * */
1620+c/* Improved Weizsaecker-Williams formula * */
1621+c/* S. Frixione et al. hep-ph/9310350 * */
1622+c/* * */
1623 c/* ********************************************************* */
1624 c provided by Tomasz Pierzchala - UCL
1625
1626- real*8 function epa_electron(x,q2max)
1627- integer i
1628+ real*8 function epa_lepton(x,q2max, mode)
1629+ implicit none
1630+ integer i, mode, imode
1631+c mode is +3/-3 for electron and +4/-4 for muon
1632 real*8 x,phi_f
1633- real*8 xin
1634+ real*8 xin(3:4)
1635 real*8 alpha
1636 real*8 f, q2min,q2max
1637 real*8 PI
1638 data PI/3.14159265358979323846/
1639
1640- data xin/0.511d-3/ !electron mass in GeV
1641+ data xin/0.511d-3, 0.105658d0/ !electron mass in GeV
1642
1643 alpha = .0072992701
1644-
1645+ imode = abs(mode)
1646+
1647 C // x = omega/E = (E-E')/E
1648 if (x.lt.1) then
1649- q2min= xin*xin*x*x/(1-x)
1650+ q2min= xin(imode)*xin(imode)*x*x/(1-x)
1651 if(q2min.lt.q2max) then
1652- f = alpha/2d0/PI*
1653- & (2d0*xin*xin*x*(-1/q2min+1/q2max)+
1654+ f = alpha/2d0/PI*
1655+ & (2d0*xin(imode)*xin(imode)*x*(-1/q2min+1/q2max)+
1656 & (2-2d0*x+x*x)/x*dlog(q2max/q2min))
1657
1658 else
1659@@ -35,7 +40,7 @@
1660 endif
1661 c write (*,*) x,dsqrt(q2min),dsqrt(q2max),f
1662 if (f .lt. 0) f = 0
1663- epa_electron= f
1664+ epa_lepton = f
1665
1666 end
1667
1668
1669=== modified file 'Template/LO/Source/PDF/makefile'
1670--- Template/LO/Source/PDF/makefile 2020-04-08 19:22:14 +0000
1671+++ Template/LO/Source/PDF/makefile 2020-08-13 08:01:43 +0000
1672@@ -14,15 +14,16 @@
1673 ifeq ($(lhapdfversion),5)
1674 $(error Bad lhadpfversion version 6 is now required)
1675 else
1676+ PDF = pdfwrap_lhapdf.o pdf_lhapdf6.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o ElectroweakFlux.o
1677 ifeq ($(lhapdfsubversion),1) # 6.1.X
1678- PDF = pdfwrap_lhapdf.o pdf_lhapdf6.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o
1679+ PDF = pdfwrap_lhapdf.o pdf_lhapdf6.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o ElectroweakFlux.o
1680 else # 6.2.X
1681 CXXFLAGS+=-std=c++11
1682- PDF = pdfwrap_lhapdf.o pdf_lhapdf62.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o
1683+ PDF = pdfwrap_lhapdf.o pdf_lhapdf62.o pdg2pdf_lhapdf6.o opendata.o PhotonFlux.o ElectroweakFlux.o
1684 endif
1685 endif
1686 else
1687- PDF = Ctq6Pdf.o pdfwrap.o opendata.o pdf.o PhotonFlux.o pdg2pdf.o NNPDFDriver.o
1688+ PDF = Ctq6Pdf.o pdfwrap.o opendata.o pdf.o PhotonFlux.o pdg2pdf.o NNPDFDriver.o ElectroweakFlux.o
1689 endif
1690
1691 all: $(LIBDIR)$(LIBRARY)
1692
1693=== modified file 'Template/LO/Source/PDF/pdf.f'
1694--- Template/LO/Source/PDF/pdf.f 2018-02-01 23:17:18 +0000
1695+++ Template/LO/Source/PDF/pdf.f 2020-08-13 08:01:43 +0000
1696@@ -29,7 +29,7 @@
1697 double precision u_val,d_val,u_sea,d_sea,s_sea,c_sea,b_sea,gluon
1698 double precision Ctq3df,Ctq4Fn,Ctq5Pdf,Ctq6Pdf,Ctq5L
1699 double precision q2max
1700- double precision epa_electron,epa_proton
1701+ double precision epa_lepton,epa_proton
1702 include 'pdf.inc'
1703
1704 integer mode,Iprtn,Irt
1705@@ -297,8 +297,8 @@
1706 c a "diffractive" photon
1707 c
1708 q2max=xmu*xmu
1709- if(ih .eq. 3) then !from the electron
1710- fx(7)=epa_electron(x,q2max)
1711+ if(abs(ih) .eq. 3.or.abs(ih) .eq. 4) then !from the electron
1712+ fx(7)=epa_lepton(x,q2max, ih)
1713 elseif(ih .eq. 2) then !from a proton without breaking
1714 fx(7)=epa_proton(x,q2max)
1715 endif
1716
1717=== modified file 'Template/LO/Source/PDF/pdg2pdf.f'
1718--- Template/LO/Source/PDF/pdg2pdf.f 2019-12-04 21:34:25 +0000
1719+++ Template/LO/Source/PDF/pdg2pdf.f 2020-08-13 08:01:43 +0000
1720@@ -24,7 +24,7 @@
1721 integer mode,Irt,i,j
1722 double precision xlast(2),xmulast(2),pdflast(-7:7,2),q2max
1723 character*7 pdlabellast(2)
1724- double precision epa_electron,epa_proton
1725+ double precision epa_lepton,epa_proton
1726 integer ipart,ireuse,iporg,ihlast(2)
1727 save xlast,xmulast,pdflast,pdlabellast,ihlast
1728 data xlast/2*-99d9/
1729@@ -32,7 +32,29 @@
1730 data pdflast/30*-99d9/
1731 data pdlabellast/2*'abcdefg'/
1732 data ihlast/2*-99/
1733-
1734+c
1735+c Special for EWA (need to know current helicity)
1736+c
1737+ double precision ewa_wX_ByPID, ewa_zX_ByPID
1738+ external ewa_wX_ByPID, ewa_zX_ByPID
1739+ integer hel, ppid
1740+ double precision hel_jacobian
1741+ INTEGER HEL_PICKED
1742+ COMMON/HEL_PICKED/HEL_PICKED,hel_jacobian
1743+ integer get_nhel
1744+ external get_nhel
1745+ REAL*8 POL(2)
1746+ common/to_polarization/ POL
1747+c
1748+c Collider
1749+c
1750+ integer lpp(2)
1751+ double precision ebeam(2), xbk(2),q2fact(2)
1752+ common/to_collider/ ebeam , xbk ,q2fact, lpp
1753+c
1754+c
1755+c
1756+ double precision factor
1757 if (ih.eq.9) then
1758 pdg2pdf = 1d0
1759 return
1760@@ -66,12 +88,14 @@
1761 ipart=7
1762 c This will be called for any PDG code, but we only support up to 7
1763 else if(iabs(ipart).gt.7)then
1764- write(*,*) 'PDF not supported for pdg ',ipdg
1765- write(*,*) 'For lepton colliders, please set the lpp* '//
1766- $ 'variables to 0 in the run_card'
1767- open(unit=26,file='../../../error',status='unknown')
1768- write(26,*) 'Error: PDF not supported for pdg ',ipdg
1769- stop 1
1770+ if(iabs(ih).lt.2)then
1771+ write(*,*) 'PDF not supported for pdg ',ipdg
1772+ write(*,*) 'For lepton colliders, please set the lpp* '//
1773+ $ 'variables to 0 in the run_card current is' , ih
1774+ open(unit=26,file='../../../error',status='unknown')
1775+ write(26,*) 'Error: PDF not supported for pdg ',ipdg
1776+ stop 1
1777+ endif
1778 endif
1779
1780 iporg=ipart
1781@@ -85,7 +109,7 @@
1782 enddo
1783
1784 c Reuse previous result, if possible
1785- if (ireuse.gt.0.)then
1786+ if (ireuse.gt.0.and.iabs(iporg).lt.8)then
1787 if (pdflast(iporg,ireuse).ne.-99d9) then
1788 pdg2pdf = get_ion_pdf(pdflast(-7, ireuse), iporg, nb_proton(beamid),
1789 $ nb_neutron(beamid))
1790@@ -129,15 +153,85 @@
1791 pdlabellast(ireuse)=pdlabel
1792 ihlast(ireuse)=ih
1793
1794- if(iabs(ipart).eq.7.and.ih.gt.1) then
1795+c
1796+c Special mode for Improved Weizsacker-Williams,
1797+c Equivalent photon, and Effective W/Z Approximations
1798+c
1799+ if (ih.gt.1.and.ih.ne.9) then
1800+c Effective photon approximation
1801 q2max=xmu*xmu
1802- if(ih.eq.3) then !from the electron
1803- pdg2pdf=epa_electron(x,q2max)
1804- elseif(ih .eq. 2) then !from a proton without breaking
1805- pdg2pdf=epa_proton(x,q2max,beamid)
1806- endif
1807- pdflast(iporg,ireuse)=pdg2pdf
1808- return
1809+ if (iabs(ipart).eq.7) then
1810+ if(abs(ih).eq.3.or.abs(ih).eq.4) then !from the electron or muonn
1811+ pdg2pdf=epa_lepton(x,q2max, ih)
1812+ elseif(ih .eq. 2) then !from a proton without breaking
1813+ pdg2pdf=epa_proton(x,q2max,beamid)
1814+ endif
1815+ pdflast(iporg,ireuse)=pdg2pdf
1816+ return
1817+ elseif(iabs(ipart).eq.23) then ! z boson
1818+ factor = 3d0 ! 3 to cancel the average over W helicities´
1819+ if (ABS(ih).eq.3) then
1820+ ppid = 11
1821+ elseif(ABS(ih).eq.4) then
1822+ ppid = 13
1823+ elseif(ABS(ih).eq.2) then
1824+ ppid = 2212
1825+ else
1826+ write(*,*) "type of beam not yet supported for EWA"
1827+ stop 4
1828+ endif
1829+ hel = GET_NHEL(HEL_PICKED, beamid)
1830+ pdg2pdf = factor * ewa_zX_ByPID(x,q2max,hel,ppid)
1831+ if (ABS(POL(beamid)).ne.1d0) then
1832+ write(*,*) 'beam polarization not supported for EWA with Z'
1833+ stop 33
1834+ endif
1835+
1836+ return
1837+ elseif(ipart.eq.24) then ! w+ boson
1838+ factor = 3d0 ! 3 to cancel the average over W helicities´
1839+ if (ih.eq.-3) then ! from e+
1840+ ppid = -11
1841+ elseif(ih.eq.-4) then ! from mu+
1842+ ppid = -13
1843+ elseif(ih.eq.2) then
1844+ ppid = 2212
1845+ else
1846+ write(*,*) "type of beam not yet supported for EWA"
1847+ stop 4
1848+ endif
1849+ hel = GET_NHEL(HEL_PICKED, beamid)
1850+ pdg2pdf = factor*ewa_wX_ByPID(x,q2max,hel,ppid)
1851+ if(pol(beamid).lt.0d0)then
1852+ pdg2pdf = pdg2pdf * (2-ABS(POL(beamid)))/2d0 ! couple only to right handed componenta
1853+ else
1854+ pdg2pdf = pdg2pdf * ABS(POL(beamid))/2d0 ! couple only to right handed componenta
1855+ endif
1856+ return
1857+ elseif(ipart.eq.-24) then ! w- boson
1858+ factor = 3d0 ! 3 to cancel the average over W helicities´
1859+ if (ih.eq.3) then ! from e-
1860+ ppid = 11
1861+ elseif(ih.eq.4) then ! from mu-
1862+ ppid = 13
1863+ elseif(ih.eq.2) then
1864+ ppid = -2212
1865+ else
1866+ write(*,*) "type of beam not yet supported for EWA"
1867+ stop 4
1868+ endif
1869+
1870+ hel = GET_NHEL(HEL_PICKED, beamid)
1871+ pdg2pdf = factor*ewa_wX_ByPID(x,q2max,hel,ppid)
1872+ if(pol(beamid)*lpp(beamid).lt.0d0)then
1873+ pdg2pdf = pdg2pdf * ABS(POL(beamid))/2d0 ! couple only to left handed componenta
1874+ else
1875+ pdg2pdf = pdg2pdf * (2-ABS(POL(beamid)))/2d0 ! couple only to left handed componenta
1876+ endif
1877+
1878+
1879+ return
1880+ endif
1881 endif
1882
1883 if (pdlabel(1:5) .eq. 'cteq6') then
1884
1885=== removed file 'Template/LO/Source/PDF/pdg2pdf_lhapdf.f'
1886=== modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf6.f'
1887--- Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2020-03-06 20:47:59 +0000
1888+++ Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2020-08-13 08:01:43 +0000
1889@@ -24,7 +24,7 @@
1890 integer i,j,ihlast(20),ipart,iporg,ireuse,imemlast(20),iset,imem
1891 & ,i_replace,ii,ipartlast(20)
1892 double precision xlast(20),xmulast(20),pdflast(-7:7,20)
1893- double precision epa_proton, epa_electron
1894+ double precision epa_proton, epa_lepton
1895 save ihlast,xlast,xmulast,pdflast,imemlast,ipartlast
1896 data ihlast/20*-99/
1897 data ipartlast/20*-99/
1898@@ -33,6 +33,37 @@
1899 data pdflast/300*-99d9/
1900 data imemlast/20*-99/
1901 data i_replace/20/
1902+c
1903+c Special for EWA (need to know current helicity)
1904+c
1905+ double precision ewa_wX_ByPID, ewa_zX_ByPID
1906+ external ewa_wX_ByPID, ewa_zX_ByPID
1907+ integer hel, ppid
1908+ double precision hel_jacobian
1909+ INTEGER HEL_PICKED
1910+ COMMON/HEL_PICKED/HEL_PICKED,hel_jacobian
1911+ integer get_nhel
1912+ external get_nhel
1913+ REAL*8 POL(2)
1914+ common/to_polarization/ POL
1915+ double precision q2max
1916+ double precision epa_electron
1917+c
1918+c Collider
1919+c
1920+ integer lpp(2)
1921+ double precision ebeam(2), xbk(2),q2fact(2)
1922+ common/to_collider/ ebeam , xbk ,q2fact, lpp
1923+c
1924+c
1925+c
1926+ double precision factor
1927+
1928+ if (ih.eq.9) then
1929+ pdg2pdf = 1d0
1930+ return
1931+ endif
1932+
1933
1934 nb_hadron = (nb_proton(beamid)+nb_neutron(beamid))
1935 c Make sure we have a reasonable Bjorken x. Note that even though
1936@@ -62,12 +93,14 @@
1937 ipart=7
1938 c This will be called for any PDG code, but we only support up to 7
1939 else if(iabs(ipart).gt.7)then
1940- write(*,*) 'PDF not supported for pdg ',ipdg
1941- write(*,*) 'For lepton colliders, please set the lpp* '//
1942- $ 'variables to 0 in the run_card'
1943- open(unit=26,file='../../../error',status='unknown')
1944- write(26,*) 'Error: PDF not supported for pdg ',ipdg
1945- stop 1
1946+ if(iabs(ih).lt.2)then
1947+ write(*,*) 'PDF not supported for pdg ',ipdg
1948+ write(*,*) 'For lepton colliders, please set the lpp* '//
1949+ $ 'variables to 0 in the run_card'
1950+ open(unit=26,file='../../../error',status='unknown')
1951+ write(26,*) 'Error: PDF not supported for pdg ',ipdg
1952+ stop 1
1953+ endif
1954 endif
1955
1956 iporg=ipart
1957@@ -139,10 +172,77 @@
1958 pdg2pdf = get_ion_pdf(pdflast(-7, i_replace), ipart, nb_proton(beamid), nb_neutron(beamid))
1959 endif
1960 pdg2pdf=pdg2pdf/x
1961- else if(ih.eq.3) then !from the electron
1962- pdg2pdf=epa_electron(x,xmu*xmu)
1963- else if(ih.eq.2) then ! photon from a proton without breaking
1964- pdg2pdf = epa_proton(x,xmu*xmu)
1965+ else if(ih.gt.1.and.ih.ne.9) then ! photon from a proton without breaking
1966+c Effective photon approximation
1967+ q2max=xmu*xmu
1968+ if (iabs(ipart).eq.7) then
1969+ if(abs(ih).eq.3.or.abs(ih).eq.4) then !from the electron
1970+ pdg2pdf=epa_lepton(x,xmu*xmu, ih)
1971+ elseif(ih .eq. 2) then !from a proton without breaking
1972+ pdg2pdf=epa_proton(x,q2max,beamid)
1973+ endif
1974+ pdflast(iporg,ireuse)=pdg2pdf
1975+ return
1976+ elseif(iabs(ipart).eq.23) then ! z boson
1977+ if (ih.eq.3) then
1978+ ppid = 11
1979+ elseif(ih.eq.4) then
1980+ ppid = 13
1981+ elseif(ih.eq.2) then
1982+ ppid = 2212
1983+ else
1984+ write(*,*) "type of beam not yet supported for EWA"
1985+ stop 4
1986+ endif
1987+ hel = GET_NHEL(HEL_PICKED, beamid)
1988+ pdg2pdf = ewa_zX_ByPID(x,q2max,hel,ppid)
1989+ if (ABS(POL(beamid)).ne.1d0) then
1990+ write(*,*)
1991+ & 'beam polarization not supported for EWA with Z'
1992+ stop 33
1993+ endif
1994+ return
1995+ elseif(ipart.eq.24) then ! w+ boson
1996+ factor = 3d0 ! 3 to cancel the average over W helicities´
1997+ if (ih.eq.-3) then ! from e+
1998+ ppid = -11
1999+ elseif(ih.eq.-4) then ! from mu+
2000+ ppid = -13
2001+ elseif(ih.eq.2) then
2002+ ppid = 2212
2003+ else
2004+ write(*,*) "type of beam not yet supported for EWA"
2005+ stop 4
2006+ endif
2007+ hel = GET_NHEL(HEL_PICKED, beamid)
2008+ pdg2pdf = factor*ewa_wX_ByPID(x,q2max,hel,ppid)
2009+ if(pol(beamid).lt.0d0)then
2010+ pdg2pdf = pdg2pdf * (2-ABS(POL(beamid)))/2d0 ! couple only to right handed componenta
2011+ else
2012+ pdg2pdf = pdg2pdf * ABS(POL(beamid))/2d0 ! couple only to right handed componenta
2013+ endif
2014+ return
2015+ elseif(ipart.eq.-24) then ! w- boson
2016+ factor = 3d0 ! 3 to cancel the average over W helicities´
2017+ if (ih.eq.3) then ! from e-
2018+ ppid = 11
2019+ elseif(ih.eq.4) then ! from mu-
2020+ ppid = 13
2021+ elseif(ih.eq.2) then
2022+ ppid = -2212
2023+ else
2024+ write(*,*) "type of beam not yet supported for EWA"
2025+ stop 4
2026+ endif
2027+
2028+ hel = GET_NHEL(HEL_PICKED, beamid)
2029+ pdg2pdf = factor*ewa_wX_ByPID(x,q2max,hel,ppid)
2030+ if(pol(beamid)*lpp(beamid).lt.0d0)then
2031+ pdg2pdf = pdg2pdf * ABS(POL(beamid))/2d0 ! couple only to left handed componenta
2032+ else
2033+ pdg2pdf = pdg2pdf * (2-ABS(POL(beamid)))/2d0 ! couple only to left handed componenta
2034+ endif
2035+ endif
2036 else
2037 write (*,*) 'beam type not supported in lhadpf'
2038 stop 1
2039
2040=== modified file 'Template/LO/Source/kin_functions.f'
2041--- Template/LO/Source/kin_functions.f 2016-02-10 14:56:17 +0000
2042+++ Template/LO/Source/kin_functions.f 2020-08-13 08:01:43 +0000
2043@@ -590,11 +590,13 @@
2044 C 4-Vector Dot product
2045 C****************************************************************************
2046 implicit none
2047- double precision p1(0:3),p2(0:3)
2048+ double precision p1(0:3),p2(0:3), dot2
2049 dot=p1(0)*p2(0)-p1(1)*p2(1)-p1(2)*p2(2)-p1(3)*p2(3)
2050
2051- if(dabs(dot).lt.1d-6)then ! solve numerical problem
2052- dot=0d0
2053+ if(dabs(dot).lt.1d-6)then ! solve numerical problem
2054+ dot2 = p1(0)*p2(0)+p1(1)*p2(1)+p1(2)*p2(2)+p1(3)*p2(3)
2055+ dot2 = max(1e-99,dot2)
2056+ if (dot/dot2.lt.1e-6) dot=0d0
2057 endif
2058
2059 end
2060
2061=== modified file 'Template/LO/Source/setrun.f'
2062--- Template/LO/Source/setrun.f 2016-03-04 16:16:23 +0000
2063+++ Template/LO/Source/setrun.f 2020-08-13 08:01:43 +0000
2064@@ -83,12 +83,27 @@
2065 q2fact(1) = sf1**2 ! fact scale**2 for pdf1
2066 q2fact(2) = sf2**2 ! fact scale**2 for pdf2
2067
2068+ if(pb1.ne.0d0)then
2069+ if (abs(lpp(1)).eq.1.or.abs(lpp(1)).eq.2)then
2070+ write(*,*) 'proton/anti-proton beam polarization are not allowed'
2071+ stop 1
2072+ endif
2073+ pol(1)=sign(1+abs(pb1)/100d0,pb1)
2074+ endif
2075+ if(pb2.ne.0d0)then
2076+ if (abs(lpp(2)).eq.1.or.abs(lpp(2)).eq.2)then
2077+ write(*,*) 'proton/anti-proton beam polarization are not allowed'
2078+ stop 1
2079+ endif
2080+ pol(2)=sign(1+abs(pb2)/100d0,pb2)
2081+ endif
2082+
2083 if(pb1.ne.0d0.and.lpp(1).eq.0) pol(1)=sign(1+abs(pb1)/100d0,pb1)
2084 if(pb2.ne.0d0.and.lpp(2).eq.0) pol(2)=sign(1+abs(pb2)/100d0,pb2)
2085
2086 if(pb1.ne.0.or.pb2.ne.0) write(*,*) 'Setting beam polarization ',
2087- $ sign((abs(pol(1))-1)*100,pol(1)),
2088- $ sign((abs(pol(2))-1)*100,pol(2))
2089+ $ pol(1), pol(2)
2090+
2091
2092 c !!! Default behavior changed (MH, Aug. 07) !!!
2093 c If no pdf, read the param_card and use the value from there and
2094
2095=== modified file 'Template/LO/SubProcesses/genps.f'
2096--- Template/LO/SubProcesses/genps.f 2020-06-15 07:16:51 +0000
2097+++ Template/LO/SubProcesses/genps.f 2020-08-13 08:01:43 +0000
2098@@ -572,6 +572,9 @@
2099 if (abs(lpp(2)) .eq. 1 .or. abs(lpp(2)) .eq. 2) m2 = 0.938d0
2100 if (abs(lpp(1)) .eq. 3) m1 = 0.000511d0
2101 if (abs(lpp(2)) .eq. 3) m2 = 0.000511d0
2102+ if (abs(lpp(1)) .eq. 4) m1 = 0.000511d0
2103+ if (abs(lpp(1)) .eq. 4) m1 = 0.105658d0
2104+ if (abs(lpp(2)) .eq. 4) m2 = 0.105658d0
2105 if (mass_ion(1).ge.0d0) m1 = mass_ion(1)
2106 if (mass_ion(2).ge.0d0) m2 = mass_ion(2)
2107 if(ebeam(1).lt.m1.and.lpp(1).ne.9) ebeam(1)=m1
2108
2109=== modified file 'Template/LO/SubProcesses/reweight.f'
2110--- Template/LO/SubProcesses/reweight.f 2020-05-24 20:16:56 +0000
2111+++ Template/LO/SubProcesses/reweight.f 2020-08-13 08:01:43 +0000
2112@@ -1738,9 +1738,9 @@
2113 if (btest(mlevel,3))
2114 $ write(*,*)' set fact scales for PS to ',
2115 $ sqrt(q2fact(1)),sqrt(q2fact(2))
2116- else if (abs(lpp(1)).eq.2.or.abs(lpp(1)).eq.3) then
2117+ else if (abs(lpp(1)).ge.2.and.abs(lpp(1)).le.4) then
2118 q2fact(1)=q2bck(1)
2119- else if (abs(lpp(2)).eq.2.or.abs(lpp(2)).eq.3) then
2120+ else if (abs(lpp(2)).ge.2.or.abs(lpp(2)).le.4) then
2121 q2fact(2)=q2bck(2)
2122 endif
2123
2124
2125=== modified file 'Template/LO/SubProcesses/unwgt.f'
2126--- Template/LO/SubProcesses/unwgt.f 2020-05-20 11:52:45 +0000
2127+++ Template/LO/SubProcesses/unwgt.f 2020-08-13 08:01:43 +0000
2128@@ -145,10 +145,19 @@
2129 C compute the boost for the requested transformation
2130 implicit none
2131 double precision pin(0:3), pout(0:3)
2132- double precision denom
2133+ double precision denom, control
2134
2135 denom = pin(0)*pout(0) - pin(3)*pout(3)
2136 if (denom.ne.0d0) then
2137+ control = pin(0)*pout(0) + pin(3)*pout(3)
2138+ if (denom/control.gt.1d-12)then
2139+ get_betaz = (pin(3) * pout(0) - pout(3) * pin(0)) / denom
2140+c pass in massless case
2141+ else if (abs(pin(0)+pin(3)).gt.abs(pin(0))) then
2142+ get_betaz = (pin(0)**2 - pout(0)**2)/(pin(0)**2 + pout(0)**2)
2143+ else
2144+ get_betaz = (pout(0)**2 - pin(0)**2)/(pin(0)**2 + pout(0)**2)
2145+ endif
2146 get_betaz = (pin(3) * pout(0) - pout(3) * pin(0)) / denom
2147 else if (pin(0).eq.pin(3)) then
2148 get_betaz = (pin(0)**2 - pout(0)**2)/(pin(0)**2 + pout(0)**2)
2149
2150=== modified file 'Template/MadWeight/src/setrun.f'
2151--- Template/MadWeight/src/setrun.f 2018-04-27 21:01:37 +0000
2152+++ Template/MadWeight/src/setrun.f 2020-08-13 08:01:43 +0000
2153@@ -536,3 +536,11 @@
2154
2155 return
2156 end
2157+
2158+ INTEGER FUNCTION GET_NHEL(HEL, IPART)
2159+ implicit none
2160+ integer hel
2161+ integer ipart
2162+ get_nhel = 99
2163+ return
2164+ end
2165
2166=== modified file 'UpdateNotes.txt'
2167--- UpdateNotes.txt 2020-06-21 12:17:36 +0000
2168+++ UpdateNotes.txt 2020-08-13 08:01:43 +0000
2169@@ -1,5 +1,23 @@
2170 Update notes for MadGraph5_aMC@NLO (in reverse time order)
2171
2172+2.8.0:
2173+ OM: In madspin_card you can now replace the line "launch"
2174+ by "launch -n NAME", this will allow to specify the name of the
2175+ directory in EVENTS where that run is stored.
2176+ OM: Change in the python interface of the standalone output. In top of the pdg of the particles,
2177+ you can now use the process_id (the one specified with @X) to distinguish process with the same particle
2178+ content. This parameter can be set to -1 and the function then ignore that parameter.
2179+ OM: Adding new option in reweighting to allow the user to use the process_id in presence of ambiguous
2180+ initial/final state.
2181+ OM: For LO process, you can now set lpp1 and lpp2 to "4" for process with initial photon in order to get the
2182+ effective photon approximation. This mode behaves like the "3" one: The cut-off scale of the approximation
2183+ is taken from the fixed renormalization factorisation scale: "dsqrt_q2fact1/dsqrt_q2fact2"
2184+ OM: Update the makefile of standalone interface to python to be able to compile in multicore.
2185+ (thanks Matthias Komm)
2186+ OM: Update of the auto-width code to support UFO form-factors
2187+ OM: Fixing numerical issue at very low invariant mass and another numerical issue with the boost in EPA mode.
2188+
2189+
2190 2.7.3(21/06/20)
2191 OM: Fixing some bug for read-only LO gridpacks (wrong cross-section and shape when generating events).
2192 Thanks to Congqiao Li for this
2193
2194=== modified file 'aloha/aloha_writers.py'
2195--- aloha/aloha_writers.py 2020-01-09 23:14:56 +0000
2196+++ aloha/aloha_writers.py 2020-08-13 08:01:43 +0000
2197@@ -1241,12 +1241,15 @@
2198 """ build the name for combined aloha function """
2199
2200 def myHash(target_string):
2201+ suffix = ''
2202+ if '%(propa)s' in target_string:
2203+ target_string = target_string.replace('%(propa)s','')
2204+ suffix = '%(propa)s'
2205+
2206 if len(target_string)<50:
2207- return target_string
2208- if '%(propa)s' in target_string:
2209- return 'ALOHA_'+(str(hash(target_string.lower()))).replace('-','m')+'%(propa)s'
2210+ return '%s%s' % (target_string, suffix)
2211 else:
2212- return 'ALOHA_'+(str(hash(target_string.lower()))).replace('-','m')
2213+ return 'ALOHA_%s%s' % (str(hash(target_string.lower())).replace('-','m'), suffix)
2214
2215 if tag and any(t.startswith('P') for t in tag[:-1]):
2216 # propagator need to be the last entry for the tag
2217
2218=== modified file 'madgraph/core/base_objects.py'
2219--- madgraph/core/base_objects.py 2020-05-07 13:47:24 +0000
2220+++ madgraph/core/base_objects.py 2020-08-13 08:01:43 +0000
2221@@ -1222,7 +1222,8 @@
2222
2223 if name == 'particles':
2224 # Ensure no doublets in particle list
2225- make_unique(value)
2226+ if value:
2227+ make_unique(value)
2228 # Reset dictionaries
2229 self['particle_dict'] = {}
2230 self['ref_dict_to0'] = {}
2231@@ -4053,7 +4054,7 @@
2232 is needed"""
2233
2234 assert isinstance(doubletlist, list), \
2235- "Argument to make_unique must be list"
2236+ "Argument to make_unique must be list not %s" % type(doubletlist)
2237
2238
2239 uniquelist = []
2240
2241=== modified file 'madgraph/interface/common_run_interface.py'
2242--- madgraph/interface/common_run_interface.py 2020-06-17 07:23:03 +0000
2243+++ madgraph/interface/common_run_interface.py 2020-08-13 08:01:43 +0000
2244@@ -3704,11 +3704,21 @@
2245
2246 madspin_cmd.import_command_file(path)
2247
2248- # create a new run_name directory for this output
2249- i = 1
2250- while os.path.exists(pjoin(self.me_dir,'Events', '%s_decayed_%i' % (self.run_name,i))):
2251- i+=1
2252- new_run = '%s_decayed_%i' % (self.run_name,i)
2253+
2254+ if not madspin_cmd.me_run_name:
2255+ # create a new run_name directory for this output
2256+ i = 1
2257+ while os.path.exists(pjoin(self.me_dir,'Events', '%s_decayed_%i' % (self.run_name,i))):
2258+ i+=1
2259+ new_run = '%s_decayed_%i' % (self.run_name,i)
2260+ else:
2261+ new_run = madspin_cmd.me_run_name
2262+ if os.path.exists(pjoin(self.me_dir,'Events', new_run)):
2263+ i = 1
2264+ while os.path.exists(pjoin(self.me_dir,'Events', '%s_%i' % (new_run,i))):
2265+ i+=1
2266+ new_run = '%s_%i' % (new_run,i)
2267+
2268 evt_dir = pjoin(self.me_dir, 'Events')
2269
2270 os.mkdir(pjoin(evt_dir, new_run))
2271@@ -5828,6 +5838,21 @@
2272 self.run_card['mass_ion1'] != self.run_card['mass_ion2']):
2273 raise Exception, "Heavy ion profile for both beam are different but the symmetry used forbids it. \n Please generate your process with \"set group_subprocesses False\"."
2274
2275+ # EWA mode should use MC over polarization and no systematics (due to pdf call inreweight)
2276+ if self.run_card['lpp1'] in [2,3,4,-3,-4] or self.run_card['lpp2'] in [2,3,4,-3,-4]:
2277+ if any(pdg in proc_charac['pdg_initial1']+ proc_charac['pdg_initial2']
2278+ for pdg in [24, -24, 23]):
2279+ if self.run_card['nhel'] == 0:
2280+ logger.warning("only MC over polarization supported for EWA mode")
2281+ self.do_set('run_card nhel 1')
2282+ if self.run_card['use_syst']:
2283+ logger.warning("evaluation of systematics not allowed in EWA mode. set use_syst to False")
2284+ self.do_set('run_card use_syst False')
2285+
2286+ if self.run_card['lpp1'] in [4,-4] or self.run_card['lpp2'] in [4,-4]:
2287+ if 22 in proc_charac['pdg_initial1']+ proc_charac['pdg_initial2']:
2288+ raise Exception, "EPA not implemented from muon beam. (please open a ticket and we will do it)"
2289+
2290 # check the status of small width status from LO
2291 for param in self.param_card['decay']:
2292 width = param.value
2293
2294=== modified file 'madgraph/interface/madevent_interface.py'
2295--- madgraph/interface/madevent_interface.py 2020-06-18 20:23:25 +0000
2296+++ madgraph/interface/madevent_interface.py 2020-08-13 08:01:43 +0000
2297@@ -5414,6 +5414,7 @@
2298 elif mode in [1,2]:
2299 exename = os.path.basename(exe)
2300 # For condor cluster, create the input/output files
2301+ misc.sprint(exename)
2302 if 'ajob' in exename:
2303 input_files = ['madevent','input_app.txt','symfact.dat','iproc.dat','dname.mg',
2304 pjoin(self.me_dir, 'SubProcesses','randinit')]
2305@@ -5509,7 +5510,7 @@
2306 #submitting
2307 self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument,
2308 input_files=input_files, output_files=output_files,
2309- required_output=required_output, **opt)
2310+ required_output=required_output, allow_array=True, **opt)
2311 elif "refine_splitted.sh" in exename:
2312 input_files = ['madevent','symfact.dat','iproc.dat', 'dname.mg',
2313 pjoin(self.me_dir, 'SubProcesses','randinit')]
2314@@ -5533,7 +5534,7 @@
2315 #submitting
2316 self.cluster.cluster_submit(exe, stdout=stdout, cwd=cwd, argument=argument,
2317 input_files=input_files, output_files=output_files,
2318- required_output=required_output, **opt)
2319+ required_output=required_output,allow_array=True, **opt)
2320
2321
2322
2323
2324=== modified file 'madgraph/interface/madgraph_interface.py'
2325--- madgraph/interface/madgraph_interface.py 2020-06-17 06:15:07 +0000
2326+++ madgraph/interface/madgraph_interface.py 2020-08-13 08:01:43 +0000
2327@@ -8353,7 +8353,7 @@
2328 decay_dir = pjoin(path,'temp_decay')
2329 logger_mg.info('More info in temporary files:\n %s/index.html' % (decay_dir))
2330 with misc.MuteLogger(['madgraph','ALOHA','cmdprint','madevent'], [40,40,40,40]):
2331- self.exec_cmd('output %s -f' % decay_dir,child=False)
2332+ self.exec_cmd('output madevent %s -f' % decay_dir,child=False)
2333
2334 #modify some parameter of the default run_card
2335 run_card = banner_module.RunCard(pjoin(decay_dir,'Cards','run_card.dat'))
2336
2337=== modified file 'madgraph/interface/reweight_interface.py'
2338--- madgraph/interface/reweight_interface.py 2020-06-16 13:10:57 +0000
2339+++ madgraph/interface/reweight_interface.py 2020-08-13 08:01:43 +0000
2340@@ -111,6 +111,7 @@
2341 self.rwgt_dir = None
2342 self.exitted = False # Flag to know if do_quit was already called.
2343 self.keep_ordering = False
2344+ self.use_eventid = False
2345 if event_path:
2346 logger.info("Extracting the banner ...")
2347 self.do_import(event_path, allow_madspin=allow_madspin)
2348@@ -356,8 +357,8 @@
2349 if self.has_standalone_dir:
2350 self.terminate_fortran_executables()
2351 self.has_standalone_dir = False
2352- elif args[0] == "keep_ordering":
2353- self.keep_ordering = banner.ConfigFile.format_variable(args[1], bool, "keep_ordering")
2354+ elif args[0] in ["keep_ordering", "use_eventid"]:
2355+ setattr(self, args[0], banner.ConfigFile.format_variable(args[1], bool, args[0]))
2356 elif args[0] == "allow_missing_finalstate":
2357 self.options["allow_missing_finalstate"] = banner.ConfigFile.format_variable(args[1], bool, "allow_missing_finalstate")
2358 elif args[0] == "process":
2359@@ -980,11 +981,12 @@
2360 def calculate_weight(self, event):
2361 """space defines where to find the calculator (in multicore)"""
2362
2363- if not hasattr(self,'pdf'):
2364- lhapdf = misc.import_python_lhapdf(self.mg5cmd.options['lhapdf'])
2365- self.pdf = lhapdf.mkPDF(self.banner.run_card.get_lhapdf_id())
2366-
2367+
2368 if self.has_nlo and self.rwgt_mode != "LO":
2369+ if not hasattr(self,'pdf'):
2370+ lhapdf = misc.import_python_lhapdf(self.mg5cmd.options['lhapdf'])
2371+ self.pdf = lhapdf.mkPDF(self.banner.run_card.get_lhapdf_id())
2372+
2373 return self.calculate_nlo_weight(event)
2374
2375 event.parse_reweight()
2376@@ -1206,7 +1208,7 @@
2377 # base = "rw_mevirt"
2378 #else:
2379 # base = "rw_me"
2380-
2381+
2382 if (not self.second_model and not self.second_process and not self.dedicated_path) or hypp_id==0:
2383 orig_order, Pdir, hel_dict = self.id_to_path[tag]
2384 else:
2385@@ -1269,10 +1271,16 @@
2386 pold = list(p)
2387 p = self.invert_momenta(p)
2388 pdg = list(orig_order[0])+list(orig_order[1])
2389-
2390+ try:
2391+ pid = event.ievent
2392+ except AttributeError:
2393+ pid = -1
2394+ if not self.use_eventid:
2395+ pid = -1
2396+
2397 with misc.chdir(Pdir):
2398 with misc.stdchannel_redirected(sys.stdout, os.devnull):
2399- me_value = module.smatrixhel(pdg,p, event.aqcd, scale2, nhel)
2400+ me_value = module.smatrixhel(pdg, pid, p, event.aqcd, scale2, nhel)
2401
2402 # for loop we have also the stability status code
2403 if isinstance(me_value, tuple):
2404@@ -1387,10 +1395,12 @@
2405 nlo_order = nlo_order.replace('noborn', 'virt')
2406 commandline += "add process %s [%s] %s;" % (base,nlo_order,post)
2407 commandline = commandline.replace('add process', 'generate',1)
2408- logger.info("RETRY with %s", commandline)
2409- mgcmd.exec_cmd(commandline, precmd=True)
2410- has_nlo = False
2411+ if commandline:
2412+ logger.info("RETRY with %s", commandline)
2413+ mgcmd.exec_cmd(commandline, precmd=True)
2414+ has_nlo = False
2415 except Exception, error:
2416+ misc.sprint(type(error))
2417 raise
2418
2419 commandline = 'output standalone_rw %s --prefix=int' % pjoin(path_me,data['paths'][0])
2420@@ -1802,8 +1812,9 @@
2421 data = self.id_to_path_second
2422
2423 # get all the information
2424- all_pdgs = mymod.get_pdg_order()
2425- all_pdgs = [[pdg for pdg in pdgs if pdg!=0] for pdgs in mymod.get_pdg_order()]
2426+ allids, all_pids = mymod.get_pdg_order()
2427+ all_pdgs = [[pdg for pdg in pdgs if pdg!=0] for pdgs in allids]
2428+ #all_pids = [pid for (pdgs, pid) in allids]
2429 all_prefix = [''.join(j).strip().lower() for j in mymod.get_prefix()]
2430 prefix_set = set(all_prefix)
2431
2432@@ -1826,7 +1837,7 @@
2433 misc.sprint(os.path.exists(pjoin(path_me,onedir,'SubProcesses','MadLoop5_resources', '%sHelConfigs.dat' % prefix.upper())))
2434 continue
2435
2436- for i,pdg in enumerate(all_pdgs):
2437+ for i,(pdg,pid) in enumerate(zip(all_pdgs,all_pids)):
2438 if self.is_decay:
2439 incoming = [pdg[0]]
2440 outgoing = pdg[1:]
2441
2442=== modified file 'madgraph/iolibs/export_v4.py'
2443--- madgraph/iolibs/export_v4.py 2020-06-20 21:10:10 +0000
2444+++ madgraph/iolibs/export_v4.py 2020-08-13 08:01:43 +0000
2445@@ -166,6 +166,7 @@
2446 self.mgme_dir = MG5DIR
2447 self.dir_path = dir_path
2448 self.model = None
2449+ self.beam_polarization = True
2450
2451 self.opt = dict(self.default_opt)
2452 if opt:
2453@@ -185,12 +186,48 @@
2454 def export_processes(self, matrix_elements, fortran_model):
2455 """Make the switch between grouped and not grouped output"""
2456
2457+
2458 calls = 0
2459 if isinstance(matrix_elements, group_subprocs.SubProcessGroupList):
2460+ # check handling for the polarization
2461+ for m in matrix_elements:
2462+ for me in m.get('matrix_elements'):
2463+ for p in me.get('processes'):
2464+ for pid in p.get_initial_ids():
2465+ spin = p.get('model').get_particle(pid).get('spin')
2466+ if spin != 2:
2467+ self.beam_polarization = False
2468+ break
2469+ else:
2470+ continue
2471+ break
2472+ else:
2473+ continue
2474+ break
2475+ else:
2476+ continue
2477+ break
2478+
2479 for (group_number, me_group) in enumerate(matrix_elements):
2480 calls = calls + self.generate_subprocess_directory(\
2481 me_group, fortran_model, group_number)
2482 else:
2483+ # check handling for the polarization
2484+ self.beam_polarization = True
2485+ for me in matrix_elements.get_matrix_elements():
2486+ for p in me.get('processes'):
2487+ for pid in p.get_initial_ids():
2488+ spin = p.get('model').get_particle(pid).get('spin')
2489+ if spin != 2:
2490+ self.beam_polarization = False
2491+ break
2492+ else:
2493+ continue
2494+ break
2495+ else:
2496+ continue
2497+ break
2498+
2499 for me_number, me in enumerate(matrix_elements.get_matrix_elements()):
2500 calls = calls + self.generate_subprocess_directory(\
2501 me, fortran_model, me_number)
2502@@ -2066,17 +2103,18 @@
2503
2504 template = """
2505 %(python_information)s
2506- subroutine smatrixhel(pdgs, npdg, p, ALPHAS, SCALE2, nhel, ANS)
2507+ subroutine smatrixhel(pdgs, procid, npdg, p, ALPHAS, SCALE2, nhel, ANS)
2508 IMPLICIT NONE
2509
2510 CF2PY double precision, intent(in), dimension(0:3,npdg) :: p
2511 CF2PY integer, intent(in), dimension(npdg) :: pdgs
2512+CF2PY integer, intent(in):: procid
2513 CF2PY integer, intent(in) :: npdg
2514 CF2PY double precision, intent(out) :: ANS
2515 CF2PY double precision, intent(in) :: ALPHAS
2516 CF2PY double precision, intent(in) :: SCALE2
2517 integer pdgs(*)
2518- integer npdg, nhel
2519+ integer npdg, nhel, procid
2520 double precision p(*)
2521 double precision ANS, ALPHAS, PI,SCALE2
2522 include 'coupl.inc'
2523@@ -2128,12 +2166,16 @@
2524 end
2525
2526
2527- subroutine get_pdg_order(PDG)
2528+ subroutine get_pdg_order(PDG, ALLPROC)
2529 IMPLICIT NONE
2530 CF2PY INTEGER, intent(out) :: PDG(%(nb_me)i,%(maxpart)i)
2531+CF2PY INTEGER, intent(out) :: ALLPROC(%(nb_me)i)
2532 INTEGER PDG(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i)
2533+ INTEGER ALLPROC(%(nb_me)i),PIDs(%(nb_me)i)
2534 DATA PDGS/ %(pdgs)s /
2535+ DATA PIDS/ %(pids)s /
2536 PDG = PDGS
2537+ ALLPROC = PIDS
2538 RETURN
2539 END
2540
2541@@ -2151,31 +2193,33 @@
2542
2543 allids = self.prefix_info.keys()
2544 allprefix = [self.prefix_info[key][0] for key in allids]
2545- min_nexternal = min([len(ids) for ids in allids])
2546- max_nexternal = max([len(ids) for ids in allids])
2547+ min_nexternal = min([len(ids[0]) for ids in allids])
2548+ max_nexternal = max([len(ids[0]) for ids in allids])
2549
2550 info = []
2551- for key, (prefix, tag) in self.prefix_info.items():
2552- info.append('#PY %s : %s # %s' % (tag, key, prefix))
2553+ for (key, pid), (prefix, tag) in self.prefix_info.items():
2554+ info.append('#PY %s : %s # %s %s' % (tag, key, prefix, pid))
2555
2556
2557 text = []
2558 for n_ext in range(min_nexternal, max_nexternal+1):
2559- current = [ids for ids in allids if len(ids)==n_ext]
2560- if not current:
2561+ current_id = [ids[0] for ids in allids if len(ids[0])==n_ext]
2562+ current_pid = [ids[1] for ids in allids if len(ids[0])==n_ext]
2563+ if not current_id:
2564 continue
2565 if min_nexternal != max_nexternal:
2566 if n_ext == min_nexternal:
2567 text.append(' if (npdg.eq.%i)then' % n_ext)
2568 else:
2569 text.append(' else if (npdg.eq.%i)then' % n_ext)
2570- for ii,pdgs in enumerate(current):
2571+ for ii,pdgs in enumerate(current_id):
2572+ pid = current_pid[ii]
2573 condition = '.and.'.join(['%i.eq.pdgs(%i)' %(pdg, i+1) for i, pdg in enumerate(pdgs)])
2574 if ii==0:
2575- text.append( ' if(%s) then ! %i' % (condition, i))
2576+ text.append( ' if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition, pid, i))
2577 else:
2578- text.append( ' else if(%s) then ! %i' % (condition,i))
2579- text.append(' call %ssmatrixhel(p, nhel, ans)' % self.prefix_info[pdgs][0])
2580+ text.append( ' else if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition,pid,i))
2581+ text.append(' call %ssmatrixhel(p, nhel, ans)' % self.prefix_info[(pdgs,pid)][0])
2582 text.append(' endif')
2583 #close the function
2584 if min_nexternal != max_nexternal:
2585@@ -2192,8 +2236,9 @@
2586 'maxpart': max_nexternal,
2587 'nb_me': len(allids),
2588 'pdgs': ','.join(str(pdg[i]) if i<len(pdg) else '0'
2589- for i in range(max_nexternal) for pdg in allids),
2590+ for i in range(max_nexternal) for (pdg,pid) in allids),
2591 'prefix':'\',\''.join(allprefix),
2592+ 'pids': ','.join(str(pid) for (pdg,pid) in allids),
2593 'parameter_setup': '\n'.join(parameter_setup),
2594 }
2595 formatting['lenprefix'] = len(formatting['prefix'])
2596@@ -2311,7 +2356,7 @@
2597 raise Exception, '--prefix options supports only \'int\' and \'proc\''
2598 for proc in matrix_element.get('processes'):
2599 ids = [l.get('id') for l in proc.get('legs_with_decays')]
2600- self.prefix_info[tuple(ids)] = [proc_prefix, proc.get_tag()]
2601+ self.prefix_info[(tuple(ids), proc.get('id'))] = [proc_prefix, proc.get_tag()]
2602
2603 calls = self.write_matrix_element_v4(
2604 writers.FortranWriter(filename),
2605@@ -4186,11 +4231,24 @@
2606 split_orders if len(split_orders)>0 else ['ALL_ORDERS'])
2607 replace_dict['jamp_lines'] = '\n'.join(jamp_lines)
2608
2609+ if self.beam_polarization:
2610+ replace_dict['beam_polarization'] = """
2611+ DO JJ=1,nincoming
2612+ IF(POL(JJ).NE.1d0.AND.NHEL(JJ,I).EQ.INT(SIGN(1d0,POL(JJ)))) THEN
2613+ T=T*ABS(POL(JJ))
2614+ ELSE IF(POL(JJ).NE.1d0)THEN
2615+ T=T*(2d0-ABS(POL(JJ)))
2616+ ENDIF
2617+ ENDDO
2618+ """
2619+ else:
2620+ replace_dict['beam_polarization'] = ""
2621+
2622+
2623 replace_dict['template_file'] = pjoin(_file_path, \
2624 'iolibs/template_files/%s' % self.matrix_file)
2625 replace_dict['template_file2'] = pjoin(_file_path, \
2626- 'iolibs/template_files/split_orders_helping_functions.inc')
2627-
2628+ 'iolibs/template_files/split_orders_helping_functions.inc')
2629 s1,s2 = matrix_element.get_spin_state_initial()
2630 replace_dict['nb_spin_state1'] = s1
2631 replace_dict['nb_spin_state2'] = s2
2632@@ -4297,14 +4355,21 @@
2633 replace_dict['define_subdiag_lines'] = ""
2634 replace_dict['cutsdone'] = " cutsdone=.false.\n cutspassed=.false."
2635
2636+ ncomb=matrix_element.get_helicity_combinations()
2637+
2638+ replace_dict['ncomb']= ncomb
2639+ helicity_lines = self.get_helicity_lines(matrix_element)
2640+ replace_dict['helicity_lines'] = helicity_lines
2641+
2642 if not isinstance(self, ProcessExporterFortranMEGroup):
2643- ncomb=matrix_element.get_helicity_combinations()
2644 replace_dict['read_write_good_hel'] = self.read_write_good_hel(ncomb)
2645 else:
2646 replace_dict['read_write_good_hel'] = ""
2647+ # Extract helicity lines
2648
2649 context = {'read_write_good_hel':True}
2650
2651+
2652 if writer:
2653 file = open(pjoin(_file_path, \
2654 'iolibs/template_files/auto_dsig_v4.inc')).read()
2655
2656=== modified file 'madgraph/iolibs/template_files/auto_dsig_v4.inc'
2657--- madgraph/iolibs/template_files/auto_dsig_v4.inc 2019-06-10 19:05:58 +0000
2658+++ madgraph/iolibs/template_files/auto_dsig_v4.inc 2020-08-13 08:01:43 +0000
2659@@ -156,3 +156,18 @@
2660 %(read_write_good_hel)s
2661
2662 ## }
2663+
2664+
2665+ integer FUNCTION GET_NHEL%(proc_id)s(hel, ipart)
2666+ implicit none
2667+ integer hel,i, ipart
2668+ Include 'nexternal.inc'
2669+ integer one_nhel(nexternal)
2670+ INTEGER NCOMB
2671+ PARAMETER ( NCOMB=%(ncomb)d)
2672+ INTEGER NHEL(NEXTERNAL,NCOMB)
2673+ %(helicity_lines)s
2674+
2675+ get_nhel%(proc_id)s = nhel(ipart, hel)
2676+ return
2677+ end
2678
2679=== modified file 'madgraph/iolibs/template_files/loop_optimized/check_sa_all.py.inc'
2680--- madgraph/iolibs/template_files/loop_optimized/check_sa_all.py.inc 2016-10-20 23:12:29 +0000
2681+++ madgraph/iolibs/template_files/loop_optimized/check_sa_all.py.inc 2020-08-13 08:01:43 +0000
2682@@ -49,10 +49,10 @@
2683 allmatrix2py.set_madloop_path(os.path.abspath(pjoin(root_path,'MadLoop5_resources')))
2684 # List all processes available in this module
2685
2686-all_procs_available = [[pdg for pdg in proc_pdgs if pdg!=0] for proc_pdgs in allmatrix2py.get_pdg_order()]
2687+all_procs_available = [[(pdg,pids[i]) for i, pdg in enumerate(proc_pdgs) if pdg!=0] for (proc_pdgs, pids) in allmatrix2py.get_pdg_order()]
2688 print "Available processes are:"
2689 for process_pdgs in all_procs_available:
2690- print " --> %s"%str(process_pdgs)
2691+ print " --> %s: process id: %i "%str(process_pdgs[0], process_pdgs[1])
2692
2693 def invert_momenta(p):
2694 """ fortran/C-python do not order table in the same order"""
2695@@ -62,7 +62,7 @@
2696
2697 # The kinematic configuration in the convention (E, px, py, pz) and with particles ordered as in the process definition.
2698 # This is the structure of this dictionary.
2699-p= dict( (tuple(process_pdgs),[[None,]*4]*len(process_pdgs)) for process_pdgs in all_procs_available)
2700+p= dict( (tuple(process_pdgs[0]),[[None,]*4]*len(process_pdgs[0])) for process_pdgs in all_procs_available)
2701
2702 if (p.values()[0])[0][0] is None:
2703 if not os.path.isfile(pjoin(root_path,'PS.input')):
2704@@ -120,7 +120,7 @@
2705 # Choice of renormalization scale
2706 renormalization_scale = 91.188
2707
2708- finite_loop_me, return_code = allmatrix2py.smatrixhel(pdgs=list(process_pdgs),
2709+ finite_loop_me, return_code = allmatrix2py.smatrixhel(pdgs=list(process_pdgs), procid=-1,
2710 p=P, alphas=alphas,scales2=renormalization_scale,nhel=nhel)
2711
2712 print '* %-108s *'%' MadLoop evaluation for the process '
2713
2714=== modified file 'madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc'
2715--- madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc 2017-07-31 22:08:40 +0000
2716+++ madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc 2020-08-13 08:01:43 +0000
2717@@ -2737,11 +2737,14 @@
2718 PARAMETER (NEXTERNAL=%(nexternal)d)
2719 INTEGER NSQUAREDSO
2720 PARAMETER (NSQUAREDSO=%(nSquaredSO)d)
2721+ %(get_nsqso_born)s
2722 C
2723 C ARGUMENTS
2724 C
2725 %(real_dp_format)s P(0:3,NEXTERNAL)
2726- %(real_dp_format)s ANS(0:3,0:NSQUAREDSO)
2727+ INTEGER ANS_DIMENSION
2728+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
2729+ %(real_dp_format)s ANS(0:3,0:ANS_DIMENSION)
2730 INTEGER HEL, USERHEL
2731 common/%(proc_prefix)sUSERCHOICE/USERHEL
2732 C ----------
2733@@ -2764,7 +2767,10 @@
2734 C ARGUMENTS
2735 C
2736 %(real_dp_format)s P(0:3,NEXTERNAL)
2737- %(real_dp_format)s ANS(0:3,0:NSQUAREDSO)
2738+ %(get_nsqso_born)s
2739+ INTEGER ANS_DIMENSION
2740+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
2741+ %(real_dp_format)s ANS(0:3,0:ANS_DIMENSION)
2742 INTEGER HEL, RET_CODE
2743 %(real_dp_format)s PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
2744 C
2745@@ -2875,7 +2881,10 @@
2746 C ARGUMENTS
2747 C
2748 %(real_dp_format)s P(0:3,NEXTERNAL)
2749- %(real_dp_format)s ANS(0:3,0:NSQUAREDSO)
2750+ %(get_nsqso_born)s
2751+ INTEGER ANS_DIMENSION
2752+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
2753+ %(real_dp_format)s ANS(0:3,0:ANS_DIMENSION)
2754 %(real_dp_format)s PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
2755 INTEGER RET_CODE
2756 C
2757
2758=== modified file 'madgraph/iolibs/template_files/makefile_sa_f2py'
2759--- madgraph/iolibs/template_files/makefile_sa_f2py 2017-09-25 21:30:36 +0000
2760+++ madgraph/iolibs/template_files/makefile_sa_f2py 2020-08-13 08:01:43 +0000
2761@@ -2,7 +2,8 @@
2762 SHELL = /bin/bash
2763 LIBDIR = ../lib/
2764 PROG = check
2765-LINKLIBS = -L../lib/ -ldhelas -lmodel
2766+LINKLIBS_ME = -L../lib/ -ldhelas -lmodel
2767+LINKLIBS_ALL = -L../lib/ -lmatrix -ldhelas -lmodel
2768 LIBS = $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libmodel.$(libext)
2769 PROCESS= allmatrix.o
2770 LIBRARY = libmatrix.a
2771@@ -12,12 +13,19 @@
2772 MENUM=2
2773 endif
2774
2775-
2776-allmatrix$(MENUM)py.so: $(LIBDIR)/$(LIBRARY) all_matrix.o
2777- $(F2PY) --f77exec=$(FC) $(LINKLIBS) -lmatrix -c all_matrix.f */matrix.f -m allmatrix$(MENUM)py
2778-
2779-
2780-
2781+%$(MENUM)py.so: %/matrix.f
2782+ $(F2PY) --f77exec=$(FC) $(LINKLIBS_ME) -c $^ -m $(patsubst %/matrix.f,%$(MENUM)py,$^)
2783+
2784+all_matrix$(MENUM)py.so: $(LIBDIR)/$(LIBRARY) all_matrix.f
2785+ $(F2PY) --f77exec=$(FC) $(LINKLIBS_ALL) -c all_matrix.f -m all_matrix$(MENUM)py
2786+
2787+
2788+allmatrix$(MENUM)py.so: $(patsubst %/matrix.f,%$(MENUM)py.so,$(wildcard */matrix.f)) all_matrix$(MENUM)py.so
2789+ for lib in $(patsubst %.so,%,$^); do \
2790+ echo "from $$lib import *" >> allmatrix$(MENUM)py.py; \
2791+ done
2792+
2793+
2794 $(LIBDIR)/$(LIBRARY): $(patsubst %.f,%.o,$(wildcard */matrix.f)) all_matrix.o
2795 $(call CREATELIB, $@, $^)
2796
2797
2798=== modified file 'madgraph/iolibs/template_files/matrix_madevent_group_v4.inc'
2799--- madgraph/iolibs/template_files/matrix_madevent_group_v4.inc 2019-06-26 10:35:18 +0000
2800+++ madgraph/iolibs/template_files/matrix_madevent_group_v4.inc 2020-08-13 08:01:43 +0000
2801@@ -123,13 +123,7 @@
2802 DO I=1,NCOMB
2803 IF (GOODHEL(I,IMIRROR) .OR. NTRY(IMIRROR).LE.MAXTRIES.or.(ISUM_HEL.NE.0).or.THIS_NTRY(IMIRROR).le.2) THEN
2804 T=MATRIX%(proc_id)s(P ,NHEL(1,I),JC(1))
2805- DO JJ=1,nincoming
2806- IF(POL(JJ).NE.1d0.AND.NHEL(JJ,I).EQ.INT(SIGN(1d0,POL(JJ)))) THEN
2807- T=T*ABS(POL(JJ))*NB_SPIN_STATE_IN(JJ)/2d0 ! NB_SPIN_STATE(JJ)/2d0 is added for polarised beam
2808- ELSE IF(POL(JJ).NE.1d0)THEN
2809- T=T*(2d0-ABS(POL(JJ)))*NB_SPIN_STATE_IN(JJ)/2d0
2810- ENDIF
2811- ENDDO
2812+ %(beam_polarization)s
2813 IF (ISUM_HEL.NE.0.and.DS_get_dim_status('Helicity').eq.0.and.ALLOW_HELICITY_GRID_ENTRIES) then
2814 call DS_add_entry('Helicity',I,T)
2815 endif
2816@@ -174,14 +168,7 @@
2817 I = HEL_PICKED
2818
2819 T=MATRIX%(proc_id)s(P ,NHEL(1,I),JC(1))
2820-
2821- DO JJ=1,nincoming
2822- IF(POL(JJ).NE.1d0.AND.NHEL(JJ,I).EQ.INT(SIGN(1d0,POL(JJ)))) THEN
2823- T=T*ABS(POL(JJ))
2824- ELSE IF(POL(JJ).NE.1d0)THEN
2825- T=T*(2d0-ABS(POL(JJ)))
2826- ENDIF
2827- ENDDO
2828+ %(beam_polarization)s
2829 c Always one helicity at a time
2830 ANS = T
2831 c Include the Jacobian from helicity sampling
2832
2833=== modified file 'madgraph/iolibs/template_files/matrix_madevent_v4.inc'
2834--- madgraph/iolibs/template_files/matrix_madevent_v4.inc 2019-09-26 11:09:58 +0000
2835+++ madgraph/iolibs/template_files/matrix_madevent_v4.inc 2020-08-13 08:01:43 +0000
2836@@ -103,13 +103,7 @@
2837 DO I=1,NCOMB
2838 IF (GOODHEL(I) .OR. NTRY .LE. MAXTRIES.OR.(ISUM_HEL.NE.0)) THEN
2839 T=MATRIX%(proc_id)s(P ,NHEL(1,I),JC(1))
2840- DO JJ=1,nincoming
2841- IF(POL(JJ).NE.1d0.AND.NHEL(JJ,I).EQ.INT(SIGN(1d0,POL(JJ)))) THEN
2842- T=T*ABS(POL(JJ))*NB_SPIN_STATE(JJ)/2d0 ! NB_SPIN_STATE(JJ)/2d0 is added for polarised beam
2843- ELSE IF(POL(JJ).NE.1d0)THEN
2844- T=T*(2d0-ABS(POL(JJ)))*NB_SPIN_STATE(JJ)/2d0
2845- ENDIF
2846- ENDDO
2847+ %(beam_polarization)s
2848 IF (ISUM_HEL.NE.0) then
2849 call DS_add_entry('Helicity',I,T)
2850 endif
2851@@ -153,13 +147,7 @@
2852 I = HEL_PICKED
2853
2854 T=MATRIX%(proc_id)s(P ,NHEL(1,I),JC(1))
2855- DO JJ=1,nincoming
2856- IF(POL(JJ).NE.1d0.AND.NHEL(JJ,I).EQ.INT(SIGN(1d0,POL(JJ)))) THEN
2857- T=T*ABS(POL(JJ))
2858- ELSE IF(POL(JJ).NE.1d0)THEN
2859- T=T*(2d0-ABS(POL(JJ)))
2860- ENDIF
2861- ENDDO
2862+ %(beam_polarization)s
2863 c Always one helicity at a time
2864 ANS = T
2865 c Include the Jacobian from helicity sampling
2866
2867=== modified file 'madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc'
2868--- madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc 2020-01-16 07:19:30 +0000
2869+++ madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc 2020-08-13 08:01:43 +0000
2870@@ -506,5 +506,10 @@
2871 C
2872 %(read_write_good_hel)s
2873
2874-
2875-
2876+ integer function get_nhel(hel, partid)
2877+ implicit none
2878+ integer hel, partid
2879+ write(*,*) "do not support this type of pdf with group_subprocess=True"
2880+ stop 1
2881+ return
2882+ end
2883
2884=== modified file 'madgraph/loop/loop_exporters.py'
2885--- madgraph/loop/loop_exporters.py 2020-06-20 21:10:10 +0000
2886+++ madgraph/loop/loop_exporters.py 2020-08-13 08:01:43 +0000
2887@@ -334,11 +334,12 @@
2888 CALL SETMADLOOPPATH(PATH)
2889 END
2890
2891- subroutine smatrixhel(pdgs, npdg, p, ALPHAS, SCALES2, nhel, ANS, RETURNCODE)
2892+ subroutine smatrixhel(pdgs, procid, npdg, p, ALPHAS, SCALES2, nhel, ANS, RETURNCODE)
2893 IMPLICIT NONE
2894
2895 CF2PY double precision, intent(in), dimension(0:3,npdg) :: p
2896 CF2PY integer, intent(in), dimension(npdg) :: pdgs
2897+CF2PY integer, intent(in):: procid
2898 CF2PY integer, intent(in) :: npdg
2899 CF2PY double precision, intent(out) :: ANS
2900 CF2PY integer, intent(out) :: RETURNCODE
2901@@ -346,22 +347,25 @@
2902 CF2PY double precision, intent(in) :: SCALES2
2903
2904 integer pdgs(*)
2905- integer npdg, nhel, RETURNCODE
2906+ integer npdg, nhel, RETURNCODE, procid
2907 double precision p(*)
2908 double precision ANS, ALPHAS, PI,SCALES2
2909-
2910+ 1 continue
2911 %(smatrixhel)s
2912
2913 return
2914 end
2915
2916- subroutine get_pdg_order(OUT)
2917+ subroutine get_pdg_order(OUT, ALLPROC)
2918 IMPLICIT NONE
2919 CF2PY INTEGER, intent(out) :: OUT(%(nb_me)i,%(maxpart)i)
2920-
2921+CF2PY INTEGER, intent(out) :: ALLPROC(%(nb_me)i)
2922 INTEGER OUT(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i)
2923+ INTEGER ALLPROC(%(nb_me)i),PIDs(%(nb_me)i)
2924 DATA PDGS/ %(pdgs)s /
2925+ DATA PIDS/ %(pids)s /
2926 OUT=PDGS
2927+ ALLPROC = PIDS
2928 RETURN
2929 END
2930
2931@@ -378,31 +382,37 @@
2932
2933 allids = self.prefix_info.keys()
2934 allprefix = [self.prefix_info[key][0] for key in allids]
2935- min_nexternal = min([len(ids) for ids in allids])
2936- max_nexternal = max([len(ids) for ids in allids])
2937+ min_nexternal = min([len(ids[0]) for ids in allids])
2938+ max_nexternal = max([len(ids[0]) for ids in allids])
2939
2940 info = []
2941- for key, (prefix, tag) in self.prefix_info.items():
2942- info.append('#PY %s : %s # %s' % (tag, key, prefix))
2943+ for (key,pid), (prefix, tag) in self.prefix_info.items():
2944+ info.append('#PY %s : %s # %s %s' % (tag, key, prefix, pid))
2945
2946
2947 text = []
2948 for n_ext in range(min_nexternal, max_nexternal+1):
2949- current = [ids for ids in allids if len(ids)==n_ext]
2950- if not current:
2951+ current_id = [ids[0] for ids in allids if len(ids[0])==n_ext]
2952+ current_pid = [ids[1] for ids in allids if len(ids[0])==n_ext]
2953+ if not current_id:
2954 continue
2955 if min_nexternal != max_nexternal:
2956 if n_ext == min_nexternal:
2957 text.append(' if (npdg.eq.%i)then' % n_ext)
2958 else:
2959 text.append(' else if (npdg.eq.%i)then' % n_ext)
2960- for ii,pdgs in enumerate(current):
2961+ for ii,pdgs in enumerate(current_id):
2962+ pid = current_pid[ii]
2963 condition = '.and.'.join(['%i.eq.pdgs(%i)' %(pdg, i+1) for i, pdg in enumerate(pdgs)])
2964 if ii==0:
2965- text.append( ' if(%s) then ! %i' % (condition, i))
2966+ text.append( ' if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition, pid, i))
2967 else:
2968- text.append( ' else if(%s) then ! %i' % (condition,i))
2969- text.append(' call %sget_me(p, ALPHAS, DSQRT(SCALES2), NHEL, ANS, RETURNCODE)' % self.prefix_info[pdgs][0])
2970+ text.append( ' else if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition,pid,i))
2971+ text.append(' call %sget_me(p, ALPHAS, DSQRT(SCALES2), NHEL, ANS, RETURNCODE)' % self.prefix_info[(pdgs,pid)][0])
2972+ text.append( ' else if(procid.gt.0) then !')
2973+ text.append( ' procid = -1' )
2974+ text.append( ' goto 1' )
2975+
2976 text.append(' endif')
2977 #close the function
2978 if min_nexternal != max_nexternal:
2979@@ -422,9 +432,10 @@
2980 'nb_me': len(allids),
2981 'pdgs': ','.join([str(pdg[i]) if i<len(pdg) else '0'
2982 for i in range(max_nexternal) \
2983- for pdg in allids]),
2984+ for (pdg,pid) in allids]),
2985 'prefix':'\',\''.join(allprefix),
2986 'parameter_setup': '\n'.join(parameter_setup),
2987+ 'pids': ','.join(str(pid) for (pdg,pid) in allids),
2988 }
2989
2990
2991@@ -1023,7 +1034,7 @@
2992 if 'prefix' in self.cmd_options and self.cmd_options['prefix'] in ['int','proc']:
2993 for proc in matrix_element.get('processes'):
2994 ids = [l.get('id') for l in proc.get('legs_with_decays')]
2995- self.prefix_info[tuple(ids)] = [dict['proc_prefix'], proc.get_tag()]
2996+ self.prefix_info[tuple(ids),proc.get('id')] = [dict['proc_prefix'], proc.get_tag()]
2997
2998 # The proc_id is used for MadEvent grouping, so none of our concern here
2999 # and it is simply set to an empty string.
3000@@ -3013,7 +3024,6 @@
3001 matrix_element.rep_dict['coef_construction']=replace_dict['coef_construction']
3002
3003 replace_dict['coef_merging']='\n'.join(coef_merging)
3004-
3005 file = file % replace_dict
3006 number_of_calls = len(filter(lambda call: call.find('CALL LOOP') != 0, \
3007 loop_CT_calls))
3008
3009=== modified file 'madgraph/various/banner.py'
3010--- madgraph/various/banner.py 2020-05-25 21:16:05 +0000
3011+++ madgraph/various/banner.py 2020-08-13 08:01:43 +0000
3012@@ -24,6 +24,7 @@
3013 import math
3014 import StringIO
3015 import itertools
3016+import time
3017
3018
3019 pjoin = os.path.join
3020@@ -2896,10 +2897,10 @@
3021 self.add_param("nevents", 10000)
3022 self.add_param("iseed", 0)
3023 self.add_param("python_seed", -2, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed")
3024- self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9, -2,-3],
3025- comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF from proton\n -1: PDF from anti-proton\n 2:photon from proton, 3:photon from electron, 9: PLUGIN MODE')
3026- self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9],
3027- comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF from proton\n -1: PDF from anti-proton\n 2:photon from proton, 3:photon from electron, 9: PLUGIN MODE')
3028+ self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,4,9,-2,-3,-4],
3029+ comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF from proton\n -1: PDF from anti-proton\n 2:photon from proton, 3:photon/W/Z from electron, 4:photon/W/Z from muon,\n 9: PLUGIN MODE')
3030+ self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,4,9,-3,-4],
3031+ comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF from proton\n -1: PDF from anti-proton\n 2:photon from proton, 3:photon/W/Z from electron, 4:photon/W/Z from muon,\n 9: PLUGIN MODE')
3032 self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)")
3033 self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)")
3034 self.add_param("polbeam1", 0.0, fortran_name="pb1", hidden=True,
3035@@ -3182,7 +3183,6 @@
3036 if self['xqcut'] > 0:
3037 if self['ickkw'] == 0:
3038 logger.error('xqcut>0 but ickkw=0. Potentially not fully consistent setup. Be carefull')
3039- import time
3040 time.sleep(5)
3041 if self['drjj'] != 0:
3042 if 'drjj' in self.user_set:
3043@@ -3212,14 +3212,16 @@
3044
3045 # check if lpp =
3046 for i in [1,2]:
3047- if self['lpp%s' % i ] == 3 and self['dsqrt_q2fact%s'%i] > 4:
3048- raise InvalidRunCard( "Photon from electron are using fixed scale value of muf [dsqrt_q2fact%s] as the cut off value of the approximation.\n" % i + \
3049- "For EPA this number should be small (for HERA prediction it should be 2 at most)")
3050- if self['lpp%s' % i ] == 2 and self['dsqrt_q2fact%s'%i] == 91.188:
3051- raise InvalidRunCard("Since 2.7.1 Photon from proton are using fixed scale value of muf [dsqrt_q2fact%s] as the cut of th Improved Weizsaecker-Williams formula. Please edit it accordingly." % i)
3052+ if abs(self['lpp%s' % i ]) in [3,4] and self['dsqrt_q2fact%s'%i] == 91.188:
3053+ logger.warning("Photon from lepton are using fixed scale value of muf [dsqrt_q2fact%s] as the cut of the EPA. Looks like you kept the default value (Mz). Is this really the cut-off of the EPA that you want to use?" % i)
3054+ time.sleep(5)
3055
3056+ if abs(self['lpp%s' % i ]) == 2 and self['dsqrt_q2fact%s'%i] == 91.188:
3057+ logger.warning("Since 2.7.1 Photon from proton are using fixed scale value of muf [dsqrt_q2fact%s] as the cut of the Improved Weizsaecker-Williams formula. Please edit it accordingly." % i)
3058+ time.sleep(5)
3059+
3060 # if both lpp1/2 are on PA mode -> force fixed factorization scale
3061- if self['lpp1'] in [2, 3] and self['lpp2'] in [2, 3] and not self['fixed_fac_scale']:
3062+ if abs(self['lpp1']) in [2, 3,4] and abs(self['lpp2']) in [2, 3,4] and not self['fixed_fac_scale']:
3063 raise InvalidRunCard("Having both beam in elastic photon mode requires fixec_fac_scale to be on True [since this is use as cutoff]")
3064
3065
3066@@ -3293,8 +3295,11 @@
3067 process 1->N all cut set on off.
3068 loop_induced -> MC over helicity
3069 e+ e- beam -> lpp:0 ebeam:500
3070+ P X beam (X: neutrino, lepton, EWA)
3071+ support of EWA beam [ZW] (from proton by default -> 100TeV)
3072 p p beam -> set maxjetflavor automatically
3073 more than one multiplicity: ickkw=1 xqcut=30 use_syst=F
3074+ interference module -> no systematics
3075 """
3076
3077 if proc_characteristic['loop_induced']:
3078@@ -3318,11 +3323,87 @@
3079 beam_id.add(leg['id'])
3080
3081 if any(i in beam_id for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21,22]):
3082- maxjetflavor = max([4]+[abs(i) for i in beam_id if -7< i < 7])
3083+ maxjetflavor = max([3]+[abs(i) for i in beam_id if -7< i < 7])
3084 self['maxjetflavor'] = maxjetflavor
3085 self['asrwgtflavor'] = maxjetflavor
3086
3087- if any(i in beam_id for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21,22]):
3088+ # check EWA case -> for pp at 100TeV or EWA-lepton (1+1 TeV)
3089+ if any(i in beam_id for i in [23,24,-24]):
3090+
3091+ self['use_syst'] = False
3092+ self['nhel'] = 1
3093+
3094+ # check where the W/Z are (on which beam)
3095+ EWA_in1 = any(i in beam_id_split[0] for i in [23,24,-24])
3096+ EWA_in2 = any(i in beam_id_split[1] for i in [23,24,-24])
3097+ p_in1 = any(i in beam_id_split[0] for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21])
3098+ p_in2 = any(i in beam_id_split[1] for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21])
3099+
3100+
3101+ # case1 W W collision
3102+ if EWA_in1 and EWA_in2:
3103+ self['lpp1'] = 2
3104+ self['lpp2'] = 2
3105+ self['ebeam1'] = '50k'
3106+ self['ebeam2'] = '50k'
3107+ # case2 p W collision
3108+ elif p_in1 and EWA_in2:
3109+ self['lpp1'] = 1
3110+ self['lpp2'] = 2
3111+ self['ebeam1'] = '50k'
3112+ self['ebeam2'] = '50k'
3113+ # case3 W p collision
3114+ elif p_in2 and EWA_in1:
3115+ self['lpp1'] = 2
3116+ self['lpp2'] = 1
3117+ self['ebeam1'] = '50k'
3118+ self['ebeam2'] = '50k'
3119+ # case3 W X collision (mainly for X=lepton)
3120+ elif EWA_in1:
3121+ self['ebeam1'] = '1k'
3122+ self['ebeam2'] = '1k'
3123+ if 11 in beam_id_split[1]:
3124+ self['lpp1'] = -3
3125+ self['lpp2'] = 0
3126+ elif -11 in beam_id_split[1]:
3127+ self['lpp1'] = 3
3128+ self['lpp2'] = 0
3129+ elif 13 in beam_id_split[1]:
3130+ self['lpp1'] = -4
3131+ self['lpp2'] = 0
3132+ elif -13 in beam_id_split[1]:
3133+ self['lpp1'] = 4
3134+ self['lpp2'] = 0
3135+ else:
3136+ self['lpp1'] = 0
3137+ self['lpp2'] = 0
3138+ # case3 X W collision (mainly for X=lepton)
3139+ elif EWA_in2:
3140+ self['ebeam1'] = '1k'
3141+ self['ebeam2'] = '1k'
3142+ if 11 in beam_id_split[0]:
3143+ self['lpp1'] = 0
3144+ self['lpp2'] = -3
3145+ elif -11 in beam_id_split[0]:
3146+ self['lpp1'] = 0
3147+ self['lpp2'] = 3
3148+ elif 13 in beam_id_split[0]:
3149+ self['lpp1'] = 0
3150+ self['lpp2'] = -4
3151+ elif -13 in beam_id_split[0]:
3152+ self['lpp1'] = 0
3153+ self['lpp2'] = 4
3154+ else:
3155+ self['lpp1'] = 0
3156+ self['lpp2'] = 0
3157+ # anything else should it happen?
3158+ else:
3159+ self['nhel'] = 1
3160+ self['lpp1'] = 0
3161+ self['lpp2'] = 0
3162+ self['ebeam1'] = '1k'
3163+ self['ebeam2'] = '1k'
3164+ elif any(i in beam_id for i in [1,-1,2,-2,3,-3,4,-4,5,-5,21,22]):
3165 # check for e p collision
3166 if any(id in beam_id for id in [11,-11,13,-13]):
3167 self.display_block.append('beam_pol')
3168@@ -3336,20 +3417,25 @@
3169 self['lpp2'] = 0
3170 self['ebeam1'] = '6500'
3171 self['ebeam2'] = '1k'
3172-
3173- elif 11 in beam_id or -11 in beam_id:
3174+
3175+ elif any(id in beam_id for id in [11,-11,13,-13]):
3176 self['lpp1'] = 0
3177 self['lpp2'] = 0
3178 self['ebeam1'] = 500
3179 self['ebeam2'] = 500
3180 self['use_syst'] = False
3181+ if beam_id_split[0] == beam_id_split[1]:
3182+ self.display_block.append('ecut')
3183 self.display_block.append('beam_pol')
3184- self.display_block.append('ecut')
3185+
3186+ if beam_id_split[0] == beam_id_split[1]:
3187+ self.display_block.append('ecut')
3188 else:
3189 self['lpp1'] = 0
3190 self['lpp2'] = 0
3191 self['use_syst'] = False
3192- self.display_block.append('beam_pol')
3193+ self.display_block.append('beam_pol')
3194+ self.display_block.append('ecut')
3195
3196 # automatic polarisation of the beam if neutrino beam
3197 if any(id in beam_id for id in [12,-12,14,-14,16,-16]):
3198@@ -3358,25 +3444,25 @@
3199 self['lpp1'] = 0
3200 self['ebeam1'] = '1k'
3201 self['polbeam1'] = -100
3202- if not all(id in beam_id_split[0] for id in [12,14,16]):
3203- logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].')
3204+ if not all(id in [12,14,16] for id in beam_id_split[0]):
3205+ logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1]. %s')
3206 elif any(id in beam_id_split[0] for id in [-12,-14,-16]):
3207 self['lpp1'] = 0
3208 self['ebeam1'] = '1k'
3209 self['polbeam1'] = 100
3210- if not all(id in beam_id_split[0] for id in [-12,-14,-16]):
3211+ if not all(id in [-12,-14,-16] for id in beam_id_split[0]):
3212 logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].')
3213 if any(id in beam_id_split[1] for id in [12,14,16]):
3214 self['lpp2'] = 0
3215 self['ebeam2'] = '1k'
3216 self['polbeam2'] = -100
3217- if not all(id in beam_id_split[1] for id in [12,14,16]):
3218+ if not all(id in [12,14,16] for id in beam_id_split[1]):
3219 logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].')
3220 if any(id in beam_id_split[1] for id in [-12,-14,-16]):
3221 self['lpp2'] = 0
3222 self['ebeam2'] = '1k'
3223 self['polbeam2'] = 100
3224- if not all(id in beam_id_split[1] for id in [-12,-14,-16]):
3225+ if not all(id in [-12,-14,-16] for id in beam_id_split[1]):
3226 logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].')
3227
3228 # Check if need matching
3229@@ -4285,7 +4371,7 @@
3230 maxjetflavor = max([4]+[abs(i) for i in beam_id if -7< i < 7])
3231 self['maxjetflavor'] = maxjetflavor
3232 pass
3233- elif 11 in beam_id or -11 in beam_id:
3234+ elif any(id in beam_id for id in [11,-11,13,-13]):
3235 self['lpp1'] = 0
3236 self['lpp2'] = 0
3237 self['ebeam1'] = 500
3238
3239=== modified file 'madgraph/various/cluster.py'
3240--- madgraph/various/cluster.py 2017-11-17 14:15:01 +0000
3241+++ madgraph/various/cluster.py 2020-08-13 08:01:43 +0000
3242@@ -87,6 +87,7 @@
3243 """Basic Class for all cluster type submission"""
3244 name = 'mother class'
3245 identifier_length = 14
3246+ allow_arrays = False
3247
3248 def __init__(self,*args, **opts):
3249 """Init the cluster"""
3250@@ -97,6 +98,8 @@
3251 self.submitted_dirs = [] #HTCaaS
3252 self.submitted_exes = [] #HTCaaS
3253 self.submitted_args = [] #HTCaaS
3254+ self.waiting_array_job = [] # for job array submission
3255+
3256
3257 if 'cluster_queue' in opts:
3258 self.cluster_queue = opts['cluster_queue']
3259@@ -122,7 +125,6 @@
3260 """How to make one submission. Return status id on the cluster."""
3261 raise NotImplemented, 'No implementation of how to submit a job to cluster \'%s\'' % self.name
3262
3263-
3264 @store_input()
3265 def submit2(self, prog, argument=[], cwd=None, stdout=None, stderr=None,
3266 log=None, input_files=[], output_files=[], required_output=[],
3267@@ -199,10 +201,15 @@
3268
3269 def cluster_submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None,
3270 log=None, input_files=[], output_files=[], required_output=[],
3271- nb_submit=0, packet_member=None):
3272+ nb_submit=0, packet_member=None, allow_array=False):
3273 """This function wrap the cluster submition with cluster independant
3274 method should not be overwritten (but for DAG type submission)"""
3275-
3276+
3277+ if allow_array and self.allow_array:
3278+ self.add_into_array(prog, argument, cwd, stdout, stderr, log, input_files,
3279+ output_files, required_output, nb_submit)
3280+ return None
3281+
3282 id = self.submit2(prog, argument, cwd, stdout, stderr, log, input_files,
3283 output_files, required_output, nb_submit)
3284
3285@@ -458,7 +465,27 @@
3286 self.submit2(**args)
3287 return 'resubmit'
3288 return 'done'
3289-
3290+
3291+ def add_into_array(self,*args, **opts):
3292+ """ """
3293+ raise NotImplemented, 'No implementation of how to submit with a job array to cluster \'%s\'' % self.name
3294+
3295+ def submit_array(self, list_of_args):
3296+ """ """
3297+ raise NotImplemented, 'No implementation of how to submit with a job array to cluster \'%s\'' % self.name
3298+
3299+
3300+ def release_array(self):
3301+
3302+ if not self.allow_arrays:
3303+ if self.waiting_array_jobs:
3304+ raise NotImplemented, 'No implementation of how to submit with a job array to cluster \'%s\'' % self.name
3305+ return None
3306+ elif self.waiting_array_jobs:
3307+ return self.submit_array(self.waiting_array_jobs)
3308+ else:
3309+ return None
3310+
3311 @check_interupt()
3312 def launch_and_wait(self, prog, argument=[], cwd=None, stdout=None,
3313 stderr=None, log=None, required_output=[], nb_submit=0,
3314@@ -1648,6 +1675,7 @@
3315 running_tag = ['R', 'CG']
3316 complete_tag = ['C']
3317 identifier_length = 8
3318+ allow_arrays = True
3319
3320 @multiple_try()
3321 def submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None,
3322@@ -1692,6 +1720,42 @@
3323 self.submitted_ids.append(id)
3324 return id
3325
3326+ def add_into_array(prog, argument, cwd, stdout, stderr, log, input_files,
3327+ output_files, required_output, nb_submit):
3328+
3329+ self.waiting_array_job.append((prog, argument, cwd, stdout, stderr, log, input_files,
3330+ output_files, required_output, nb_submit))
3331+
3332+
3333+ def submit_array(self, waiting_array_jobs):
3334+ """write a temporary file in order to submit an array of jobs"""
3335+
3336+ for arg in waiting_array_jobs):
3337+ print( arg)
3338+ misc.sprint(waiting_array_jobs)
3339+ template= """
3340+#SBATCH --job-name=%(job_name)s # Job name
3341+#SBATCH --mail-type=NONE # Mail events (NONE, BEGIN, END, FAIL, ALL)
3342+#SBATCH --mail-user=gatorlink@ufl.edu # Where to send mail
3343+#SBATCH --nodes=1 # Use one node
3344+#SBATCH --ntasks=1 # Run a single task
3345+#SBATCH --output=array_%A-%a.out # Standard output and error log
3346+#SBATCH --array=1-5 # Array range
3347+ """
3348+
3349+ import os
3350+ import tempfile
3351+
3352+ fd, path = tempfile.mkstemp()
3353+ try:
3354+ with os.fdopen(fd, 'w') as tmp:
3355+ # do stuff with temp file
3356+ tmp.write('stuff')
3357+ finally:
3358+ os.remove(path)
3359+
3360+
3361+
3362 @multiple_try()
3363 def control_one_job(self, id):
3364 """ control the status of a single job with it's cluster id """
3365
3366=== modified file 'mg5decay/decay_objects.py'
3367--- mg5decay/decay_objects.py 2018-06-01 08:46:21 +0000
3368+++ mg5decay/decay_objects.py 2020-08-13 08:01:43 +0000
3369@@ -4086,15 +4086,28 @@
3370 # Evaluate the coupling strength
3371 vertex = model.get('interaction_dict')[abs(vert.get('id'))]
3372 lorentz_factor = 0
3373+
3374+ for fct in model['functions']:
3375+ if ';' in fct.expr:
3376+ raise Exception('; is not allowed in function_library')
3377+ exec("mdl_%s = lambda %s: %s" %(fct.name, ','.join( fct.arguments), fct.expr))
3378+ exec("%s = lambda %s: %s" %(fct.name, ','.join( fct.arguments), fct.expr))
3379+
3380 for key, v in vertex['couplings'].items():
3381 if not hasattr(model, 'lorentz_dict'):
3382 model.lorentz_dict = dict([(l.name, l) for l in model['lorentz']])
3383 self.init_regular_expression()
3384+
3385+ lorentz = model.lorentz_dict[vertex['lorentz'][key[1]]]
3386+ structure = lorentz.structure
3387+ if hasattr(lorentz, 'formfactors') and lorentz.formfactors:
3388+ for ff in lorentz.formfactors:
3389+ structure = structure.replace(ff.name, '(%s)' % ff.value)
3390
3391- structure = model.lorentz_dict[vertex['lorentz'][key[1]]].structure
3392 new_structure = self.lor_pattern.sub(self.simplify_lorentz,
3393 structure)
3394- lor_value = eval(new_structure % q_dict_lor)
3395+
3396+ lor_value = eval(new_structure % q_dict_lor, locals(), globals())
3397 if lor_value == 0:
3398 new_structure = new_structure.replace('-','+')
3399 lor_value = eval(new_structure % q_dict_lor)
3400@@ -4131,6 +4144,12 @@
3401 # A quick estimate of the next-level decay of a off-shell decay
3402 # Consider all legs are onshell.
3403 else:
3404+ for fct in model['functions']:
3405+ if ';' in fct.expr:
3406+ raise Exception('; is not allowed in function_library')
3407+ exec("mdl_%s = lambda %s: %s" %(fct.name, ','.join( fct.arguments), fct.expr))
3408+ exec("%s = lambda %s: %s" %(fct.name, ','.join( fct.arguments), fct.expr))
3409+
3410 M = abs(eval(ini_part.get('mass')))
3411 # The avg_E is lower by one more particle in the next-level.
3412 avg_E = (M/(len(self.get_final_legs())+1.))
3413
3414=== modified file 'tests/acceptance_tests/test_cmd_reweight.py'
3415--- tests/acceptance_tests/test_cmd_reweight.py 2020-06-20 21:10:10 +0000
3416+++ tests/acceptance_tests/test_cmd_reweight.py 2020-08-13 08:01:43 +0000
3417@@ -212,8 +212,12 @@
3418 ff = open(pjoin(self.run_dir, 'Cards', 'reweight_card.dat'),'w')
3419 ff.write(cmd_lines)
3420 ff.close()
3421-
3422- with misc.stdchannel_redirected(sys.stdout, os.devnull):
3423+ mad_logger = logging.getLogger('madgraph')
3424+
3425+ if mad_logger.level > 20:
3426+ with misc.stdchannel_redirected(sys.stdout, os.devnull):
3427+ me_cmd.run_cmd('reweight run_01 --from_cards')
3428+ else:
3429 me_cmd.run_cmd('reweight run_01 --from_cards')
3430
3431 lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz'))
3432@@ -242,9 +246,12 @@
3433 ff.write(cmd_lines)
3434 ff.close()
3435
3436- if 1: #with misc.stdchannel_redirected(sys.stdout, os.devnull):
3437+ mad_logger = logging.getLogger('madgraph')
3438+ if mad_logger.level > 20:
3439+ with misc.stdchannel_redirected(sys.stdout, os.devnull):
3440+ me_cmd.run_cmd('reweight run_01 --from_cards')
3441+ else:
3442 me_cmd.run_cmd('reweight run_01 --from_cards')
3443-
3444 #solutions = [41.511565, 41.930505, 41.511565, 41.511565, 41.586169, 41.511565, 41.511565, 41.511565, 41.511565, 42.046806, 41.511565, 44.164503, 41.511565, -41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.778368, 41.511565, 42.05448, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 42.115494, 41.511854, 41.511567, 41.511565, 42.00028, 42.120605, 41.514867, -41.511565, 41.511565, 45.125706, 41.511565, 42.180208, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.997509, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.513926, 41.511565, 41.882499, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 47.532736, 41.511565, 41.809063, 41.511565, 41.511565, 41.511565, 41.927695, 41.511565, 41.511565, 41.555692, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, -41.511565, 41.511565, 42.029675, 41.725129, 41.511565, 41.511565, 41.511778, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 42.050439, 41.511565, 41.511565, 41.511565, -41.511565, 42.071105, 41.511565, 41.511565]
3445 solutions = [41.511565, 41.75164, 41.511565, 41.511565, 41.557009, 41.511565, 41.511565, 41.511565, 41.511565, 41.759881, 41.511565, 44.717244, 41.511565, -41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 42.041827, 41.511565, 41.663092, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.920917, 41.511736, 41.511566, 41.511565, 205.29791, 42.538389, 41.513573, -41.511565, 41.511565, 44.650974, 41.511565, 42.549187, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.431553, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.513265, 41.511565, 43.902643, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 8853.0397, 41.511565, 333.38491, 41.511565, 41.511565, 41.511565, 75.701362, 41.511565, 41.511565, 41.54695, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, -41.511565, 41.511565, 41.454923, 41.53984, 41.511565, 41.511565, 41.511743, 41.511565, 41.511565, 41.511565, 41.511565, 41.511565, 41.732627, 41.511565, 41.511565, 41.511565, -41.511565, 41.395865, 41.511565, 41.511565]
3446 lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'rwgt_events_tree_rwgt_1.lhe.gz'))
3447
3448=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f'
3449--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2020-06-20 21:10:10 +0000
3450+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2020-08-13 08:01:43 +0000
3451@@ -2553,11 +2553,14 @@
3452 PARAMETER (NEXTERNAL=3)
3453 INTEGER NSQUAREDSO
3454 PARAMETER (NSQUAREDSO=1)
3455+ INCLUDE 'nsqso_born.inc'
3456 C
3457 C ARGUMENTS
3458 C
3459 REAL*8 P(0:3,NEXTERNAL)
3460- REAL*8 ANS(0:3,0:NSQUAREDSO)
3461+ INTEGER ANS_DIMENSION
3462+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3463+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3464 INTEGER HEL, USERHEL
3465 COMMON/USERCHOICE/USERHEL
3466 C ----------
3467@@ -2581,7 +2584,10 @@
3468 C ARGUMENTS
3469 C
3470 REAL*8 P(0:3,NEXTERNAL)
3471- REAL*8 ANS(0:3,0:NSQUAREDSO)
3472+ INCLUDE 'nsqso_born.inc'
3473+ INTEGER ANS_DIMENSION
3474+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3475+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3476 INTEGER HEL, RET_CODE
3477 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3478 C
3479@@ -2698,7 +2704,10 @@
3480 C ARGUMENTS
3481 C
3482 REAL*8 P(0:3,NEXTERNAL)
3483- REAL*8 ANS(0:3,0:NSQUAREDSO)
3484+ INCLUDE 'nsqso_born.inc'
3485+ INTEGER ANS_DIMENSION
3486+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3487+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3488 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3489 INTEGER RET_CODE
3490 C
3491
3492=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f'
3493--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2020-06-20 21:10:10 +0000
3494+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2020-08-13 08:01:43 +0000
3495@@ -2553,11 +2553,14 @@
3496 PARAMETER (NEXTERNAL=3)
3497 INTEGER NSQUAREDSO
3498 PARAMETER (NSQUAREDSO=1)
3499+ INCLUDE 'nsqso_born.inc'
3500 C
3501 C ARGUMENTS
3502 C
3503 REAL*8 P(0:3,NEXTERNAL)
3504- REAL*8 ANS(0:3,0:NSQUAREDSO)
3505+ INTEGER ANS_DIMENSION
3506+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3507+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3508 INTEGER HEL, USERHEL
3509 COMMON/USERCHOICE/USERHEL
3510 C ----------
3511@@ -2581,7 +2584,10 @@
3512 C ARGUMENTS
3513 C
3514 REAL*8 P(0:3,NEXTERNAL)
3515- REAL*8 ANS(0:3,0:NSQUAREDSO)
3516+ INCLUDE 'nsqso_born.inc'
3517+ INTEGER ANS_DIMENSION
3518+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3519+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3520 INTEGER HEL, RET_CODE
3521 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3522 C
3523@@ -2698,7 +2704,10 @@
3524 C ARGUMENTS
3525 C
3526 REAL*8 P(0:3,NEXTERNAL)
3527- REAL*8 ANS(0:3,0:NSQUAREDSO)
3528+ INCLUDE 'nsqso_born.inc'
3529+ INTEGER ANS_DIMENSION
3530+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3531+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3532 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3533 INTEGER RET_CODE
3534 C
3535
3536=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/auto_dsig.f'
3537--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/auto_dsig.f 2019-06-17 21:29:56 +0000
3538+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/auto_dsig.f 2020-08-13 08:01:43 +0000
3539@@ -174,3 +174,33 @@
3540
3541
3542
3543+
3544+ INTEGER FUNCTION GET_NHEL1(HEL, IPART)
3545+ IMPLICIT NONE
3546+ INTEGER HEL,I, IPART
3547+ INCLUDE 'nexternal.inc'
3548+ INTEGER ONE_NHEL(NEXTERNAL)
3549+ INTEGER NCOMB
3550+ PARAMETER ( NCOMB=16)
3551+ INTEGER NHEL(NEXTERNAL,NCOMB)
3552+ DATA (NHEL(I, 1),I=1,4) / 1,-1,-1, 1/
3553+ DATA (NHEL(I, 2),I=1,4) / 1,-1,-1,-1/
3554+ DATA (NHEL(I, 3),I=1,4) / 1,-1, 1, 1/
3555+ DATA (NHEL(I, 4),I=1,4) / 1,-1, 1,-1/
3556+ DATA (NHEL(I, 5),I=1,4) / 1, 1,-1, 1/
3557+ DATA (NHEL(I, 6),I=1,4) / 1, 1,-1,-1/
3558+ DATA (NHEL(I, 7),I=1,4) / 1, 1, 1, 1/
3559+ DATA (NHEL(I, 8),I=1,4) / 1, 1, 1,-1/
3560+ DATA (NHEL(I, 9),I=1,4) /-1,-1,-1, 1/
3561+ DATA (NHEL(I, 10),I=1,4) /-1,-1,-1,-1/
3562+ DATA (NHEL(I, 11),I=1,4) /-1,-1, 1, 1/
3563+ DATA (NHEL(I, 12),I=1,4) /-1,-1, 1,-1/
3564+ DATA (NHEL(I, 13),I=1,4) /-1, 1,-1, 1/
3565+ DATA (NHEL(I, 14),I=1,4) /-1, 1,-1,-1/
3566+ DATA (NHEL(I, 15),I=1,4) /-1, 1, 1, 1/
3567+ DATA (NHEL(I, 16),I=1,4) /-1, 1, 1,-1/
3568+
3569+ GET_NHEL1 = NHEL(IPART, HEL)
3570+ RETURN
3571+ END
3572+
3573
3574=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f'
3575--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f 2020-06-20 21:10:10 +0000
3576+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f 2020-08-13 08:01:43 +0000
3577@@ -150,6 +150,7 @@
3578 $ .LE.MAXTRIES.OR.(ISUM_HEL.NE.0).OR.THIS_NTRY(IMIRROR).LE.2)
3579 $ THEN
3580 T=MATRIX1(P ,NHEL(1,I),JC(1))
3581+
3582 DO JJ=1,NINCOMING
3583 IF(POL(JJ).NE.1D0.AND.NHEL(JJ,I).EQ.INT(SIGN(1D0,POL(JJ))
3584 $ )) THEN
3585@@ -158,6 +159,7 @@
3586 T=T*(2D0-ABS(POL(JJ)))*NB_SPIN_STATE_IN(JJ)/2D0
3587 ENDIF
3588 ENDDO
3589+
3590 IF (ISUM_HEL.NE.0.AND.DS_GET_DIM_STATUS('Helicity')
3591 $ .EQ.0.AND.ALLOW_HELICITY_GRID_ENTRIES) THEN
3592 CALL DS_ADD_ENTRY('Helicity',I,T)
3593@@ -216,6 +218,7 @@
3594 T=T*(2D0-ABS(POL(JJ)))
3595 ENDIF
3596 ENDDO
3597+
3598 C Always one helicity at a time
3599 ANS = T
3600 C Include the Jacobian from helicity sampling
3601
3602=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f'
3603--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f 2020-01-19 16:22:42 +0000
3604+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f 2020-08-13 08:01:43 +0000
3605@@ -595,6 +595,12 @@
3606
3607
3608
3609-
3610-
3611+ INTEGER FUNCTION GET_NHEL(HEL, PARTID)
3612+ IMPLICIT NONE
3613+ INTEGER HEL, PARTID
3614+ WRITE(*,*) 'do not support this type of pdf with'
3615+ $ //' group_subprocess=True'
3616+ STOP 1
3617+ RETURN
3618+ END
3619
3620
3621=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/auto_dsig.f'
3622--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/auto_dsig.f 2019-06-17 21:29:56 +0000
3623+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/auto_dsig.f 2020-08-13 08:01:43 +0000
3624@@ -221,3 +221,33 @@
3625
3626
3627
3628+
3629+ INTEGER FUNCTION GET_NHEL(HEL, IPART)
3630+ IMPLICIT NONE
3631+ INTEGER HEL,I, IPART
3632+ INCLUDE 'nexternal.inc'
3633+ INTEGER ONE_NHEL(NEXTERNAL)
3634+ INTEGER NCOMB
3635+ PARAMETER ( NCOMB=16)
3636+ INTEGER NHEL(NEXTERNAL,NCOMB)
3637+ DATA (NHEL(I, 1),I=1,4) / 1,-1,-1,-1/
3638+ DATA (NHEL(I, 2),I=1,4) / 1,-1,-1, 1/
3639+ DATA (NHEL(I, 3),I=1,4) / 1,-1, 1,-1/
3640+ DATA (NHEL(I, 4),I=1,4) / 1,-1, 1, 1/
3641+ DATA (NHEL(I, 5),I=1,4) / 1, 1,-1,-1/
3642+ DATA (NHEL(I, 6),I=1,4) / 1, 1,-1, 1/
3643+ DATA (NHEL(I, 7),I=1,4) / 1, 1, 1,-1/
3644+ DATA (NHEL(I, 8),I=1,4) / 1, 1, 1, 1/
3645+ DATA (NHEL(I, 9),I=1,4) /-1,-1,-1,-1/
3646+ DATA (NHEL(I, 10),I=1,4) /-1,-1,-1, 1/
3647+ DATA (NHEL(I, 11),I=1,4) /-1,-1, 1,-1/
3648+ DATA (NHEL(I, 12),I=1,4) /-1,-1, 1, 1/
3649+ DATA (NHEL(I, 13),I=1,4) /-1, 1,-1,-1/
3650+ DATA (NHEL(I, 14),I=1,4) /-1, 1,-1, 1/
3651+ DATA (NHEL(I, 15),I=1,4) /-1, 1, 1,-1/
3652+ DATA (NHEL(I, 16),I=1,4) /-1, 1, 1, 1/
3653+
3654+ GET_NHEL = NHEL(IPART, HEL)
3655+ RETURN
3656+ END
3657+
3658
3659=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f'
3660--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f 2020-06-20 21:10:10 +0000
3661+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f 2020-08-13 08:01:43 +0000
3662@@ -122,6 +122,7 @@
3663 IF (GOODHEL(I) .OR. NTRY .LE. MAXTRIES.OR.(ISUM_HEL.NE.0))
3664 $ THEN
3665 T=MATRIX(P ,NHEL(1,I),JC(1))
3666+
3667 DO JJ=1,NINCOMING
3668 IF(POL(JJ).NE.1D0.AND.NHEL(JJ,I).EQ.INT(SIGN(1D0,POL(JJ))
3669 $ )) THEN
3670@@ -130,6 +131,7 @@
3671 T=T*(2D0-ABS(POL(JJ)))*NB_SPIN_STATE(JJ)/2D0
3672 ENDIF
3673 ENDDO
3674+
3675 IF (ISUM_HEL.NE.0) THEN
3676 CALL DS_ADD_ENTRY('Helicity',I,T)
3677 ENDIF
3678@@ -175,6 +177,7 @@
3679 I = HEL_PICKED
3680
3681 T=MATRIX(P ,NHEL(1,I),JC(1))
3682+
3683 DO JJ=1,NINCOMING
3684 IF(POL(JJ).NE.1D0.AND.NHEL(JJ,I).EQ.INT(SIGN(1D0,POL(JJ))))
3685 $ THEN
3686@@ -183,6 +186,7 @@
3687 T=T*(2D0-ABS(POL(JJ)))
3688 ENDIF
3689 ENDDO
3690+
3691 C Always one helicity at a time
3692 ANS = T
3693 C Include the Jacobian from helicity sampling
3694
3695=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f'
3696--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2020-06-20 21:10:10 +0000
3697+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2020-08-13 08:01:43 +0000
3698@@ -2630,11 +2630,14 @@
3699 PARAMETER (NEXTERNAL=4)
3700 INTEGER NSQUAREDSO
3701 PARAMETER (NSQUAREDSO=3)
3702+ INCLUDE 'nsqso_born.inc'
3703 C
3704 C ARGUMENTS
3705 C
3706 REAL*8 P(0:3,NEXTERNAL)
3707- REAL*8 ANS(0:3,0:NSQUAREDSO)
3708+ INTEGER ANS_DIMENSION
3709+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3710+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3711 INTEGER HEL, USERHEL
3712 COMMON/ML5_0_USERCHOICE/USERHEL
3713 C ----------
3714@@ -2658,7 +2661,10 @@
3715 C ARGUMENTS
3716 C
3717 REAL*8 P(0:3,NEXTERNAL)
3718- REAL*8 ANS(0:3,0:NSQUAREDSO)
3719+ INCLUDE 'nsqso_born.inc'
3720+ INTEGER ANS_DIMENSION
3721+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3722+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3723 INTEGER HEL, RET_CODE
3724 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3725 C
3726@@ -2775,7 +2781,10 @@
3727 C ARGUMENTS
3728 C
3729 REAL*8 P(0:3,NEXTERNAL)
3730- REAL*8 ANS(0:3,0:NSQUAREDSO)
3731+ INCLUDE 'nsqso_born.inc'
3732+ INTEGER ANS_DIMENSION
3733+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3734+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3735 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3736 INTEGER RET_CODE
3737 C
3738
3739=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f'
3740--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f 2020-06-20 21:10:10 +0000
3741+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f 2020-08-13 08:01:43 +0000
3742@@ -2801,11 +2801,14 @@
3743 PARAMETER (NEXTERNAL=4)
3744 INTEGER NSQUAREDSO
3745 PARAMETER (NSQUAREDSO=3)
3746+ INCLUDE 'nsqso_born.inc'
3747 C
3748 C ARGUMENTS
3749 C
3750 REAL*8 P(0:3,NEXTERNAL)
3751- REAL*8 ANS(0:3,0:NSQUAREDSO)
3752+ INTEGER ANS_DIMENSION
3753+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3754+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3755 INTEGER HEL, USERHEL
3756 COMMON/ML5_0_USERCHOICE/USERHEL
3757 C ----------
3758@@ -2829,7 +2832,10 @@
3759 C ARGUMENTS
3760 C
3761 REAL*8 P(0:3,NEXTERNAL)
3762- REAL*8 ANS(0:3,0:NSQUAREDSO)
3763+ INCLUDE 'nsqso_born.inc'
3764+ INTEGER ANS_DIMENSION
3765+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3766+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3767 INTEGER HEL, RET_CODE
3768 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3769 C
3770@@ -2946,7 +2952,10 @@
3771 C ARGUMENTS
3772 C
3773 REAL*8 P(0:3,NEXTERNAL)
3774- REAL*8 ANS(0:3,0:NSQUAREDSO)
3775+ INCLUDE 'nsqso_born.inc'
3776+ INTEGER ANS_DIMENSION
3777+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3778+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3779 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3780 INTEGER RET_CODE
3781 C
3782
3783=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f'
3784--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f 2020-06-20 21:10:10 +0000
3785+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f 2020-08-13 08:01:43 +0000
3786@@ -2567,11 +2567,14 @@
3787 PARAMETER (NEXTERNAL=4)
3788 INTEGER NSQUAREDSO
3789 PARAMETER (NSQUAREDSO=1)
3790+ INCLUDE 'nsqso_born.inc'
3791 C
3792 C ARGUMENTS
3793 C
3794 REAL*8 P(0:3,NEXTERNAL)
3795- REAL*8 ANS(0:3,0:NSQUAREDSO)
3796+ INTEGER ANS_DIMENSION
3797+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3798+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3799 INTEGER HEL, USERHEL
3800 COMMON/ML5_0_USERCHOICE/USERHEL
3801 C ----------
3802@@ -2595,7 +2598,10 @@
3803 C ARGUMENTS
3804 C
3805 REAL*8 P(0:3,NEXTERNAL)
3806- REAL*8 ANS(0:3,0:NSQUAREDSO)
3807+ INCLUDE 'nsqso_born.inc'
3808+ INTEGER ANS_DIMENSION
3809+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3810+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3811 INTEGER HEL, RET_CODE
3812 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3813 C
3814@@ -2712,7 +2718,10 @@
3815 C ARGUMENTS
3816 C
3817 REAL*8 P(0:3,NEXTERNAL)
3818- REAL*8 ANS(0:3,0:NSQUAREDSO)
3819+ INCLUDE 'nsqso_born.inc'
3820+ INTEGER ANS_DIMENSION
3821+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3822+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3823 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3824 INTEGER RET_CODE
3825 C
3826
3827=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f'
3828--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f 2020-06-20 21:10:10 +0000
3829+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f 2020-08-13 08:01:43 +0000
3830@@ -2817,11 +2817,14 @@
3831 PARAMETER (NEXTERNAL=4)
3832 INTEGER NSQUAREDSO
3833 PARAMETER (NSQUAREDSO=4)
3834+ INCLUDE 'nsqso_born.inc'
3835 C
3836 C ARGUMENTS
3837 C
3838 REAL*8 P(0:3,NEXTERNAL)
3839- REAL*8 ANS(0:3,0:NSQUAREDSO)
3840+ INTEGER ANS_DIMENSION
3841+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3842+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3843 INTEGER HEL, USERHEL
3844 COMMON/ML5_0_USERCHOICE/USERHEL
3845 C ----------
3846@@ -2845,7 +2848,10 @@
3847 C ARGUMENTS
3848 C
3849 REAL*8 P(0:3,NEXTERNAL)
3850- REAL*8 ANS(0:3,0:NSQUAREDSO)
3851+ INCLUDE 'nsqso_born.inc'
3852+ INTEGER ANS_DIMENSION
3853+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3854+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3855 INTEGER HEL, RET_CODE
3856 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3857 C
3858@@ -2962,7 +2968,10 @@
3859 C ARGUMENTS
3860 C
3861 REAL*8 P(0:3,NEXTERNAL)
3862- REAL*8 ANS(0:3,0:NSQUAREDSO)
3863+ INCLUDE 'nsqso_born.inc'
3864+ INTEGER ANS_DIMENSION
3865+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3866+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3867 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3868 INTEGER RET_CODE
3869 C
3870
3871=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f'
3872--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f 2020-06-20 21:10:10 +0000
3873+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f 2020-08-13 08:01:43 +0000
3874@@ -2801,11 +2801,14 @@
3875 PARAMETER (NEXTERNAL=4)
3876 INTEGER NSQUAREDSO
3877 PARAMETER (NSQUAREDSO=3)
3878+ INCLUDE 'nsqso_born.inc'
3879 C
3880 C ARGUMENTS
3881 C
3882 REAL*8 P(0:3,NEXTERNAL)
3883- REAL*8 ANS(0:3,0:NSQUAREDSO)
3884+ INTEGER ANS_DIMENSION
3885+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3886+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3887 INTEGER HEL, USERHEL
3888 COMMON/ML5_0_USERCHOICE/USERHEL
3889 C ----------
3890@@ -2829,7 +2832,10 @@
3891 C ARGUMENTS
3892 C
3893 REAL*8 P(0:3,NEXTERNAL)
3894- REAL*8 ANS(0:3,0:NSQUAREDSO)
3895+ INCLUDE 'nsqso_born.inc'
3896+ INTEGER ANS_DIMENSION
3897+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3898+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3899 INTEGER HEL, RET_CODE
3900 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3901 C
3902@@ -2946,7 +2952,10 @@
3903 C ARGUMENTS
3904 C
3905 REAL*8 P(0:3,NEXTERNAL)
3906- REAL*8 ANS(0:3,0:NSQUAREDSO)
3907+ INCLUDE 'nsqso_born.inc'
3908+ INTEGER ANS_DIMENSION
3909+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3910+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3911 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3912 INTEGER RET_CODE
3913 C
3914
3915=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f'
3916--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f 2020-06-20 21:10:10 +0000
3917+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f 2020-08-13 08:01:43 +0000
3918@@ -2630,11 +2630,14 @@
3919 PARAMETER (NEXTERNAL=4)
3920 INTEGER NSQUAREDSO
3921 PARAMETER (NSQUAREDSO=3)
3922+ INCLUDE 'nsqso_born.inc'
3923 C
3924 C ARGUMENTS
3925 C
3926 REAL*8 P(0:3,NEXTERNAL)
3927- REAL*8 ANS(0:3,0:NSQUAREDSO)
3928+ INTEGER ANS_DIMENSION
3929+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3930+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3931 INTEGER HEL, USERHEL
3932 COMMON/ML5_0_USERCHOICE/USERHEL
3933 C ----------
3934@@ -2658,7 +2661,10 @@
3935 C ARGUMENTS
3936 C
3937 REAL*8 P(0:3,NEXTERNAL)
3938- REAL*8 ANS(0:3,0:NSQUAREDSO)
3939+ INCLUDE 'nsqso_born.inc'
3940+ INTEGER ANS_DIMENSION
3941+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3942+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3943 INTEGER HEL, RET_CODE
3944 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3945 C
3946@@ -2775,7 +2781,10 @@
3947 C ARGUMENTS
3948 C
3949 REAL*8 P(0:3,NEXTERNAL)
3950- REAL*8 ANS(0:3,0:NSQUAREDSO)
3951+ INCLUDE 'nsqso_born.inc'
3952+ INTEGER ANS_DIMENSION
3953+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3954+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3955 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3956 INTEGER RET_CODE
3957 C
3958
3959=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f'
3960--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f 2020-06-20 21:10:10 +0000
3961+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f 2020-08-13 08:01:43 +0000
3962@@ -2567,11 +2567,14 @@
3963 PARAMETER (NEXTERNAL=4)
3964 INTEGER NSQUAREDSO
3965 PARAMETER (NSQUAREDSO=1)
3966+ INCLUDE 'nsqso_born.inc'
3967 C
3968 C ARGUMENTS
3969 C
3970 REAL*8 P(0:3,NEXTERNAL)
3971- REAL*8 ANS(0:3,0:NSQUAREDSO)
3972+ INTEGER ANS_DIMENSION
3973+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3974+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3975 INTEGER HEL, USERHEL
3976 COMMON/ML5_0_USERCHOICE/USERHEL
3977 C ----------
3978@@ -2595,7 +2598,10 @@
3979 C ARGUMENTS
3980 C
3981 REAL*8 P(0:3,NEXTERNAL)
3982- REAL*8 ANS(0:3,0:NSQUAREDSO)
3983+ INCLUDE 'nsqso_born.inc'
3984+ INTEGER ANS_DIMENSION
3985+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3986+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3987 INTEGER HEL, RET_CODE
3988 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
3989 C
3990@@ -2712,7 +2718,10 @@
3991 C ARGUMENTS
3992 C
3993 REAL*8 P(0:3,NEXTERNAL)
3994- REAL*8 ANS(0:3,0:NSQUAREDSO)
3995+ INCLUDE 'nsqso_born.inc'
3996+ INTEGER ANS_DIMENSION
3997+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
3998+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
3999 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4000 INTEGER RET_CODE
4001 C
4002
4003=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f'
4004--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f 2020-06-20 21:10:10 +0000
4005+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f 2020-08-13 08:01:43 +0000
4006@@ -2565,11 +2565,14 @@
4007 PARAMETER (NEXTERNAL=4)
4008 INTEGER NSQUAREDSO
4009 PARAMETER (NSQUAREDSO=1)
4010+ INCLUDE 'nsqso_born.inc'
4011 C
4012 C ARGUMENTS
4013 C
4014 REAL*8 P(0:3,NEXTERNAL)
4015- REAL*8 ANS(0:3,0:NSQUAREDSO)
4016+ INTEGER ANS_DIMENSION
4017+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4018+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4019 INTEGER HEL, USERHEL
4020 COMMON/ML5_0_USERCHOICE/USERHEL
4021 C ----------
4022@@ -2593,7 +2596,10 @@
4023 C ARGUMENTS
4024 C
4025 REAL*8 P(0:3,NEXTERNAL)
4026- REAL*8 ANS(0:3,0:NSQUAREDSO)
4027+ INCLUDE 'nsqso_born.inc'
4028+ INTEGER ANS_DIMENSION
4029+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4030+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4031 INTEGER HEL, RET_CODE
4032 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4033 C
4034@@ -2710,7 +2716,10 @@
4035 C ARGUMENTS
4036 C
4037 REAL*8 P(0:3,NEXTERNAL)
4038- REAL*8 ANS(0:3,0:NSQUAREDSO)
4039+ INCLUDE 'nsqso_born.inc'
4040+ INTEGER ANS_DIMENSION
4041+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4042+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4043 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4044 INTEGER RET_CODE
4045 C
4046
4047=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f'
4048--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f 2020-06-20 21:10:10 +0000
4049+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f 2020-08-13 08:01:43 +0000
4050@@ -2584,11 +2584,14 @@
4051 PARAMETER (NEXTERNAL=4)
4052 INTEGER NSQUAREDSO
4053 PARAMETER (NSQUAREDSO=1)
4054+ INCLUDE 'nsqso_born.inc'
4055 C
4056 C ARGUMENTS
4057 C
4058 REAL*8 P(0:3,NEXTERNAL)
4059- REAL*8 ANS(0:3,0:NSQUAREDSO)
4060+ INTEGER ANS_DIMENSION
4061+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4062+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4063 INTEGER HEL, USERHEL
4064 COMMON/ML5_0_USERCHOICE/USERHEL
4065 C ----------
4066@@ -2612,7 +2615,10 @@
4067 C ARGUMENTS
4068 C
4069 REAL*8 P(0:3,NEXTERNAL)
4070- REAL*8 ANS(0:3,0:NSQUAREDSO)
4071+ INCLUDE 'nsqso_born.inc'
4072+ INTEGER ANS_DIMENSION
4073+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4074+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4075 INTEGER HEL, RET_CODE
4076 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4077 C
4078@@ -2729,7 +2735,10 @@
4079 C ARGUMENTS
4080 C
4081 REAL*8 P(0:3,NEXTERNAL)
4082- REAL*8 ANS(0:3,0:NSQUAREDSO)
4083+ INCLUDE 'nsqso_born.inc'
4084+ INTEGER ANS_DIMENSION
4085+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4086+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4087 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4088 INTEGER RET_CODE
4089 C
4090
4091=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f'
4092--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2020-06-20 21:10:10 +0000
4093+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2020-08-13 08:01:43 +0000
4094@@ -2574,11 +2574,14 @@
4095 PARAMETER (NEXTERNAL=4)
4096 INTEGER NSQUAREDSO
4097 PARAMETER (NSQUAREDSO=1)
4098+ INCLUDE 'nsqso_born.inc'
4099 C
4100 C ARGUMENTS
4101 C
4102 REAL*8 P(0:3,NEXTERNAL)
4103- REAL*8 ANS(0:3,0:NSQUAREDSO)
4104+ INTEGER ANS_DIMENSION
4105+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4106+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4107 INTEGER HEL, USERHEL
4108 COMMON/MG5_1_USERCHOICE/USERHEL
4109 C ----------
4110@@ -2602,7 +2605,10 @@
4111 C ARGUMENTS
4112 C
4113 REAL*8 P(0:3,NEXTERNAL)
4114- REAL*8 ANS(0:3,0:NSQUAREDSO)
4115+ INCLUDE 'nsqso_born.inc'
4116+ INTEGER ANS_DIMENSION
4117+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4118+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4119 INTEGER HEL, RET_CODE
4120 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4121 C
4122@@ -2719,7 +2725,10 @@
4123 C ARGUMENTS
4124 C
4125 REAL*8 P(0:3,NEXTERNAL)
4126- REAL*8 ANS(0:3,0:NSQUAREDSO)
4127+ INCLUDE 'nsqso_born.inc'
4128+ INTEGER ANS_DIMENSION
4129+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4130+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4131 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4132 INTEGER RET_CODE
4133 C
4134
4135=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f'
4136--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f 2020-06-20 21:10:10 +0000
4137+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f 2020-08-13 08:01:43 +0000
4138@@ -2548,11 +2548,14 @@
4139 PARAMETER (NEXTERNAL=5)
4140 INTEGER NSQUAREDSO
4141 PARAMETER (NSQUAREDSO=0)
4142+ INCLUDE 'nsqso_born.inc'
4143 C
4144 C ARGUMENTS
4145 C
4146 REAL*8 P(0:3,NEXTERNAL)
4147- REAL*8 ANS(0:3,0:NSQUAREDSO)
4148+ INTEGER ANS_DIMENSION
4149+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4150+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4151 INTEGER HEL, USERHEL
4152 COMMON/ML5_0_USERCHOICE/USERHEL
4153 C ----------
4154@@ -2576,7 +2579,10 @@
4155 C ARGUMENTS
4156 C
4157 REAL*8 P(0:3,NEXTERNAL)
4158- REAL*8 ANS(0:3,0:NSQUAREDSO)
4159+ INCLUDE 'nsqso_born.inc'
4160+ INTEGER ANS_DIMENSION
4161+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4162+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4163 INTEGER HEL, RET_CODE
4164 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4165 C
4166@@ -2693,7 +2699,10 @@
4167 C ARGUMENTS
4168 C
4169 REAL*8 P(0:3,NEXTERNAL)
4170- REAL*8 ANS(0:3,0:NSQUAREDSO)
4171+ INCLUDE 'nsqso_born.inc'
4172+ INTEGER ANS_DIMENSION
4173+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4174+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4175 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4176 INTEGER RET_CODE
4177 C
4178
4179=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f'
4180--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f 2020-06-20 21:10:10 +0000
4181+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f 2020-08-13 08:01:43 +0000
4182@@ -2548,11 +2548,14 @@
4183 PARAMETER (NEXTERNAL=5)
4184 INTEGER NSQUAREDSO
4185 PARAMETER (NSQUAREDSO=0)
4186+ INCLUDE 'nsqso_born.inc'
4187 C
4188 C ARGUMENTS
4189 C
4190 REAL*8 P(0:3,NEXTERNAL)
4191- REAL*8 ANS(0:3,0:NSQUAREDSO)
4192+ INTEGER ANS_DIMENSION
4193+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4194+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4195 INTEGER HEL, USERHEL
4196 COMMON/ML5_0_USERCHOICE/USERHEL
4197 C ----------
4198@@ -2576,7 +2579,10 @@
4199 C ARGUMENTS
4200 C
4201 REAL*8 P(0:3,NEXTERNAL)
4202- REAL*8 ANS(0:3,0:NSQUAREDSO)
4203+ INCLUDE 'nsqso_born.inc'
4204+ INTEGER ANS_DIMENSION
4205+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4206+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4207 INTEGER HEL, RET_CODE
4208 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4209 C
4210@@ -2693,7 +2699,10 @@
4211 C ARGUMENTS
4212 C
4213 REAL*8 P(0:3,NEXTERNAL)
4214- REAL*8 ANS(0:3,0:NSQUAREDSO)
4215+ INCLUDE 'nsqso_born.inc'
4216+ INTEGER ANS_DIMENSION
4217+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4218+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4219 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4220 INTEGER RET_CODE
4221 C
4222
4223=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f'
4224--- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f 2020-06-20 21:10:10 +0000
4225+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f 2020-08-13 08:01:43 +0000
4226@@ -2548,11 +2548,14 @@
4227 PARAMETER (NEXTERNAL=4)
4228 INTEGER NSQUAREDSO
4229 PARAMETER (NSQUAREDSO=0)
4230+ INCLUDE 'nsqso_born.inc'
4231 C
4232 C ARGUMENTS
4233 C
4234 REAL*8 P(0:3,NEXTERNAL)
4235- REAL*8 ANS(0:3,0:NSQUAREDSO)
4236+ INTEGER ANS_DIMENSION
4237+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4238+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4239 INTEGER HEL, USERHEL
4240 COMMON/ML5_0_USERCHOICE/USERHEL
4241 C ----------
4242@@ -2576,7 +2579,10 @@
4243 C ARGUMENTS
4244 C
4245 REAL*8 P(0:3,NEXTERNAL)
4246- REAL*8 ANS(0:3,0:NSQUAREDSO)
4247+ INCLUDE 'nsqso_born.inc'
4248+ INTEGER ANS_DIMENSION
4249+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4250+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4251 INTEGER HEL, RET_CODE
4252 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4253 C
4254@@ -2693,7 +2699,10 @@
4255 C ARGUMENTS
4256 C
4257 REAL*8 P(0:3,NEXTERNAL)
4258- REAL*8 ANS(0:3,0:NSQUAREDSO)
4259+ INCLUDE 'nsqso_born.inc'
4260+ INTEGER ANS_DIMENSION
4261+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4262+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4263 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4264 INTEGER RET_CODE
4265 C
4266
4267=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f'
4268--- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f 2020-06-20 21:10:10 +0000
4269+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f 2020-08-13 08:01:43 +0000
4270@@ -2548,11 +2548,14 @@
4271 PARAMETER (NEXTERNAL=4)
4272 INTEGER NSQUAREDSO
4273 PARAMETER (NSQUAREDSO=0)
4274+ INCLUDE 'nsqso_born.inc'
4275 C
4276 C ARGUMENTS
4277 C
4278 REAL*8 P(0:3,NEXTERNAL)
4279- REAL*8 ANS(0:3,0:NSQUAREDSO)
4280+ INTEGER ANS_DIMENSION
4281+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4282+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4283 INTEGER HEL, USERHEL
4284 COMMON/ML5_0_USERCHOICE/USERHEL
4285 C ----------
4286@@ -2576,7 +2579,10 @@
4287 C ARGUMENTS
4288 C
4289 REAL*8 P(0:3,NEXTERNAL)
4290- REAL*8 ANS(0:3,0:NSQUAREDSO)
4291+ INCLUDE 'nsqso_born.inc'
4292+ INTEGER ANS_DIMENSION
4293+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4294+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4295 INTEGER HEL, RET_CODE
4296 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4297 C
4298@@ -2693,7 +2699,10 @@
4299 C ARGUMENTS
4300 C
4301 REAL*8 P(0:3,NEXTERNAL)
4302- REAL*8 ANS(0:3,0:NSQUAREDSO)
4303+ INCLUDE 'nsqso_born.inc'
4304+ INTEGER ANS_DIMENSION
4305+ PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO))
4306+ REAL*8 ANS(0:3,0:ANS_DIMENSION)
4307 REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO)
4308 INTEGER RET_CODE
4309 C
4310
4311=== modified file 'tests/test_manager.py'
4312--- tests/test_manager.py 2018-08-10 12:40:47 +0000
4313+++ tests/test_manager.py 2020-08-13 08:01:43 +0000
4314@@ -44,6 +44,7 @@
4315 import time
4316 import datetime
4317 import shutil
4318+import subprocess
4319 import glob
4320 from functools import wraps
4321
4322@@ -973,7 +974,8 @@
4323
4324 parser.add_option("-N", "--notification", default=45,
4325 help="Running time, below which no notification is raised. (-1 for no notification)")
4326-
4327+ parser.add_option("", "--nocaffeinate", action="store_false", default=True, dest='nosleep',
4328+ help='For mac user, forbids to use caffeinate when running with a script')
4329
4330 (options, args) = parser.parse_args()
4331
4332@@ -1046,6 +1048,14 @@
4333 logging.getLogger('tutorial').setLevel('ERROR')
4334 except:
4335 pass
4336+
4337+ if sys.platform == "darwin" and options.nosleep:
4338+ logging.getLogger('madgraph').warning("launching caffeinate to prevent idle sleep when MG5aMC is running. Run './bin/mg5_aMC -s' to prevent this.")
4339+ pid = os.getpid()
4340+ subprocess.Popen(['caffeinate', '-i', '-w', str(pid)])
4341+
4342+
4343+
4344
4345 if options.synchronize and IOTestManager._compress_ref_fodler:
4346 print "The tarball synchronization is not necessary since"+ \

Subscribers

People subscribed via source and target branches

to all changes: