Merge lp:~maddevelopers/mg5amcnlo/fix_multiparticle_vertex_color into lp:~madteam/mg5amcnlo/trunk

Proposed by Johan Alwall
Status: Merged
Merged at revision: 186
Proposed branch: lp:~maddevelopers/mg5amcnlo/fix_multiparticle_vertex_color
Merge into: lp:~madteam/mg5amcnlo/trunk
Diff against target: 481 lines (+125/-43)
12 files modified
Template/SubProcesses/addmothers.f (+30/-0)
Template/SubProcesses/cuts.f (+20/-4)
UpdateNotes.txt (+7/-0)
madgraph/VERSION (+2/-2)
madgraph/core/base_objects.py (+5/-0)
madgraph/core/helas_objects.py (+3/-2)
madgraph/interface/cmd_interface.py (+1/-1)
madgraph/iolibs/export_cpp.py (+10/-7)
madgraph/iolibs/export_python.py (+8/-9)
madgraph/iolibs/export_v4.py (+18/-5)
tests/unit_tests/core/test_helas_objects.py (+4/-4)
tests/unit_tests/iolibs/test_export_v4.py (+17/-9)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/fix_multiparticle_vertex_color
Reviewer Review Type Date Requested Status
Johan Alwall (community) Needs Information
Olivier Mattelaer Approve
Review via email: mp+80643@code.launchpad.net

Description of the change

Fix the color setting in addmasses.f for multiparticle vertices, which I forgot when I switched to let the model provide color info in v. 1.3.18.

To post a comment you must log in.
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Johan,

Concerning the dummy PDG, it should check that the number is not define in the model
(and use another dummy PDG in this case).
This should be easy to do and much safer.

Otherwise, you use a lot of substraction for checking equality.
Which is not 100% safe: on the following case for example (in fact the other case are safe).
if(icolalt(1,ida(1))+icolalt(1,ida(2))-
10 + $ icolalt(2,ida(1))-icolalt(2,ida(2)).eq.0)

We might have trouble. In the other case, it will be more clear(and faster in fact) to use direct equality.

I'm confused about this comment:
1 3/6/8 -> 3/8

Otherwise I checked all color link and they are fine.

Cheers,

Olivier

review: Needs Fixing
Revision history for this message
Johan Alwall (johan-alwall) wrote :

Hello Olivier,

> Concerning the dummy PDG, it should check that the number is not define in the
> model
> (and use another dummy PDG in this case).
> This should be easy to do and much safer.

Ok, I'll do that.

> Otherwise, you use a lot of substraction for checking equality.
> Which is not 100% safe: on the following case for example (in fact the other
> case are safe).
> if(icolalt(1,ida(1))+icolalt(1,ida(2))-
> 10 + $ icolalt(2,ida(1))-icolalt(2,ida(2)).eq.0)

