Merge lp:~mg5core1/mg5amcnlo/2.7.4 into lp:mg5amcnlo/lts
- 2.7.4
- Merge into series2.0
Proposed by
Olivier Mattelaer
Status: | Merged |
---|---|
Merged at revision: | 289 |
Proposed branch: | lp:~mg5core1/mg5amcnlo/2.7.4 |
Merge into: | lp:mg5amcnlo/lts |
Diff against target: |
2886 lines (+849/-329) 66 files modified
MadSpin/interface_madspin.py (+35/-0) Template/LO/Cards/pythia8_card_default.dat (+2/-0) Template/LO/Cards/run_card.dat (+1/-1) Template/LO/Source/PDF/PhotonFlux.f (+12/-9) Template/LO/Source/PDF/pdf.f (+3/-3) Template/LO/Source/PDF/pdg2pdf.f (+3/-3) Template/LO/Source/PDF/pdg2pdf_lhapdf6.f (+3/-3) Template/LO/Source/kin_functions.f (+5/-3) Template/LO/Source/setrun.f (+16/-0) Template/LO/SubProcesses/genps.f (+2/-1) Template/LO/SubProcesses/reweight.f (+2/-2) Template/LO/SubProcesses/unwgt.f (+10/-1) UpdateNotes.txt (+28/-0) aloha/aloha_parsers.py (+35/-70) aloha/aloha_writers.py (+7/-4) madgraph/core/base_objects.py (+15/-0) madgraph/core/helas_objects.py (+65/-1) madgraph/interface/common_run_interface.py (+16/-5) madgraph/interface/madgraph_interface.py (+33/-15) madgraph/interface/reweight_interface.py (+26/-15) madgraph/iolibs/export_fks.py (+7/-4) madgraph/iolibs/export_v4.py (+27/-16) madgraph/iolibs/group_subprocs.py (+31/-6) madgraph/iolibs/helas_call_writers.py (+23/-6) 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 (+10/-1) madgraph/loop/loop_exporters.py (+28/-18) madgraph/various/banner.py (+25/-20) mg5decay/decay_objects.py (+21/-2) tests/acceptance_tests/test_cmd.py (+2/-0) 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/amp2lines.txt (+1/-2) tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/coloramps.inc (+1/-2) tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/config_subproc_map.inc (+0/-1) tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/configs.inc (+1/-7) tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f (+13/-4) tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/nqcd_list.inc (+0/-1) tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/symfact.dat (+0/-1) 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/parallel_tests/test_aloha.py (+58/-0) tests/test_manager.py (+11/-1) tests/unit_tests/iolibs/test_export_v4.py (+2/-2) tests/unit_tests/iolibs/test_group_subprocs.py (+3/-2) tests/unit_tests/iolibs/test_helas_call_writers.py (+23/-23) tests/unit_tests/various/test_diagram_symmetry.py (+2/-5) vendor/StdHEP/src/inc/stdevent.h (+4/-0) vendor/StdHEP/src/stdhep/mcf_hepev4_xdr.c (+1/-1) vendor/StdHEP/src/stdhep/mcf_hepup_xdr.c (+1/-1) vendor/StdHEP/src/stdhep_arch (+1/-1) |
To merge this branch: | bzr merge lp:~mg5core1/mg5amcnlo/2.7.4 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MadTeam | Pending | ||
Review via email: mp+388903@code.launchpad.net |
Commit message
This will be merged as 2.8.0
The main new feature is the EPA from protron (which Fabio ask me to release as soon as possible).
This also contains some deep change to the python interface of the standalone output
Description of the change
To post a comment you must log in.
lp:~mg5core1/mg5amcnlo/2.7.4
updated
- 304. By olivier-mattelaer
-
remove max cut of for lepton EPA
- 305. By olivier-mattelaer
-
avoid infinite number of attempt to compile StdHEP
- 306. By olivier-mattelaer
-
fix a typo
- 307. By olivier-mattelaer
-
fixing seed issue with gridpck + spinmode=none
- 308. By olivier-mattelaer
-
allow Form-Factor up to 20 argument
- 309. By olivier-mattelaer
-
security for the madspin seed in spinmode none mode
- 310. By olivier-mattelaer
-
merge with 2.7.2_tchannel
- 311. By olivier-mattelaer
-
fixing two tests
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-21 07:00:37 +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 | @@ -1282,6 +1307,16 @@ |
49 | me5_cmd.exec_cmd("exit") |
50 | out[i] = lhe_parser.EventFile(pjoin(decay_dir, "Events", 'run_01', 'unweighted_events.lhe.gz')) |
51 | else: |
52 | + if not self.seed: |
53 | + if hasattr(self, 'mother'): |
54 | + try: |
55 | + self.seed = 100 + self.mother.run_card['iseed'] |
56 | + except: |
57 | + self.seed = random.randint(0, int(30081*30081)) |
58 | + self.seed += 1 |
59 | + if self.seed > 30081*30081: |
60 | + self.seed -= 30081*30081 |
61 | + logger.info('Will use seed %s' % (self.seed)) |
62 | misc.call(['run.sh', str(int(1.2*nb_event)), str(self.seed)], cwd=decay_dir) |
63 | out[i] = lhe_parser.EventFile(pjoin(decay_dir, 'events.lhe.gz')) |
64 | if cumul: |
65 | |
66 | === modified file 'Template/LO/Cards/pythia8_card_default.dat' |
67 | --- Template/LO/Cards/pythia8_card_default.dat 2017-02-06 18:35:42 +0000 |
68 | +++ Template/LO/Cards/pythia8_card_default.dat 2020-08-21 07:00:37 +0000 |
69 | @@ -12,6 +12,8 @@ |
70 | ! ------------------------------------------------------------------- |
71 | ! Specify the HEPMC output of the Pythia8 shower. You can set it to: |
72 | ! auto : MG5aMC will automatically place it the run_<i> directory |
73 | +! autoremove: MG5aMC will automatically remove the file at the end of the run. |
74 | +! (usefull when running with Delphes) |
75 | ! /dev/null : to turn off the HEPMC output. |
76 | ! <path> : to select where the HEPMC file must written. It will |
77 | ! therefore not be placed in the run_<i> directory. The |
78 | |
79 | === modified file 'Template/LO/Cards/run_card.dat' |
80 | --- Template/LO/Cards/run_card.dat 2020-05-27 07:52:34 +0000 |
81 | +++ Template/LO/Cards/run_card.dat 2020-08-21 07:00:37 +0000 |
82 | @@ -28,7 +28,7 @@ |
83 | #********************************************************************* |
84 | # Collider type and energy * |
85 | # lpp: 0=No PDF, 1=proton, -1=antiproton, 2=photon from proton, * |
86 | -# 3=photon from electron * |
87 | +# 3=photon from electron, 4=photon from muon * |
88 | #********************************************************************* |
89 | %(lpp1)s = lpp1 ! beam 1 type |
90 | %(lpp2)s = lpp2 ! beam 2 type |
91 | |
92 | === modified file 'Template/LO/Source/PDF/PhotonFlux.f' |
93 | --- Template/LO/Source/PDF/PhotonFlux.f 2020-03-27 13:59:33 +0000 |
94 | +++ Template/LO/Source/PDF/PhotonFlux.f 2020-08-21 07:00:37 +0000 |
95 | @@ -6,25 +6,28 @@ |
96 | c/* ********************************************************* */ |
97 | c provided by Tomasz Pierzchala - UCL |
98 | |
99 | - real*8 function epa_electron(x,q2max) |
100 | - integer i |
101 | + real*8 function epa_lepton(x,q2max, mode) |
102 | + implicit none |
103 | + integer i, mode, imode |
104 | +c mode is +3/-3 for electron and +4/-4 for muon |
105 | real*8 x,phi_f |
106 | - real*8 xin |
107 | + real*8 xin(3:4) |
108 | real*8 alpha |
109 | real*8 f, q2min,q2max |
110 | real*8 PI |
111 | data PI/3.14159265358979323846/ |
112 | |
113 | - data xin/0.511d-3/ !electron mass in GeV |
114 | + data xin/0.511d-3, 0.105658d0/ !electron mass in GeV |
115 | |
116 | alpha = .0072992701 |
117 | - |
118 | + imode = abs(mode) |
119 | + |
120 | C // x = omega/E = (E-E')/E |
121 | if (x.lt.1) then |
122 | - q2min= xin*xin*x*x/(1-x) |
123 | + q2min= xin(imode)*xin(imode)*x*x/(1-x) |
124 | if(q2min.lt.q2max) then |
125 | - f = alpha/2d0/PI* |
126 | - & (2d0*xin*xin*x*(-1/q2min+1/q2max)+ |
127 | + f = alpha/2d0/PI* |
128 | + & (2d0*xin(imode)*xin(imode)*x*(-1/q2min+1/q2max)+ |
129 | & (2-2d0*x+x*x)/x*dlog(q2max/q2min)) |
130 | |
131 | else |
132 | @@ -35,7 +38,7 @@ |
133 | endif |
134 | c write (*,*) x,dsqrt(q2min),dsqrt(q2max),f |
135 | if (f .lt. 0) f = 0 |
136 | - epa_electron= f |
137 | + epa_lepton = f |
138 | |
139 | end |
140 | |
141 | |
142 | === modified file 'Template/LO/Source/PDF/pdf.f' |
143 | --- Template/LO/Source/PDF/pdf.f 2018-02-01 23:17:18 +0000 |
144 | +++ Template/LO/Source/PDF/pdf.f 2020-08-21 07:00:37 +0000 |
145 | @@ -29,7 +29,7 @@ |
146 | double precision u_val,d_val,u_sea,d_sea,s_sea,c_sea,b_sea,gluon |
147 | double precision Ctq3df,Ctq4Fn,Ctq5Pdf,Ctq6Pdf,Ctq5L |
148 | double precision q2max |
149 | - double precision epa_electron,epa_proton |
150 | + double precision epa_lepton,epa_proton |
151 | include 'pdf.inc' |
152 | |
153 | integer mode,Iprtn,Irt |
154 | @@ -297,8 +297,8 @@ |
155 | c a "diffractive" photon |
156 | c |
157 | q2max=xmu*xmu |
158 | - if(ih .eq. 3) then !from the electron |
159 | - fx(7)=epa_electron(x,q2max) |
160 | + if(abs(ih) .eq. 3.or.abs(ih) .eq. 4) then !from the electron |
161 | + fx(7)=epa_lepton(x,q2max, ih) |
162 | elseif(ih .eq. 2) then !from a proton without breaking |
163 | fx(7)=epa_proton(x,q2max) |
164 | endif |
165 | |
166 | === modified file 'Template/LO/Source/PDF/pdg2pdf.f' |
167 | --- Template/LO/Source/PDF/pdg2pdf.f 2019-12-04 21:34:25 +0000 |
168 | +++ Template/LO/Source/PDF/pdg2pdf.f 2020-08-21 07:00:37 +0000 |
169 | @@ -24,7 +24,7 @@ |
170 | integer mode,Irt,i,j |
171 | double precision xlast(2),xmulast(2),pdflast(-7:7,2),q2max |
172 | character*7 pdlabellast(2) |
173 | - double precision epa_electron,epa_proton |
174 | + double precision epa_lepton,epa_proton |
175 | integer ipart,ireuse,iporg,ihlast(2) |
176 | save xlast,xmulast,pdflast,pdlabellast,ihlast |
177 | data xlast/2*-99d9/ |
178 | @@ -131,8 +131,8 @@ |
179 | |
180 | if(iabs(ipart).eq.7.and.ih.gt.1) then |
181 | q2max=xmu*xmu |
182 | - if(ih.eq.3) then !from the electron |
183 | - pdg2pdf=epa_electron(x,q2max) |
184 | + if(abs(ih).eq.3.or.abs(ih).eq.4) then !from the electron or muonn |
185 | + pdg2pdf=epa_lepton(x,q2max, ih) |
186 | elseif(ih .eq. 2) then !from a proton without breaking |
187 | pdg2pdf=epa_proton(x,q2max,beamid) |
188 | endif |
189 | |
190 | === removed file 'Template/LO/Source/PDF/pdg2pdf_lhapdf.f' |
191 | === modified file 'Template/LO/Source/PDF/pdg2pdf_lhapdf6.f' |
192 | --- Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2020-03-06 20:47:59 +0000 |
193 | +++ Template/LO/Source/PDF/pdg2pdf_lhapdf6.f 2020-08-21 07:00:37 +0000 |
194 | @@ -24,7 +24,7 @@ |
195 | integer i,j,ihlast(20),ipart,iporg,ireuse,imemlast(20),iset,imem |
196 | & ,i_replace,ii,ipartlast(20) |
197 | double precision xlast(20),xmulast(20),pdflast(-7:7,20) |
198 | - double precision epa_proton, epa_electron |
199 | + double precision epa_proton, epa_lepton |
200 | save ihlast,xlast,xmulast,pdflast,imemlast,ipartlast |
201 | data ihlast/20*-99/ |
202 | data ipartlast/20*-99/ |
203 | @@ -139,8 +139,8 @@ |
204 | pdg2pdf = get_ion_pdf(pdflast(-7, i_replace), ipart, nb_proton(beamid), nb_neutron(beamid)) |
205 | endif |
206 | pdg2pdf=pdg2pdf/x |
207 | - else if(ih.eq.3) then !from the electron |
208 | - pdg2pdf=epa_electron(x,xmu*xmu) |
209 | + else if(abs(ih).eq.3.or.abs(ih).eq.4) then !from the electron |
210 | + pdg2pdf=epa_lepton(x,xmu*xmu, ih) |
211 | else if(ih.eq.2) then ! photon from a proton without breaking |
212 | pdg2pdf = epa_proton(x,xmu*xmu) |
213 | else |
214 | |
215 | === modified file 'Template/LO/Source/kin_functions.f' |
216 | --- Template/LO/Source/kin_functions.f 2016-02-10 14:56:17 +0000 |
217 | +++ Template/LO/Source/kin_functions.f 2020-08-21 07:00:37 +0000 |
218 | @@ -590,11 +590,13 @@ |
219 | C 4-Vector Dot product |
220 | C**************************************************************************** |
221 | implicit none |
222 | - double precision p1(0:3),p2(0:3) |
223 | + double precision p1(0:3),p2(0:3), dot2 |
224 | dot=p1(0)*p2(0)-p1(1)*p2(1)-p1(2)*p2(2)-p1(3)*p2(3) |
225 | |
226 | - if(dabs(dot).lt.1d-6)then ! solve numerical problem |
227 | - dot=0d0 |
228 | + if(dabs(dot).lt.1d-6)then ! solve numerical problem |
229 | + dot2 = p1(0)*p2(0)+p1(1)*p2(1)+p1(2)*p2(2)+p1(3)*p2(3) |
230 | + dot2 = max(1e-99,dot2) |
231 | + if (dot/dot2.lt.1e-6) dot=0d0 |
232 | endif |
233 | |
234 | end |
235 | |
236 | === modified file 'Template/LO/Source/setrun.f' |
237 | --- Template/LO/Source/setrun.f 2016-03-04 16:16:23 +0000 |
238 | +++ Template/LO/Source/setrun.f 2020-08-21 07:00:37 +0000 |
239 | @@ -83,6 +83,22 @@ |
240 | q2fact(1) = sf1**2 ! fact scale**2 for pdf1 |
241 | q2fact(2) = sf2**2 ! fact scale**2 for pdf2 |
242 | |
243 | + if(pb1.ne.0d0)then |
244 | + if (abs(lpp(1)).eq.1.or.abs(lpp(1)).eq.2)then |
245 | + write(*,*) 'proton/anti-proton beam polarization are not allowed' |
246 | + stop 1 |
247 | + endif |
248 | + pol(1)=sign(1+abs(pb1)/100d0,pb1) |
249 | + endif |
250 | + if(pb2.ne.0d0)then |
251 | + if (abs(lpp(2)).eq.1.or.abs(lpp(2)).eq.2)then |
252 | + write(*,*) 'proton/anti-proton beam polarization are not allowed' |
253 | + stop 1 |
254 | + endif |
255 | + pol(2)=sign(1+abs(pb2)/100d0,pb2) |
256 | + endif |
257 | + |
258 | + |
259 | if(pb1.ne.0d0.and.lpp(1).eq.0) pol(1)=sign(1+abs(pb1)/100d0,pb1) |
260 | if(pb2.ne.0d0.and.lpp(2).eq.0) pol(2)=sign(1+abs(pb2)/100d0,pb2) |
261 | |
262 | |
263 | === modified file 'Template/LO/SubProcesses/genps.f' |
264 | --- Template/LO/SubProcesses/genps.f 2020-06-15 07:16:51 +0000 |
265 | +++ Template/LO/SubProcesses/genps.f 2020-08-21 07:00:37 +0000 |
266 | @@ -572,6 +572,8 @@ |
267 | if (abs(lpp(2)) .eq. 1 .or. abs(lpp(2)) .eq. 2) m2 = 0.938d0 |
268 | if (abs(lpp(1)) .eq. 3) m1 = 0.000511d0 |
269 | if (abs(lpp(2)) .eq. 3) m2 = 0.000511d0 |
270 | + if (abs(lpp(1)) .eq. 4) m1 = 0.105658d0 |
271 | + if (abs(lpp(2)) .eq. 4) m2 = 0.105658d0 |
272 | if (mass_ion(1).ge.0d0) m1 = mass_ion(1) |
273 | if (mass_ion(2).ge.0d0) m2 = mass_ion(2) |
274 | if(ebeam(1).lt.m1.and.lpp(1).ne.9) ebeam(1)=m1 |
275 | @@ -1046,7 +1048,6 @@ |
276 | ptotm(i) = ptot(i) |
277 | endif |
278 | enddo |
279 | -c ma2 = dot(pa,pa) |
280 | c |
281 | c determine magnitude of p1 in cms frame (from dhelas routine mom2cx) |
282 | c |
283 | |
284 | === modified file 'Template/LO/SubProcesses/reweight.f' |
285 | --- Template/LO/SubProcesses/reweight.f 2020-05-24 20:16:56 +0000 |
286 | +++ Template/LO/SubProcesses/reweight.f 2020-08-21 07:00:37 +0000 |
287 | @@ -1738,9 +1738,9 @@ |
288 | if (btest(mlevel,3)) |
289 | $ write(*,*)' set fact scales for PS to ', |
290 | $ sqrt(q2fact(1)),sqrt(q2fact(2)) |
291 | - else if (abs(lpp(1)).eq.2.or.abs(lpp(1)).eq.3) then |
292 | + else if (abs(lpp(1)).ge.2.and.abs(lpp(1)).le.4) then |
293 | q2fact(1)=q2bck(1) |
294 | - else if (abs(lpp(2)).eq.2.or.abs(lpp(2)).eq.3) then |
295 | + else if (abs(lpp(2)).ge.2.or.abs(lpp(2)).le.4) then |
296 | q2fact(2)=q2bck(2) |
297 | endif |
298 | |
299 | |
300 | === modified file 'Template/LO/SubProcesses/unwgt.f' |
301 | --- Template/LO/SubProcesses/unwgt.f 2020-05-20 11:52:45 +0000 |
302 | +++ Template/LO/SubProcesses/unwgt.f 2020-08-21 07:00:37 +0000 |
303 | @@ -145,10 +145,19 @@ |
304 | C compute the boost for the requested transformation |
305 | implicit none |
306 | double precision pin(0:3), pout(0:3) |
307 | - double precision denom |
308 | + double precision denom, control |
309 | |
310 | denom = pin(0)*pout(0) - pin(3)*pout(3) |
311 | if (denom.ne.0d0) then |
312 | + control = pin(0)*pout(0) + pin(3)*pout(3) |
313 | + if (denom/control.gt.1d-12)then |
314 | + get_betaz = (pin(3) * pout(0) - pout(3) * pin(0)) / denom |
315 | +c pass in massless case |
316 | + else if (abs(pin(0)+pin(3)).gt.abs(pin(0))) then |
317 | + get_betaz = (pin(0)**2 - pout(0)**2)/(pin(0)**2 + pout(0)**2) |
318 | + else |
319 | + get_betaz = (pout(0)**2 - pin(0)**2)/(pin(0)**2 + pout(0)**2) |
320 | + endif |
321 | get_betaz = (pin(3) * pout(0) - pout(3) * pin(0)) / denom |
322 | else if (pin(0).eq.pin(3)) then |
323 | get_betaz = (pin(0)**2 - pout(0)**2)/(pin(0)**2 + pout(0)**2) |
324 | |
325 | === modified file 'UpdateNotes.txt' |
326 | --- UpdateNotes.txt 2020-06-21 12:17:36 +0000 |
327 | +++ UpdateNotes.txt 2020-08-21 07:00:37 +0000 |
328 | @@ -1,5 +1,33 @@ |
329 | Update notes for MadGraph5_aMC@NLO (in reverse time order) |
330 | |
331 | +2.8.0: |
332 | + OM: For LO process, you can now set lpp1 and lpp2 to "4" for process with initial photon in order to get the |
333 | + effective photon approximation. This mode behaves like the "3" one: The cut-off scale of the approximation |
334 | + is taken from the fixed renormalization factorisation scale: "dsqrt_q2fact1/dsqrt_q2fact2" |
335 | + OM: The width ao T-channel propagator are now set to zero automatically. |
336 | + To return to the previous behaviour , you can use the options "set zerowidth_tchannel False" |
337 | + (to set before the output command) |
338 | + OM: Change in madevent phase-space integrator for T-channel: |
339 | + - The integration of photon/Z/Higgs are now done together rather than separatly and follow importance |
340 | + sampling of the photon channel |
341 | + - A new option "set max_t_for_channel X" allows to veto some channel of integration with more than X |
342 | + t-channel propagator. This options can speed-up significantly the computation in VBF process. |
343 | + (We advise to set X to 2 in those cases) |
344 | + - Fix a numerical issue occuring for low invariant mass in T-channel creating spurious configuration. |
345 | + OM: In madspin_card you can now replace the line "launch" |
346 | + by "launch -n NAME", this will allow to specify the name of the |
347 | + directory in EVENTS where that run is stored. |
348 | + OM: Change in the python interface of the standalone output. In top of the pdg of the particles, |
349 | + you can now use the process_id (the one specified with @X) to distinguish process with the same particle |
350 | + content. This parameter can be set to -1 and the function then ignore that parameter. |
351 | + OM: Adding new option in reweighting to allow the user to use the process_id in presence of ambiguous |
352 | + initial/final state. |
353 | + OM: Update the makefile of standalone interface to python to be able to compile in multicore. |
354 | + (thanks Matthias Komm) |
355 | + OM: Update of the auto-width code to support UFO form-factors |
356 | + OM: Fixing numerical issue with the boost in EPA mode. |
357 | + |
358 | + |
359 | 2.7.3(21/06/20) |
360 | OM: Fixing some bug for read-only LO gridpacks (wrong cross-section and shape when generating events). |
361 | Thanks to Congqiao Li for this |
362 | |
363 | === modified file 'aloha/aloha_parsers.py' |
364 | --- aloha/aloha_parsers.py 2020-01-09 16:39:38 +0000 |
365 | +++ aloha/aloha_parsers.py 2020-08-21 07:00:37 +0000 |
366 | @@ -175,29 +175,17 @@ |
367 | "expression : group" |
368 | p[0] = p[1] |
369 | |
370 | - def p_expression_function1(self, p): |
371 | - "expression : FUNCTION '(' expression ')'" |
372 | - p1 = p[1] |
373 | - re_groups = self.re_cmath_function.match(p1) |
374 | - if re_groups: |
375 | - p1 = re_groups.group("name") |
376 | - p[0] = p1 + '(' + p[3] + ')' |
377 | - |
378 | - def p_expression_function2(self, p): |
379 | - "expression : FUNCTION '(' expression ',' expression ')'" |
380 | - p1 = p[1] |
381 | - re_groups = self.re_cmath_function.match(p1) |
382 | - if re_groups: |
383 | - p1 = re_groups.group("name") |
384 | - p[0] = p1 + '(' + p[3] + ',' + p[5] + ')' |
385 | |
386 | def p_error(self, p): |
387 | if p: |
388 | try: |
389 | print p |
390 | print p[:] |
391 | + print p.value |
392 | except: |
393 | pass |
394 | + print p.value |
395 | + |
396 | raise Exception("Syntax error at '%s' in '%s'" % (p.value, self.f)) |
397 | else: |
398 | logger.error("Syntax error at EOF") |
399 | @@ -268,63 +256,40 @@ |
400 | new = aloha_lib.KERNEL.add_function_expression(p[1], eval(p[2])) |
401 | p[0] = str(new) |
402 | |
403 | - def p_expression_function1(self, p): |
404 | - "expression : FUNCTION '(' expression ')'" |
405 | - |
406 | - p1 = p[1] |
407 | - if p1 in self.aloha_object: |
408 | - p[0] = p[1]+'('+p[3]+')' |
409 | - return |
410 | - re_groups = self.re_cmath_function.match(p1) |
411 | - |
412 | - if re_groups: |
413 | - p1 = re_groups.group("name") |
414 | - new = aloha_lib.KERNEL.add_function_expression(p1, eval(p[3])) |
415 | - p[0] = str(new) |
416 | - |
417 | - def p_expression_function2(self, p): |
418 | - "expression : FUNCTION '(' expression ',' expression ')'" |
419 | - |
420 | - if p[1] in self.aloha_object: |
421 | - p[0] = p[1]+'('+p[3]+','+ p[5]+')' |
422 | - return |
423 | - |
424 | - p1 = p[1] |
425 | - re_groups = self.re_cmath_function.match(p1) |
426 | - if re_groups: |
427 | - p1 = re_groups.group("name") |
428 | - new = aloha_lib.KERNEL.add_function_expression(p1, eval(p[3]), eval(p[5])) |
429 | - p[0] = str(new) |
430 | - |
431 | - def p_expression_function3(self, p): |
432 | - "expression : FUNCTION '(' expression ',' expression ',' expression ')'" |
433 | - |
434 | - if p[1] in self.aloha_object: |
435 | - p[0] = p[1]+'('+p[3]+','+ p[5]+','+p[7]+')' |
436 | - return |
437 | - |
438 | - p1 = p[1] |
439 | - re_groups = self.re_cmath_function.match(p1) |
440 | - if re_groups: |
441 | - p1 = re_groups.group("name") |
442 | - |
443 | - new = aloha_lib.KERNEL.add_function_expression(p1, eval(p[3]), eval(p[5]),eval(p[7])) |
444 | - p[0] = str(new) |
445 | - |
446 | - def p_expression_function4(self, p): |
447 | - "expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ')'" |
448 | - if p[1] in self.aloha_object: |
449 | - p[0] = p[1]+'('+p[3]+','+ p[5]+','+ p[7]+','+ p[9]+')' |
450 | - return |
451 | - |
452 | - p1 = p[1] |
453 | - re_groups = self.re_cmath_function.match(p1) |
454 | - if re_groups: |
455 | - p1 = re_groups.group("name") |
456 | - args = [eval(p[2*i+1]) for i in [1,2,3,4]] |
457 | + def p_expression_function(self, p): |
458 | + """expression : FUNCTION '(' expression ')' |
459 | + expression : FUNCTION '(' expression ',' expression ')' |
460 | + expression : FUNCTION '(' expression ',' expression ',' expression ')' |
461 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ')' |
462 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ')' |
463 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
464 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
465 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
466 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
467 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
468 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
469 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
470 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
471 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
472 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
473 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
474 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
475 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
476 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
477 | + expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ',' expression ')' |
478 | + """ |
479 | + if p[1] in self.aloha_object: |
480 | + p[0] = ''.join(p[1:]) |
481 | + return |
482 | + |
483 | + p1 = p[1] |
484 | + re_groups = self.re_cmath_function.match(p1) |
485 | + if re_groups: |
486 | + p1 = re_groups.group("name") |
487 | + args = [eval(p[2*i+1]) for i in range(1, len(p)//2)] |
488 | new = aloha_lib.KERNEL.add_function_expression(p1, *args) |
489 | p[0] = str(new) |
490 | - |
491 | + |
492 | def p_expression_binop(self, p): |
493 | '''expression : expression '=' expression |
494 | | expression '+' expression |
495 | |
496 | === modified file 'aloha/aloha_writers.py' |
497 | --- aloha/aloha_writers.py 2020-01-09 23:14:56 +0000 |
498 | +++ aloha/aloha_writers.py 2020-08-21 07:00:37 +0000 |
499 | @@ -1241,12 +1241,15 @@ |
500 | """ build the name for combined aloha function """ |
501 | |
502 | def myHash(target_string): |
503 | + suffix = '' |
504 | + if '%(propa)s' in target_string: |
505 | + target_string = target_string.replace('%(propa)s','') |
506 | + suffix = '%(propa)s' |
507 | + |
508 | if len(target_string)<50: |
509 | - return target_string |
510 | - if '%(propa)s' in target_string: |
511 | - return 'ALOHA_'+(str(hash(target_string.lower()))).replace('-','m')+'%(propa)s' |
512 | + return '%s%s' % (target_string, suffix) |
513 | else: |
514 | - return 'ALOHA_'+(str(hash(target_string.lower()))).replace('-','m') |
515 | + return 'ALOHA_%s%s' % (str(hash(target_string.lower())).replace('-','m'), suffix) |
516 | |
517 | if tag and any(t.startswith('P') for t in tag[:-1]): |
518 | # propagator need to be the last entry for the tag |
519 | |
520 | === modified file 'madgraph/core/base_objects.py' |
521 | --- madgraph/core/base_objects.py 2020-05-07 13:47:24 +0000 |
522 | +++ madgraph/core/base_objects.py 2020-08-21 07:00:37 +0000 |
523 | @@ -2256,6 +2256,7 @@ |
524 | # the list ID_to_veto_for_multichanneling then all loop are considered by |
525 | # default and the constraint below is not applied. |
526 | max_n_loop_for_multichanneling = 4 |
527 | + max_tpropa = 99 |
528 | |
529 | def default_setup(self): |
530 | """Default values for all properties""" |
531 | @@ -2600,6 +2601,20 @@ |
532 | state_dict = {True:'T',False:'F'} |
533 | return new_diag |
534 | |
535 | + def get_nb_t_channel(self): |
536 | + """return number of t-channel propagator in this diagram |
537 | + This is used to filter multi-channel. |
538 | + """ |
539 | + nb_t = 0 |
540 | + for v in self['vertices'][:-1]: |
541 | + l = v.get('legs')[-1] |
542 | + if not l.get('state'): |
543 | + nb_t +=1 |
544 | + return nb_t |
545 | + |
546 | + |
547 | + |
548 | + |
549 | def get_vertex_leg_numbers(self, |
550 | veto_inter_id=Vertex.ID_to_veto_for_multichanneling, |
551 | max_n_loop=0): |
552 | |
553 | === modified file 'madgraph/core/helas_objects.py' |
554 | --- madgraph/core/helas_objects.py 2020-05-07 09:07:13 +0000 |
555 | +++ madgraph/core/helas_objects.py 2020-08-21 07:00:37 +0000 |
556 | @@ -974,6 +974,27 @@ |
557 | def is_majorana(self): |
558 | return self.is_fermion() and self.get('self_antipart') |
559 | |
560 | + def is_t_channel(self): |
561 | + |
562 | + ninitial = 2 |
563 | + if self.get('number_external') > ninitial: |
564 | + return False |
565 | + if self['mothers']: |
566 | + nb_t_channel= sum(int(wf.is_t_channel()) for wf in self['mothers']) |
567 | + #raise Exception |
568 | + else: |
569 | + return True |
570 | + |
571 | + if nb_t_channel == 1: |
572 | + return True |
573 | + else: |
574 | + return False |
575 | + |
576 | + |
577 | + |
578 | + |
579 | + |
580 | + |
581 | def get_analytic_info(self, info, alohaModel=None): |
582 | """ Returns a given analytic information about this loop wavefunction or |
583 | its characterizing interaction. The list of available information is in |
584 | @@ -2011,6 +2032,11 @@ |
585 | schannels.sort(lambda x1,x2: x2.get('legs')[-1].get('number') - \ |
586 | x1.get('legs')[-1].get('number')) |
587 | |
588 | + for t in tchannels: |
589 | + t['is_t_channel'] = True |
590 | + for s in schannels: |
591 | + s['is_t_channel'] = False |
592 | + |
593 | return schannels, tchannels |
594 | |
595 | def get_struct_external_leg_ids(self): |
596 | @@ -3134,16 +3160,46 @@ |
597 | |
598 | return tuple(sorted(indices)) |
599 | |
600 | + def get_nb_t_channel(self): |
601 | + """ """ |
602 | + |
603 | + def get_nb_t(wf): |
604 | + mothers = [] |
605 | + try: |
606 | + mothers = wf.get('mothers') |
607 | + except: |
608 | + return 0 |
609 | + if not mothers: |
610 | + return 0 |
611 | + nb_t = sum([get_nb_t(w) for w in mothers]) |
612 | + try: |
613 | + if not wf.get('leg_state'): |
614 | + return nb_t +1 |
615 | + except Exception: |
616 | + return nb_t |
617 | + return nb_t |
618 | + |
619 | + return get_nb_t(self) |
620 | + |
621 | + |
622 | + nbcall = 0 |
623 | def get_vertex_leg_numbers(self, |
624 | veto_inter_id=base_objects.Vertex.ID_to_veto_for_multichanneling, |
625 | - max_n_loop=0): |
626 | + max_n_loop=0, max_tpropa=0): |
627 | """Get a list of the number of legs in vertices in this diagram, |
628 | This function is only used for establishing the multi-channeling, so that |
629 | we exclude from it all the fake vertices and the vertices resulting from |
630 | shrunk loops (id=-2)""" |
631 | |
632 | + HelasAmplitude.nbcall +=1 |
633 | if max_n_loop == 0: |
634 | max_n_loop = base_objects.Vertex.max_n_loop_for_multichanneling |
635 | + if max_tpropa == 0: |
636 | + try: |
637 | + max_tpropa = base_objects.Vertex.max_tpropa |
638 | + except AttributeError: |
639 | + max_tpropa = 99 |
640 | + |
641 | |
642 | vertex_leg_numbers = [len(self.get('mothers'))] if \ |
643 | (self['interaction_id'] not in veto_inter_id) or \ |
644 | @@ -3152,6 +3208,9 @@ |
645 | for mother in self.get('mothers'): |
646 | vertex_leg_numbers.extend(mother.get_vertex_leg_numbers( |
647 | veto_inter_id = veto_inter_id)) |
648 | + nb_t = self.get_nb_t_channel() |
649 | + if nb_t > max_tpropa: |
650 | + return [] * len(vertex_leg_numbers) |
651 | |
652 | return vertex_leg_numbers |
653 | |
654 | @@ -3322,6 +3381,11 @@ |
655 | return self.get('amplitudes')[0].get_vertex_leg_numbers( |
656 | veto_inter_id=veto_inter_id, max_n_loop=max_n_loop) |
657 | |
658 | + def get_nb_t_channel(self): |
659 | + """Get the number of T channel for this diagram""" |
660 | + |
661 | + return self.get('amplitudes')[0].get_nb_t_channel() |
662 | + |
663 | def get_regular_amplitudes(self): |
664 | """ For regular HelasDiagrams, it is simply all amplitudes. |
665 | It is overloaded in LoopHelasDiagram""" |
666 | |
667 | === modified file 'madgraph/interface/common_run_interface.py' |
668 | --- madgraph/interface/common_run_interface.py 2020-06-17 07:23:03 +0000 |
669 | +++ madgraph/interface/common_run_interface.py 2020-08-21 07:00:37 +0000 |
670 | @@ -3697,6 +3697,7 @@ |
671 | if isinstance(value, str): |
672 | madspin_cmd.mg5cmd.exec_cmd( 'set %s %s --no_save' %(key,value), errorhandling=False, printcmd=False, precmd=False, postcmd=True) |
673 | madspin_cmd.cluster = self.cluster |
674 | + madspin_cmd.mother = self |
675 | |
676 | madspin_cmd.update_status = lambda *x,**opt: self.update_status(*x, level='madspin',**opt) |
677 | |
678 | @@ -3704,11 +3705,21 @@ |
679 | |
680 | madspin_cmd.import_command_file(path) |
681 | |
682 | - # create a new run_name directory for this output |
683 | - i = 1 |
684 | - while os.path.exists(pjoin(self.me_dir,'Events', '%s_decayed_%i' % (self.run_name,i))): |
685 | - i+=1 |
686 | - new_run = '%s_decayed_%i' % (self.run_name,i) |
687 | + |
688 | + if not madspin_cmd.me_run_name: |
689 | + # create a new run_name directory for this output |
690 | + i = 1 |
691 | + while os.path.exists(pjoin(self.me_dir,'Events', '%s_decayed_%i' % (self.run_name,i))): |
692 | + i+=1 |
693 | + new_run = '%s_decayed_%i' % (self.run_name,i) |
694 | + else: |
695 | + new_run = madspin_cmd.me_run_name |
696 | + if os.path.exists(pjoin(self.me_dir,'Events', new_run)): |
697 | + i = 1 |
698 | + while os.path.exists(pjoin(self.me_dir,'Events', '%s_%i' % (new_run,i))): |
699 | + i+=1 |
700 | + new_run = '%s_%i' % (new_run,i) |
701 | + |
702 | evt_dir = pjoin(self.me_dir, 'Events') |
703 | |
704 | os.mkdir(pjoin(evt_dir, new_run)) |
705 | |
706 | === modified file 'madgraph/interface/madgraph_interface.py' |
707 | --- madgraph/interface/madgraph_interface.py 2020-06-17 06:15:07 +0000 |
708 | +++ madgraph/interface/madgraph_interface.py 2020-08-21 07:00:37 +0000 |
709 | @@ -748,7 +748,7 @@ |
710 | logger.info(" > This option can considerably slow down the loop ME") |
711 | logger.info(" computation time, especially when summing over all color") |
712 | logger.info(" and helicity configuration, hence turned off by default.") |
713 | - logger.info("gauge unitary|Feynman",'$MG:color:GREEN') |
714 | + logger.info("gauge unitary|Feynman|axial",'$MG:color:GREEN') |
715 | logger.info(" > (default unitary) choose the gauge of the non QCD part.") |
716 | logger.info(" > For loop processes, only Feynman gauge is employable.") |
717 | logger.info("complex_mass_scheme True|False",'$MG:color:GREEN') |
718 | @@ -779,14 +779,20 @@ |
719 | logger.info(" copied and compiled locally in the output directory.") |
720 | logger.info(" o environment_paths: The location of all libraries the ") |
721 | logger.info(" output depends on should be found in your env. paths.") |
722 | -# logger.info("max_npoint_for_channel <value>",'$MG:color:GREEN') |
723 | -# logger.info(" > (default '0') [Used for loop-induced outputs]") |
724 | -# logger.info(" > Sets the maximum 'n' of n-points loops to be used for") |
725 | -# logger.info(" > setting up the integration multichannels.") |
726 | -# logger.info(" > The default value of zero automatically picks the apparent") |
727 | -# logger.info(" > appropriate choice which is to sometimes pick box loops") |
728 | -# logger.info(" > but never higher n-points ones.") |
729 | - |
730 | + logger.info("max_npoint_for_channel <value>",'$MG:color:GREEN') |
731 | + logger.info(" > (default '0') [Used ONLY for loop-induced outputs with madevent]") |
732 | + logger.info(" > Sets the maximum 'n' of n-points loops to be used for") |
733 | + logger.info(" > setting up the integration multichannels.") |
734 | + logger.info(" > The default value of zero automatically picks the apparent") |
735 | + logger.info(" > appropriate choice which is to sometimes pick box loops") |
736 | + logger.info(" > but never higher n-points ones.") |
737 | + logger.info("max_t_for_channel <value>",'$MG:color:GREEN') |
738 | + logger.info(" > (default '0') [Used ONLY for tree-level output with madevent]") |
739 | + logger.info(" > Forbids the inclusion of channel of integration with more than X") |
740 | + logger.info(" > T channel propagators. Such channel can sometimes be quite slow to integrate") |
741 | + logger.info("zerowidth_tchannel <value>",'$MG:color:GREEN') |
742 | + logger.info(" > (default: True) [Used ONLY for tree-level output with madevent]") |
743 | + logger.info(" > set the width to zero for all T-channel propagator --no impact on complex-mass scheme mode") |
744 | #=============================================================================== |
745 | # CheckValidForCmd |
746 | #=============================================================================== |
747 | @@ -1493,7 +1499,7 @@ |
748 | raise self.InvalidCmd('output_level needs ' + \ |
749 | 'a valid level') |
750 | |
751 | - if args[0] in ['timeout', 'max_npoint_for_channel']: |
752 | + if args[0] in ['timeout', 'max_npoint_for_channel', 'max_t_for_channel']: |
753 | if not args[1].isdigit(): |
754 | raise self.InvalidCmd('%s values should be a integer' % args[0]) |
755 | |
756 | @@ -2861,6 +2867,8 @@ |
757 | 'gauge', |
758 | 'EWscheme', |
759 | 'max_npoint_for_channel', |
760 | + 'max_t_for_channel', |
761 | + 'zerowidth_tchannel', |
762 | 'default_unset_couplings'] |
763 | _valid_nlo_modes = ['all','real','virt','sqrvirt','tree','noborn','LOonly'] |
764 | _valid_sqso_types = ['==','<=','=','>'] |
765 | @@ -2920,7 +2928,9 @@ |
766 | 'loop_optimized_output':True, |
767 | 'loop_color_flows':False, |
768 | 'max_npoint_for_channel': 0, # 0 means automaticly adapted |
769 | - 'default_unset_couplings': 99 # 99 means infinity |
770 | + 'default_unset_couplings': 99, # 99 means infinity |
771 | + 'max_t_for_channel': 99, # means no restrictions |
772 | + 'zerowidth_tchannel': True, |
773 | } |
774 | |
775 | options_madevent = {'automatic_html_opening':True, |
776 | @@ -7585,7 +7595,7 @@ |
777 | 'Note that you can still compile and run aMC@NLO with the built-in PDFs\n' + \ |
778 | ' MG5_aMC> set lhapdf /PATH/TO/lhapdf-config\n') |
779 | |
780 | - elif args[0] in ['timeout', 'auto_update', 'cluster_nb_retry', |
781 | + elif args[0] in ['timeout', 'auto_update', 'cluster_nb_retry', 'max_t_for_channel', |
782 | 'cluster_retry_wait', 'cluster_size', 'max_npoint_for_channel']: |
783 | self.options[args[0]] = int(args[1]) |
784 | |
785 | @@ -7636,7 +7646,9 @@ |
786 | tmp = args[1].lower() |
787 | else: |
788 | raise |
789 | - self.options[args[0]] = tmp |
790 | + self.options[args[0]] = tmp |
791 | + elif args[0] in ['zerowidth_tchannel']: |
792 | + self.options[args[0]] = banner_module.ConfigFile.format_variable(args[1], bool, args[0]) |
793 | elif args[0] in ['cluster_queue']: |
794 | self.options[args[0]] = args[1].strip() |
795 | elif args[0] in self.options: |
796 | @@ -7847,7 +7859,8 @@ |
797 | if self.options['max_npoint_for_channel']: |
798 | base_objects.Vertex.max_n_loop_for_multichanneling = self.options['max_npoint_for_channel'] |
799 | else: |
800 | - base_objects.Vertex.max_n_loop_for_multichanneling = 3 |
801 | + base_objects.Vertex.max_n_loop_for_multichanneling = 3 |
802 | + base_objects.Vertex.max_tpropa = self.options['max_t_for_channel'] |
803 | |
804 | # Perform export and finalize right away |
805 | self.export(nojpeg, main_file_name, group_processes, args) |
806 | @@ -7866,6 +7879,7 @@ |
807 | args=[]): |
808 | """Export a generated amplitude to file.""" |
809 | |
810 | + |
811 | # Define the helas call writer |
812 | if self._curr_exporter.exporter == 'cpp': |
813 | self._curr_helas_model = helas_call_writers.CPPUFOHelasCallWriter(self._curr_model) |
814 | @@ -7874,6 +7888,10 @@ |
815 | self._curr_helas_model = helas_call_writers.FortranHelasCallWriter(self._curr_model) |
816 | else: |
817 | assert self._curr_exporter.exporter == 'v4' |
818 | + options = {'zerowidth_tchannel': True} |
819 | + if self._curr_amps and self._curr_amps[0].get_ninitial() == 1: |
820 | + options['zerowidth_tchannel'] = False |
821 | + |
822 | self._curr_helas_model = helas_call_writers.FortranUFOHelasCallWriter(self._curr_model) |
823 | |
824 | version = [arg[10:] for arg in args if arg.startswith('--version=')] |
825 | @@ -8353,7 +8371,7 @@ |
826 | decay_dir = pjoin(path,'temp_decay') |
827 | logger_mg.info('More info in temporary files:\n %s/index.html' % (decay_dir)) |
828 | with misc.MuteLogger(['madgraph','ALOHA','cmdprint','madevent'], [40,40,40,40]): |
829 | - self.exec_cmd('output %s -f' % decay_dir,child=False) |
830 | + self.exec_cmd('output madevent %s -f' % decay_dir,child=False) |
831 | |
832 | #modify some parameter of the default run_card |
833 | run_card = banner_module.RunCard(pjoin(decay_dir,'Cards','run_card.dat')) |
834 | |
835 | === modified file 'madgraph/interface/reweight_interface.py' |
836 | --- madgraph/interface/reweight_interface.py 2020-06-16 13:10:57 +0000 |
837 | +++ madgraph/interface/reweight_interface.py 2020-08-21 07:00:37 +0000 |
838 | @@ -111,6 +111,7 @@ |
839 | self.rwgt_dir = None |
840 | self.exitted = False # Flag to know if do_quit was already called. |
841 | self.keep_ordering = False |
842 | + self.use_eventid = False |
843 | if event_path: |
844 | logger.info("Extracting the banner ...") |
845 | self.do_import(event_path, allow_madspin=allow_madspin) |
846 | @@ -356,8 +357,8 @@ |
847 | if self.has_standalone_dir: |
848 | self.terminate_fortran_executables() |
849 | self.has_standalone_dir = False |
850 | - elif args[0] == "keep_ordering": |
851 | - self.keep_ordering = banner.ConfigFile.format_variable(args[1], bool, "keep_ordering") |
852 | + elif args[0] in ["keep_ordering", "use_eventid"]: |
853 | + setattr(self, args[0], banner.ConfigFile.format_variable(args[1], bool, args[0])) |
854 | elif args[0] == "allow_missing_finalstate": |
855 | self.options["allow_missing_finalstate"] = banner.ConfigFile.format_variable(args[1], bool, "allow_missing_finalstate") |
856 | elif args[0] == "process": |
857 | @@ -980,11 +981,12 @@ |
858 | def calculate_weight(self, event): |
859 | """space defines where to find the calculator (in multicore)""" |
860 | |
861 | - if not hasattr(self,'pdf'): |
862 | - lhapdf = misc.import_python_lhapdf(self.mg5cmd.options['lhapdf']) |
863 | - self.pdf = lhapdf.mkPDF(self.banner.run_card.get_lhapdf_id()) |
864 | - |
865 | + |
866 | if self.has_nlo and self.rwgt_mode != "LO": |
867 | + if not hasattr(self,'pdf'): |
868 | + lhapdf = misc.import_python_lhapdf(self.mg5cmd.options['lhapdf']) |
869 | + self.pdf = lhapdf.mkPDF(self.banner.run_card.get_lhapdf_id()) |
870 | + |
871 | return self.calculate_nlo_weight(event) |
872 | |
873 | event.parse_reweight() |
874 | @@ -1206,7 +1208,7 @@ |
875 | # base = "rw_mevirt" |
876 | #else: |
877 | # base = "rw_me" |
878 | - |
879 | + |
880 | if (not self.second_model and not self.second_process and not self.dedicated_path) or hypp_id==0: |
881 | orig_order, Pdir, hel_dict = self.id_to_path[tag] |
882 | else: |
883 | @@ -1269,10 +1271,16 @@ |
884 | pold = list(p) |
885 | p = self.invert_momenta(p) |
886 | pdg = list(orig_order[0])+list(orig_order[1]) |
887 | - |
888 | + try: |
889 | + pid = event.ievent |
890 | + except AttributeError: |
891 | + pid = -1 |
892 | + if not self.use_eventid: |
893 | + pid = -1 |
894 | + |
895 | with misc.chdir(Pdir): |
896 | with misc.stdchannel_redirected(sys.stdout, os.devnull): |
897 | - me_value = module.smatrixhel(pdg,p, event.aqcd, scale2, nhel) |
898 | + me_value = module.smatrixhel(pdg, pid, p, event.aqcd, scale2, nhel) |
899 | |
900 | # for loop we have also the stability status code |
901 | if isinstance(me_value, tuple): |
902 | @@ -1387,10 +1395,12 @@ |
903 | nlo_order = nlo_order.replace('noborn', 'virt') |
904 | commandline += "add process %s [%s] %s;" % (base,nlo_order,post) |
905 | commandline = commandline.replace('add process', 'generate',1) |
906 | - logger.info("RETRY with %s", commandline) |
907 | - mgcmd.exec_cmd(commandline, precmd=True) |
908 | - has_nlo = False |
909 | + if commandline: |
910 | + logger.info("RETRY with %s", commandline) |
911 | + mgcmd.exec_cmd(commandline, precmd=True) |
912 | + has_nlo = False |
913 | except Exception, error: |
914 | + misc.sprint(type(error)) |
915 | raise |
916 | |
917 | commandline = 'output standalone_rw %s --prefix=int' % pjoin(path_me,data['paths'][0]) |
918 | @@ -1802,8 +1812,9 @@ |
919 | data = self.id_to_path_second |
920 | |
921 | # get all the information |
922 | - all_pdgs = mymod.get_pdg_order() |
923 | - all_pdgs = [[pdg for pdg in pdgs if pdg!=0] for pdgs in mymod.get_pdg_order()] |
924 | + allids, all_pids = mymod.get_pdg_order() |
925 | + all_pdgs = [[pdg for pdg in pdgs if pdg!=0] for pdgs in allids] |
926 | + #all_pids = [pid for (pdgs, pid) in allids] |
927 | all_prefix = [''.join(j).strip().lower() for j in mymod.get_prefix()] |
928 | prefix_set = set(all_prefix) |
929 | |
930 | @@ -1826,7 +1837,7 @@ |
931 | misc.sprint(os.path.exists(pjoin(path_me,onedir,'SubProcesses','MadLoop5_resources', '%sHelConfigs.dat' % prefix.upper()))) |
932 | continue |
933 | |
934 | - for i,pdg in enumerate(all_pdgs): |
935 | + for i,(pdg,pid) in enumerate(zip(all_pdgs,all_pids)): |
936 | if self.is_decay: |
937 | incoming = [pdg[0]] |
938 | outgoing = pdg[1:] |
939 | |
940 | === modified file 'madgraph/iolibs/export_fks.py' |
941 | --- madgraph/iolibs/export_fks.py 2019-10-16 10:56:33 +0000 |
942 | +++ madgraph/iolibs/export_fks.py 2020-08-21 07:00:37 +0000 |
943 | @@ -851,22 +851,25 @@ |
944 | StdHep_path = pjoin(MG5DIR, 'vendor', 'StdHEP') |
945 | if output_dependencies == 'external': |
946 | # check if stdhep has to be compiled (only the first time) |
947 | - if not os.path.exists(pjoin(MG5DIR, 'vendor', 'StdHEP', 'lib', 'libstdhep.a')) or \ |
948 | - not os.path.exists(pjoin(MG5DIR, 'vendor', 'StdHEP', 'lib', 'libFmcfio.a')): |
949 | + if (not os.path.exists(pjoin(MG5DIR, 'vendor', 'StdHEP', 'lib', 'libstdhep.a')) or \ |
950 | + not os.path.exists(pjoin(MG5DIR, 'vendor', 'StdHEP', 'lib', 'libFmcfio.a'))) and \ |
951 | + not os.path.exists(pjoin(MG5DIR, 'vendor', 'StdHEP','fail')): |
952 | if 'FC' not in os.environ or not os.environ['FC']: |
953 | path = os.path.join(StdHep_path, 'src', 'make_opts') |
954 | text = open(path).read() |
955 | for base in base_compiler: |
956 | text = text.replace(base,'FC=%s' % fcompiler_chosen) |
957 | open(path, 'w').writelines(text) |
958 | - |
959 | logger.info('Compiling StdHEP. This has to be done only once.') |
960 | try: |
961 | misc.compile(cwd = pjoin(MG5DIR, 'vendor', 'StdHEP')) |
962 | except Exception as error: |
963 | logger.debug(str(error)) |
964 | logger.warning("StdHep failed to compiled. This forbids to run NLO+PS with PY6 and Herwig6") |
965 | - logger.info("details on the compilation error are available if the code is run with --debug flag") |
966 | + logger.info("details on the compilation error are available on %s", pjoin(MG5DIR, 'vendor', 'StdHEP','fail')) |
967 | + logger.info("if you want to retry the compilation automatically, you have to remove that file first") |
968 | + with open(pjoin(MG5DIR, 'vendor', 'StdHEP','fail'),'w') as fsock: |
969 | + fsock.write(str(error)) |
970 | else: |
971 | logger.info('Done.') |
972 | if os.path.exists(pjoin(StdHep_path, 'lib', 'libstdhep.a')): |
973 | |
974 | === modified file 'madgraph/iolibs/export_v4.py' |
975 | --- madgraph/iolibs/export_v4.py 2020-06-20 21:10:10 +0000 |
976 | +++ madgraph/iolibs/export_v4.py 2020-08-21 07:00:37 +0000 |
977 | @@ -2066,17 +2066,18 @@ |
978 | |
979 | template = """ |
980 | %(python_information)s |
981 | - subroutine smatrixhel(pdgs, npdg, p, ALPHAS, SCALE2, nhel, ANS) |
982 | + subroutine smatrixhel(pdgs, procid, npdg, p, ALPHAS, SCALE2, nhel, ANS) |
983 | IMPLICIT NONE |
984 | |
985 | CF2PY double precision, intent(in), dimension(0:3,npdg) :: p |
986 | CF2PY integer, intent(in), dimension(npdg) :: pdgs |
987 | +CF2PY integer, intent(in):: procid |
988 | CF2PY integer, intent(in) :: npdg |
989 | CF2PY double precision, intent(out) :: ANS |
990 | CF2PY double precision, intent(in) :: ALPHAS |
991 | CF2PY double precision, intent(in) :: SCALE2 |
992 | integer pdgs(*) |
993 | - integer npdg, nhel |
994 | + integer npdg, nhel, procid |
995 | double precision p(*) |
996 | double precision ANS, ALPHAS, PI,SCALE2 |
997 | include 'coupl.inc' |
998 | @@ -2128,12 +2129,16 @@ |
999 | end |
1000 | |
1001 | |
1002 | - subroutine get_pdg_order(PDG) |
1003 | + subroutine get_pdg_order(PDG, ALLPROC) |
1004 | IMPLICIT NONE |
1005 | CF2PY INTEGER, intent(out) :: PDG(%(nb_me)i,%(maxpart)i) |
1006 | +CF2PY INTEGER, intent(out) :: ALLPROC(%(nb_me)i) |
1007 | INTEGER PDG(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i) |
1008 | + INTEGER ALLPROC(%(nb_me)i),PIDs(%(nb_me)i) |
1009 | DATA PDGS/ %(pdgs)s / |
1010 | + DATA PIDS/ %(pids)s / |
1011 | PDG = PDGS |
1012 | + ALLPROC = PIDS |
1013 | RETURN |
1014 | END |
1015 | |
1016 | @@ -2151,31 +2156,33 @@ |
1017 | |
1018 | allids = self.prefix_info.keys() |
1019 | allprefix = [self.prefix_info[key][0] for key in allids] |
1020 | - min_nexternal = min([len(ids) for ids in allids]) |
1021 | - max_nexternal = max([len(ids) for ids in allids]) |
1022 | + min_nexternal = min([len(ids[0]) for ids in allids]) |
1023 | + max_nexternal = max([len(ids[0]) for ids in allids]) |
1024 | |
1025 | info = [] |
1026 | - for key, (prefix, tag) in self.prefix_info.items(): |
1027 | - info.append('#PY %s : %s # %s' % (tag, key, prefix)) |
1028 | + for (key, pid), (prefix, tag) in self.prefix_info.items(): |
1029 | + info.append('#PY %s : %s # %s %s' % (tag, key, prefix, pid)) |
1030 | |
1031 | |
1032 | text = [] |
1033 | for n_ext in range(min_nexternal, max_nexternal+1): |
1034 | - current = [ids for ids in allids if len(ids)==n_ext] |
1035 | - if not current: |
1036 | + current_id = [ids[0] for ids in allids if len(ids[0])==n_ext] |
1037 | + current_pid = [ids[1] for ids in allids if len(ids[0])==n_ext] |
1038 | + if not current_id: |
1039 | continue |
1040 | if min_nexternal != max_nexternal: |
1041 | if n_ext == min_nexternal: |
1042 | text.append(' if (npdg.eq.%i)then' % n_ext) |
1043 | else: |
1044 | text.append(' else if (npdg.eq.%i)then' % n_ext) |
1045 | - for ii,pdgs in enumerate(current): |
1046 | + for ii,pdgs in enumerate(current_id): |
1047 | + pid = current_pid[ii] |
1048 | condition = '.and.'.join(['%i.eq.pdgs(%i)' %(pdg, i+1) for i, pdg in enumerate(pdgs)]) |
1049 | if ii==0: |
1050 | - text.append( ' if(%s) then ! %i' % (condition, i)) |
1051 | + text.append( ' if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition, pid, i)) |
1052 | else: |
1053 | - text.append( ' else if(%s) then ! %i' % (condition,i)) |
1054 | - text.append(' call %ssmatrixhel(p, nhel, ans)' % self.prefix_info[pdgs][0]) |
1055 | + text.append( ' else if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition,pid,i)) |
1056 | + text.append(' call %ssmatrixhel(p, nhel, ans)' % self.prefix_info[(pdgs,pid)][0]) |
1057 | text.append(' endif') |
1058 | #close the function |
1059 | if min_nexternal != max_nexternal: |
1060 | @@ -2192,8 +2199,9 @@ |
1061 | 'maxpart': max_nexternal, |
1062 | 'nb_me': len(allids), |
1063 | 'pdgs': ','.join(str(pdg[i]) if i<len(pdg) else '0' |
1064 | - for i in range(max_nexternal) for pdg in allids), |
1065 | + for i in range(max_nexternal) for (pdg,pid) in allids), |
1066 | 'prefix':'\',\''.join(allprefix), |
1067 | + 'pids': ','.join(str(pid) for (pdg,pid) in allids), |
1068 | 'parameter_setup': '\n'.join(parameter_setup), |
1069 | } |
1070 | formatting['lenprefix'] = len(formatting['prefix']) |
1071 | @@ -2311,7 +2319,7 @@ |
1072 | raise Exception, '--prefix options supports only \'int\' and \'proc\'' |
1073 | for proc in matrix_element.get('processes'): |
1074 | ids = [l.get('id') for l in proc.get('legs_with_decays')] |
1075 | - self.prefix_info[tuple(ids)] = [proc_prefix, proc.get_tag()] |
1076 | + self.prefix_info[(tuple(ids), proc.get('id'))] = [proc_prefix, proc.get_tag()] |
1077 | |
1078 | calls = self.write_matrix_element_v4( |
1079 | writers.FortranWriter(filename), |
1080 | @@ -3507,6 +3515,7 @@ |
1081 | MadEvent format.""" |
1082 | |
1083 | matrix_file = "matrix_madevent_v4.inc" |
1084 | + done_warning_tchannel = False |
1085 | |
1086 | # helper function for customise helas writter |
1087 | @staticmethod |
1088 | @@ -4053,7 +4062,9 @@ |
1089 | # Extract helas calls |
1090 | helas_calls = fortran_model.get_matrix_element_calls(\ |
1091 | matrix_element) |
1092 | - |
1093 | + if fortran_model.width_tchannel_set_tozero and not ProcessExporterFortranME.done_warning_tchannel: |
1094 | + logger.warning("Some T-channel width have been set to zero [new since 2.8.0]\n if you want to keep this width please set \"zerowidth_tchannel\" to False") |
1095 | + ProcessExporterFortranME.done_warning_tchannel = True |
1096 | |
1097 | replace_dict['helas_calls'] = "\n".join(helas_calls) |
1098 | |
1099 | |
1100 | === modified file 'madgraph/iolibs/group_subprocs.py' |
1101 | --- madgraph/iolibs/group_subprocs.py 2020-02-28 21:24:00 +0000 |
1102 | +++ madgraph/iolibs/group_subprocs.py 2020-08-21 07:00:37 +0000 |
1103 | @@ -62,11 +62,21 @@ |
1104 | ((leg numer, spin, mass, width, color), number).""" |
1105 | |
1106 | part = model.get_particle(leg.get('id')) |
1107 | + if abs(part.get('pdg_code')) in [23,25] and leg.get('state') == False: |
1108 | + part2 = model.get_particle(22) |
1109 | + mass = part2.get('mass') |
1110 | + width = part2.get('mass') |
1111 | + spin = part2.get('spin') |
1112 | + else: |
1113 | + mass = part.get('mass') |
1114 | + width = part.get('width') |
1115 | + spin = part.get('spin') |
1116 | |
1117 | - return [((leg.get('number'), part.get('spin'), |
1118 | - part.get('mass'), part.get('width'), part.get('color')), |
1119 | + return [((leg.get('number'), spin, |
1120 | + mass, width, part.get('color')), |
1121 | leg.get('number'))] |
1122 | - |
1123 | + |
1124 | + |
1125 | @staticmethod |
1126 | def vertex_id_from_vertex(vertex, last_vertex, model, ninitial): |
1127 | """Returns the info needed to identify configs: |
1128 | @@ -77,9 +87,18 @@ |
1129 | if last_vertex: |
1130 | return ((0,),) |
1131 | else: |
1132 | - part = model.get_particle(vertex.get('legs')[-1].get('id')) |
1133 | + leg = vertex.get('legs')[-1] |
1134 | + part = model.get_particle(leg.get('id')) |
1135 | + if abs(part.get('pdg_code')) in [23,25] and leg.get('state') == False: |
1136 | + part2 = model.get_particle(22) |
1137 | + mass = part2.get('mass') |
1138 | + width = part2.get('width') |
1139 | + else: |
1140 | + mass = part.get('mass') |
1141 | + width = part.get('width') |
1142 | + |
1143 | return ((part.get('color'), |
1144 | - part.get('mass'), part.get('width')), |
1145 | + mass, width), |
1146 | 0) |
1147 | |
1148 | @staticmethod |
1149 | @@ -296,7 +315,7 @@ |
1150 | return sum([md.get_num_configs(model, nini) for md in |
1151 | self.get('mapping_diagrams')]) |
1152 | |
1153 | - def find_mapping_diagrams(self): |
1154 | + def find_mapping_diagrams(self, max_tpropa=0): |
1155 | """Find all unique diagrams for all processes in this |
1156 | process class, and the mapping of their diagrams unto this |
1157 | unique diagram.""" |
1158 | @@ -304,6 +323,9 @@ |
1159 | assert self.get('matrix_elements'), \ |
1160 | "Need matrix elements to run find_mapping_diagrams" |
1161 | |
1162 | + if max_tpropa == 0: |
1163 | + max_tpropa = base_objects.Vertex.max_tpropa |
1164 | + |
1165 | matrix_elements = self.get('matrix_elements') |
1166 | model = matrix_elements[0].get('processes')[0].get('model') |
1167 | # mapping_diagrams: The configurations for the non-reducable |
1168 | @@ -348,6 +370,9 @@ |
1169 | max(diagram.get_vertex_leg_numbers()) > minvert: |
1170 | diagram_maps[ime].append(0) |
1171 | continue |
1172 | + if diagram.get_nb_t_channel() > max_tpropa: |
1173 | + diagram_maps[ime].append(0) |
1174 | + continue |
1175 | # Create the equivalent diagram, in the format |
1176 | # [[((ext_number1, mass_width_id1), ..., )], |
1177 | # ...] (for each vertex) |
1178 | |
1179 | === modified file 'madgraph/iolibs/helas_call_writers.py' |
1180 | --- madgraph/iolibs/helas_call_writers.py 2019-03-01 14:55:00 +0000 |
1181 | +++ madgraph/iolibs/helas_call_writers.py 2020-08-21 07:00:37 +0000 |
1182 | @@ -14,6 +14,8 @@ |
1183 | ################################################################################ |
1184 | """Classes for writing Helas calls. HelasCallWriter is the base class.""" |
1185 | |
1186 | +import re |
1187 | + |
1188 | import madgraph.core.base_objects as base_objects |
1189 | import madgraph.core.helas_objects as helas_objects |
1190 | import madgraph.loop.loop_helas_objects as loop_helas_objects |
1191 | @@ -62,6 +64,7 @@ |
1192 | self['model'] = base_objects.Model() |
1193 | self['wavefunctions'] = {} |
1194 | self['amplitudes'] = {} |
1195 | + self.width_tchannel_set_tozero = False |
1196 | |
1197 | def filter(self, name, value): |
1198 | """Filter for model property values""" |
1199 | @@ -231,6 +234,8 @@ |
1200 | |
1201 | res = [] |
1202 | for diagram in matrix_element.get('diagrams'): |
1203 | + |
1204 | + |
1205 | res.extend([ self.get_wavefunction_call(wf) for \ |
1206 | wf in diagram.get('wavefunctions') ]) |
1207 | res.append("# Amplitude(s) for diagram number %d" % \ |
1208 | @@ -274,11 +279,18 @@ |
1209 | corresponding to the key""" |
1210 | |
1211 | try: |
1212 | + #misc.sprint(wavefunction['number_external']) |
1213 | call = self["wavefunctions"][wavefunction.get_call_key()](\ |
1214 | - wavefunction) |
1215 | - return call |
1216 | - except KeyError: |
1217 | + wavefunction) |
1218 | + except KeyError as error: |
1219 | return "" |
1220 | + |
1221 | + if self.options['zerowidth_tchannel'] and wavefunction.is_t_channel(): |
1222 | + call, n = re.subn(',\s*fk_(?!ZERO)\w*\s*,', ', ZERO,', str(call), flags=re.I) |
1223 | + if n: |
1224 | + self.width_tchannel_set_tozero = True |
1225 | + return call |
1226 | + |
1227 | |
1228 | def get_amplitude_call(self, amplitude): |
1229 | """Return the function for writing the amplitude |
1230 | @@ -324,10 +336,15 @@ |
1231 | |
1232 | # Customized constructor |
1233 | |
1234 | - def __init__(self, argument={}): |
1235 | + def __init__(self, argument={}, options={}): |
1236 | """Allow generating a HelasCallWriter from a Model |
1237 | """ |
1238 | |
1239 | + default_options = {'zerowidth_tchannel': True} |
1240 | + |
1241 | + self.options = dict(default_options) |
1242 | + self.options.update(options) |
1243 | + |
1244 | if isinstance(argument, base_objects.Model): |
1245 | super(HelasCallWriter, self).__init__() |
1246 | self.set('model', argument) |
1247 | @@ -1003,13 +1020,13 @@ |
1248 | |
1249 | mp_prefix = check_param_card.ParamCard.mp_prefix |
1250 | |
1251 | - def __init__(self, argument={}, hel_sum = False): |
1252 | + def __init__(self, argument={}, hel_sum = False, options={}): |
1253 | """Allow generating a HelasCallWriter from a Model.The hel_sum argument |
1254 | specifies if amplitude and wavefunctions must be stored specifying the |
1255 | helicity, i.e. W(1,i) vs W(1,i,H). |
1256 | """ |
1257 | self.hel_sum = hel_sum |
1258 | - super(FortranUFOHelasCallWriter, self).__init__(argument) |
1259 | + super(FortranUFOHelasCallWriter, self).__init__(argument, options=options) |
1260 | |
1261 | def format_helas_object(self, prefix, number): |
1262 | """ Returns the string for accessing the wavefunction with number in |
1263 | |
1264 | === modified file 'madgraph/iolibs/template_files/loop_optimized/check_sa_all.py.inc' |
1265 | --- madgraph/iolibs/template_files/loop_optimized/check_sa_all.py.inc 2016-10-20 23:12:29 +0000 |
1266 | +++ madgraph/iolibs/template_files/loop_optimized/check_sa_all.py.inc 2020-08-21 07:00:37 +0000 |
1267 | @@ -49,10 +49,10 @@ |
1268 | allmatrix2py.set_madloop_path(os.path.abspath(pjoin(root_path,'MadLoop5_resources'))) |
1269 | # List all processes available in this module |
1270 | |
1271 | -all_procs_available = [[pdg for pdg in proc_pdgs if pdg!=0] for proc_pdgs in allmatrix2py.get_pdg_order()] |
1272 | +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()] |
1273 | print "Available processes are:" |
1274 | for process_pdgs in all_procs_available: |
1275 | - print " --> %s"%str(process_pdgs) |
1276 | + print " --> %s: process id: %i "%str(process_pdgs[0], process_pdgs[1]) |
1277 | |
1278 | def invert_momenta(p): |
1279 | """ fortran/C-python do not order table in the same order""" |
1280 | @@ -62,7 +62,7 @@ |
1281 | |
1282 | # The kinematic configuration in the convention (E, px, py, pz) and with particles ordered as in the process definition. |
1283 | # This is the structure of this dictionary. |
1284 | -p= dict( (tuple(process_pdgs),[[None,]*4]*len(process_pdgs)) for process_pdgs in all_procs_available) |
1285 | +p= dict( (tuple(process_pdgs[0]),[[None,]*4]*len(process_pdgs[0])) for process_pdgs in all_procs_available) |
1286 | |
1287 | if (p.values()[0])[0][0] is None: |
1288 | if not os.path.isfile(pjoin(root_path,'PS.input')): |
1289 | @@ -120,7 +120,7 @@ |
1290 | # Choice of renormalization scale |
1291 | renormalization_scale = 91.188 |
1292 | |
1293 | - finite_loop_me, return_code = allmatrix2py.smatrixhel(pdgs=list(process_pdgs), |
1294 | + finite_loop_me, return_code = allmatrix2py.smatrixhel(pdgs=list(process_pdgs), procid=-1, |
1295 | p=P, alphas=alphas,scales2=renormalization_scale,nhel=nhel) |
1296 | |
1297 | print '* %-108s *'%' MadLoop evaluation for the process ' |
1298 | |
1299 | === modified file 'madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc' |
1300 | --- madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc 2017-07-31 22:08:40 +0000 |
1301 | +++ madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc 2020-08-21 07:00:37 +0000 |
1302 | @@ -2737,11 +2737,14 @@ |
1303 | PARAMETER (NEXTERNAL=%(nexternal)d) |
1304 | INTEGER NSQUAREDSO |
1305 | PARAMETER (NSQUAREDSO=%(nSquaredSO)d) |
1306 | + %(get_nsqso_born)s |
1307 | C |
1308 | C ARGUMENTS |
1309 | C |
1310 | %(real_dp_format)s P(0:3,NEXTERNAL) |
1311 | - %(real_dp_format)s ANS(0:3,0:NSQUAREDSO) |
1312 | + INTEGER ANS_DIMENSION |
1313 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1314 | + %(real_dp_format)s ANS(0:3,0:ANS_DIMENSION) |
1315 | INTEGER HEL, USERHEL |
1316 | common/%(proc_prefix)sUSERCHOICE/USERHEL |
1317 | C ---------- |
1318 | @@ -2764,7 +2767,10 @@ |
1319 | C ARGUMENTS |
1320 | C |
1321 | %(real_dp_format)s P(0:3,NEXTERNAL) |
1322 | - %(real_dp_format)s ANS(0:3,0:NSQUAREDSO) |
1323 | + %(get_nsqso_born)s |
1324 | + INTEGER ANS_DIMENSION |
1325 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1326 | + %(real_dp_format)s ANS(0:3,0:ANS_DIMENSION) |
1327 | INTEGER HEL, RET_CODE |
1328 | %(real_dp_format)s PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
1329 | C |
1330 | @@ -2875,7 +2881,10 @@ |
1331 | C ARGUMENTS |
1332 | C |
1333 | %(real_dp_format)s P(0:3,NEXTERNAL) |
1334 | - %(real_dp_format)s ANS(0:3,0:NSQUAREDSO) |
1335 | + %(get_nsqso_born)s |
1336 | + INTEGER ANS_DIMENSION |
1337 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1338 | + %(real_dp_format)s ANS(0:3,0:ANS_DIMENSION) |
1339 | %(real_dp_format)s PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
1340 | INTEGER RET_CODE |
1341 | C |
1342 | |
1343 | === modified file 'madgraph/iolibs/template_files/makefile_sa_f2py' |
1344 | --- madgraph/iolibs/template_files/makefile_sa_f2py 2017-09-25 21:30:36 +0000 |
1345 | +++ madgraph/iolibs/template_files/makefile_sa_f2py 2020-08-21 07:00:37 +0000 |
1346 | @@ -2,7 +2,8 @@ |
1347 | SHELL = /bin/bash |
1348 | LIBDIR = ../lib/ |
1349 | PROG = check |
1350 | -LINKLIBS = -L../lib/ -ldhelas -lmodel |
1351 | +LINKLIBS_ME = -L../lib/ -ldhelas -lmodel |
1352 | +LINKLIBS_ALL = -L../lib/ -lmatrix -ldhelas -lmodel |
1353 | LIBS = $(LIBDIR)libdhelas.$(libext) $(LIBDIR)libmodel.$(libext) |
1354 | PROCESS= allmatrix.o |
1355 | LIBRARY = libmatrix.a |
1356 | @@ -12,12 +13,19 @@ |
1357 | MENUM=2 |
1358 | endif |
1359 | |
1360 | - |
1361 | -allmatrix$(MENUM)py.so: $(LIBDIR)/$(LIBRARY) all_matrix.o |
1362 | - $(F2PY) --f77exec=$(FC) $(LINKLIBS) -lmatrix -c all_matrix.f */matrix.f -m allmatrix$(MENUM)py |
1363 | - |
1364 | - |
1365 | - |
1366 | +%$(MENUM)py.so: %/matrix.f |
1367 | + $(F2PY) --f77exec=$(FC) $(LINKLIBS_ME) -c $^ -m $(patsubst %/matrix.f,%$(MENUM)py,$^) |
1368 | + |
1369 | +all_matrix$(MENUM)py.so: $(LIBDIR)/$(LIBRARY) all_matrix.f |
1370 | + $(F2PY) --f77exec=$(FC) $(LINKLIBS_ALL) -c all_matrix.f -m all_matrix$(MENUM)py |
1371 | + |
1372 | + |
1373 | +allmatrix$(MENUM)py.so: $(patsubst %/matrix.f,%$(MENUM)py.so,$(wildcard */matrix.f)) all_matrix$(MENUM)py.so |
1374 | + for lib in $(patsubst %.so,%,$^); do \ |
1375 | + echo "from $$lib import *" >> allmatrix$(MENUM)py.py; \ |
1376 | + done |
1377 | + |
1378 | + |
1379 | $(LIBDIR)/$(LIBRARY): $(patsubst %.f,%.o,$(wildcard */matrix.f)) all_matrix.o |
1380 | $(call CREATELIB, $@, $^) |
1381 | |
1382 | |
1383 | === modified file 'madgraph/iolibs/template_files/matrix_madevent_group_v4.inc' |
1384 | --- madgraph/iolibs/template_files/matrix_madevent_group_v4.inc 2019-06-26 10:35:18 +0000 |
1385 | +++ madgraph/iolibs/template_files/matrix_madevent_group_v4.inc 2020-08-21 07:00:37 +0000 |
1386 | @@ -52,7 +52,11 @@ |
1387 | INTEGER JHEL(2), J, JJ |
1388 | INTEGER THIS_NTRY(2) |
1389 | SAVE THIS_NTRY |
1390 | - DATA THIS_NTRY /0,0/ |
1391 | + INTEGER NB_FAIL |
1392 | + SAVE NB_FAIL |
1393 | + DATA THIS_NTRY /0,0/ |
1394 | + DATA NB_FAIL /0/ |
1395 | + |
1396 | c |
1397 | C This is just to temporarily store the reference grid for helicity of the DiscreteSampler so as to obtain its number of entries with ref_helicity_grid%%n_tot_entries |
1398 | type(SampledDimension) ref_helicity_grid |
1399 | @@ -211,8 +215,13 @@ |
1400 | IF (XTOT.NE.0D0) THEN |
1401 | %(set_amp2_line)s |
1402 | ELSE IF(ANS.ne.0d0) THEN |
1403 | + IF(NB_FAIL.ge.10)then |
1404 | write(*,*) "Problem in the multi-channeling. All amp2 are zero but not the total matrix-element" |
1405 | + |
1406 | stop 1 |
1407 | + else |
1408 | + nb_fail = nb_fail +1 |
1409 | + endif |
1410 | ENDIF |
1411 | ENDIF |
1412 | ANS=ANS/DBLE(IDEN) |
1413 | |
1414 | === modified file 'madgraph/loop/loop_exporters.py' |
1415 | --- madgraph/loop/loop_exporters.py 2020-06-20 21:10:10 +0000 |
1416 | +++ madgraph/loop/loop_exporters.py 2020-08-21 07:00:37 +0000 |
1417 | @@ -334,11 +334,12 @@ |
1418 | CALL SETMADLOOPPATH(PATH) |
1419 | END |
1420 | |
1421 | - subroutine smatrixhel(pdgs, npdg, p, ALPHAS, SCALES2, nhel, ANS, RETURNCODE) |
1422 | + subroutine smatrixhel(pdgs, procid, npdg, p, ALPHAS, SCALES2, nhel, ANS, RETURNCODE) |
1423 | IMPLICIT NONE |
1424 | |
1425 | CF2PY double precision, intent(in), dimension(0:3,npdg) :: p |
1426 | CF2PY integer, intent(in), dimension(npdg) :: pdgs |
1427 | +CF2PY integer, intent(in):: procid |
1428 | CF2PY integer, intent(in) :: npdg |
1429 | CF2PY double precision, intent(out) :: ANS |
1430 | CF2PY integer, intent(out) :: RETURNCODE |
1431 | @@ -346,22 +347,25 @@ |
1432 | CF2PY double precision, intent(in) :: SCALES2 |
1433 | |
1434 | integer pdgs(*) |
1435 | - integer npdg, nhel, RETURNCODE |
1436 | + integer npdg, nhel, RETURNCODE, procid |
1437 | double precision p(*) |
1438 | double precision ANS, ALPHAS, PI,SCALES2 |
1439 | - |
1440 | + 1 continue |
1441 | %(smatrixhel)s |
1442 | |
1443 | return |
1444 | end |
1445 | |
1446 | - subroutine get_pdg_order(OUT) |
1447 | + subroutine get_pdg_order(OUT, ALLPROC) |
1448 | IMPLICIT NONE |
1449 | CF2PY INTEGER, intent(out) :: OUT(%(nb_me)i,%(maxpart)i) |
1450 | - |
1451 | +CF2PY INTEGER, intent(out) :: ALLPROC(%(nb_me)i) |
1452 | INTEGER OUT(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i) |
1453 | + INTEGER ALLPROC(%(nb_me)i),PIDs(%(nb_me)i) |
1454 | DATA PDGS/ %(pdgs)s / |
1455 | + DATA PIDS/ %(pids)s / |
1456 | OUT=PDGS |
1457 | + ALLPROC = PIDS |
1458 | RETURN |
1459 | END |
1460 | |
1461 | @@ -378,31 +382,37 @@ |
1462 | |
1463 | allids = self.prefix_info.keys() |
1464 | allprefix = [self.prefix_info[key][0] for key in allids] |
1465 | - min_nexternal = min([len(ids) for ids in allids]) |
1466 | - max_nexternal = max([len(ids) for ids in allids]) |
1467 | + min_nexternal = min([len(ids[0]) for ids in allids]) |
1468 | + max_nexternal = max([len(ids[0]) for ids in allids]) |
1469 | |
1470 | info = [] |
1471 | - for key, (prefix, tag) in self.prefix_info.items(): |
1472 | - info.append('#PY %s : %s # %s' % (tag, key, prefix)) |
1473 | + for (key,pid), (prefix, tag) in self.prefix_info.items(): |
1474 | + info.append('#PY %s : %s # %s %s' % (tag, key, prefix, pid)) |
1475 | |
1476 | |
1477 | text = [] |
1478 | for n_ext in range(min_nexternal, max_nexternal+1): |
1479 | - current = [ids for ids in allids if len(ids)==n_ext] |
1480 | - if not current: |
1481 | + current_id = [ids[0] for ids in allids if len(ids[0])==n_ext] |
1482 | + current_pid = [ids[1] for ids in allids if len(ids[0])==n_ext] |
1483 | + if not current_id: |
1484 | continue |
1485 | if min_nexternal != max_nexternal: |
1486 | if n_ext == min_nexternal: |
1487 | text.append(' if (npdg.eq.%i)then' % n_ext) |
1488 | else: |
1489 | text.append(' else if (npdg.eq.%i)then' % n_ext) |
1490 | - for ii,pdgs in enumerate(current): |
1491 | + for ii,pdgs in enumerate(current_id): |
1492 | + pid = current_pid[ii] |
1493 | condition = '.and.'.join(['%i.eq.pdgs(%i)' %(pdg, i+1) for i, pdg in enumerate(pdgs)]) |
1494 | if ii==0: |
1495 | - text.append( ' if(%s) then ! %i' % (condition, i)) |
1496 | + text.append( ' if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition, pid, i)) |
1497 | else: |
1498 | - text.append( ' else if(%s) then ! %i' % (condition,i)) |
1499 | - text.append(' call %sget_me(p, ALPHAS, DSQRT(SCALES2), NHEL, ANS, RETURNCODE)' % self.prefix_info[pdgs][0]) |
1500 | + text.append( ' else if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition,pid,i)) |
1501 | + text.append(' call %sget_me(p, ALPHAS, DSQRT(SCALES2), NHEL, ANS, RETURNCODE)' % self.prefix_info[(pdgs,pid)][0]) |
1502 | + text.append( ' else if(procid.gt.0) then !') |
1503 | + text.append( ' procid = -1' ) |
1504 | + text.append( ' goto 1' ) |
1505 | + |
1506 | text.append(' endif') |
1507 | #close the function |
1508 | if min_nexternal != max_nexternal: |
1509 | @@ -422,9 +432,10 @@ |
1510 | 'nb_me': len(allids), |
1511 | 'pdgs': ','.join([str(pdg[i]) if i<len(pdg) else '0' |
1512 | for i in range(max_nexternal) \ |
1513 | - for pdg in allids]), |
1514 | + for (pdg,pid) in allids]), |
1515 | 'prefix':'\',\''.join(allprefix), |
1516 | 'parameter_setup': '\n'.join(parameter_setup), |
1517 | + 'pids': ','.join(str(pid) for (pdg,pid) in allids), |
1518 | } |
1519 | |
1520 | |
1521 | @@ -1023,7 +1034,7 @@ |
1522 | if 'prefix' in self.cmd_options and self.cmd_options['prefix'] in ['int','proc']: |
1523 | for proc in matrix_element.get('processes'): |
1524 | ids = [l.get('id') for l in proc.get('legs_with_decays')] |
1525 | - self.prefix_info[tuple(ids)] = [dict['proc_prefix'], proc.get_tag()] |
1526 | + self.prefix_info[tuple(ids),proc.get('id')] = [dict['proc_prefix'], proc.get_tag()] |
1527 | |
1528 | # The proc_id is used for MadEvent grouping, so none of our concern here |
1529 | # and it is simply set to an empty string. |
1530 | @@ -3013,7 +3024,6 @@ |
1531 | matrix_element.rep_dict['coef_construction']=replace_dict['coef_construction'] |
1532 | |
1533 | replace_dict['coef_merging']='\n'.join(coef_merging) |
1534 | - |
1535 | file = file % replace_dict |
1536 | number_of_calls = len(filter(lambda call: call.find('CALL LOOP') != 0, \ |
1537 | loop_CT_calls)) |
1538 | |
1539 | === modified file 'madgraph/various/banner.py' |
1540 | --- madgraph/various/banner.py 2020-05-25 21:16:05 +0000 |
1541 | +++ madgraph/various/banner.py 2020-08-21 07:00:37 +0000 |
1542 | @@ -24,6 +24,7 @@ |
1543 | import math |
1544 | import StringIO |
1545 | import itertools |
1546 | +import time |
1547 | |
1548 | |
1549 | pjoin = os.path.join |
1550 | @@ -2896,10 +2897,10 @@ |
1551 | self.add_param("nevents", 10000) |
1552 | self.add_param("iseed", 0) |
1553 | 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") |
1554 | - self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9, -2,-3], |
1555 | - 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') |
1556 | - self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9], |
1557 | - 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') |
1558 | + self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9, -2,-3,4,-4], |
1559 | + 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, 4: photon from muon, 9: PLUGIN MODE') |
1560 | + self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9,4,-4], |
1561 | + 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, 4: photon from muon, 9: PLUGIN MODE') |
1562 | self.add_param("ebeam1", 6500.0, fortran_name="ebeam(1)") |
1563 | self.add_param("ebeam2", 6500.0, fortran_name="ebeam(2)") |
1564 | self.add_param("polbeam1", 0.0, fortran_name="pb1", hidden=True, |
1565 | @@ -2945,6 +2946,7 @@ |
1566 | self.add_param("pdfwgt", True, hidden=True) |
1567 | self.add_param("asrwgtflavor", 5, hidden=True, comment = 'highest quark flavor for a_s reweighting in MLM') |
1568 | self.add_param("clusinfo", True, hidden=True) |
1569 | + #format output / boost |
1570 | self.add_param("lhe_version", 3.0, hidden=True) |
1571 | self.add_param("boost_event", "False", hidden=True, include=False, comment="allow to boost the full event. The boost put at rest the sume of 4-momenta of the particle selected by the filter defined here. example going to the higgs rest frame: lambda p: p.pid==25") |
1572 | self.add_param("me_frame", [1,2], hidden=True, include=False, comment="choose lorentz frame where to evaluate matrix-element [for non lorentz invariant matrix-element/polarization]:\n - 0: partonic center of mass\n - 1: Multi boson frame\n - 2 : (multi) scalar frame\n - 3 : user custom") |
1573 | @@ -3182,7 +3184,6 @@ |
1574 | if self['xqcut'] > 0: |
1575 | if self['ickkw'] == 0: |
1576 | logger.error('xqcut>0 but ickkw=0. Potentially not fully consistent setup. Be carefull') |
1577 | - import time |
1578 | time.sleep(5) |
1579 | if self['drjj'] != 0: |
1580 | if 'drjj' in self.user_set: |
1581 | @@ -3212,14 +3213,16 @@ |
1582 | |
1583 | # check if lpp = |
1584 | for i in [1,2]: |
1585 | - if self['lpp%s' % i ] == 3 and self['dsqrt_q2fact%s'%i] > 4: |
1586 | - 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 + \ |
1587 | - "For EPA this number should be small (for HERA prediction it should be 2 at most)") |
1588 | - if self['lpp%s' % i ] == 2 and self['dsqrt_q2fact%s'%i] == 91.188: |
1589 | - 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) |
1590 | + if abs(self['lpp%s' % i ]) in [3,4] and self['dsqrt_q2fact%s'%i] == 91.188: |
1591 | + 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) |
1592 | + time.sleep(5) |
1593 | |
1594 | + if abs(self['lpp%s' % i ]) == 2 and self['dsqrt_q2fact%s'%i] == 91.188: |
1595 | + 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) |
1596 | + time.sleep(5) |
1597 | + |
1598 | # if both lpp1/2 are on PA mode -> force fixed factorization scale |
1599 | - if self['lpp1'] in [2, 3] and self['lpp2'] in [2, 3] and not self['fixed_fac_scale']: |
1600 | + if abs(self['lpp1']) in [2, 3,4] and abs(self['lpp2']) in [2, 3,4] and not self['fixed_fac_scale']: |
1601 | raise InvalidRunCard("Having both beam in elastic photon mode requires fixec_fac_scale to be on True [since this is use as cutoff]") |
1602 | |
1603 | |
1604 | @@ -3337,19 +3340,21 @@ |
1605 | self['ebeam1'] = '6500' |
1606 | self['ebeam2'] = '1k' |
1607 | |
1608 | - elif 11 in beam_id or -11 in beam_id: |
1609 | + elif any(id in beam_id for id in [11,-11,13,-13]): |
1610 | self['lpp1'] = 0 |
1611 | self['lpp2'] = 0 |
1612 | self['ebeam1'] = 500 |
1613 | self['ebeam2'] = 500 |
1614 | self['use_syst'] = False |
1615 | + if set([ abs(i) for i in beam_id_split[0]]) == set([ abs(i) for i in beam_id_split[1]]): |
1616 | + self.display_block.append('ecut') |
1617 | self.display_block.append('beam_pol') |
1618 | - self.display_block.append('ecut') |
1619 | else: |
1620 | self['lpp1'] = 0 |
1621 | self['lpp2'] = 0 |
1622 | self['use_syst'] = False |
1623 | - self.display_block.append('beam_pol') |
1624 | + self.display_block.append('beam_pol') |
1625 | + self.display_block.append('ecut') |
1626 | |
1627 | # automatic polarisation of the beam if neutrino beam |
1628 | if any(id in beam_id for id in [12,-12,14,-14,16,-16]): |
1629 | @@ -3358,25 +3363,25 @@ |
1630 | self['lpp1'] = 0 |
1631 | self['ebeam1'] = '1k' |
1632 | self['polbeam1'] = -100 |
1633 | - if not all(id in beam_id_split[0] for id in [12,14,16]): |
1634 | - logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') |
1635 | + if not all(id in [12,14,16] for id in beam_id_split[0]): |
1636 | + logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1]. %s') |
1637 | elif any(id in beam_id_split[0] for id in [-12,-14,-16]): |
1638 | self['lpp1'] = 0 |
1639 | self['ebeam1'] = '1k' |
1640 | self['polbeam1'] = 100 |
1641 | - if not all(id in beam_id_split[0] for id in [-12,-14,-16]): |
1642 | + if not all(id in [-12,-14,-16] for id in beam_id_split[0]): |
1643 | logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam1].') |
1644 | if any(id in beam_id_split[1] for id in [12,14,16]): |
1645 | self['lpp2'] = 0 |
1646 | self['ebeam2'] = '1k' |
1647 | self['polbeam2'] = -100 |
1648 | - if not all(id in beam_id_split[1] for id in [12,14,16]): |
1649 | + if not all(id in [12,14,16] for id in beam_id_split[1]): |
1650 | logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') |
1651 | if any(id in beam_id_split[1] for id in [-12,-14,-16]): |
1652 | self['lpp2'] = 0 |
1653 | self['ebeam2'] = '1k' |
1654 | self['polbeam2'] = 100 |
1655 | - if not all(id in beam_id_split[1] for id in [-12,-14,-16]): |
1656 | + if not all(id in [-12,-14,-16] for id in beam_id_split[1]): |
1657 | logger.warning('Issue with default beam setup of neutrino in the run_card. Please check it up [polbeam2].') |
1658 | |
1659 | # Check if need matching |
1660 | @@ -4285,7 +4290,7 @@ |
1661 | maxjetflavor = max([4]+[abs(i) for i in beam_id if -7< i < 7]) |
1662 | self['maxjetflavor'] = maxjetflavor |
1663 | pass |
1664 | - elif 11 in beam_id or -11 in beam_id: |
1665 | + elif any(id in beam_id for id in [11,-11,13,-13]): |
1666 | self['lpp1'] = 0 |
1667 | self['lpp2'] = 0 |
1668 | self['ebeam1'] = 500 |
1669 | |
1670 | === modified file 'mg5decay/decay_objects.py' |
1671 | --- mg5decay/decay_objects.py 2018-06-01 08:46:21 +0000 |
1672 | +++ mg5decay/decay_objects.py 2020-08-21 07:00:37 +0000 |
1673 | @@ -4086,15 +4086,28 @@ |
1674 | # Evaluate the coupling strength |
1675 | vertex = model.get('interaction_dict')[abs(vert.get('id'))] |
1676 | lorentz_factor = 0 |
1677 | + |
1678 | + for fct in model['functions']: |
1679 | + if ';' in fct.expr: |
1680 | + raise Exception('; is not allowed in function_library') |
1681 | + exec("mdl_%s = lambda %s: %s" %(fct.name, ','.join( fct.arguments), fct.expr)) |
1682 | + exec("%s = lambda %s: %s" %(fct.name, ','.join( fct.arguments), fct.expr)) |
1683 | + |
1684 | for key, v in vertex['couplings'].items(): |
1685 | if not hasattr(model, 'lorentz_dict'): |
1686 | model.lorentz_dict = dict([(l.name, l) for l in model['lorentz']]) |
1687 | self.init_regular_expression() |
1688 | + |
1689 | + lorentz = model.lorentz_dict[vertex['lorentz'][key[1]]] |
1690 | + structure = lorentz.structure |
1691 | + if hasattr(lorentz, 'formfactors') and lorentz.formfactors: |
1692 | + for ff in lorentz.formfactors: |
1693 | + structure = structure.replace(ff.name, '(%s)' % ff.value) |
1694 | |
1695 | - structure = model.lorentz_dict[vertex['lorentz'][key[1]]].structure |
1696 | new_structure = self.lor_pattern.sub(self.simplify_lorentz, |
1697 | structure) |
1698 | - lor_value = eval(new_structure % q_dict_lor) |
1699 | + |
1700 | + lor_value = eval(new_structure % q_dict_lor, locals(), globals()) |
1701 | if lor_value == 0: |
1702 | new_structure = new_structure.replace('-','+') |
1703 | lor_value = eval(new_structure % q_dict_lor) |
1704 | @@ -4131,6 +4144,12 @@ |
1705 | # A quick estimate of the next-level decay of a off-shell decay |
1706 | # Consider all legs are onshell. |
1707 | else: |
1708 | + for fct in model['functions']: |
1709 | + if ';' in fct.expr: |
1710 | + raise Exception('; is not allowed in function_library') |
1711 | + exec("mdl_%s = lambda %s: %s" %(fct.name, ','.join( fct.arguments), fct.expr)) |
1712 | + exec("%s = lambda %s: %s" %(fct.name, ','.join( fct.arguments), fct.expr)) |
1713 | + |
1714 | M = abs(eval(ini_part.get('mass'))) |
1715 | # The avg_E is lower by one more particle in the next-level. |
1716 | avg_E = (M/(len(self.get_final_legs())+1.)) |
1717 | |
1718 | === modified file 'tests/acceptance_tests/test_cmd.py' |
1719 | --- tests/acceptance_tests/test_cmd.py 2020-03-08 16:22:04 +0000 |
1720 | +++ tests/acceptance_tests/test_cmd.py 2020-08-21 07:00:37 +0000 |
1721 | @@ -206,6 +206,8 @@ |
1722 | 'low_mem_multicore_nlo_generation': False, |
1723 | 'ninja': './HEPTools/lib', |
1724 | 'samurai': None, |
1725 | + 'max_t_for_channel': 99, |
1726 | + 'zerowidth_tchannel': True |
1727 | } |
1728 | |
1729 | self.assertEqual(config, expected) |
1730 | |
1731 | === modified file 'tests/acceptance_tests/test_cmd_reweight.py' |
1732 | --- tests/acceptance_tests/test_cmd_reweight.py 2020-06-20 21:10:10 +0000 |
1733 | +++ tests/acceptance_tests/test_cmd_reweight.py 2020-08-21 07:00:37 +0000 |
1734 | @@ -212,8 +212,12 @@ |
1735 | ff = open(pjoin(self.run_dir, 'Cards', 'reweight_card.dat'),'w') |
1736 | ff.write(cmd_lines) |
1737 | ff.close() |
1738 | - |
1739 | - with misc.stdchannel_redirected(sys.stdout, os.devnull): |
1740 | + mad_logger = logging.getLogger('madgraph') |
1741 | + |
1742 | + if mad_logger.level > 20: |
1743 | + with misc.stdchannel_redirected(sys.stdout, os.devnull): |
1744 | + me_cmd.run_cmd('reweight run_01 --from_cards') |
1745 | + else: |
1746 | me_cmd.run_cmd('reweight run_01 --from_cards') |
1747 | |
1748 | lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz')) |
1749 | @@ -242,9 +246,12 @@ |
1750 | ff.write(cmd_lines) |
1751 | ff.close() |
1752 | |
1753 | - if 1: #with misc.stdchannel_redirected(sys.stdout, os.devnull): |
1754 | + mad_logger = logging.getLogger('madgraph') |
1755 | + if mad_logger.level > 20: |
1756 | + with misc.stdchannel_redirected(sys.stdout, os.devnull): |
1757 | + me_cmd.run_cmd('reweight run_01 --from_cards') |
1758 | + else: |
1759 | me_cmd.run_cmd('reweight run_01 --from_cards') |
1760 | - |
1761 | #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] |
1762 | 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] |
1763 | lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'rwgt_events_tree_rwgt_1.lhe.gz')) |
1764 | |
1765 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f' |
1766 | --- 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 |
1767 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2020-08-21 07:00:37 +0000 |
1768 | @@ -2553,11 +2553,14 @@ |
1769 | PARAMETER (NEXTERNAL=3) |
1770 | INTEGER NSQUAREDSO |
1771 | PARAMETER (NSQUAREDSO=1) |
1772 | + INCLUDE 'nsqso_born.inc' |
1773 | C |
1774 | C ARGUMENTS |
1775 | C |
1776 | REAL*8 P(0:3,NEXTERNAL) |
1777 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
1778 | + INTEGER ANS_DIMENSION |
1779 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1780 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
1781 | INTEGER HEL, USERHEL |
1782 | COMMON/USERCHOICE/USERHEL |
1783 | C ---------- |
1784 | @@ -2581,7 +2584,10 @@ |
1785 | C ARGUMENTS |
1786 | C |
1787 | REAL*8 P(0:3,NEXTERNAL) |
1788 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
1789 | + INCLUDE 'nsqso_born.inc' |
1790 | + INTEGER ANS_DIMENSION |
1791 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1792 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
1793 | INTEGER HEL, RET_CODE |
1794 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
1795 | C |
1796 | @@ -2698,7 +2704,10 @@ |
1797 | C ARGUMENTS |
1798 | C |
1799 | REAL*8 P(0:3,NEXTERNAL) |
1800 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
1801 | + INCLUDE 'nsqso_born.inc' |
1802 | + INTEGER ANS_DIMENSION |
1803 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1804 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
1805 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
1806 | INTEGER RET_CODE |
1807 | C |
1808 | |
1809 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f' |
1810 | --- 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 |
1811 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2020-08-21 07:00:37 +0000 |
1812 | @@ -2553,11 +2553,14 @@ |
1813 | PARAMETER (NEXTERNAL=3) |
1814 | INTEGER NSQUAREDSO |
1815 | PARAMETER (NSQUAREDSO=1) |
1816 | + INCLUDE 'nsqso_born.inc' |
1817 | C |
1818 | C ARGUMENTS |
1819 | C |
1820 | REAL*8 P(0:3,NEXTERNAL) |
1821 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
1822 | + INTEGER ANS_DIMENSION |
1823 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1824 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
1825 | INTEGER HEL, USERHEL |
1826 | COMMON/USERCHOICE/USERHEL |
1827 | C ---------- |
1828 | @@ -2581,7 +2584,10 @@ |
1829 | C ARGUMENTS |
1830 | C |
1831 | REAL*8 P(0:3,NEXTERNAL) |
1832 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
1833 | + INCLUDE 'nsqso_born.inc' |
1834 | + INTEGER ANS_DIMENSION |
1835 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1836 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
1837 | INTEGER HEL, RET_CODE |
1838 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
1839 | C |
1840 | @@ -2698,7 +2704,10 @@ |
1841 | C ARGUMENTS |
1842 | C |
1843 | REAL*8 P(0:3,NEXTERNAL) |
1844 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
1845 | + INCLUDE 'nsqso_born.inc' |
1846 | + INTEGER ANS_DIMENSION |
1847 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1848 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
1849 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
1850 | INTEGER RET_CODE |
1851 | C |
1852 | |
1853 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/amp2lines.txt' |
1854 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/amp2lines.txt 2014-10-09 17:19:02 +0000 |
1855 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/amp2lines.txt 2020-08-21 07:00:37 +0000 |
1856 | @@ -2,5 +2,4 @@ |
1857 | AMP2(2)=AMP2(2)+AMP(2)*dconjg(AMP(2)) |
1858 | AMP2(3)=AMP2(3)+AMP(3)*dconjg(AMP(3)) |
1859 | AMP2(4)=AMP2(4)+AMP(4)*dconjg(AMP(4)) |
1860 | -AMP2(5)=AMP2(5)+AMP(5)*dconjg(AMP(5)) |
1861 | -AMP2(6)=AMP2(6)+AMP(6)*dconjg(AMP(6)) |
1862 | \ No newline at end of file |
1863 | +AMP2(5)=AMP2(5)+(AMP(5)+AMP(6))*dconjg(AMP(5)+AMP(6)) |
1864 | \ No newline at end of file |
1865 | |
1866 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/coloramps.inc' |
1867 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/coloramps.inc 2014-10-09 17:19:02 +0000 |
1868 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/coloramps.inc 2020-08-21 07:00:37 +0000 |
1869 | @@ -1,10 +1,9 @@ |
1870 | - LOGICAL ICOLAMP(2,6,2) |
1871 | + LOGICAL ICOLAMP(2,5,2) |
1872 | DATA(ICOLAMP(I,1,1),I=1,2)/.FALSE.,.TRUE./ |
1873 | DATA(ICOLAMP(I,2,1),I=1,2)/.TRUE.,.FALSE./ |
1874 | DATA(ICOLAMP(I,3,1),I=1,2)/.TRUE.,.FALSE./ |
1875 | DATA(ICOLAMP(I,4,1),I=1,2)/.TRUE.,.FALSE./ |
1876 | DATA(ICOLAMP(I,5,1),I=1,2)/.FALSE.,.TRUE./ |
1877 | - DATA(ICOLAMP(I,6,1),I=1,2)/.FALSE.,.TRUE./ |
1878 | DATA(ICOLAMP(I,1,2),I=1,2)/.FALSE.,.TRUE./ |
1879 | DATA(ICOLAMP(I,2,2),I=1,2)/.TRUE.,.FALSE./ |
1880 | DATA(ICOLAMP(I,3,2),I=1,2)/.TRUE.,.FALSE./ |
1881 | |
1882 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/config_subproc_map.inc' |
1883 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/config_subproc_map.inc 2014-10-09 17:19:02 +0000 |
1884 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/config_subproc_map.inc 2020-08-21 07:00:37 +0000 |
1885 | @@ -3,4 +3,3 @@ |
1886 | DATA (CONFSUB(I,3),I=1,2)/3,3/ |
1887 | DATA (CONFSUB(I,4),I=1,2)/4,0/ |
1888 | DATA (CONFSUB(I,5),I=1,2)/5,0/ |
1889 | - DATA (CONFSUB(I,6),I=1,2)/6,0/ |
1890 | |
1891 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/configs.inc' |
1892 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/configs.inc 2014-10-09 17:19:02 +0000 |
1893 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/configs.inc 2020-08-21 07:00:37 +0000 |
1894 | @@ -25,11 +25,5 @@ |
1895 | DATA TPRID(-1,5)/22/ |
1896 | DATA (SPROP(I,-1,5),I=1,2)/0,0/ |
1897 | DATA (IFOREST(I,-2,5),I=1,2)/-1,4/ |
1898 | -C Diagram 6 |
1899 | - DATA MAPCONFIG(6)/6/ |
1900 | - DATA (IFOREST(I,-1,6),I=1,2)/1,3/ |
1901 | - DATA TPRID(-1,6)/23/ |
1902 | - DATA (SPROP(I,-1,6),I=1,2)/0,0/ |
1903 | - DATA (IFOREST(I,-2,6),I=1,2)/-1,4/ |
1904 | C Number of configs |
1905 | - DATA MAPCONFIG(0)/6/ |
1906 | + DATA MAPCONFIG(0)/5/ |
1907 | |
1908 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f' |
1909 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f 2020-06-20 21:10:10 +0000 |
1910 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f 2020-08-21 07:00:37 +0000 |
1911 | @@ -54,7 +54,11 @@ |
1912 | INTEGER JHEL(2), J, JJ |
1913 | INTEGER THIS_NTRY(2) |
1914 | SAVE THIS_NTRY |
1915 | + INTEGER NB_FAIL |
1916 | + SAVE NB_FAIL |
1917 | DATA THIS_NTRY /0,0/ |
1918 | + DATA NB_FAIL /0/ |
1919 | + |
1920 | C |
1921 | C This is just to temporarily store the reference grid for |
1922 | C helicity of the DiscreteSampler so as to obtain its number of |
1923 | @@ -245,9 +249,14 @@ |
1924 | IF (XTOT.NE.0D0) THEN |
1925 | ANS=ANS*AMP2(SUBDIAG(1))/XTOT |
1926 | ELSE IF(ANS.NE.0D0) THEN |
1927 | - WRITE(*,*) 'Problem in the multi-channeling. All amp2 are' |
1928 | - $ //' zero but not the total matrix-element' |
1929 | - STOP 1 |
1930 | + IF(NB_FAIL.GE.10)THEN |
1931 | + WRITE(*,*) 'Problem in the multi-channeling. All amp2 are' |
1932 | + $ //' zero but not the total matrix-element' |
1933 | + |
1934 | + STOP 1 |
1935 | + ELSE |
1936 | + NB_FAIL = NB_FAIL +1 |
1937 | + ENDIF |
1938 | ENDIF |
1939 | ENDIF |
1940 | ANS=ANS/DBLE(IDEN) |
1941 | @@ -361,7 +370,7 @@ |
1942 | CALL FFV1_3(W(1,1),W(1,3),GQED,ZERO, FK_ZERO,W(1,5)) |
1943 | C Amplitude(s) for diagram number 5 |
1944 | CALL FFV1_0(W(1,4),W(1,2),W(1,5),GQED,AMP(5)) |
1945 | - CALL FFV1_2_3(W(1,1),W(1,3),GUZ1,GUZ2,MZ, FK_WZ,W(1,5)) |
1946 | + CALL FFV1_2_3(W(1,1),W(1,3),GUZ1,GUZ2,MZ, ZERO,W(1,5)) |
1947 | C Amplitude(s) for diagram number 6 |
1948 | CALL FFV1_2_0(W(1,4),W(1,2),W(1,5),GUZ1,GUZ2,AMP(6)) |
1949 | C JAMPs contributing to orders ALL_ORDERS=1 |
1950 | |
1951 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/nqcd_list.inc' |
1952 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/nqcd_list.inc 2014-10-09 17:19:02 +0000 |
1953 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/nqcd_list.inc 2020-08-21 07:00:37 +0000 |
1954 | @@ -3,4 +3,3 @@ |
1955 | DATA NQCD(3)/0/ |
1956 | DATA NQCD(4)/2/ |
1957 | DATA NQCD(5)/0/ |
1958 | - DATA NQCD(6)/0/ |
1959 | |
1960 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/symfact.dat' |
1961 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/symfact.dat 2014-10-09 17:19:02 +0000 |
1962 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/symfact.dat 2020-08-21 07:00:37 +0000 |
1963 | @@ -3,4 +3,3 @@ |
1964 | 3 1 |
1965 | 4 1 |
1966 | 5 1 |
1967 | - 6 1 |
1968 | |
1969 | === modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f' |
1970 | --- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2020-06-20 21:10:10 +0000 |
1971 | +++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2020-08-21 07:00:37 +0000 |
1972 | @@ -2630,11 +2630,14 @@ |
1973 | PARAMETER (NEXTERNAL=4) |
1974 | INTEGER NSQUAREDSO |
1975 | PARAMETER (NSQUAREDSO=3) |
1976 | + INCLUDE 'nsqso_born.inc' |
1977 | C |
1978 | C ARGUMENTS |
1979 | C |
1980 | REAL*8 P(0:3,NEXTERNAL) |
1981 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
1982 | + INTEGER ANS_DIMENSION |
1983 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1984 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
1985 | INTEGER HEL, USERHEL |
1986 | COMMON/ML5_0_USERCHOICE/USERHEL |
1987 | C ---------- |
1988 | @@ -2658,7 +2661,10 @@ |
1989 | C ARGUMENTS |
1990 | C |
1991 | REAL*8 P(0:3,NEXTERNAL) |
1992 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
1993 | + INCLUDE 'nsqso_born.inc' |
1994 | + INTEGER ANS_DIMENSION |
1995 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
1996 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
1997 | INTEGER HEL, RET_CODE |
1998 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
1999 | C |
2000 | @@ -2775,7 +2781,10 @@ |
2001 | C ARGUMENTS |
2002 | C |
2003 | REAL*8 P(0:3,NEXTERNAL) |
2004 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2005 | + INCLUDE 'nsqso_born.inc' |
2006 | + INTEGER ANS_DIMENSION |
2007 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2008 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2009 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2010 | INTEGER RET_CODE |
2011 | C |
2012 | |
2013 | === modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f' |
2014 | --- 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 |
2015 | +++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f 2020-08-21 07:00:37 +0000 |
2016 | @@ -2801,11 +2801,14 @@ |
2017 | PARAMETER (NEXTERNAL=4) |
2018 | INTEGER NSQUAREDSO |
2019 | PARAMETER (NSQUAREDSO=3) |
2020 | + INCLUDE 'nsqso_born.inc' |
2021 | C |
2022 | C ARGUMENTS |
2023 | C |
2024 | REAL*8 P(0:3,NEXTERNAL) |
2025 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2026 | + INTEGER ANS_DIMENSION |
2027 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2028 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2029 | INTEGER HEL, USERHEL |
2030 | COMMON/ML5_0_USERCHOICE/USERHEL |
2031 | C ---------- |
2032 | @@ -2829,7 +2832,10 @@ |
2033 | C ARGUMENTS |
2034 | C |
2035 | REAL*8 P(0:3,NEXTERNAL) |
2036 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2037 | + INCLUDE 'nsqso_born.inc' |
2038 | + INTEGER ANS_DIMENSION |
2039 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2040 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2041 | INTEGER HEL, RET_CODE |
2042 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2043 | C |
2044 | @@ -2946,7 +2952,10 @@ |
2045 | C ARGUMENTS |
2046 | C |
2047 | REAL*8 P(0:3,NEXTERNAL) |
2048 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2049 | + INCLUDE 'nsqso_born.inc' |
2050 | + INTEGER ANS_DIMENSION |
2051 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2052 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2053 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2054 | INTEGER RET_CODE |
2055 | C |
2056 | |
2057 | === modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f' |
2058 | --- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f 2020-06-20 21:10:10 +0000 |
2059 | +++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f 2020-08-21 07:00:37 +0000 |
2060 | @@ -2567,11 +2567,14 @@ |
2061 | PARAMETER (NEXTERNAL=4) |
2062 | INTEGER NSQUAREDSO |
2063 | PARAMETER (NSQUAREDSO=1) |
2064 | + INCLUDE 'nsqso_born.inc' |
2065 | C |
2066 | C ARGUMENTS |
2067 | C |
2068 | REAL*8 P(0:3,NEXTERNAL) |
2069 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2070 | + INTEGER ANS_DIMENSION |
2071 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2072 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2073 | INTEGER HEL, USERHEL |
2074 | COMMON/ML5_0_USERCHOICE/USERHEL |
2075 | C ---------- |
2076 | @@ -2595,7 +2598,10 @@ |
2077 | C ARGUMENTS |
2078 | C |
2079 | REAL*8 P(0:3,NEXTERNAL) |
2080 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2081 | + INCLUDE 'nsqso_born.inc' |
2082 | + INTEGER ANS_DIMENSION |
2083 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2084 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2085 | INTEGER HEL, RET_CODE |
2086 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2087 | C |
2088 | @@ -2712,7 +2718,10 @@ |
2089 | C ARGUMENTS |
2090 | C |
2091 | REAL*8 P(0:3,NEXTERNAL) |
2092 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2093 | + INCLUDE 'nsqso_born.inc' |
2094 | + INTEGER ANS_DIMENSION |
2095 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2096 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2097 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2098 | INTEGER RET_CODE |
2099 | C |
2100 | |
2101 | === modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f' |
2102 | --- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f 2020-06-20 21:10:10 +0000 |
2103 | +++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f 2020-08-21 07:00:37 +0000 |
2104 | @@ -2817,11 +2817,14 @@ |
2105 | PARAMETER (NEXTERNAL=4) |
2106 | INTEGER NSQUAREDSO |
2107 | PARAMETER (NSQUAREDSO=4) |
2108 | + INCLUDE 'nsqso_born.inc' |
2109 | C |
2110 | C ARGUMENTS |
2111 | C |
2112 | REAL*8 P(0:3,NEXTERNAL) |
2113 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2114 | + INTEGER ANS_DIMENSION |
2115 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2116 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2117 | INTEGER HEL, USERHEL |
2118 | COMMON/ML5_0_USERCHOICE/USERHEL |
2119 | C ---------- |
2120 | @@ -2845,7 +2848,10 @@ |
2121 | C ARGUMENTS |
2122 | C |
2123 | REAL*8 P(0:3,NEXTERNAL) |
2124 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2125 | + INCLUDE 'nsqso_born.inc' |
2126 | + INTEGER ANS_DIMENSION |
2127 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2128 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2129 | INTEGER HEL, RET_CODE |
2130 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2131 | C |
2132 | @@ -2962,7 +2968,10 @@ |
2133 | C ARGUMENTS |
2134 | C |
2135 | REAL*8 P(0:3,NEXTERNAL) |
2136 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2137 | + INCLUDE 'nsqso_born.inc' |
2138 | + INTEGER ANS_DIMENSION |
2139 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2140 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2141 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2142 | INTEGER RET_CODE |
2143 | C |
2144 | |
2145 | === modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f' |
2146 | --- 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 |
2147 | +++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f 2020-08-21 07:00:37 +0000 |
2148 | @@ -2801,11 +2801,14 @@ |
2149 | PARAMETER (NEXTERNAL=4) |
2150 | INTEGER NSQUAREDSO |
2151 | PARAMETER (NSQUAREDSO=3) |
2152 | + INCLUDE 'nsqso_born.inc' |
2153 | C |
2154 | C ARGUMENTS |
2155 | C |
2156 | REAL*8 P(0:3,NEXTERNAL) |
2157 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2158 | + INTEGER ANS_DIMENSION |
2159 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2160 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2161 | INTEGER HEL, USERHEL |
2162 | COMMON/ML5_0_USERCHOICE/USERHEL |
2163 | C ---------- |
2164 | @@ -2829,7 +2832,10 @@ |
2165 | C ARGUMENTS |
2166 | C |
2167 | REAL*8 P(0:3,NEXTERNAL) |
2168 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2169 | + INCLUDE 'nsqso_born.inc' |
2170 | + INTEGER ANS_DIMENSION |
2171 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2172 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2173 | INTEGER HEL, RET_CODE |
2174 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2175 | C |
2176 | @@ -2946,7 +2952,10 @@ |
2177 | C ARGUMENTS |
2178 | C |
2179 | REAL*8 P(0:3,NEXTERNAL) |
2180 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2181 | + INCLUDE 'nsqso_born.inc' |
2182 | + INTEGER ANS_DIMENSION |
2183 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2184 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2185 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2186 | INTEGER RET_CODE |
2187 | C |
2188 | |
2189 | === modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f' |
2190 | --- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f 2020-06-20 21:10:10 +0000 |
2191 | +++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f 2020-08-21 07:00:37 +0000 |
2192 | @@ -2630,11 +2630,14 @@ |
2193 | PARAMETER (NEXTERNAL=4) |
2194 | INTEGER NSQUAREDSO |
2195 | PARAMETER (NSQUAREDSO=3) |
2196 | + INCLUDE 'nsqso_born.inc' |
2197 | C |
2198 | C ARGUMENTS |
2199 | C |
2200 | REAL*8 P(0:3,NEXTERNAL) |
2201 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2202 | + INTEGER ANS_DIMENSION |
2203 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2204 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2205 | INTEGER HEL, USERHEL |
2206 | COMMON/ML5_0_USERCHOICE/USERHEL |
2207 | C ---------- |
2208 | @@ -2658,7 +2661,10 @@ |
2209 | C ARGUMENTS |
2210 | C |
2211 | REAL*8 P(0:3,NEXTERNAL) |
2212 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2213 | + INCLUDE 'nsqso_born.inc' |
2214 | + INTEGER ANS_DIMENSION |
2215 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2216 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2217 | INTEGER HEL, RET_CODE |
2218 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2219 | C |
2220 | @@ -2775,7 +2781,10 @@ |
2221 | C ARGUMENTS |
2222 | C |
2223 | REAL*8 P(0:3,NEXTERNAL) |
2224 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2225 | + INCLUDE 'nsqso_born.inc' |
2226 | + INTEGER ANS_DIMENSION |
2227 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2228 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2229 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2230 | INTEGER RET_CODE |
2231 | C |
2232 | |
2233 | === modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f' |
2234 | --- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f 2020-06-20 21:10:10 +0000 |
2235 | +++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f 2020-08-21 07:00:37 +0000 |
2236 | @@ -2567,11 +2567,14 @@ |
2237 | PARAMETER (NEXTERNAL=4) |
2238 | INTEGER NSQUAREDSO |
2239 | PARAMETER (NSQUAREDSO=1) |
2240 | + INCLUDE 'nsqso_born.inc' |
2241 | C |
2242 | C ARGUMENTS |
2243 | C |
2244 | REAL*8 P(0:3,NEXTERNAL) |
2245 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2246 | + INTEGER ANS_DIMENSION |
2247 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2248 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2249 | INTEGER HEL, USERHEL |
2250 | COMMON/ML5_0_USERCHOICE/USERHEL |
2251 | C ---------- |
2252 | @@ -2595,7 +2598,10 @@ |
2253 | C ARGUMENTS |
2254 | C |
2255 | REAL*8 P(0:3,NEXTERNAL) |
2256 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2257 | + INCLUDE 'nsqso_born.inc' |
2258 | + INTEGER ANS_DIMENSION |
2259 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2260 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2261 | INTEGER HEL, RET_CODE |
2262 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2263 | C |
2264 | @@ -2712,7 +2718,10 @@ |
2265 | C ARGUMENTS |
2266 | C |
2267 | REAL*8 P(0:3,NEXTERNAL) |
2268 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2269 | + INCLUDE 'nsqso_born.inc' |
2270 | + INTEGER ANS_DIMENSION |
2271 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2272 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2273 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2274 | INTEGER RET_CODE |
2275 | C |
2276 | |
2277 | === modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f' |
2278 | --- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f 2020-06-20 21:10:10 +0000 |
2279 | +++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f 2020-08-21 07:00:37 +0000 |
2280 | @@ -2565,11 +2565,14 @@ |
2281 | PARAMETER (NEXTERNAL=4) |
2282 | INTEGER NSQUAREDSO |
2283 | PARAMETER (NSQUAREDSO=1) |
2284 | + INCLUDE 'nsqso_born.inc' |
2285 | C |
2286 | C ARGUMENTS |
2287 | C |
2288 | REAL*8 P(0:3,NEXTERNAL) |
2289 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2290 | + INTEGER ANS_DIMENSION |
2291 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2292 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2293 | INTEGER HEL, USERHEL |
2294 | COMMON/ML5_0_USERCHOICE/USERHEL |
2295 | C ---------- |
2296 | @@ -2593,7 +2596,10 @@ |
2297 | C ARGUMENTS |
2298 | C |
2299 | REAL*8 P(0:3,NEXTERNAL) |
2300 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2301 | + INCLUDE 'nsqso_born.inc' |
2302 | + INTEGER ANS_DIMENSION |
2303 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2304 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2305 | INTEGER HEL, RET_CODE |
2306 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2307 | C |
2308 | @@ -2710,7 +2716,10 @@ |
2309 | C ARGUMENTS |
2310 | C |
2311 | REAL*8 P(0:3,NEXTERNAL) |
2312 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2313 | + INCLUDE 'nsqso_born.inc' |
2314 | + INTEGER ANS_DIMENSION |
2315 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2316 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2317 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2318 | INTEGER RET_CODE |
2319 | C |
2320 | |
2321 | === modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f' |
2322 | --- 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 |
2323 | +++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f 2020-08-21 07:00:37 +0000 |
2324 | @@ -2584,11 +2584,14 @@ |
2325 | PARAMETER (NEXTERNAL=4) |
2326 | INTEGER NSQUAREDSO |
2327 | PARAMETER (NSQUAREDSO=1) |
2328 | + INCLUDE 'nsqso_born.inc' |
2329 | C |
2330 | C ARGUMENTS |
2331 | C |
2332 | REAL*8 P(0:3,NEXTERNAL) |
2333 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2334 | + INTEGER ANS_DIMENSION |
2335 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2336 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2337 | INTEGER HEL, USERHEL |
2338 | COMMON/ML5_0_USERCHOICE/USERHEL |
2339 | C ---------- |
2340 | @@ -2612,7 +2615,10 @@ |
2341 | C ARGUMENTS |
2342 | C |
2343 | REAL*8 P(0:3,NEXTERNAL) |
2344 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2345 | + INCLUDE 'nsqso_born.inc' |
2346 | + INTEGER ANS_DIMENSION |
2347 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2348 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2349 | INTEGER HEL, RET_CODE |
2350 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2351 | C |
2352 | @@ -2729,7 +2735,10 @@ |
2353 | C ARGUMENTS |
2354 | C |
2355 | REAL*8 P(0:3,NEXTERNAL) |
2356 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2357 | + INCLUDE 'nsqso_born.inc' |
2358 | + INTEGER ANS_DIMENSION |
2359 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2360 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2361 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2362 | INTEGER RET_CODE |
2363 | C |
2364 | |
2365 | === modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f' |
2366 | --- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2020-06-20 21:10:10 +0000 |
2367 | +++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2020-08-21 07:00:37 +0000 |
2368 | @@ -2574,11 +2574,14 @@ |
2369 | PARAMETER (NEXTERNAL=4) |
2370 | INTEGER NSQUAREDSO |
2371 | PARAMETER (NSQUAREDSO=1) |
2372 | + INCLUDE 'nsqso_born.inc' |
2373 | C |
2374 | C ARGUMENTS |
2375 | C |
2376 | REAL*8 P(0:3,NEXTERNAL) |
2377 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2378 | + INTEGER ANS_DIMENSION |
2379 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2380 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2381 | INTEGER HEL, USERHEL |
2382 | COMMON/MG5_1_USERCHOICE/USERHEL |
2383 | C ---------- |
2384 | @@ -2602,7 +2605,10 @@ |
2385 | C ARGUMENTS |
2386 | C |
2387 | REAL*8 P(0:3,NEXTERNAL) |
2388 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2389 | + INCLUDE 'nsqso_born.inc' |
2390 | + INTEGER ANS_DIMENSION |
2391 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2392 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2393 | INTEGER HEL, RET_CODE |
2394 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2395 | C |
2396 | @@ -2719,7 +2725,10 @@ |
2397 | C ARGUMENTS |
2398 | C |
2399 | REAL*8 P(0:3,NEXTERNAL) |
2400 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2401 | + INCLUDE 'nsqso_born.inc' |
2402 | + INTEGER ANS_DIMENSION |
2403 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2404 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2405 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2406 | INTEGER RET_CODE |
2407 | C |
2408 | |
2409 | === modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f' |
2410 | --- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f 2020-06-20 21:10:10 +0000 |
2411 | +++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f 2020-08-21 07:00:37 +0000 |
2412 | @@ -2548,11 +2548,14 @@ |
2413 | PARAMETER (NEXTERNAL=5) |
2414 | INTEGER NSQUAREDSO |
2415 | PARAMETER (NSQUAREDSO=0) |
2416 | + INCLUDE 'nsqso_born.inc' |
2417 | C |
2418 | C ARGUMENTS |
2419 | C |
2420 | REAL*8 P(0:3,NEXTERNAL) |
2421 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2422 | + INTEGER ANS_DIMENSION |
2423 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2424 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2425 | INTEGER HEL, USERHEL |
2426 | COMMON/ML5_0_USERCHOICE/USERHEL |
2427 | C ---------- |
2428 | @@ -2576,7 +2579,10 @@ |
2429 | C ARGUMENTS |
2430 | C |
2431 | REAL*8 P(0:3,NEXTERNAL) |
2432 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2433 | + INCLUDE 'nsqso_born.inc' |
2434 | + INTEGER ANS_DIMENSION |
2435 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2436 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2437 | INTEGER HEL, RET_CODE |
2438 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2439 | C |
2440 | @@ -2693,7 +2699,10 @@ |
2441 | C ARGUMENTS |
2442 | C |
2443 | REAL*8 P(0:3,NEXTERNAL) |
2444 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2445 | + INCLUDE 'nsqso_born.inc' |
2446 | + INTEGER ANS_DIMENSION |
2447 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2448 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2449 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2450 | INTEGER RET_CODE |
2451 | C |
2452 | |
2453 | === modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f' |
2454 | --- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f 2020-06-20 21:10:10 +0000 |
2455 | +++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f 2020-08-21 07:00:37 +0000 |
2456 | @@ -2548,11 +2548,14 @@ |
2457 | PARAMETER (NEXTERNAL=5) |
2458 | INTEGER NSQUAREDSO |
2459 | PARAMETER (NSQUAREDSO=0) |
2460 | + INCLUDE 'nsqso_born.inc' |
2461 | C |
2462 | C ARGUMENTS |
2463 | C |
2464 | REAL*8 P(0:3,NEXTERNAL) |
2465 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2466 | + INTEGER ANS_DIMENSION |
2467 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2468 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2469 | INTEGER HEL, USERHEL |
2470 | COMMON/ML5_0_USERCHOICE/USERHEL |
2471 | C ---------- |
2472 | @@ -2576,7 +2579,10 @@ |
2473 | C ARGUMENTS |
2474 | C |
2475 | REAL*8 P(0:3,NEXTERNAL) |
2476 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2477 | + INCLUDE 'nsqso_born.inc' |
2478 | + INTEGER ANS_DIMENSION |
2479 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2480 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2481 | INTEGER HEL, RET_CODE |
2482 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2483 | C |
2484 | @@ -2693,7 +2699,10 @@ |
2485 | C ARGUMENTS |
2486 | C |
2487 | REAL*8 P(0:3,NEXTERNAL) |
2488 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2489 | + INCLUDE 'nsqso_born.inc' |
2490 | + INTEGER ANS_DIMENSION |
2491 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2492 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2493 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2494 | INTEGER RET_CODE |
2495 | C |
2496 | |
2497 | === modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f' |
2498 | --- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f 2020-06-20 21:10:10 +0000 |
2499 | +++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f 2020-08-21 07:00:37 +0000 |
2500 | @@ -2548,11 +2548,14 @@ |
2501 | PARAMETER (NEXTERNAL=4) |
2502 | INTEGER NSQUAREDSO |
2503 | PARAMETER (NSQUAREDSO=0) |
2504 | + INCLUDE 'nsqso_born.inc' |
2505 | C |
2506 | C ARGUMENTS |
2507 | C |
2508 | REAL*8 P(0:3,NEXTERNAL) |
2509 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2510 | + INTEGER ANS_DIMENSION |
2511 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2512 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2513 | INTEGER HEL, USERHEL |
2514 | COMMON/ML5_0_USERCHOICE/USERHEL |
2515 | C ---------- |
2516 | @@ -2576,7 +2579,10 @@ |
2517 | C ARGUMENTS |
2518 | C |
2519 | REAL*8 P(0:3,NEXTERNAL) |
2520 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2521 | + INCLUDE 'nsqso_born.inc' |
2522 | + INTEGER ANS_DIMENSION |
2523 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2524 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2525 | INTEGER HEL, RET_CODE |
2526 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2527 | C |
2528 | @@ -2693,7 +2699,10 @@ |
2529 | C ARGUMENTS |
2530 | C |
2531 | REAL*8 P(0:3,NEXTERNAL) |
2532 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2533 | + INCLUDE 'nsqso_born.inc' |
2534 | + INTEGER ANS_DIMENSION |
2535 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2536 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2537 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2538 | INTEGER RET_CODE |
2539 | C |
2540 | |
2541 | === modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f' |
2542 | --- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f 2020-06-20 21:10:10 +0000 |
2543 | +++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f 2020-08-21 07:00:37 +0000 |
2544 | @@ -2548,11 +2548,14 @@ |
2545 | PARAMETER (NEXTERNAL=4) |
2546 | INTEGER NSQUAREDSO |
2547 | PARAMETER (NSQUAREDSO=0) |
2548 | + INCLUDE 'nsqso_born.inc' |
2549 | C |
2550 | C ARGUMENTS |
2551 | C |
2552 | REAL*8 P(0:3,NEXTERNAL) |
2553 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2554 | + INTEGER ANS_DIMENSION |
2555 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2556 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2557 | INTEGER HEL, USERHEL |
2558 | COMMON/ML5_0_USERCHOICE/USERHEL |
2559 | C ---------- |
2560 | @@ -2576,7 +2579,10 @@ |
2561 | C ARGUMENTS |
2562 | C |
2563 | REAL*8 P(0:3,NEXTERNAL) |
2564 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2565 | + INCLUDE 'nsqso_born.inc' |
2566 | + INTEGER ANS_DIMENSION |
2567 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2568 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2569 | INTEGER HEL, RET_CODE |
2570 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2571 | C |
2572 | @@ -2693,7 +2699,10 @@ |
2573 | C ARGUMENTS |
2574 | C |
2575 | REAL*8 P(0:3,NEXTERNAL) |
2576 | - REAL*8 ANS(0:3,0:NSQUAREDSO) |
2577 | + INCLUDE 'nsqso_born.inc' |
2578 | + INTEGER ANS_DIMENSION |
2579 | + PARAMETER(ANS_DIMENSION=MAX(NSQSO_BORN,NSQUAREDSO)) |
2580 | + REAL*8 ANS(0:3,0:ANS_DIMENSION) |
2581 | REAL*8 PREC_ASKED,PREC_FOUND(0:NSQUAREDSO) |
2582 | INTEGER RET_CODE |
2583 | C |
2584 | |
2585 | === modified file 'tests/parallel_tests/test_aloha.py' |
2586 | --- tests/parallel_tests/test_aloha.py 2019-05-24 13:15:29 +0000 |
2587 | +++ tests/parallel_tests/test_aloha.py 2020-08-21 07:00:37 +0000 |
2588 | @@ -2914,6 +2914,64 @@ |
2589 | for ind in one_exp.listindices(): |
2590 | self.assertAlmostEqual(eval(str(one_exp.get_rep(ind))), eval(str(two_exp.get_rep(ind)))) |
2591 | |
2592 | + |
2593 | + @set_global() |
2594 | + def test_short_aloha_FormFactor(self): |
2595 | + """ test the handling of form factor function """ |
2596 | + aloha_lib.KERNEL.clean() |
2597 | + SSS2 = self.Lorentz(name = 'FFS2', |
2598 | + spins = [1, 1, 1], |
2599 | + structure="FormFF(P(-1,1)*P(-1,2))" |
2600 | + ) |
2601 | + abstract_FFT = create_aloha.AbstractRoutineBuilder(SSS2).compute_routine(3, factorize=False) |
2602 | + expr = abstract_FFT.expr |
2603 | + self.assertTrue('FCT0' in str(expr)) |
2604 | + obj = aloha_lib.KERNEL.fct_expr['FCT0'] |
2605 | + |
2606 | + self.assertTrue(obj[0] == 'FormFF') |
2607 | + self.assertEqual(len(obj[1]), 1) |
2608 | + |
2609 | + SSS3 = self.Lorentz(name = 'FFS3', |
2610 | + spins = [1, 1, 1], |
2611 | + structure="MyFCT(P(-1,1)*P(-1,2), P(-1,1)*P(-1,2), P(-1,1)*P(-1,3), MT, MT)" |
2612 | + ) |
2613 | + abstract_FFT = create_aloha.AbstractRoutineBuilder(SSS3).compute_routine(3, factorize=False) |
2614 | + expr2 = abstract_FFT.expr |
2615 | + self.assertFalse(str(expr) == str(expr2)) |
2616 | + self.assertTrue('FCT1' in str(expr2)) |
2617 | + |
2618 | + obj = aloha_lib.KERNEL.fct_expr['FCT1'] |
2619 | + |
2620 | + self.assertTrue(obj[0] == 'MyFCT') |
2621 | + self.assertEqual(len(obj[1]), 5) |
2622 | + self.assertEqual(obj[1][0], obj[1][1]) |
2623 | + self.assertNotEqual(obj[1][0], obj[1][2]) |
2624 | + self.assertEqual(obj[1][3], obj[1][4]) |
2625 | + |
2626 | + # |
2627 | + self.assertTrue('TMP' in str(obj[1][0])) |
2628 | + self.assertTrue('MT' in str(obj[1][4])) |
2629 | + |
2630 | + # check math function |
2631 | + SSS3 = self.Lorentz(name = 'FFS3', |
2632 | + spins = [1, 1, 1], |
2633 | + structure="cmath.exp(P(-1,1)*P(-1,2))" |
2634 | + ) |
2635 | + abstract_FFT = create_aloha.AbstractRoutineBuilder(SSS3).compute_routine(3, factorize=False) |
2636 | + expr = abstract_FFT.expr |
2637 | + self.assertFalse(str(expr) == str(expr2)) |
2638 | + self.assertTrue('FCT2' in str(expr)) |
2639 | + |
2640 | + obj = aloha_lib.KERNEL.fct_expr['FCT2'] |
2641 | + self.assertEqual('exp', obj[0]) |
2642 | + |
2643 | + |
2644 | + |
2645 | + |
2646 | + |
2647 | + |
2648 | + |
2649 | + |
2650 | def test_short_aloha_FFT2(self): |
2651 | """ test the FFT2 creation of vertex""" |
2652 | |
2653 | |
2654 | === modified file 'tests/test_manager.py' |
2655 | --- tests/test_manager.py 2018-08-10 12:40:47 +0000 |
2656 | +++ tests/test_manager.py 2020-08-21 07:00:37 +0000 |
2657 | @@ -44,6 +44,7 @@ |
2658 | import time |
2659 | import datetime |
2660 | import shutil |
2661 | +import subprocess |
2662 | import glob |
2663 | from functools import wraps |
2664 | |
2665 | @@ -973,7 +974,8 @@ |
2666 | |
2667 | parser.add_option("-N", "--notification", default=45, |
2668 | help="Running time, below which no notification is raised. (-1 for no notification)") |
2669 | - |
2670 | + parser.add_option("", "--nocaffeinate", action="store_false", default=True, dest='nosleep', |
2671 | + help='For mac user, forbids to use caffeinate when running with a script') |
2672 | |
2673 | (options, args) = parser.parse_args() |
2674 | |
2675 | @@ -1046,6 +1048,14 @@ |
2676 | logging.getLogger('tutorial').setLevel('ERROR') |
2677 | except: |
2678 | pass |
2679 | + |
2680 | + if sys.platform == "darwin" and options.nosleep: |
2681 | + logging.getLogger('madgraph').warning("launching caffeinate to prevent idle sleep when MG5aMC is running. Run './bin/mg5_aMC -s' to prevent this.") |
2682 | + pid = os.getpid() |
2683 | + subprocess.Popen(['caffeinate', '-i', '-w', str(pid)]) |
2684 | + |
2685 | + |
2686 | + |
2687 | |
2688 | if options.synchronize and IOTestManager._compress_ref_fodler: |
2689 | print "The tarball synchronization is not necessary since"+ \ |
2690 | |
2691 | === modified file 'tests/unit_tests/iolibs/test_export_v4.py' |
2692 | --- tests/unit_tests/iolibs/test_export_v4.py 2018-11-08 22:24:49 +0000 |
2693 | +++ tests/unit_tests/iolibs/test_export_v4.py 2020-08-21 07:00:37 +0000 |
2694 | @@ -464,9 +464,9 @@ |
2695 | symmetry, perms, ident_perms = \ |
2696 | diagram_symmetry.find_symmetry(subprocess_group) |
2697 | |
2698 | - self.assertEqual(symmetry, [1,1,1,1,1,1]) |
2699 | + self.assertEqual(symmetry, [1,1,1,1,1]) |
2700 | self.assertEqual(perms, |
2701 | - [[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3]]) |
2702 | + [[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3],[0,1,2,3]]) |
2703 | self.assertEqual(ident_perms, |
2704 | [[0,1,2,3]]) |
2705 | |
2706 | |
2707 | === modified file 'tests/unit_tests/iolibs/test_group_subprocs.py' |
2708 | --- tests/unit_tests/iolibs/test_group_subprocs.py 2016-02-19 12:28:04 +0000 |
2709 | +++ tests/unit_tests/iolibs/test_group_subprocs.py 2020-08-21 07:00:37 +0000 |
2710 | @@ -285,13 +285,13 @@ |
2711 | {0: [1, 2, 3]}, |
2712 | {0: [1, 2, 3], 1: [1, 3, 2]}, |
2713 | {0: [1, 2, 3], 1: [1, 3, 2]}, |
2714 | - {0: [1, 2, 3, 4, 5, 6], 1: [7, 8, 9, 1, 2, 3], 2: [7, 8, 9], 3: [1, 2, 3], 4: [1, 2, 3], 5: [7, 8, 9, 4, 5, 6], 6: [7, 8, 9], 7: [1, 2, 3, 4, 5, 6], 8: [1, 2, 3], 9: [1, 2, 3]}, |
2715 | + {0: [1, 2, 2, 3, 4, 4], 1: [5, 6, 7, 1, 2, 2], 2: [5, 6, 7], 3: [1, 2, 2], 4: [1, 2, 2], 5: [5, 6, 7, 3, 4, 4], 6: [5, 6, 7], 7: [1, 2, 2, 3, 4, 4], 8: [1, 2, 2], 9: [1, 2, 2]}, |
2716 | {0: [1, 2, 3], 1: [1, 3, 2]}]] |
2717 | diags_for_config = [[[[2], [3], [4]], |
2718 | [[1], [2], [3]], |
2719 | [[1, 1], [2, 3], [3, 2]], |
2720 | [[1, 1], [2, 3], [3, 2]], |
2721 | - [[1, 4, 0, 1, 1, 0, 0, 1, 1, 1], [2, 5, 0, 2, 2, 0, 0, 2, 2, 2], [3, 6, 0, 3, 3, 0, 0, 3, 3, 3], [4, 0, 0, 0, 0, 4, 0, 4, 0, 0], [5, 0, 0, 0, 0, 5, 0, 5, 0, 0], [6, 0, 0, 0, 0, 6, 0, 6, 0, 0], [0, 1, 1, 0, 0, 1, 1, 0, 0, 0], [0, 2, 2, 0, 0, 2, 2, 0, 0, 0], [0, 3, 3, 0, 0, 3, 3, 0, 0, 0]], |
2722 | + [[1, 4, 0, 1, 1, 0, 0, 1, 1, 1], [2, 5, 0, 2, 2, 0, 0, 2, 2, 2], [4, 0, 0, 0, 0, 4, 0, 4, 0, 0], [5, 0, 0, 0, 0, 5, 0, 5, 0, 0], [0, 1, 1, 0, 0, 1, 1, 0, 0, 0], [0, 2, 2, 0, 0, 2, 2, 0, 0, 0], [0, 3, 3, 0, 0, 3, 3, 0, 0, 0]], |
2723 | [[1, 1], [2, 3], [3, 2]]]] |
2724 | #new_diagram_maps = [] |
2725 | #new_diags_for_config = [] |
2726 | @@ -325,6 +325,7 @@ |
2727 | for igroup, group in enumerate(subprocess_groups): |
2728 | group.get('matrix_elements') |
2729 | #dmaps.append(group.get('diagram_maps')) |
2730 | + |
2731 | self.assertEqual(group.get('diagram_maps'), |
2732 | diagram_maps[nfs-2][igroup]) |
2733 | #diags.append([group.get_subproc_diagrams_for_config(ic) for\ |
2734 | |
2735 | === modified file 'tests/unit_tests/iolibs/test_helas_call_writers.py' |
2736 | --- tests/unit_tests/iolibs/test_helas_call_writers.py 2019-03-01 14:55:00 +0000 |
2737 | +++ tests/unit_tests/iolibs/test_helas_call_writers.py 2020-08-21 07:00:37 +0000 |
2738 | @@ -547,37 +547,37 @@ |
2739 | """Test automatic generation of wavefunction and amplitude calls""" |
2740 | |
2741 | goal = [ \ |
2742 | - 'CALL IXXXXX(P(0,1),me,NHEL(1),+1*IC(1),W(1,1))', |
2743 | - 'CALL OXXXXX(P(0,2),me,NHEL(2),-1*IC(2),W(1,2))', |
2744 | + 'CALL IXXXXX(P(0,4),me,NHEL(4),+1*IC(4),W(1,4))', |
2745 | + 'CALL OXXXXX(P(0,5),me,NHEL(5),-1*IC(5),W(1,5))', |
2746 | 'CALL VXXXXX(P(0,3),zero,NHEL(3),-1*IC(3),W(1,3))', |
2747 | - 'CALL FVOXXX(W(1,2),W(1,3),MGVX12,me,zero,W(1,1))', |
2748 | - 'CALL FVIXXX(W(1,1),W(1,3),MGVX12,me,zero,W(1,2))', |
2749 | - 'CALL JIOXXX(W(1,1),W(1,2),MGVX12,zero,zero,W(1,3))', |
2750 | - 'CALL IOVXXX(W(1,1),W(1,2),W(1,3),MGVX12,AMP(1))', |
2751 | - 'CALL VXXXXX(P(0,1),zero,NHEL(1),-1*IC(1),W(1,1))', |
2752 | - 'CALL VXXXXX(P(0,2),zero,NHEL(2),-1*IC(2),W(1,2))', |
2753 | + 'CALL FVOXXX(W(1,5),W(1,3),MGVX12,me,zero,W(1,4))', |
2754 | + 'CALL FVIXXX(W(1,4),W(1,3),MGVX12,me,zero,W(1,5))', |
2755 | + 'CALL JIOXXX(W(1,4),W(1,5),MGVX12,zero,zero,W(1,3))', |
2756 | + 'CALL IOVXXX(W(1,4),W(1,5),W(1,3),MGVX12,AMP(1))', |
2757 | + 'CALL VXXXXX(P(0,4),zero,NHEL(4),-1*IC(4),W(1,4))', |
2758 | + 'CALL VXXXXX(P(0,5),zero,NHEL(5),-1*IC(5),W(1,5))', |
2759 | 'CALL TXXXXX(P(0,3),zero,NHEL(3),-1*IC(3),W(1,3))', |
2760 | - 'CALL JVTAXX(W(1,2),W(1,3),MGVX2,zero,zero,W(1,1))', |
2761 | - 'CALL JVTAXX(W(1,1),W(1,3),MGVX2,zero,zero,W(1,2))', |
2762 | - 'CALL UVVAXX(W(1,1),W(1,2),MGVX2,zero,zero,zero,W(1,3))', |
2763 | - 'CALL VVTAXX(W(1,1),W(1,2),W(1,3),MGVX2,zero,AMP(2))', |
2764 | - 'CALL VXXXXX(P(0,1),zero,NHEL(1),-1*IC(1),W(1,1))', |
2765 | - 'CALL VXXXXX(P(0,2),zero,NHEL(2),-1*IC(2),W(1,2))', |
2766 | + 'CALL JVTAXX(W(1,5),W(1,3),MGVX2,zero,zero,W(1,4))', |
2767 | + 'CALL JVTAXX(W(1,4),W(1,3),MGVX2,zero,zero,W(1,5))', |
2768 | + 'CALL UVVAXX(W(1,4),W(1,5),MGVX2,zero,zero,zero,W(1,3))', |
2769 | + 'CALL VVTAXX(W(1,4),W(1,5),W(1,3),MGVX2,zero,AMP(2))', |
2770 | + 'CALL VXXXXX(P(0,4),zero,NHEL(4),-1*IC(4),W(1,4))', |
2771 | + 'CALL VXXXXX(P(0,5),zero,NHEL(5),-1*IC(5),W(1,5))', |
2772 | 'CALL SXXXXX(P(0,3),-1*IC(3),W(1,3))', |
2773 | 'CALL SXXXXX(P(0,4),-1*IC(4),W(1,4))', |
2774 | - 'CALL JVSSXX(W(1,2),W(1,3),W(1,4),MGVX89,zero,zero,W(1,1))', |
2775 | - 'CALL JVSSXX(W(1,1),W(1,3),W(1,4),MGVX89,zero,zero,W(1,2))', |
2776 | - 'CALL HVVSXX(W(1,2),W(1,1),W(1,4),MGVX89,Musq2,Wusq2,W(1,3))', |
2777 | - 'CALL HVVSXX(W(1,2),W(1,1),W(1,3),MGVX89,Musq2,Wusq2,W(1,4))', |
2778 | - 'CALL VVSSXX(W(1,2),W(1,1),W(1,3),W(1,4),MGVX89,AMP(1))'] |
2779 | + 'CALL JVSSXX(W(1,5),W(1,3),W(1,4),MGVX89,zero,zero,W(1,4))', |
2780 | + 'CALL JVSSXX(W(1,4),W(1,3),W(1,4),MGVX89,zero,zero,W(1,5))', |
2781 | + 'CALL HVVSXX(W(1,5),W(1,4),W(1,4),MGVX89,Musq2,Wusq2,W(1,3))', |
2782 | + 'CALL HVVSXX(W(1,5),W(1,4),W(1,3),MGVX89,Musq2,Wusq2,W(1,4))', |
2783 | + 'CALL VVSSXX(W(1,5),W(1,4),W(1,3),W(1,4),MGVX89,AMP(1))'] |
2784 | |
2785 | myleglist = base_objects.LegList() |
2786 | |
2787 | myleglist.append(base_objects.Leg({'id':11, |
2788 | - 'number': 1, |
2789 | + 'number': 4, |
2790 | 'state':False})) |
2791 | myleglist.append(base_objects.Leg({'id':-11, |
2792 | - 'number': 2, |
2793 | + 'number': 5, |
2794 | 'state':False})) |
2795 | myleglist.append(base_objects.Leg({'id':22, |
2796 | 'number': 3, |
2797 | @@ -621,10 +621,10 @@ |
2798 | myleglist = base_objects.LegList() |
2799 | |
2800 | myleglist.append(base_objects.Leg({'id':21, |
2801 | - 'number': 1, |
2802 | + 'number': 4, |
2803 | 'state':False})) |
2804 | myleglist.append(base_objects.Leg({'id':21, |
2805 | - 'number': 2, |
2806 | + 'number': 5, |
2807 | 'state':False})) |
2808 | myleglist.append(base_objects.Leg({'id': 8000002, |
2809 | 'number': 3, |
2810 | |
2811 | === modified file 'tests/unit_tests/various/test_diagram_symmetry.py' |
2812 | --- tests/unit_tests/various/test_diagram_symmetry.py 2015-10-01 16:00:08 +0000 |
2813 | +++ tests/unit_tests/various/test_diagram_symmetry.py 2020-08-21 07:00:37 +0000 |
2814 | @@ -115,12 +115,9 @@ |
2815 | symmetry, perms, ident_perms = diagram_symmetry.find_symmetry(\ |
2816 | subproc_group) |
2817 | |
2818 | - self.assertEqual(len([s for s in symmetry if s > 0]), 23) |
2819 | + self.assertEqual(len([s for s in symmetry if s > 0]), 19) |
2820 | |
2821 | - self.assertEqual(symmetry, |
2822 | - [1, 1, 1, 1, -2, -3, -4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
2823 | - 1, 1, 1, 1, 1, 1, 1, 1, 1, -8, -9, -10, -11, -12, -13, |
2824 | - -14, -15, -16, -17, -21, -22, -23]) |
2825 | + self.assertEqual(symmetry,[1, 1, 1, 1, -2, -3, -4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -8, -9, -10, -11, -12, -13, -14, -18, -19]) |
2826 | |
2827 | return |
2828 | |
2829 | |
2830 | === modified file 'vendor/StdHEP/src/inc/stdevent.h' |
2831 | --- vendor/StdHEP/src/inc/stdevent.h 2013-09-26 09:34:42 +0000 |
2832 | +++ vendor/StdHEP/src/inc/stdevent.h 2020-08-21 07:00:37 +0000 |
2833 | @@ -4,6 +4,9 @@ |
2834 | /* note that to avoid alignment problems, structures and common blocks |
2835 | should be in the order: double precision, real, integer. |
2836 | */ |
2837 | +#ifndef stdevent |
2838 | +#define stdevent |
2839 | + |
2840 | #define NMXHEP 4000 |
2841 | #define NMXMLT 16 |
2842 | struct stdevent { |
2843 | @@ -27,3 +30,4 @@ |
2844 | int color[NMXHEP]; /* color */ |
2845 | int jcol[NMXHEP]; /* collision number */ |
2846 | } stdevent_; |
2847 | +#endif |
2848 | |
2849 | === modified file 'vendor/StdHEP/src/stdhep/mcf_hepev4_xdr.c' |
2850 | --- vendor/StdHEP/src/stdhep/mcf_hepev4_xdr.c 2013-09-26 09:34:42 +0000 |
2851 | +++ vendor/StdHEP/src/stdhep/mcf_hepev4_xdr.c 2020-08-21 07:00:37 +0000 |
2852 | @@ -49,7 +49,7 @@ |
2853 | #define TRUE 1 |
2854 | #endif |
2855 | |
2856 | -struct stdver stdver_; |
2857 | +extern struct stdver stdver_; |
2858 | |
2859 | bool_t xdr_stdhep_4_(XDR *xdrs, int *blockid, |
2860 | int *ntot, char** version) |
2861 | |
2862 | === modified file 'vendor/StdHEP/src/stdhep/mcf_hepup_xdr.c' |
2863 | --- vendor/StdHEP/src/stdhep/mcf_hepup_xdr.c 2013-09-26 09:34:42 +0000 |
2864 | +++ vendor/StdHEP/src/stdhep/mcf_hepup_xdr.c 2020-08-21 07:00:37 +0000 |
2865 | @@ -47,7 +47,7 @@ |
2866 | #define TRUE 1 |
2867 | #endif |
2868 | |
2869 | -struct stdver stdver_; |
2870 | +extern struct stdver stdver_; |
2871 | |
2872 | bool_t xdr_hepeup_(XDR *xdrs, int *blockid, |
2873 | int *ntot, char** version) |
2874 | |
2875 | === modified file 'vendor/StdHEP/src/stdhep_arch' |
2876 | --- vendor/StdHEP/src/stdhep_arch 2014-03-18 03:15:44 +0000 |
2877 | +++ vendor/StdHEP/src/stdhep_arch 2020-08-21 07:00:37 +0000 |
2878 | @@ -27,7 +27,7 @@ |
2879 | CPP=gcc -E |
2880 | CFLAGS= $(DFLG) |
2881 | CXFLAGS = -I/usr/X11R6/include |
2882 | - FFLAGS= $(DFLG) -fno-second-underscore |
2883 | + FFLAGS= $(DFLG) -fno-second-underscore -std=legacy |
2884 | KPPFLAGS= -C -P -DLinux -DUNIX |
2885 | LOCAL = -lnsl |
2886 | # BUILD_SHARED = false |