I want to have only one call to check for 1+1, 3+3bar, 6+6bar, 8+8 adding to a singlet. Perhaps the following is safer, and should cover all cases:
if(icolalt(1,ida(1)).eq.icolalt(2,ida(2)).and.icolalt(2,ida(1)).eq.icolalt(1,ida(2)).or.
icolalt(1,ida(1)).eq.-icolalt(1,ida(2)).and.icolalt(2,ida(1)).eq.-icolalt(2,ida(2))

> I'm confused about this comment:
> 1 3/6/8 -> 3/8

Ah - should be 1 3/6/8 -> 3/6/8

> Otherwise I checked all color link and they are fine.

Ok great!

Thanks,
Johan

Revision history for this message
Johan Alwall (johan-alwall) wrote :

Ok I have implemented your comments. Please approve and merge when you have a chance.

Thanks!
Johan

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Johan,

I see one modifications that was not there this afternoon.
In export_python, and which is not related to my comments.
So this require some additional tests and therefore will require some additional
time to test this properly.

So I'm not approve this for the moment.

Otherwise, I receive a bug report for one of the student.
One of the cut of the run_card is not correctly treated in the cuts.f
I'll push my fix in this version. So could you review that part.
I've send to him the fix by email, so he is suppose to check if this works and tell me tomorrow.

186. By Olivier Mattelaer

add the cut missing in cuts.f

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Johan,

Could you explain to me why you have change export_python?
If they are a true reason, why this part is different between export_python and export_v4?

review: Needs Information
Revision history for this message
Johan Alwall (johan-alwall) wrote :

> Hi Johan,
>
> Could you explain to me why you have change export_python?
> If they are a true reason, why this part is different between export_python
> and export_v4?

Good point, I fixed it.

Johan

187. By Johan Alwall

Changed my previous stupid way of checking for multiparticle vertices in export_python.py to the right way

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Perfect, thanks, approved!!
Please check if you agree with my modifications with cuts.f
and make the merge.

review: Approve
Revision history for this message
Johan Alwall (johan-alwall) wrote :

Hello Olivier,

I honestly never understood the "lepton+neutrino" cut. What exactly is is supposed to do? It was Simon who implemented it for some particular purpose, and I never understood the point. Is it supposed to be the ET (in which case only the transverse momentum components are used) or the full invariant mass (which is not something that can be measured in the detector)?

Johan

review: Needs Information
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

This one was not used at all in cuts.f.
I put Simon in cc. In order that he can discuss this point with us.

Cheers,

Olivier

On 30-oct.-11, at 15:06, Johan Alwall wrote:

> Review: Needs Information
>
> Hello Olivier,
>
> I honestly never understood the "lepton+neutrino" cut. What exactly
> is is supposed to do? It was Simon who implemented it for some
> particular purpose, and I never understood the point. Is it supposed
> to be the ET (in which case only the transverse momentum components
> are used) or the full invariant mass (which is not something that
> can be measured in the detector)?
>
> Johan
> --
> https://code.launchpad.net/~maddevelopers/madgraph5/
> fix_multiparticle_vertex_color/+merge/80643
> You are reviewing the proposed merge of lp:~maddevelopers/madgraph5/
> fix_multiparticle_vertex_color into lp:madgraph5.

188. By Olivier Mattelaer

correct install command for td script

189. By Johan Alwall

Corrected a comment about missing Et, updated UpdateNotes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Template/SubProcesses/addmothers.f'
2--- Template/SubProcesses/addmothers.f 2011-09-30 04:08:40 +0000
3+++ Template/SubProcesses/addmothers.f 2011-10-31 13:57:25 +0000
4@@ -205,6 +205,36 @@
5 if(mo_color.eq.1) then ! color singlet
6 icolalt(1,i) = 0
7 icolalt(2,i) = 0
8+ elseif(mo_color.eq.2) then ! used as dummy for multipart. vert
9+ if(icolalt(1,ida(1)).eq.icolalt(2,ida(2)).and.
10+ $ icolalt(2,ida(1)).eq.icolalt(1,ida(2)).or.
11+ $ icolalt(1,ida(1)).eq.-icolalt(1,ida(2)).and.
12+ $ icolalt(2,ida(1)).eq.-icolalt(2,ida(2))) then ! color singlet
13+ icolalt(1,i) = 0
14+ icolalt(2,i) = 0
15+ elseif(icolalt(1,ida(1)).eq.icolalt(2,ida(2))) then ! 3bar 3 -> 8 or 8 8 -> 8
16+ icolalt(1,i) = icolalt(1,ida(2))
17+ icolalt(2,i) = icolalt(2,ida(1))
18+ else if(icolalt(1,ida(2)).eq.icolalt(2,ida(1))) then ! 3 3bar -> 8 or 8 8 -> 8
19+ icolalt(1,i) = icolalt(1,ida(1))
20+ icolalt(2,i) = icolalt(2,ida(2))
21+ else if(icolalt(1,ida(1)).eq.0.and.icolalt(2,ida(1)).eq.0) then ! 1 3/6/8 -> 3/6/8
22+ icolalt(1,i) = icolalt(1,ida(2))
23+ icolalt(2,i) = icolalt(2,ida(2))
24+ else if(icolalt(1,ida(2)).eq.0.and.icolalt(2,ida(2)).eq.0) then ! 3/6/8 1 -> 3/6/8
25+ icolalt(1,i) = icolalt(1,ida(1))
26+ icolalt(2,i) = icolalt(2,ida(1))
27+ elseif(icolalt(1,ida(1)).eq.-icolalt(1,ida(2))) then ! antisextet
28+ icolalt(1,i) = -icolalt(1,ida(2))
29+ icolalt(2,i) = icolalt(2,ida(1))
30+ elseif(icolalt(2,ida(1)).eq.-icolalt(2,ida(2))) then ! sextet
31+ icolalt(1,i) = icolalt(1,ida(2))
32+ icolalt(2,i) = -icolalt(1,ida(1))
33+ else
34+c This might be due to multiparticle vertex with color combinations
35+c that can't be captured with just two sets of color indices
36+ call write_error(da_color(1), da_color(2), mo_color)
37+ endif
38 elseif(mo_color.eq.-3) then ! color anti-triplet
39 icolalt(1,i) = 0
40 if(da_color(1).eq.-3.and.da_color(2).eq.1)then
41
42=== modified file 'Template/SubProcesses/cuts.f'
43--- Template/SubProcesses/cuts.f 2011-09-16 05:33:32 +0000
44+++ Template/SubProcesses/cuts.f 2011-10-31 13:57:25 +0000
45@@ -53,7 +53,7 @@
46 LOGICAL DEBUG
47 integer i,j,njets,nheavyjets,hardj1,hardj2
48 REAL*8 XVAR,ptmax1,ptmax2,htj,tmp,inclht
49- real*8 ptemp(0:3)
50+ real*8 ptemp(0:3), ptemp2(0:3)
51 character*20 formstr
52 C
53 C PARAMETERS
54@@ -262,12 +262,13 @@
55 endif
56 enddo
57 c
58-c missing ET min & max cut
59-c nb: missing et simply defined as the sum over the neutrino's 4 momenta
60+c missing ET min & max cut + Invariant mass of leptons and neutrino
61+c nb: missing Et defined as the vector sum over the neutrino's pt
62 c
63 c-- reset ptemp(0:3)
64 do j=0,3
65- ptemp(j)=0
66+ ptemp(j)=0 ! for the neutrino
67+ ptemp2(j)=0 ! for the leptons
68 enddo
69 c- sum over the momenta
70 do i=nincoming+1,nexternal
71@@ -276,11 +277,19 @@
72 do j=0,3
73 ptemp(j)=ptemp(j)+p(j,i)
74 enddo
75+ elseif(is_a_l(i)) then
76+ if(debug) write (*,*) i,' -> lepton '
77+ do j=0,3
78+ ptemp2(j)=ptemp2(j)+p(j,i)
79+ enddo
80 endif
81+
82 enddo
83 c- check the et
84 if(debug.and.ptemp(0).eq.0d0) write (*,*) 'No et miss in event'
85 if(debug.and.ptemp(0).gt.0d0) write (*,*) 'Et miss =',pt(ptemp(0)),' ',misset,':',missetmax
86+ if(debug.and.ptemp2(0).eq.0d0) write (*,*) 'No leptons in event'
87+ if(debug.and.ptemp(0).gt.0d0) write (*,*) 'Energy of leptons =',pt(ptemp2(0))
88 if(ptemp(0).gt.0d0) then
89 notgood=(pt(ptemp(0)) .lt. misset).or.
90 & (pt(ptemp(0)) .gt. missetmax)
91@@ -290,6 +299,13 @@
92 return
93 endif
94 endif
95+ if (mmnl.gt.0d0.or.mmnlmax.lt.1d5)then
96+ if(SumDot(ptemp,ptemp2,1d0).lt.mmnl.or.SumDot(ptemp, ptemp2,1d0).gt.mmnlmax) then
97+ if(debug) write (*,*) 'lepton invariant mass -> fails'
98+ passcuts=.false.
99+ return
100+ endif
101+ endif
102 c
103 c pt cut on heavy particles
104 c gives min(pt) for (at least) one heavy particle
105
106=== modified file 'UpdateNotes.txt'
107--- UpdateNotes.txt 2011-10-27 03:18:04 +0000
108+++ UpdateNotes.txt 2011-10-31 13:57:25 +0000
109@@ -1,5 +1,12 @@
110 Update notes for MadGraph 5 (in reverse time order)
111
112+1.3.26 (31/10/11) JA: Fix color setting in MadEvent event file for
113+ multiparticle vertices, which was not taken into
114+ account in the upgrade in v. 1.3.18
115+ OM: Fixed mmnl cut (inv. mass of all leptons and neutrinos)
116+ which was never active.
117+ OM: Fix td install in Linux were a chmod was missing
118+
119 1.3.25 (27/10/11) JA: Ensure that the correct intermediate resonance
120 is always written in the event file, even when we
121 have resonances with identical properties.
122
123=== modified file 'madgraph/VERSION'
124--- madgraph/VERSION 2011-10-27 03:18:04 +0000
125+++ madgraph/VERSION 2011-10-31 13:57:25 +0000
126@@ -1,2 +1,2 @@
127-version = 1.3.25
128-date = 2011-10-27
129+version = 1.3.26
130+date = 2011-10-31
131
132=== modified file 'madgraph/core/base_objects.py'
133--- madgraph/core/base_objects.py 2011-10-04 04:47:51 +0000
134+++ madgraph/core/base_objects.py 2011-10-31 13:57:25 +0000
135@@ -959,6 +959,11 @@
136 part.set('antiname', default[pdg])
137 if antipart:
138 antipart.set('antiname', default[pdg])
139+
140+ def get_first_non_pdg(self):
141+ """Return the first positive number that is not a valid PDG code"""
142+ return [c for c in range(1, len(self.get('particles')) + 1) if \
143+ c not in self.get('particle_dict').keys()][0]
144
145 def write_param_card(self):
146 """Write out the param_card, and return as string."""
147
148=== modified file 'madgraph/core/helas_objects.py'
149--- madgraph/core/helas_objects.py 2011-10-26 13:10:34 +0000
150+++ madgraph/core/helas_objects.py 2011-10-31 13:57:25 +0000
151@@ -1776,7 +1776,7 @@
152 'id': self.get('interaction_id'),
153 'legs': legs})
154
155- def get_s_and_t_channels(self, ninitial):
156+ def get_s_and_t_channels(self, ninitial, new_pdg):
157 """Returns two lists of vertices corresponding to the s- and
158 t-channels of this amplitude/diagram, ordered from the outermost
159 s-channel and in/down towards the highest number initial state
160@@ -1885,7 +1885,8 @@
161 popped_legs = \
162 base_objects.LegList([vertex.get('legs').pop(0) \
163 for i in [0,1]])
164- popped_legs.append(base_objects.Leg({'id': 21,
165+ popped_legs.append(base_objects.Leg({\
166+ 'id': new_pdg,
167 'number': min([l.get('number') for l in popped_legs]),
168 'state': True,
169 'onshell': None}))
170
171=== modified file 'madgraph/interface/cmd_interface.py'
172--- madgraph/interface/cmd_interface.py 2011-10-27 01:33:41 +0000
173+++ madgraph/interface/cmd_interface.py 2011-10-31 13:57:25 +0000
174@@ -2596,7 +2596,7 @@
175 logger.info('Downloading TD for Linux 32 bit')
176 target = 'http://cp3wks05.fynu.ucl.ac.be/twiki/pub/Software/TopDrawer/td'
177 subprocess.call(['wget', target], cwd=os.path.join(MG5DIR,'td'))
178-
179+ os.chmod(os.path.join(MG5DIR,'td','td'), 0775)
180 if sys.maxsize > 2**32:
181 logger.warning('''td program (needed by MadAnalysis) is not compile for 64 bit computer
182 Please follow instruction in http://cp3wks05.fynu.ucl.ac.be/twiki/bin/view/Software/TopDrawer.''')
183
184=== modified file 'madgraph/iolibs/export_cpp.py'
185--- madgraph/iolibs/export_cpp.py 2011-07-08 09:54:01 +0000
186+++ madgraph/iolibs/export_cpp.py 2011-10-31 13:57:25 +0000
187@@ -1184,19 +1184,22 @@
188 """Return the PIDs for any resonances in 2->2 and 2->3 processes."""
189
190 resonances = []
191-
192+ model = self.matrix_elements[0].get('processes')[0].get('model')
193+ new_pdg = model.get_first_non_pdg()
194 # Get a list of all resonant s-channel contributions
195 diagrams = sum([me.get('diagrams') for me in self.matrix_elements], [])
196 for diagram in diagrams:
197 schannels, tchannels = diagram.get('amplitudes')[0].\
198- get_s_and_t_channels(self.ninitial)
199+ get_s_and_t_channels(self.ninitial, new_pdg)
200
201 for schannel in schannels:
202 sid = schannel.get('legs')[-1].get('id')
203- width = self.model.get_particle(sid).get('width')
204- if width.lower() != 'zero':
205- resonances.append(sid)
206-
207+ try:
208+ width = self.model.get_particle(sid).get('width')
209+ if width.lower() != 'zero':
210+ resonances.append(sid)
211+ except KeyError:
212+ pass
213 resonance_set = set(resonances)
214
215 singleres = 0
216@@ -1210,7 +1213,7 @@
217 # schannel is True if all diagrams are s-channel and there are
218 # no QCD vertices
219 schannel = not any([\
220- len(d.get('amplitudes')[0].get_s_and_t_channels(self.ninitial)[0])\
221+ len(d.get('amplitudes')[0].get_s_and_t_channels(self.ninitial, new_pdg)[0])\
222 == 0 for d in diagrams]) and \
223 not any(['QCD' in d.calculate_orders() for d in diagrams])
224
225
226=== modified file 'madgraph/iolibs/export_python.py'
227--- madgraph/iolibs/export_python.py 2011-04-17 17:11:07 +0000
228+++ madgraph/iolibs/export_python.py 2011-10-31 13:57:25 +0000
229@@ -262,6 +262,9 @@
230 """Return the amp2(i) = sum(amp for diag(i))^2 lines"""
231
232 ret_lines = []
233+ # Get minimum legs in a vertex
234+ minvert = min([max(diag.get_vertex_leg_numbers()) for diag in \
235+ matrix_element.get('diagrams')])
236 if config_map:
237 # In this case, we need to sum up all amplitudes that have
238 # identical topologies, as given by the config_map (which
239@@ -293,16 +296,12 @@
240 ret_lines.append(line)
241 ret_lines.sort()
242 else:
243+ wf_dict = {}
244+ vx_list = []
245+ optimization = 0
246 for idiag, diag in enumerate(matrix_element.get('diagrams')):
247- # Ignore any diagrams with 4-particle vertices. The
248- # easiest way to get this info is to use the
249- # get_s_and_t_channels function, which collects all
250- # vertices corresponding to this diagram.
251- schannels, tchannels = diag.get('amplitudes')[0].\
252- get_s_and_t_channels(2)
253- allchannels = schannels + tchannels
254- if not allchannels or \
255- any([len(vert.get('legs')) > 3 for vert in allchannels]):
256+ # Ignore any diagrams with 4-particle vertices.
257+ if max(diag.get_vertex_leg_numbers()) > minvert:
258 continue
259 # Now write out the expression for AMP2, meaning the sum of
260 # squared amplitudes belonging to the same diagram
261
262=== modified file 'madgraph/iolibs/export_v4.py'
263--- madgraph/iolibs/export_v4.py 2011-10-12 08:55:02 +0000
264+++ madgraph/iolibs/export_v4.py 2011-10-31 13:57:25 +0000
265@@ -1456,6 +1456,13 @@
266 get_color=%d
267 return
268 """ % (part_id, model.get_particle(part_id).get_color())
269+ # Dummy particle for multiparticle vertices with pdg given by
270+ # first code not in the model
271+ lines += """else if(ipdg.eq.%d)then
272+c This is dummy particle used in multiparticle vertices
273+ get_color=2
274+ return
275+ """ % model.get_first_non_pdg()
276 lines += """else
277 write(*,*)'Error: No color given for pdg ',ipdg
278 get_color=0
279@@ -1521,16 +1528,18 @@
280
281 configs = [(i+1, d) for i,d in enumerate(matrix_element.get('diagrams'))]
282 mapconfigs = [c[0] for c in configs]
283+ model = matrix_element.get('processes')[0].get('model')
284 return mapconfigs, self.write_configs_file_from_diagrams(writer,
285 [[c[1]] for c in configs],
286 mapconfigs,
287- nexternal, ninitial)
288+ nexternal, ninitial,
289+ model)
290
291 #===========================================================================
292 # write_configs_file_from_diagrams
293 #===========================================================================
294 def write_configs_file_from_diagrams(self, writer, configs, mapconfigs,
295- nexternal, ninitial):
296+ nexternal, ninitial, model):
297 """Write the actual configs.inc file.
298
299 configs is the diagrams corresponding to configs (each
300@@ -1555,6 +1564,8 @@
301
302 nconfigs = 0
303
304+ new_pdg = model.get_first_non_pdg()
305+
306 for iconfig, helas_diags in enumerate(configs):
307 if any([vert > minvert for vert in
308 [d for d in helas_diags if d][0].get_vertex_leg_numbers()]):
309@@ -1571,7 +1582,7 @@
310 # get_s_and_t_channels gives vertices starting from
311 # final state external particles and working inwards
312 stchannels.append(h.get('amplitudes')[0].\
313- get_s_and_t_channels(ninitial))
314+ get_s_and_t_channels(ninitial, new_pdg))
315 else:
316 stchannels.append((empty_verts, None))
317
318@@ -1877,7 +1888,7 @@
319 for iconf, configs in enumerate(s_and_t_channels):
320 for vertex in configs[0] + configs[1][:-1]:
321 leg = vertex.get('legs')[-1]
322- if leg.get('id') == 21 and 21 not in particle_dict:
323+ if leg.get('id') not in particle_dict:
324 # Fake propagator used in multiparticle vertices
325 mass = 'zero'
326 width = 'zero'
327@@ -2414,6 +2425,7 @@
328 configuration."""
329
330 matrix_elements = subproc_group.get('matrix_elements')
331+ model = matrix_elements[0].get('processes')[0].get('model')
332
333 diagrams = []
334 config_numbers = []
335@@ -2437,7 +2449,8 @@
336 return len(diagrams), \
337 self.write_configs_file_from_diagrams(writer, diagrams,
338 config_numbers,
339- nexternal, ninitial)
340+ nexternal, ninitial,
341+ model)
342
343 #===========================================================================
344 # write_leshouche_file
345
346=== modified file 'tests/unit_tests/core/test_helas_objects.py'
347--- tests/unit_tests/core/test_helas_objects.py 2011-10-26 13:10:34 +0000
348+++ tests/unit_tests/core/test_helas_objects.py 2011-10-31 13:57:25 +0000
349@@ -1444,7 +1444,7 @@
350 for idiag in range(len(diagrams)):
351 if idiag in photon_none[ngluons]:
352 vertices, tchannels = \
353- diagrams[idiag].get('amplitudes')[0].get_s_and_t_channels(2)
354+ diagrams[idiag].get('amplitudes')[0].get_s_and_t_channels(2, 20)
355 for ivert in range(len(vertices)):
356 if ivert in photon_none[ngluons][idiag]:
357 self.assertEqual(False,
358@@ -1485,7 +1485,7 @@
359 for idiag in range(len(diagrams)):
360 if idiag in quark_none[ngluons]:
361 vertices, tchannels = \
362- diagrams[idiag].get('amplitudes')[0].get_s_and_t_channels(2)
363+ diagrams[idiag].get('amplitudes')[0].get_s_and_t_channels(2, 20)
364 for ivert in range(len(vertices)):
365 if ivert in quark_none[ngluons][idiag]:
366 self.assertEqual(False,
367@@ -2264,7 +2264,7 @@
368 for idiag in range(len(diagrams)):
369 if idiag in quark_none:
370 vertices, tchannels = \
371- diagrams[idiag].get('amplitudes')[0].get_s_and_t_channels(2)
372+ diagrams[idiag].get('amplitudes')[0].get_s_and_t_channels(2, 20)
373 for ivert in range(len(vertices)):
374 if ivert in quark_none[idiag]:
375 # This is forbidden leg
376@@ -2324,7 +2324,7 @@
377 for idiag in range(len(diagrams)):
378 if idiag in quark_none:
379 vertices, tchannels = \
380- diagrams[idiag].get('amplitudes')[0].get_s_and_t_channels(2)
381+ diagrams[idiag].get('amplitudes')[0].get_s_and_t_channels(2, 20)
382 for ivert in range(len(vertices)):
383 if ivert in quark_none[idiag]:
384 # This is forbidden leg
385
386=== modified file 'tests/unit_tests/iolibs/test_export_v4.py'
387--- tests/unit_tests/iolibs/test_export_v4.py 2011-10-12 16:09:26 +0000
388+++ tests/unit_tests/iolibs/test_export_v4.py 2011-10-31 13:57:25 +0000
389@@ -3477,6 +3477,10 @@
390 ELSE IF(IPDG.EQ.21)THEN
391 GET_COLOR=8
392 RETURN
393+ ELSE IF(IPDG.EQ.1)THEN
394+C This is dummy particle used in multiparticle vertices
395+ GET_COLOR=2
396+ RETURN
397 ELSE
398 WRITE(*,*)'Error: No color given for pdg ',IPDG
399 GET_COLOR=0
400@@ -5236,7 +5240,7 @@
401 """C Diagram 1
402 DATA MAPCONFIG(1)/1/
403 DATA (IFOREST(I,-1,1),I=1,2)/4,3/
404- DATA (SPROP(I,-1,1),I=1,1)/21/
405+ DATA (SPROP(I,-1,1),I=1,1)/1/
406 DATA TPRID(-1,1)/0/
407 DATA (IFOREST(I,-2,1),I=1,2)/1,5/
408 DATA TPRID(-2,1)/2/
409@@ -5248,7 +5252,7 @@
410 DATA (SPROP(I,-1,2),I=1,1)/6/
411 DATA TPRID(-1,2)/0/
412 DATA (IFOREST(I,-2,2),I=1,2)/-1,3/
413- DATA (SPROP(I,-2,2),I=1,1)/21/
414+ DATA (SPROP(I,-2,2),I=1,1)/1/
415 DATA TPRID(-2,2)/0/
416 C Diagram 3
417 DATA MAPCONFIG(3)/3/
418@@ -5256,12 +5260,12 @@
419 DATA (SPROP(I,-1,3),I=1,1)/6/
420 DATA TPRID(-1,3)/0/
421 DATA (IFOREST(I,-2,3),I=1,2)/4,-1/
422- DATA (SPROP(I,-2,3),I=1,1)/21/
423+ DATA (SPROP(I,-2,3),I=1,1)/1/
424 DATA TPRID(-2,3)/0/
425 C Diagram 4
426 DATA MAPCONFIG(4)/4/
427 DATA (IFOREST(I,-1,4),I=1,2)/4,3/
428- DATA (SPROP(I,-1,4),I=1,1)/21/
429+ DATA (SPROP(I,-1,4),I=1,1)/1/
430 DATA TPRID(-1,4)/0/
431 DATA (IFOREST(I,-2,4),I=1,2)/1,-1/
432 DATA TPRID(-2,4)/2/
433@@ -5279,7 +5283,7 @@
434 self.assertFileContains('test',
435 """ PMASS(-1,1) = ZERO
436 PWIDTH(-1,1) = ZERO
437- POW(-1,1) = 2
438+ POW(-1,1) = 0
439 PMASS(-2,1) = ZERO
440 PWIDTH(-2,1) = ZERO
441 POW(-2,1) = 1
442@@ -5288,16 +5292,16 @@
443 POW(-1,2) = 1
444 PMASS(-2,2) = ZERO
445 PWIDTH(-2,2) = ZERO
446- POW(-2,2) = 2
447+ POW(-2,2) = 0
448 PMASS(-1,3) = ABS(MT)
449 PWIDTH(-1,3) = ABS(WT)
450 POW(-1,3) = 1
451 PMASS(-2,3) = ZERO
452 PWIDTH(-2,3) = ZERO
453- POW(-2,3) = 2
454+ POW(-2,3) = 0
455 PMASS(-1,4) = ZERO
456 PWIDTH(-1,4) = ZERO
457- POW(-1,4) = 2
458+ POW(-1,4) = 0
459 PMASS(-2,4) = ZERO
460 PWIDTH(-2,4) = ZERO
461 POW(-2,4) = 1
462@@ -8534,7 +8538,7 @@
463 for (idiag, diagram) in enumerate(diagrams):
464
465 schannels, tchannels = diagram.get('amplitudes')[0].\
466- get_s_and_t_channels(2)
467+ get_s_and_t_channels(2, 20)
468
469 self.assertEqual([[l.get('number') for l in v.get('legs')] for v \
470 in schannels],
471@@ -8736,6 +8740,10 @@
472 ELSE IF(IPDG.EQ.24)THEN
473 GET_COLOR=1
474 RETURN
475+ ELSE IF(IPDG.EQ.1)THEN
476+C This is dummy particle used in multiparticle vertices
477+ GET_COLOR=2
478+ RETURN
479 ELSE
480 WRITE(*,*)'Error: No color given for pdg ',IPDG
481 GET_COLOR=0

Subscribers

People subscribed via source and target branches