Merge lp:~maddevelopers/mg5amcnlo/plugin_model into lp:~maddevelopers/mg5amcnlo/2.1.1

Proposed by Olivier Mattelaer
Status: Merged
Merged at revision: 302
Proposed branch: lp:~maddevelopers/mg5amcnlo/plugin_model
Merge into: lp:~maddevelopers/mg5amcnlo/2.1.1
Diff against target: 5139 lines (+4135/-167) (has conflicts)
39 files modified
madgraph/core/base_objects.py (+6/-0)
madgraph/core/diagram_generation.py (+6/-3)
madgraph/interface/amcatnlo_interface.py (+4/-2)
madgraph/interface/madgraph_interface.py (+128/-49)
madgraph/various/banner.py (+2/-2)
models/build_restriction_lib.py (+1/-1)
models/hgg_plugin/HEFT_UFO.log (+75/-0)
models/hgg_plugin/__init__.py (+32/-0)
models/hgg_plugin/coupling_orders.py (+24/-0)
models/hgg_plugin/couplings.py (+29/-0)
models/hgg_plugin/function_library.py (+54/-0)
models/hgg_plugin/lorentz.py (+38/-0)
models/hgg_plugin/object_library.py (+259/-0)
models/hgg_plugin/parameters.py (+149/-0)
models/hgg_plugin/particles.py (+48/-0)
models/hgg_plugin/vertices.py (+40/-0)
models/hgg_plugin/write_param_card.py (+181/-0)
models/import_ufo.py (+30/-23)
models/loop_sm/object_library.py (+1/-1)
models/loop_sm/particles.py (+15/-15)
models/sm/__init__.py (+5/-2)
models/taudecay_UFO/__init__.py (+48/-0)
models/taudecay_UFO/coupling_orders.py (+16/-0)
models/taudecay_UFO/couplings.py (+15/-0)
models/taudecay_UFO/function_library.py (+71/-0)
models/taudecay_UFO/lorentz.py (+14/-0)
models/taudecay_UFO/object_library.py (+377/-0)
models/taudecay_UFO/param_card.dat (+66/-0)
models/taudecay_UFO/parameters.py (+123/-0)
models/taudecay_UFO/particles.py (+65/-0)
models/taudecay_UFO/propagators.py (+35/-0)
models/taudecay_UFO/taudecay_UFO.log (+68/-0)
models/taudecay_UFO/vertices.py (+23/-0)
models/taudecay_UFO/write_param_card.py (+207/-0)
models/usermod.py (+864/-0)
tests/input_files/LoopSMTest/particles.py (+19/-26)
tests/time_db (+58/-43)
tests/unit_tests/various/test_import_ufo.py (+56/-0)
tests/unit_tests/various/test_usermod.py (+883/-0)
Text conflict in tests/time_db
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/plugin_model
Reviewer Review Type Date Requested Status
Valentin Hirschi Approve
Review via email: mp+210109@code.launchpad.net

Description of the change

possibility to do:
add model XXX which merge the two model in a single one.
usefull for taudecay and hgg_plugin

Cheers,

Olivier

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

Some news?

Olivier

Revision history for this message
Valentin Hirschi (valentin-hirschi) wrote :

Hi Olivier,

a)

It seems to work fine. I tried to add the tau addon to the sm UFO and run

p p > pi- vt~ vt

I also tried to decay the tau with MadSpin and it went through ok even though it showed a lot of overweights, i.e.

WARNING: Found many weight larger than the computed max_weight (17/10000 = 0.17%)

But I guess it is still ok.

b)

Then I tried to get the same result for g g > h d d~ with HEFT and the sm model with HEFT added.
In the second case the code crash when launching MadEvent with:

  File "/Users/valentin/Documents/Work/MG5/plugin_model/models/check_param_card.py", line 185, in append
    (self.name, obj.lhacode, self.param_dict[tuple(obj.lhacode)].value, obj.value)
InvalidParamCard: mass (24,) is already define to 79.82901 impossible to assign 80.419

I guess I was supposed to use the 'hgg_plugin' instead. But if adding the whole 'heft' was not allowed to start with I would expect MG5_aMC to tell me so.

c)

Also when I tried to add the tau decay to loop_sm, I got:

TypeError : __init__() got an unexpected keyword argument 'counterterm'

Given that it's difficult to know in advance whether it makes sense or not to add a tree model to a loop one, I would simply forbid that altogether with a nicer error message. And also for the converse: i.e. adding a loop model to a tree level one.

d)

When add model reuses an existing model created before with the add model functionality, it might be useful to have an info line explicitly saying that it reuses it and the path of the model reused.

e)

How are the model restrictions handled exactly ? For example I tried to import the SM model with zero b mass and then add the tau decay. After this I saw that the b-mass of the merged model was massive again. Also the existing restriction files where not in the directory of the merged model which was output. So would it be possible to also automatically merge restriction? If not then it's ok but it should be clearly stated, at least in the help.

I have to head off, so I'll continue it later.
This is a great functionality, thanks!

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

Hi Valentin,

a) I guess so

b) I don't reproduce your problem with the card. But in fact another one (that I fixed)

You are allowed to do it but since all interactions are include you are going to have a lot of double counting since you will have two times the same interactions added.

c) As I told to you, this is linked to the way the loop_sm is built. (in a non linear way which should NOT be allowed in the UFO format!) If we use the one from FR it is working fine!
I don't want to forbid this since the tauddecay might be usefull also at NLO. (especially when/if MS can do three/four body decay.) But if you insist, I can forbid it for the moment.

d) OK done.

e) For the moment they are just completely ignored. I think that this is possible to do. Assuming that only the restriction of the original model are going trough. I'll move on that as fast as possible.

Cheers,

Olivier

257. By Olivier Mattelaer

move the restriction of the original model to the new one.

Revision history for this message
Valentin Hirschi (valentin-hirschi) wrote :

Hi Olivier,

We discussed most of this on skype already so let me attend point c) only,
the rest being ok now.

On Sat, Mar 22, 2014 at 11:19 AM, Olivier Mattelaer <
<email address hidden>> wrote:

> Hi Valentin,
>
> a) I guess so
>
> b) I don't reproduce your problem with the card. But in fact another one
> (that I fixed)
>
> You are allowed to do it but since all interactions are include you are
> going to have a lot of double counting since you will have two times the
> same interactions added.
>
> c) As I told to you, this is linked to the way the loop_sm is built. (in a
> non linear way which should NOT be allowed in the UFO format!) If we use
> the one from FR it is working fine!
> I don't want to forbid this since the tauddecay might be usefull also at
> NLO. (especially when/if MS can do three/four body decay.) But if you
> insist, I can forbid it for the moment.
>
>
I propose the following:

i) Never allow to *add* a loop model as this is meaningless most of the
time and anyway not for any time soon. But you can start from a loop model.

ii) Whenever adding a model to a *loop model*, make sure it has no particle
counterterms since this is what prevents you from handling those. I the
future we might alleviate this if I change the way the particle wf
counterterms are implemented. This means that one can add models to UFO NLO
models (which do not need particle wf counterterms for now).

iii) Whenever adding a model to a loop model, one should forbid the added
model to define any coupling order which also appear in the base model and
which is perturbed there (i.e. defined with expansion_order > 1)

These three things still don't guarantee that the resulting model is
consistent (i.e. does not miss R2 or UV counterterms), but it removes what
has no chance of being right.
It would be nice to have warning when adding a model to a loop model
stressing that the resulting model might have inconsistent/missing
counterterms.

Anyway, the rest is working! So after this point is addressed, I approve
the merge, thanks!

> d) OK done.
>
> e) For the moment they are just completely ignored. I think that this is
> possible to do. Assuming that only the restriction of the original model
> are going trough. I'll move on that as fast as possible.
>
> Cheers,
>
> Olivier
>
>
>
>
>
>
>
> --
>
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/plugin_model/+merge/210109
> You are requested to review the proposed merge of
> lp:~maddevelopers/mg5amcnlo/plugin_model into lp:~maddevelopers/mg5amcnlo/
> 2.1.1.
>

--
Valentin

258. By Valentin Hirschi

1. Change UFO@NLO conventions so that the 'loop_particles' attribute of
   the particles instances of the model is no longer a list of instances
   of the 'Particle' class but simple integer PDG. This makes the
   UFO model construction linear.

259. By Olivier Mattelaer

- more secure way to add two full model. This should still be discourage but this should be
      working roughly correctly now.
- restrict the usage of loop model.

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

Hi Valentin,

According to your comment (via Skype) about adding two full model:
1) if an interaction has
   - the same coupling (i.e. the exact same formula or identified like it)
   - the same lorentz structure
   - the same particle content
   - the same color
   Then it is not added (and not warning)
2) if an interaction has
   - the same coupling ORDER
   - the same lorentz structure
   - the same particle content
   - the same color
   Then it is not added but a warning is raised.

Concerning your comment above

(i) the loop model are now forbidden to be used as add-on.
(ii) ok done
(iii) I've change the perturbative order to zero in that case. (with an informative message).

Revision history for this message
Valentin Hirschi (valentin-hirschi) wrote :

Given our skype discussion and your recent modifications, I accept the merge!
Thanks!

PS: At one point which should fix the latest details so as to have my hand-written model loop_sm handled.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'madgraph/core/base_objects.py'
2--- madgraph/core/base_objects.py 2014-03-08 18:07:26 +0000
3+++ madgraph/core/base_objects.py 2014-03-24 03:30:32 +0000
4@@ -1070,6 +1070,12 @@
5 modeldir = os.path.dirname(modeldir)
6 modeldir = pjoin(modeldir, modelname)
7 return modeldir
8+ elif name == 'restrict_name':
9+ modeldir = self.get('version_tag').rsplit('##',1)[0]
10+ modelname = self['name']
11+ basename = os.path.basename(modeldir)
12+ restriction = modelname[len(basename)+1:]
13+ return restriction
14
15 if (name == 'interaction_dict') and not self[name]:
16 if self['interactions']:
17
18=== modified file 'madgraph/core/diagram_generation.py'
19--- madgraph/core/diagram_generation.py 2013-11-29 07:28:53 +0000
20+++ madgraph/core/diagram_generation.py 2014-03-24 03:30:32 +0000
21@@ -558,9 +558,12 @@
22 part = model.get('particle_dict')[leg.get('id')]
23 try:
24 value = part.get(charge)
25- except AttributeError, PhysicsObjectError:
26- value = 0
27-
28+ except (AttributeError, base_objects.PhysicsObject.PhysicsObjectError):
29+ try:
30+ value = getattr(part, charge)
31+ except AttributeError:
32+ value = 0
33+
34 if (leg.get('id') != part['pdg_code']) != leg['state']:
35 total -= value
36 else:
37
38=== modified file 'madgraph/interface/amcatnlo_interface.py'
39--- madgraph/interface/amcatnlo_interface.py 2014-03-07 13:18:20 +0000
40+++ madgraph/interface/amcatnlo_interface.py 2014-03-24 03:30:32 +0000
41@@ -388,8 +388,10 @@
42 # Check the validity of the arguments
43 self.check_add(args)
44
45- if args[0] != 'process':
46- raise self.InvalidCmd("The add command can only be used with a process")
47+ if args[0] == 'model':
48+ return self.add_model(args[1:])
49+ elif args[0] != 'process':
50+ raise self.InvalidCmd("The add command can only be used with process or model")
51 else:
52 line = ' '.join(args[1:])
53
54
55=== modified file 'madgraph/interface/madgraph_interface.py'
56--- madgraph/interface/madgraph_interface.py 2014-03-18 21:39:55 +0000
57+++ madgraph/interface/madgraph_interface.py 2014-03-24 03:30:32 +0000
58@@ -533,7 +533,9 @@
59 logger.info(" can still handle these.")
60
61 def help_add(self):
62-
63+ logger.info("-- generate diagrams for a process and add to existing processes",'$MG:color:BLUE')
64+ logger.info(" OR merge two model",'$MG:color:BLUE')
65+ logger.info('')
66 logger.info("-- generate diagrams for a process and add to existing processes",'$MG:color:BLUE')
67 logger.info("General leading-order syntax:",'$MG:color:BLACK')
68 logger.info(" o add process INITIAL STATE > REQ S-CHANNEL > FINAL STATE $ EXCL S-CHANNEL / FORBIDDEN PARTICLES COUP1=ORDER1 COUP2=ORDER2 @N")
69@@ -567,6 +569,17 @@
70 logger.info(" the 'virt=' NLO mode. aMC@NLO cannot integrate these processes, but standalone MadLoop5")
71 logger.info(" can still handle these.")
72
73+ logger.info("-- merge two model to create a new one", '$MG:color:BLUE')
74+ logger.info("syntax:",'$MG:color:BLACK')
75+ logger.info(" o add model MODELNAME [OPTIONS]")
76+ logger.info(" o Example: add model taudecay",'$MG:color:GREEN')
77+ logger.info(" > Merge the two model in a single one. If that same merge was done before.")
78+ logger.info(" > Just reload the previous merge. (WARNING: This doesn't check if those model are modified)")
79+ logger.info(" > Options:")
80+ logger.info(" --output= : Specify the name of the directory where the merge is done.")
81+ logger.info(" This allow to do \"import NAME\" to load that merge.")
82+ logger.info(" --recreate : Force to recreated the merge model even if the merge model directory already exists.")
83+
84 def help_compute_widths(self):
85 logger.info("syntax: calculate_width PART [other particles] [OPTIONS]")
86 logger.info(" Computes the width and partial width for a set of particles")
87@@ -696,37 +709,22 @@
88
89 def check_add(self, args):
90 """check the validity of line
91- syntax: add process PROCESS
92+ syntax: add process PROCESS | add model MODELNAME
93 """
94
95 if len(args) < 2:
96 self.help_add()
97 raise self.InvalidCmd('\"add\" requires at least two arguments')
98-
99- if args[0] != 'process':
100- raise self.InvalidCmd('\"add\" requires the argument \"process\"')
101-
102- if not self._curr_model:
103- logger.info("No model currently active, so we import the Standard Model")
104- self.do_import('model sm')
105-
106- if args[-1].startswith('--optimize'):
107- if args[2] != '>':
108- raise self.InvalidCmd('optimize mode valid only for 1->N processes. (See model restriction for 2->N)')
109- if '=' in args[-1]:
110- path = args[-1].split('=',1)[1]
111- if not os.path.exists(path) or \
112- self.detect_file_type(path) != 'param_card':
113- raise self.InvalidCmd('%s is not a valid param_card')
114- else:
115- path=None
116- # Update the default value of the model here.
117- if not isinstance(self._curr_model, model_reader.ModelReader):
118- self._curr_model = model_reader.ModelReader(self._curr_model)
119- self._curr_model.set_parameters_and_couplings(path)
120- self.check_process_format(' '.join(args[1:-1]))
121- else:
122- self.check_process_format(' '.join(args[1:]))
123+
124+ if args[0] not in ['model', 'process']:
125+ raise self.InvalidCmd('\"add\" requires the argument \"process\" or \"model\"')
126+
127+ if args[0] == 'process':
128+ return self.check_generate(args)
129+
130+ if args[0] == 'model':
131+ pass
132+
133
134 def check_define(self, args):
135 """check the validity of line
136@@ -848,8 +846,29 @@
137
138 def check_generate(self, args):
139 """check the validity of args"""
140- # Not called anymore see check_add
141- return self.check_add(args)
142+
143+ if not self._curr_model:
144+ logger.info("No model currently active, so we import the Standard Model")
145+ self.do_import('model sm')
146+
147+ if args[-1].startswith('--optimize'):
148+ if args[2] != '>':
149+ raise self.InvalidCmd('optimize mode valid only for 1->N processes. (See model restriction for 2->N)')
150+ if '=' in args[-1]:
151+ path = args[-1].split('=',1)[1]
152+ if not os.path.exists(path) or \
153+ self.detect_file_type(path) != 'param_card':
154+ raise self.InvalidCmd('%s is not a valid param_card')
155+ else:
156+ path=None
157+ # Update the default value of the model here.
158+ if not isinstance(self._curr_model, model_reader.ModelReader):
159+ self._curr_model = model_reader.ModelReader(self._curr_model)
160+ self._curr_model.set_parameters_and_couplings(path)
161+ self.check_process_format(' '.join(args[1:-1]))
162+ else:
163+ self.check_process_format(' '.join(args[1:]))
164+
165
166 def check_process_format(self, process):
167 """ check the validity of the string given to describe a format """
168@@ -1801,18 +1820,15 @@
169 if len(args) == 1:
170 return self.list_completion(text, self._add_opts)
171
172- return self.complete_generate(text, " ".join(args[1:]), begidx, endidx)
173-
174- # Return list of particle names and multiparticle names, as well as
175- # coupling orders and allowed symbols
176- couplings = []
177- if len(args) > 2 and args[-1] != '>':
178- couplings = ['>']
179- if '>' in args and args.index('>') < len(args) - 1:
180- couplings = [c + "=" for c in self._couplings] + ['@','$','/','>']
181- return self.list_completion(text, self._particle_names + \
182- self._multiparticles.keys() + couplings)
183-
184+ if args[1] == 'process':
185+ return self.complete_generate(text, " ".join(args[1:]), begidx, endidx)
186+
187+ elif args[1] == 'model':
188+ completion_categories = self.complete_import(text, line, begidx, endidx,
189+ allow_restrict=False, treat_completion=False)
190+ completion_categories['options'] = self.list_completion(text,['--modelname=','--recreate'])
191+ return self.deal_multiple_categories(completion_categories)
192+
193 def complete_customize_model(self, text, line, begidx, endidx):
194 "Complete the customize_model command"
195
196@@ -2141,8 +2157,9 @@
197 return self.path_completion(text,
198 pjoin(*[a for a in args if a.endswith(os.path.sep)]),
199 only_dirs = True)
200-
201- def complete_import(self, text, line, begidx, endidx):
202+
203+ def complete_import(self, text, line, begidx, endidx, allow_restrict=True,
204+ treat_completion=True):
205 "Complete the import command"
206
207 args=self.split_arg(line[0:begidx])
208@@ -2246,12 +2263,15 @@
209
210 if mode == 'model_v4':
211 completion_categories['model name'] = model_list
212- else:
213+ elif allow_restrict:
214 # need to update the list with the possible restriction
215 all_name = []
216 for model_name in model_list:
217 all_name += self.find_restrict_card(model_name,
218 base_dir=pjoin(MG5DIR,'models'))
219+ else:
220+ all_name = model_list
221+
222 if mode == 'all':
223 cur_path = pjoin(*[a for a in args \
224 if a.endswith(os.path.sep)])
225@@ -2271,8 +2291,12 @@
226 completion_categories['options'] = self.list_completion(text, ['--modelname','-modelname','--noprefix'])
227 if len(args) >= 3 and mode.startswith('banner') and not '--no_launch' in line:
228 completion_categories['options'] = self.list_completion(text, ['--no_launch'])
229- return self.deal_multiple_categories(completion_categories)
230-
231+
232+ if treat_completion:
233+ return self.deal_multiple_categories(completion_categories)
234+ else:
235+ #this means this function is called as a subgroup of another completion
236+ return completion_categories
237
238
239 def find_restrict_card(self, model_name, base_dir='./', no_restrict=True):
240@@ -2331,7 +2355,7 @@
241 _display_opts = ['particles', 'interactions', 'processes', 'diagrams',
242 'diagrams_text', 'multiparticles', 'couplings', 'lorentz',
243 'checks', 'parameters', 'options', 'coupling_order','variable']
244- _add_opts = ['process']
245+ _add_opts = ['process', 'model']
246 _save_opts = ['model', 'processes', 'options']
247 _tutorial_opts = ['aMCatNLO', 'stop', 'MadLoop', 'MadGraph5']
248 _switch_opts = ['mg5','aMC@NLO','ML5']
249@@ -2495,10 +2519,12 @@
250 def do_add(self, line):
251 """Generate an amplitude for a given process and add to
252 existing amplitudes
253+ or merge two model
254 """
255
256 args = self.split_arg(line)
257
258+
259 warning_duplicate = True
260 if '--no_warning=duplicate' in args:
261 warning_duplicate = False
262@@ -2507,6 +2533,9 @@
263 # Check the validity of the arguments
264 self.check_add(args)
265
266+ if args[0] == 'model':
267+ return self.add_model(args[1:])
268+
269 # special option for 1->N to avoid generation of kinematically forbidden
270 #decay.
271 if args[-1].startswith('--optimize'):
272@@ -2589,8 +2618,58 @@
273 ndiags = sum([amp.get_number_of_diagrams() for \
274 amp in self._curr_amps])
275 logger.info("Total: %i processes with %i diagrams" % \
276- (len(self._curr_amps), ndiags))
277-
278+ (len(self._curr_amps), ndiags))
279+
280+ def add_model(self, args):
281+ """merge two model"""
282+
283+ model_path = args[0]
284+ recreate = ('--recreate' in args)
285+ output_dir = [a.split('=',1)[1] for a in args if a.startswith('--output')]
286+ if output_dir:
287+ output_dir = output_dir[0]
288+ recreate = True
289+ restrict_name = ''
290+ else:
291+ name = os.path.basename(self._curr_model.get('modelpath'))
292+ restrict_name = self._curr_model.get('restrict_name')
293+ output_dir = pjoin(MG5DIR, 'models', '%s__%s' % (name,
294+ os.path.basename(model_path)))
295+
296+ if os.path.exists(output_dir):
297+ if recreate:
298+ shutil.rmtree(output_dir)
299+ else:
300+ logger.info('Model already created! Loading it from %s' % output_dir)
301+ oldmodel = self._curr_model.get('modelpath')
302+ new_model_name = output_dir
303+ if restrict_name:
304+ new_model_name = '%s-%s' % (output_dir, restrict_name)
305+ try:
306+ self.exec_cmd('import model %s' % new_model_name, errorhandling=False,
307+ printcmd=False, precmd=True, postcmd=True)
308+ except Exception, error:
309+ logger.debug('fail to load model %s with error:\n %s' % (output_dir, error))
310+ logger.warning('Fail to load the model. Restore previous model')
311+ self.exec_cmd('import model %s' % oldmodel, errorhandling=False,
312+ printcmd=False, precmd=True, postcmd=True)
313+ raise Exception('Invalid Model! Please retry with the option \'--recreate\'.')
314+ else:
315+ return
316+
317+ #Need to do the work!!!
318+ import models.usermod as usermod
319+ base_model = usermod.UFOModel(self._curr_model.get('modelpath'))
320+ base_model.add_model(path=model_path)
321+ base_model.write(output_dir)
322+
323+ new_model_name = output_dir
324+ if restrict_name:
325+ new_model_name = '%s-%s' % (output_dir, restrict_name)
326+ self.exec_cmd('import model %s' % new_model_name, errorhandling=False,
327+ printcmd=False, precmd=True, postcmd=True)
328+
329+
330 # Define a multiparticle label
331 def do_define(self, line, log=True):
332 """Define a multiparticle"""
333
334=== modified file 'madgraph/various/banner.py'
335--- madgraph/various/banner.py 2014-03-18 12:41:26 +0000
336+++ madgraph/various/banner.py 2014-03-24 03:30:32 +0000
337@@ -880,7 +880,7 @@
338 if cmds[1].startswith('model'):
339 self.info['full_model_line'] = line
340 self.clean(remove_bef_last='import', keep_switch=True,
341- allow_for_removal=['generate', 'add process', 'output'])
342+ allow_for_removal=['generate', 'add process', 'add model', 'output'])
343 if cmds[1] == 'model':
344 self.info['model'] = cmds[2]
345 else:
346@@ -908,7 +908,7 @@
347 keep_switch force to keep the statement remove_bef_??? which changes starts
348 the removal mode.
349 """
350-
351+
352 #check consistency
353 if __debug__ and allow_for_removal:
354 for arg in to_keep:
355
356=== modified file 'models/build_restriction_lib.py'
357--- models/build_restriction_lib.py 2013-11-13 02:21:10 +0000
358+++ models/build_restriction_lib.py 2014-03-24 03:30:32 +0000
359@@ -47,7 +47,7 @@
360 self.append(current_rule)
361 first=False
362
363-
364+
365
366
367
368\ No newline at end of file
369
370=== added directory 'models/hgg_plugin'
371=== added file 'models/hgg_plugin/HEFT_UFO.log'
372--- models/hgg_plugin/HEFT_UFO.log 1970-01-01 00:00:00 +0000
373+++ models/hgg_plugin/HEFT_UFO.log 2014-03-24 03:30:32 +0000
374@@ -0,0 +1,75 @@
375+# This file was automatically created by FeynRules $Revision: 634 $
376+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (November 6, 2010)
377+# Date: Wed 20 Jul 2011 12:57:52
378+
379+
380+#
381+# This is the logfile for the model Higgs_Effective_Couplings
382+
383+# Authors: N. Christensen, C. Duhr
384+# Model version: 1.3
385+# Checking the Lagrangians
386+ * All Lagrangians are ok.
387+#
388+# Particle definitions
389+#
390+
391+ * No particles removed. All particles correspond to GenInt setup.
392+
393+# Automatically assigned PDG numbers
394+ * Assigned PDG number 9000001 to particle ghA
395+ * Assigned PDG number 9000002 to particle ghZ
396+ * Assigned PDG number 9000003 to particle ghWp
397+ * Assigned PDG number 9000004 to particle ghWm
398+ * Assigned PDG number 9000005 to particle ghG
399+ * Assigned PDG number 9000006 to particle h1
400+
401+
402+# Compulsory PDG codes:
403+ * Class SM leptons complete.
404+ * Class SM neutrinos complete.
405+ * Class SM quarks complete.
406+ * Class SM gauge bosons complete.
407+#
408+# Parameter definitions
409+#
410+
411+ * All parameters are ok.
412+
413+
414+# Vertices
415+ * Calling FeynmanRules for 1 Lagrangians.
416+ * Number of classes vertices: 36
417+ * Number of flavored vertices: 77
418+ * Saved vertices in InterfaceRun[ 1 ].
419+ * Removing all ghosts and Goldstone bosons form the output.
420+ * Checked QNumber conservation.
421+ - Quantum number GhostNumber conserved in all vertices.
422+ - Quantum number LeptonNumber conserved in all vertices.
423+ - Quantum number Q conserved in all vertices.
424+ * particles.py written.
425+ * parameters.py written.
426+#
427+# Vertex definitions
428+#
429+
430+ * 76 vertices written.
431+ * vertices.py written.
432+#
433+# Lorentz structure definitions
434+#
435+
436+ * 22 lorentz structures written.
437+ * lorentz.py written.
438+#
439+# Coupling definitions
440+#
441+
442+ * 53 couplings written.
443+ * couplings.py written.
444+#
445+# Coupling order definitions
446+#
447+
448+ * 0 couplings orders written.
449+ * coupling_orders.py written.
450
451=== added file 'models/hgg_plugin/__init__.py'
452--- models/hgg_plugin/__init__.py 1970-01-01 00:00:00 +0000
453+++ models/hgg_plugin/__init__.py 2014-03-24 03:30:32 +0000
454@@ -0,0 +1,32 @@
455+
456+import particles
457+import couplings
458+import lorentz
459+import parameters
460+import vertices
461+import coupling_orders
462+import write_param_card
463+
464+
465+all_particles = particles.all_particles
466+all_vertices = vertices.all_vertices
467+all_couplings = couplings.all_couplings
468+all_lorentz = lorentz.all_lorentz
469+all_parameters = parameters.all_parameters
470+all_orders = coupling_orders.all_orders
471+all_functions = function_library.all_functions
472+
473+try:
474+ import decays
475+except ImportError:
476+ pass
477+else:
478+ all_decays = decays.all_decays
479+
480+
481+gauge = [0, 1]
482+
483+
484+__author__ = "N. Christensen, C. Duhr"
485+__date__ = "02. 06. 2009"
486+__version__= "1.3"
487
488=== added file 'models/hgg_plugin/coupling_orders.py'
489--- models/hgg_plugin/coupling_orders.py 1970-01-01 00:00:00 +0000
490+++ models/hgg_plugin/coupling_orders.py 2014-03-24 03:30:32 +0000
491@@ -0,0 +1,24 @@
492+# This file was automatically created by FeynRules 1.7.55
493+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (October 6, 2011)
494+# Date: Wed 8 Aug 2012 14:16:24
495+
496+
497+from object_library import all_orders, CouplingOrder
498+
499+
500+QCD = CouplingOrder(name = 'QCD',
501+ expansion_order = 99,
502+ hierarchy = 1)
503+
504+QED = CouplingOrder(name = 'QED',
505+ expansion_order = 99,
506+ hierarchy = 2)
507+
508+HIG = CouplingOrder(name = 'HIG',
509+ expansion_order = 1,
510+ hierarchy = 2)
511+
512+HIW = CouplingOrder(name = 'HIW',
513+ expansion_order = 1,
514+ hierarchy = 2)
515+
516
517=== added file 'models/hgg_plugin/couplings.py'
518--- models/hgg_plugin/couplings.py 1970-01-01 00:00:00 +0000
519+++ models/hgg_plugin/couplings.py 2014-03-24 03:30:32 +0000
520@@ -0,0 +1,29 @@
521+# This file was automatically created by FeynRules 1.7.55
522+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (October 6, 2011)
523+# Date: Wed 8 Aug 2012 14:16:24
524+
525+
526+from object_library import all_couplings, Coupling
527+
528+from function_library import complexconjugate, re, im, csc, sec, acsc, asec
529+
530+
531+GC_13 = Coupling(name = 'GC_13',
532+ value = '-(complex(0,1)*GH)',
533+ order = {'HIG':1})
534+
535+GC_14 = Coupling(name = 'GC_14',
536+ value = '-(G*GH)',
537+ order = {'HIG':1,'QCD':1})
538+
539+GC_15 = Coupling(name = 'GC_15',
540+ value = 'complex(0,1)*G**2*GH',
541+ order = {'HIG':1,'QCD':2})
542+
543+GC_16 = Coupling(name = 'GC_16',
544+ value = '(complex(0,1)*Gphi)/8.',
545+ order = {'HIG':1})
546+
547+GC_17 = Coupling(name = 'GC_17',
548+ value = '-(G*Gphi)',
549+ order = {'HIG':1,'QCD':1})
550
551=== added file 'models/hgg_plugin/function_library.py'
552--- models/hgg_plugin/function_library.py 1970-01-01 00:00:00 +0000
553+++ models/hgg_plugin/function_library.py 2014-03-24 03:30:32 +0000
554@@ -0,0 +1,54 @@
555+# This file is part of the UFO.
556+#
557+# This file contains definitions for functions that
558+# are extensions of the cmath library, and correspond
559+# either to functions that are in cmath, but inconvenient
560+# to access from there (e.g. z.conjugate()),
561+# or functions that are simply not defined.
562+#
563+#
564+
565+__date__ = "22 July 2010"
566+__author__ = "claude.duhr@durham.ac.uk"
567+
568+import cmath
569+from object_library import all_functions, Function
570+
571+#
572+# shortcuts for functions from cmath
573+#
574+
575+complexconjugate = Function(name = 'complexconjugate',
576+ arguments = ('z',),
577+ expression = 'z.conjugate()')
578+
579+
580+re = Function(name = 're',
581+ arguments = ('z',),
582+ expression = 'z.real')
583+
584+im = Function(name = 'im',
585+ arguments = ('z',),
586+ expression = 'z.imag')
587+
588+# New functions (trigonometric)
589+
590+sec = Function(name = 'sec',
591+ arguments = ('z',),
592+ expression = '1./cmath.cos(z)')
593+
594+asec = Function(name = 'asec',
595+ arguments = ('z',),
596+ expression = 'cmath.acos(1./z)')
597+
598+csc = Function(name = 'csc',
599+ arguments = ('z',),
600+ expression = '1./cmath.sin(z)')
601+
602+acsc = Function(name = 'acsc',
603+ arguments = ('z',),
604+ expression = 'cmath.asin(1./z)')
605+
606+
607+
608+
609
610=== added file 'models/hgg_plugin/lorentz.py'
611--- models/hgg_plugin/lorentz.py 1970-01-01 00:00:00 +0000
612+++ models/hgg_plugin/lorentz.py 2014-03-24 03:30:32 +0000
613@@ -0,0 +1,38 @@
614+# This file was automatically created by FeynRules 1.7.55
615+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (October 6, 2011)
616+# Date: Wed 8 Aug 2012 14:16:24
617+
618+
619+from object_library import all_lorentz, Lorentz
620+
621+from function_library import complexconjugate, re, im, csc, sec, acsc, asec
622+
623+
624+VVS1 = Lorentz(name = 'VVS1',
625+ spins = [ 3, 3, 1 ],
626+ structure = '-4*Epsilon(1,2,-1,-2)*P(-2,2)*P(-1,1) + 4*Epsilon(1,2,-1,-2)*P(-2,1)*P(-1,2)')
627+
628+VVS3 = Lorentz(name = 'VVS3',
629+ spins = [ 3, 3, 1 ],
630+ structure = 'P(1,2)*P(2,1) - P(-1,1)*P(-1,2)*Metric(1,2)')
631+
632+VVVS1 = Lorentz(name = 'VVVS1',
633+ spins = [ 3, 3, 3, 1 ],
634+ structure = 'Epsilon(1,2,3,-1)*P(-1,1) + Epsilon(1,2,3,-1)*P(-1,2) + Epsilon(1,2,3,-1)*P(-1,3)')
635+
636+VVVS2 = Lorentz(name = 'VVVS2',
637+ spins = [ 3, 3, 3, 1 ],
638+ structure = 'P(3,1)*Metric(1,2) - P(3,2)*Metric(1,2) - P(2,1)*Metric(1,3) + P(2,3)*Metric(1,3) + P(1,2)*Metric(2,3) - P(1,3)*Metric(2,3)')
639+
640+VVVVS1 = Lorentz(name = 'VVVVS1',
641+ spins = [ 3, 3, 3, 3, 1 ],
642+ structure = 'Metric(1,4)*Metric(2,3) - Metric(1,3)*Metric(2,4)')
643+
644+VVVVS2 = Lorentz(name = 'VVVVS2',
645+ spins = [ 3, 3, 3, 3, 1 ],
646+ structure = 'Metric(1,4)*Metric(2,3) - Metric(1,2)*Metric(3,4)')
647+
648+VVVVS3 = Lorentz(name = 'VVVVS3',
649+ spins = [ 3, 3, 3, 3, 1 ],
650+ structure = 'Metric(1,3)*Metric(2,4) - Metric(1,2)*Metric(3,4)')
651+
652
653=== added file 'models/hgg_plugin/object_library.py'
654--- models/hgg_plugin/object_library.py 1970-01-01 00:00:00 +0000
655+++ models/hgg_plugin/object_library.py 2014-03-24 03:30:32 +0000
656@@ -0,0 +1,259 @@
657+##
658+##
659+## Feynrules Header
660+##
661+##
662+##
663+##
664+##
665+
666+import cmath
667+
668+
669+class UFOBaseClass(object):
670+ """The class from which all FeynRules classes are derived."""
671+
672+ require_args = []
673+
674+ def __init__(self, *args, **options):
675+ assert(len(self.require_args) == len (args))
676+
677+ for i, name in enumerate(self.require_args):
678+ setattr(self, name, args[i])
679+
680+ for (option, value) in options.items():
681+ setattr(self, option, value)
682+
683+ def get(self, name):
684+ return getattr(self, name)
685+
686+ def set(self, name, value):
687+ setattr(self, name, value)
688+
689+ def get_all(self):
690+ """Return a dictionary containing all the information of the object"""
691+ return self.__dict__
692+
693+ def __str__(self):
694+ return self.name
695+
696+ def nice_string(self):
697+ """ return string with the full information """
698+ return '\n'.join(['%s \t: %s' %(name, value) for name, value in self.__dict__.items()])
699+
700+ def __repr__(self):
701+ replacements = [
702+ ('+','__plus__'),
703+ ('-','__minus__'),
704+ ('@','__at__'),
705+ ('!','__exclam__'),
706+ ('?','__quest__'),
707+ ('*','__star__'),
708+ ('~','__tilde__')
709+ ]
710+ text = self.name
711+ for orig,sub in replacements:
712+ text = text.replace(orig,sub)
713+ return text
714+
715+
716+
717+all_particles = []
718+
719+
720+
721+class Particle(UFOBaseClass):
722+ """A standard Particle"""
723+
724+ require_args=['pdg_code', 'name', 'antiname', 'spin', 'color', 'mass', 'width', 'texname', 'antitexname', 'charge']
725+
726+ require_args_all = ['pdg_code', 'name', 'antiname', 'spin', 'color', 'mass', 'width', 'texname', 'antitexname', 'charge', 'line', 'propagating', 'goldstoneboson']
727+
728+ def __init__(self, pdg_code, name, antiname, spin, color, mass, width, texname,
729+ antitexname, charge , line=None, propagating=True, goldstoneboson=False, **options):
730+
731+ args= (pdg_code, name, antiname, spin, color, mass, width, texname,
732+ antitexname, float(charge))
733+
734+ UFOBaseClass.__init__(self, *args, **options)
735+
736+ global all_particles
737+ all_particles.append(self)
738+
739+ self.propagating = propagating
740+ self.goldstoneboson= goldstoneboson
741+
742+ self.selfconjugate = (name == antiname)
743+ if 1: #not line:
744+ self.line = self.find_line_type()
745+ else:
746+ self.line = line
747+
748+
749+
750+
751+ def find_line_type(self):
752+ """ find how we draw a line if not defined
753+ valid output: dashed/straight/wavy/curly/double/swavy/scurly
754+ """
755+
756+ spin = self.spin
757+ color = self.color
758+
759+ #use default
760+ if spin == 1:
761+ return 'dashed'
762+ elif spin == 2:
763+ if not self.selfconjugate:
764+ return 'straight'
765+ elif color == 1:
766+ return 'swavy'
767+ else:
768+ return 'scurly'
769+ elif spin == 3:
770+ if color == 1:
771+ return 'wavy'
772+
773+ else:
774+ return 'curly'
775+ elif spin == 5:
776+ return 'double'
777+ elif spin == -1:
778+ return 'dotted'
779+ else:
780+ return 'dashed' # not supported yet
781+
782+ def anti(self):
783+ if self.selfconjugate:
784+ raise Exception('%s has no anti particle.' % self.name)
785+ outdic = {}
786+ for k,v in self.__dict__.iteritems():
787+ if k not in self.require_args_all:
788+ outdic[k] = -v
789+ if self.color in [1,8]:
790+ newcolor = self.color
791+ else:
792+ newcolor = -self.color
793+
794+ return Particle(-self.pdg_code, self.antiname, self.name, self.spin, newcolor, self.mass, self.width,
795+ self.antitexname, self.texname, -self.charge, self.line, self.propagating, self.goldstoneboson, **outdic)
796+
797+
798+
799+all_parameters = []
800+
801+class Parameter(UFOBaseClass):
802+
803+ require_args=['name', 'nature', 'type', 'value', 'texname']
804+
805+ def __init__(self, name, nature, type, value, texname, lhablock=None, lhacode=None):
806+
807+ args = (name,nature,type,value,texname)
808+
809+ UFOBaseClass.__init__(self, *args)
810+
811+ args=(name,nature,type,value,texname)
812+
813+ global all_parameters
814+ all_parameters.append(self)
815+
816+ if (lhablock is None or lhacode is None) and nature == 'external':
817+ raise Exception('Need LHA information for external parameter "%s".' % name)
818+ self.lhablock = lhablock
819+ self.lhacode = lhacode
820+
821+all_vertices = []
822+
823+class Vertex(UFOBaseClass):
824+
825+ require_args=['name', 'particles', 'color', 'lorentz', 'couplings']
826+
827+ def __init__(self, name, particles, color, lorentz, couplings, **opt):
828+
829+ args = (name, particles, color, lorentz, couplings)
830+
831+ UFOBaseClass.__init__(self, *args, **opt)
832+
833+ args=(particles,color,lorentz,couplings)
834+
835+ global all_vertices
836+ all_vertices.append(self)
837+
838+all_couplings = []
839+
840+class Coupling(UFOBaseClass):
841+
842+ require_args=['name', 'value', 'order']
843+
844+ def __init__(self, name, value, order, **opt):
845+
846+ args =(name, value, order)
847+ UFOBaseClass.__init__(self, *args, **opt)
848+ global all_couplings
849+ all_couplings.append(self)
850+
851+
852+
853+all_lorentz = []
854+
855+class Lorentz(UFOBaseClass):
856+
857+ require_args=['name','spins','structure']
858+
859+ def __init__(self, name, spins, structure='external', **opt):
860+ args = (name, spins, structure)
861+ UFOBaseClass.__init__(self, *args, **opt)
862+
863+ global all_lorentz
864+ all_lorentz.append(self)
865+
866+
867+all_functions = []
868+
869+class Function(object):
870+
871+ def __init__(self, name, arguments, expression):
872+
873+ global all_functions
874+ all_functions.append(self)
875+
876+ self.name = name
877+ self.arguments = arguments
878+ self.expr = expression
879+
880+ def __call__(self, *opt):
881+
882+ for i, arg in enumerate(self.arguments):
883+ exec('%s = %s' % (arg, opt[i] ))
884+
885+ return eval(self.expr)
886+
887+all_orders = []
888+
889+class CouplingOrder(object):
890+
891+ def __init__(self, name, expansion_order, hierarchy, perturbative_expansion = 0):
892+
893+ global all_orders
894+ all_orders.append(self)
895+
896+ self.name = name
897+ self.expansion_order = expansion_order
898+ self.hierarchy = hierarchy
899+
900+all_decays = []
901+
902+class Decay(UFOBaseClass):
903+ require_args = ['particle','partial_widths']
904+
905+ def __init__(self, particle, partial_widths, **opt):
906+ args = (particle, partial_widths)
907+ UFOBaseClass.__init__(self, *args, **opt)
908+
909+ global all_decays
910+ all_decays.append(self)
911+
912+ # Add the information directly to the particle
913+ particle.partial_widths = partial_widths
914+
915+
916
917=== added file 'models/hgg_plugin/parameters.py'
918--- models/hgg_plugin/parameters.py 1970-01-01 00:00:00 +0000
919+++ models/hgg_plugin/parameters.py 2014-03-24 03:30:32 +0000
920@@ -0,0 +1,149 @@
921+# This file was automatically created by FeynRules 1.7.55
922+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (October 6, 2011)
923+# Date: Wed 8 Aug 2012 14:16:24
924+
925+
926+
927+from object_library import all_parameters, Parameter
928+
929+
930+from function_library import complexconjugate, re, im, csc, sec, acsc, asec
931+
932+# This is a default parameter object representing 0.
933+ZERO = Parameter(name = 'ZERO',
934+ nature = 'internal',
935+ type = 'real',
936+ value = '0.0',
937+ texname = '0')
938+
939+MH = Parameter(name = 'MH',
940+ nature = 'external',
941+ type = 'real',
942+ value = 125,
943+ texname = '\\text{MH}',
944+ lhablock = 'MASS',
945+ lhacode = [ 25 ])
946+
947+MT = Parameter(name = 'MT',
948+ nature = 'external',
949+ type = 'real',
950+ value = 172,
951+ texname = '\\text{MT}',
952+ lhablock = 'MASS',
953+ lhacode = [ 6 ])
954+
955+Gf = Parameter(name = 'Gf',
956+ nature = 'external',
957+ type = 'real',
958+ value = 0.0000116637,
959+ texname = 'G_f',
960+ lhablock = 'SMINPUTS',
961+ lhacode = [ 2 ])
962+
963+
964+MZ = Parameter(name = 'MZ',
965+ nature = 'external',
966+ type = 'real',
967+ value = 91.1876,
968+ texname = '\\text{MZ}',
969+ lhablock = 'MASS',
970+ lhacode = [ 23 ])
971+
972+aEWM1 = Parameter(name = 'aEWM1',
973+ nature = 'external',
974+ type = 'real',
975+ value = 132.50698,
976+ texname = '\\text{aEWM1}',
977+ lhablock = 'SMINPUTS',
978+ lhacode = [ 1 ])
979+
980+aEW = Parameter(name = 'aEW',
981+ nature = 'internal',
982+ type = 'real',
983+ value = '1/aEWM1',
984+ texname = '\\text{aEW}')
985+
986+MW = Parameter(name = 'MW',
987+ nature = 'internal',
988+ type = 'real',
989+ value = 'cmath.sqrt(MZ**2/2. + cmath.sqrt(MZ**4/4. - (aEW*cmath.pi*MZ**2)/(Gf*cmath.sqrt(2))))',
990+ texname = 'M_W')
991+
992+ee = Parameter(name = 'ee',
993+ nature = 'internal',
994+ type = 'real',
995+ value = '2*cmath.sqrt(aEW)*cmath.sqrt(cmath.pi)',
996+ texname = 'e')
997+
998+sw2 = Parameter(name = 'sw2',
999+ nature = 'internal',
1000+ type = 'real',
1001+ value = '1 - MW**2/MZ**2',
1002+ texname = '\\text{sw2}')
1003+
1004+sw = Parameter(name = 'sw',
1005+ nature = 'internal',
1006+ type = 'real',
1007+ value = 'cmath.sqrt(sw2)',
1008+ texname = 's_w')
1009+
1010+v = Parameter(name = 'v',
1011+ nature = 'internal',
1012+ type = 'real',
1013+ value = '(2*MW*sw)/ee',
1014+ texname = 'v')
1015+
1016+aS = Parameter(name = 'aS',
1017+ nature = 'external',
1018+ type = 'real',
1019+ value = 0.118,
1020+ texname = '\\text{aS}',
1021+ lhablock = 'SMINPUTS',
1022+ lhacode = [ 3 ])
1023+
1024+G = Parameter(name = 'G',
1025+ nature = 'internal',
1026+ type = 'real',
1027+ value = '2*cmath.sqrt(aS)*cmath.sqrt(cmath.pi)',
1028+ texname = 'G')
1029+
1030+GH = Parameter(name = 'GH',
1031+ nature = 'internal',
1032+ type = 'real',
1033+ value = '-(G**2*(1 + (13*MH**6)/(16800.*MT**6) + MH**4/(168.*MT**4) + (7*MH**2)/(120.*MT**2)))/(12.*cmath.pi**2*v)',
1034+ texname = 'G_H')
1035+
1036+
1037+
1038+
1039+
1040+WH = Parameter(name = 'WH',
1041+ nature = 'external',
1042+ type = 'real',
1043+ value = 6.38233934e-03,
1044+ texname = '\\text{WH}',
1045+ lhablock = 'DECAY',
1046+ lhacode = [ 25 ])
1047+
1048+WH1 = Parameter(name = 'WH1',
1049+ nature = 'external',
1050+ type = 'real',
1051+ value = 0.00575308848,
1052+ texname = '\\text{WH1}',
1053+ lhablock = 'DECAY',
1054+ lhacode = [ 9000006 ])
1055+
1056+MP = Parameter(name = 'MP',
1057+ nature = 'external',
1058+ type = 'real',
1059+ value = 120,
1060+ texname = '\\text{MP}',
1061+ lhablock = 'MASS',
1062+ lhacode = [ 9000006 ])
1063+
1064+Gphi = Parameter(name = 'Gphi',
1065+ nature = 'internal',
1066+ type = 'real',
1067+ value = '-(G**2*(1 + MH**6/(560.*MT**6) + MH**4/(90.*MT**4) + MH**2/(12.*MT**2)))/(8.*cmath.pi**2*v)',
1068+ texname = 'G_h')
1069+
1070
1071=== added file 'models/hgg_plugin/particles.py'
1072--- models/hgg_plugin/particles.py 1970-01-01 00:00:00 +0000
1073+++ models/hgg_plugin/particles.py 2014-03-24 03:30:32 +0000
1074@@ -0,0 +1,48 @@
1075+# This file was automatically created by FeynRules 1.7.55
1076+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (October 6, 2011)
1077+# Date: Wed 8 Aug 2012 14:16:24
1078+
1079+
1080+from __future__ import division
1081+from object_library import all_particles, Particle
1082+import parameters as Param
1083+
1084+G = Particle(pdg_code = 21,
1085+ name = 'G',
1086+ antiname = 'G',
1087+ spin = 3,
1088+ color = 8,
1089+ mass = Param.ZERO,
1090+ width = Param.ZERO,
1091+ texname = 'G',
1092+ antitexname = 'G',
1093+ charge = 0,
1094+ GhostNumber = 0,
1095+ LeptonNumber = 0)
1096+
1097+H = Particle(pdg_code = 25,
1098+ name = 'H',
1099+ antiname = 'H',
1100+ spin = 1,
1101+ color = 1,
1102+ mass = Param.MH,
1103+ width = Param.WH,
1104+ texname = '\\phi',
1105+ antitexname = '\\phi',
1106+ charge = 0,
1107+ GhostNumber = 0,
1108+ LeptonNumber = 0)
1109+
1110+h1 = Particle(pdg_code = 9000006,
1111+ name = 'h1',
1112+ antiname = 'h1',
1113+ spin = 1,
1114+ color = 1,
1115+ mass = Param.MP,
1116+ width = Param.WH1,
1117+ texname = 'h1',
1118+ antitexname = 'h1',
1119+ charge = 0,
1120+ GhostNumber = 0,
1121+ LeptonNumber = 0)
1122+
1123
1124=== added file 'models/hgg_plugin/vertices.py'
1125--- models/hgg_plugin/vertices.py 1970-01-01 00:00:00 +0000
1126+++ models/hgg_plugin/vertices.py 2014-03-24 03:30:32 +0000
1127@@ -0,0 +1,40 @@
1128+# This file was automatically created by FeynRules 1.7.55
1129+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (October 6, 2011)
1130+# Date: Wed 8 Aug 2012 14:16:24
1131+
1132+
1133+from object_library import all_vertices, Vertex
1134+import particles as P
1135+import couplings as C
1136+import lorentz as L
1137+
1138+V_13 = Vertex(name = 'V_13',
1139+ particles = [ P.G, P.G, P.H ],
1140+ color = [ 'Identity(1,2)' ],
1141+ lorentz = [ L.VVS3 ],
1142+ couplings = {(0,0):C.GC_13})
1143+
1144+V_37 = Vertex(name = 'V_37',
1145+ particles = [ P.G, P.G, P.h1 ],
1146+ color = [ 'Identity(1,2)' ],
1147+ lorentz = [ L.VVS1 ],
1148+ couplings = {(0,0):C.GC_16})
1149+
1150+V_41 = Vertex(name = 'V_41',
1151+ particles = [ P.G, P.G, P.G, P.H ],
1152+ color = [ 'f(1,2,3)' ],
1153+ lorentz = [ L.VVVS2 ],
1154+ couplings = {(0,0):C.GC_14})
1155+
1156+V_42 = Vertex(name = 'V_42',
1157+ particles = [ P.G, P.G, P.G, P.G, P.H ],
1158+ color = [ 'f(-1,1,2)*f(3,4,-1)', 'f(-1,1,3)*f(2,4,-1)', 'f(-1,1,4)*f(2,3,-1)' ],
1159+ lorentz = [ L.VVVVS1, L.VVVVS2, L.VVVVS3 ],
1160+ couplings = {(1,1):C.GC_15,(0,0):C.GC_15,(2,2):C.GC_15})
1161+
1162+V_43 = Vertex(name = 'V_43',
1163+ particles = [ P.G, P.G, P.G, P.h1 ],
1164+ color = [ 'f(1,2,3)' ],
1165+ lorentz = [ L.VVVS1 ],
1166+ couplings = {(0,0):C.GC_17})
1167+
1168
1169=== added file 'models/hgg_plugin/write_param_card.py'
1170--- models/hgg_plugin/write_param_card.py 1970-01-01 00:00:00 +0000
1171+++ models/hgg_plugin/write_param_card.py 2014-03-24 03:30:32 +0000
1172@@ -0,0 +1,181 @@
1173+
1174+__date__ = "02 Aug 2012"
1175+__author__ = 'olivier.mattelaer@uclouvain.be'
1176+
1177+from function_library import *
1178+
1179+class ParamCardWriter(object):
1180+
1181+ header = \
1182+ """######################################################################\n""" + \
1183+ """## PARAM_CARD AUTOMATICALY GENERATED BY THE UFO #####################\n""" + \
1184+ """######################################################################\n"""
1185+
1186+ def __init__(self, filename, list_of_parameters=None, generic=False):
1187+ """write a valid param_card.dat"""
1188+
1189+ if not list_of_parameters:
1190+ from parameters import all_parameters
1191+ list_of_parameters = [param for param in all_parameters if \
1192+ param.nature=='external']
1193+
1194+ self.generic_output = generic
1195+ if generic:
1196+ self.define_not_dep_param(list_of_parameters)
1197+
1198+
1199+ self.fsock = open(filename, 'w')
1200+ self.fsock.write(self.header)
1201+
1202+ self.write_card(list_of_parameters)
1203+ self.fsock.close()
1204+
1205+ def define_not_dep_param(self, list_of_parameters):
1206+ """define self.dep_mass and self.dep_width in case that they are
1207+ requested in the param_card.dat"""
1208+ from particles import all_particles
1209+
1210+ self.dep_mass = [(part, part.mass) for part in all_particles \
1211+ if part.pdg_code > 0 and \
1212+ part.mass not in list_of_parameters]
1213+ self.dep_width = [(part, part.width) for part in all_particles\
1214+ if part.pdg_code > 0 and \
1215+ part.width not in list_of_parameters]
1216+
1217+ @staticmethod
1218+ def order_param(obj1, obj2):
1219+ """ order parameter of a given block """
1220+
1221+ maxlen = min([len(obj1.lhacode), len(obj2.lhacode)])
1222+
1223+ for i in range(maxlen):
1224+ if obj1.lhacode[i] < obj2.lhacode[i]:
1225+ return -1
1226+ elif obj1.lhacode[i] == obj2.lhacode[i]:
1227+ return 0
1228+ else:
1229+ return 1
1230+ #identical up to the first finish
1231+ if len(obj1.lhacode) > len(obj2.lhacode):
1232+ return 1
1233+ elif len(obj1.lhacode) == len(obj2.lhacode):
1234+ return 0
1235+ else:
1236+ return -1
1237+
1238+ def write_card(self, all_ext_param):
1239+ """ """
1240+
1241+ # list all lhablock
1242+ all_lhablock = set([param.lhablock for param in all_ext_param])
1243+
1244+ # ordonate lhablock alphabeticaly
1245+ all_lhablock = list(all_lhablock)
1246+ all_lhablock.sort()
1247+ # put at the beginning SMINPUT + MASS + DECAY
1248+ for name in ['DECAY', 'MASS','SMINPUTS']:
1249+ if name in all_lhablock:
1250+ all_lhablock.remove(name)
1251+ all_lhablock.insert(0, name)
1252+
1253+ for lhablock in all_lhablock:
1254+ self.write_block(lhablock)
1255+ need_writing = [ param for param in all_ext_param if \
1256+ param.lhablock == lhablock]
1257+ need_writing.sort(self.order_param)
1258+ [self.write_param(param, lhablock) for param in need_writing]
1259+
1260+ if self.generic_output:
1261+ if lhablock in ['MASS', 'DECAY']:
1262+ self.write_dep_param_block(lhablock)
1263+
1264+ if self.generic_output:
1265+ self.write_qnumber()
1266+
1267+ def write_block(self, name):
1268+ """ write a comment for a block"""
1269+
1270+ self.fsock.writelines(
1271+ """\n###################################""" + \
1272+ """\n## INFORMATION FOR %s""" % name.upper() +\
1273+ """\n###################################\n"""
1274+ )
1275+ if name!='DECAY':
1276+ self.fsock.write("""Block %s \n""" % name)
1277+
1278+ def write_param(self, param, lhablock):
1279+
1280+ lhacode=' '.join(['%3s' % key for key in param.lhacode])
1281+ if lhablock != 'DECAY':
1282+ text = """ %s %e # %s \n""" % (lhacode, complex(param.value).real, param.name )
1283+ else:
1284+ text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real)
1285+ self.fsock.write(text)
1286+
1287+
1288+
1289+
1290+ def write_dep_param_block(self, lhablock):
1291+ import cmath
1292+ from parameters import all_parameters
1293+ for parameter in all_parameters:
1294+ exec("%s = %s" % (parameter.name, parameter.value))
1295+ text = "## Not dependent paramater.\n"
1296+ text += "## Those values should be edited following analytical the \n"
1297+ text += "## analytical expression. Some generator could simply ignore \n"
1298+ text += "## those values and use the analytical expression\n"
1299+
1300+ if lhablock == 'MASS':
1301+ data = self.dep_mass
1302+ prefix = " "
1303+ else:
1304+ data = self.dep_width
1305+ prefix = "DECAY "
1306+ for part, param in data:
1307+ if isinstance(param.value, str):
1308+ value = complex(eval(param.value)).real
1309+ else:
1310+ value = param.value
1311+
1312+ text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code,
1313+ value, part.name, param.value)
1314+ self.fsock.write(text)
1315+
1316+ sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25]
1317+ data="""Block QNUMBERS %(pdg)d # %(name)s
1318+ 1 %(charge)d # 3 times electric charge
1319+ 2 %(spin)d # number of spin states (2S+1)
1320+ 3 %(color)d # colour rep (1: singlet, 3: triplet, 8: octet)
1321+ 4 %(antipart)d # Particle/Antiparticle distinction (0=own anti)\n"""
1322+
1323+ def write_qnumber(self):
1324+ """ write qnumber """
1325+ from particles import all_particles
1326+ import particles
1327+ print particles.__file__
1328+ text="""#===========================================================\n"""
1329+ text += """# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)\n"""
1330+ text += """#===========================================================\n\n"""
1331+
1332+ for part in all_particles:
1333+ if part.pdg_code in self.sm_pdg or part.pdg_code < 0:
1334+ continue
1335+ text += self.data % {'pdg': part.pdg_code,
1336+ 'name': part.name,
1337+ 'charge': 3 * part.charge,
1338+ 'spin': part.spin,
1339+ 'color': part.color,
1340+ 'antipart': part.name != part.antiname and 1 or 0}
1341+
1342+ self.fsock.write(text)
1343+
1344+
1345+
1346+
1347+
1348+
1349+
1350+if '__main__' == __name__:
1351+ ParamCardWriter('./param_card.dat', generic=True)
1352+ print 'write ./param_card.dat'
1353+
1354
1355=== modified file 'models/import_ufo.py'
1356--- models/import_ufo.py 2014-03-09 23:55:25 +0000
1357+++ models/import_ufo.py 2014-03-24 03:30:32 +0000
1358@@ -137,7 +137,6 @@
1359 """ a practical and efficient way to import one of those models
1360 (no restriction file use)"""
1361
1362-
1363 assert model_path == find_ufo_path(model_path)
1364 if prefix is True:
1365 prefix='mdl_'
1366@@ -203,14 +202,15 @@
1367
1368 # Load basic information
1369 ufo_model = ufomodels.load_model(model_path, decay)
1370- ufo2mg5_converter = UFOMG5Converter(ufo_model)
1371+ ufo2mg5_converter = UFOMG5Converter(ufo_model)
1372 model = ufo2mg5_converter.load_model()
1373-
1374 if model_path[-1] == '/': model_path = model_path[:-1] #avoid empty name
1375 model.set('name', os.path.split(model_path)[-1])
1376-
1377- # Load the Parameter/Coupling in a convinient format.
1378- parameters, couplings = OrganizeModelExpression(ufo_model).main()
1379+
1380+ # Load the Parameter/Coupling in a convenient format.
1381+ parameters, couplings = OrganizeModelExpression(ufo_model).main(\
1382+ additional_couplings = ufo2mg5_converter.wavefunction_CT_couplings)
1383+
1384 model.set('parameters', parameters)
1385 model.set('couplings', couplings)
1386 model.set('functions', ufo_model.all_functions)
1387@@ -244,18 +244,16 @@
1388 # model.restrict_model(restrict_file)
1389
1390 return model
1391-
1392
1393 class UFOMG5Converter(object):
1394 """Convert a UFO model to the MG5 format"""
1395
1396-
1397-
1398 def __init__(self, model, auto=False):
1399 """ initialize empty list for particles/interactions """
1400
1401 self.particles = base_objects.ParticleList()
1402 self.interactions = base_objects.InteractionList()
1403+ self.wavefunction_CT_couplings = []
1404
1405 # Check here if we can extract the couplings perturbed in this model
1406 # which indicate a loop model or if this model is only meant for
1407@@ -423,7 +421,7 @@
1408 particle.set(key,abs(value))
1409 if value<0:
1410 particle.set('ghost',True)
1411- elif key == 'propagator':
1412+ elif key == 'propagator' and value:
1413 if aloha.unitary_gauge:
1414 particle.set(key, str(value[0]))
1415 else:
1416@@ -471,7 +469,12 @@
1417 if len([1 for k in key[:-1] if k==1])==1 and \
1418 not any(k>1 for k in key[:-1]):
1419 newParticleCountertermKey=[None,\
1420- tuple([tuple([abs(part.pdg_code) for part in loop_parts]) for\
1421+# The line below is for loop UFO Model with the 'attribute'
1422+# 'loop_particles' of the Particle objects to be defined with
1423+# instances of the particle class. The new convention is to use
1424+# pdg numbers instead.
1425+# tuple([tuple([abs(part.pdg_code) for part in loop_parts]) for\
1426+ tuple([tuple(loop_parts) for\
1427 loop_parts in loop_particles[key[-1]]])]
1428 for i, order in enumerate(self.ufomodel.all_orders[:-1]):
1429 if key[i]==1:
1430@@ -486,6 +489,7 @@
1431 name = newCouplingName,
1432 value = counterterm,
1433 order = {newParticleCountertermKey[0]:2})
1434+ self.wavefunction_CT_couplings.append(self.ufomodel.all_couplings.pop())
1435
1436 particle.set('counterterm',particle_counterterms)
1437 self.particles.append(particle)
1438@@ -535,8 +539,7 @@
1439 if poleOrder!=0:
1440 newCoupling.name=newCoupling.name+"_"+str(poleOrder)+"eps"
1441 newCoupling.value=coupling.pole(poleOrder)
1442- new_couplings[key[2]][poleOrder][(key[0],key[1])]=\
1443- newCoupling
1444+ new_couplings[key[2]][poleOrder][(key[0],key[1])] = newCoupling
1445
1446 # Now we can add an interaction for each.
1447 for i, all_couplings in enumerate(new_couplings):
1448@@ -954,12 +957,13 @@
1449 self.couplings = {} # depend on -> ModelVariable
1450 self.all_expr = {} # variable_name -> ModelVariable
1451
1452- def main(self):
1453+ def main(self, additional_couplings = []):
1454 """Launch the actual computation and return the associate
1455- params/couplings."""
1456+ params/couplings. Possibly consider additional_couplings in addition
1457+ to those defined in the UFO model attribute all_couplings """
1458
1459 self.analyze_parameters()
1460- self.analyze_couplings()
1461+ self.analyze_couplings(additional_couplings = additional_couplings)
1462 return self.params, self.couplings
1463
1464
1465@@ -1011,27 +1015,27 @@
1466
1467
1468
1469- def analyze_couplings(self):
1470+ def analyze_couplings(self,additional_couplings=[]):
1471 """creates the shortcut for all special function/parameter
1472 separate the couplings dependent of track variables of the others"""
1473
1474 # First expand the couplings on all their non-zero contribution to the
1475 # three laurent orders 0, -1 and -2.
1476 if self.perturbation_couplings:
1477- new_couplings_list=[]
1478- for coupling in self.model.all_couplings:
1479+ couplings_list=[]
1480+ for coupling in self.model.all_couplings + additional_couplings:
1481 for poleOrder in range(0,3):
1482 newCoupling=copy.deepcopy(coupling)
1483 if poleOrder!=0:
1484 newCoupling.name=newCoupling.name+"_"+str(poleOrder)+"eps"
1485 if newCoupling.pole(poleOrder)!='ZERO':
1486 newCoupling.value=newCoupling.pole(poleOrder)
1487- new_couplings_list.append(newCoupling)
1488- self.model.all_couplings=new_couplings_list
1489-
1490+ couplings_list.append(newCoupling)
1491+ else:
1492+ couplings_list = self.model.all_couplings + additional_couplings
1493
1494
1495- for coupling in self.model.all_couplings:
1496+ for coupling in couplings_list:
1497 # shorten expression, find dependencies, create short object
1498 expr = self.shorten_expr(coupling.value)
1499 depend_on = self.find_dependencies(expr)
1500@@ -1595,6 +1599,9 @@
1501 data.remove(param_info[param]['obj'])
1502
1503
1504+
1505+
1506+
1507
1508
1509
1510
1511=== modified file 'models/loop_sm/object_library.py'
1512--- models/loop_sm/object_library.py 2012-11-29 22:27:28 +0000
1513+++ models/loop_sm/object_library.py 2014-03-24 03:30:32 +0000
1514@@ -149,7 +149,7 @@
1515
1516 require_args=['name', 'nature', 'type', 'value', 'texname']
1517
1518- def __init__(self, name, nature, type, value, texname, lhablock=None, lhacode=None):
1519+ def __init__(self, name, nature, type, value, texname, lhablock=None, lhacode=None, loop_particles=None, counterterm=None):
1520
1521 args = (name,nature,type,value,texname)
1522
1523
1524=== modified file 'models/loop_sm/particles.py'
1525--- models/loop_sm/particles.py 2013-03-03 22:20:25 +0000
1526+++ models/loop_sm/particles.py 2014-03-24 03:30:32 +0000
1527@@ -315,28 +315,28 @@
1528
1529 # Wavefunction renormalization
1530
1531-b.loop_particles = [[[b,G]]]
1532+b.loop_particles = [[[5,21]]]
1533 b.counterterm = {(1,0,0):CTParam.bWcft_UV.value}
1534
1535-c.loop_particles = [[[c,G]]]
1536+c.loop_particles = [[[4,21]]]
1537 c.counterterm = {(1,0,0):CTParam.cWcft_UV.value}
1538
1539-t.loop_particles = [[[t,G]]]
1540+t.loop_particles = [[[6,21]]]
1541 t.counterterm = {(1,0,0):CTParam.tWcft_UV.value}
1542
1543-G.loop_particles = [[[c]],[[b]],[[t]]]
1544+G.loop_particles = [[[4]],[[5]],[[6]]]
1545 G.counterterm = {(1,0,0):CTParam.GWcft_UV_c.value,(1,0,1):CTParam.GWcft_UV_b.value,(1,0,2):CTParam.GWcft_UV_t.value}
1546
1547 # Set counterterms values
1548
1549-Param.MB.loop_particles= [[[b,G]]]
1550-Param.MB.counterterm = {(1,0,0):CTParam.bMass_UV.value}
1551-
1552-Param.MC.loop_particles= [[[c,G]]]
1553-Param.MC.counterterm = {(1,0,0):CTParam.cMass_UV.value}
1554-
1555-Param.MT.loop_particles= [[[t,G]]]
1556-Param.MT.counterterm = {(1,0,0):CTParam.tMass_UV.value}
1557-
1558-Param.G.loop_particles = [[[u],[d],[s]],[[c]],[[b]],[[t]],[[G]]],
1559-Param.G.counterterm = {(1,0,0):CTParam.G_UVq.value,(1,0,1):CTParam.G_UVc.value,(1,0,2):CTParam.G_UVb.value,(1,0,3):CTParam.G_UVt.value,(1,0,4):CTParam.G_UVg.value},
1560+#Param.MB.loop_particles= [[[5,21]]]
1561+#Param.MB.counterterm = {(1,0,0):CTParam.bMass_UV.value}
1562+
1563+#Param.MC.loop_particles= [[[4,21]]]
1564+#Param.MC.counterterm = {(1,0,0):CTParam.cMass_UV.value}
1565+
1566+#Param.MT.loop_particles= [[[6,21]]]
1567+#Param.MT.counterterm = {(1,0,0):CTParam.tMass_UV.value}
1568+
1569+#Param.G.loop_particles = [[[2],[1],[3]],[[4]],[[5]],[[6]],[[21]]],
1570+#Param.G.counterterm = {(1,0,0):CTParam.G_UVq.value,(1,0,1):CTParam.G_UVc.value,(1,0,2):CTParam.G_UVb.value,(1,0,3):CTParam.G_UVt.value,(1,0,4):CTParam.G_UVg.value},
1571
1572=== modified file 'models/sm/__init__.py'
1573--- models/sm/__init__.py 2012-10-25 06:22:56 +0000
1574+++ models/sm/__init__.py 2014-03-24 03:30:32 +0000
1575@@ -5,7 +5,10 @@
1576 import vertices
1577 import coupling_orders
1578 import write_param_card
1579-import decays
1580+try:
1581+ import decays
1582+except ImportError:
1583+ pass
1584 try:
1585 import build_restrict
1586 except ImportError:
1587@@ -22,7 +25,7 @@
1588 all_parameters = parameters.all_parameters
1589 all_orders = coupling_orders.all_orders
1590 all_functions = function_library.all_functions
1591-all_decays = decays.all_decays
1592+#all_decays = decays.all_decays
1593
1594
1595 __author__ = "N. Christensen, C. Duhr"
1596
1597=== added directory 'models/taudecay_UFO'
1598=== added file 'models/taudecay_UFO/__init__.py'
1599--- models/taudecay_UFO/__init__.py 1970-01-01 00:00:00 +0000
1600+++ models/taudecay_UFO/__init__.py 2014-03-24 03:30:32 +0000
1601@@ -0,0 +1,48 @@
1602+
1603+import particles
1604+import couplings
1605+import lorentz
1606+import parameters
1607+import vertices
1608+import coupling_orders
1609+import write_param_card
1610+import propagators
1611+
1612+
1613+all_particles = particles.all_particles
1614+all_vertices = vertices.all_vertices
1615+all_couplings = couplings.all_couplings
1616+all_lorentz = lorentz.all_lorentz
1617+all_parameters = parameters.all_parameters
1618+all_orders = coupling_orders.all_orders
1619+all_functions = function_library.all_functions
1620+all_propagators = propagators.all_propagators
1621+
1622+try:
1623+ import decays
1624+except ImportError:
1625+ pass
1626+else:
1627+ all_decays = decays.all_decays
1628+
1629+try:
1630+ import form_factors
1631+except ImportError:
1632+ pass
1633+else:
1634+ all_form_factors = form_factors.all_form_factors
1635+
1636+try:
1637+ import CT_vertices
1638+except ImportError:
1639+ pass
1640+else:
1641+ all_CTvertices = CT_vertices.all_CTvertices
1642+
1643+
1644+gauge = [0]
1645+
1646+
1647+__author__ = "K. Mawatari, J. Nakamura"
1648+__date__ = "2013.05.29"
1649+__version__= "1.0"
1650
1651=== added file 'models/taudecay_UFO/coupling_orders.py'
1652--- models/taudecay_UFO/coupling_orders.py 1970-01-01 00:00:00 +0000
1653+++ models/taudecay_UFO/coupling_orders.py 2014-03-24 03:30:32 +0000
1654@@ -0,0 +1,16 @@
1655+# This file was automatically created by FeynRules 2.0.6
1656+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (February 23, 2011)
1657+# Date: Wed 18 Dec 2013 14:14:59
1658+
1659+
1660+from object_library import all_orders, CouplingOrder
1661+
1662+
1663+EFT = CouplingOrder(name = 'EFT',
1664+ expansion_order = 99,
1665+ hierarchy = 1)
1666+
1667+QED = CouplingOrder(name = 'QED',
1668+ expansion_order = 99,
1669+ hierarchy = 1)
1670+
1671
1672=== added file 'models/taudecay_UFO/couplings.py'
1673--- models/taudecay_UFO/couplings.py 1970-01-01 00:00:00 +0000
1674+++ models/taudecay_UFO/couplings.py 2014-03-24 03:30:32 +0000
1675@@ -0,0 +1,15 @@
1676+# This file was automatically created by FeynRules 2.0.6
1677+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (February 23, 2011)
1678+# Date: Wed 18 Dec 2013 14:14:59
1679+
1680+
1681+from object_library import all_couplings, Coupling
1682+
1683+from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot
1684+
1685+
1686+
1687+GC_1 = Coupling(name = 'GC_1',
1688+ value = '-(F1*Gf*cmath.cos(cabi)*cmath.sqrt(2))',
1689+ order = {'EFT':1,'QED':2})
1690+
1691
1692=== added file 'models/taudecay_UFO/function_library.py'
1693--- models/taudecay_UFO/function_library.py 1970-01-01 00:00:00 +0000
1694+++ models/taudecay_UFO/function_library.py 2014-03-24 03:30:32 +0000
1695@@ -0,0 +1,71 @@
1696+# This file is part of the UFO.
1697+#
1698+# This file contains definitions for functions that
1699+# are extensions of the cmath library, and correspond
1700+# either to functions that are in cmath, but inconvenient
1701+# to access from there (e.g. z.conjugate()),
1702+# or functions that are simply not defined.
1703+#
1704+#
1705+
1706+__date__ = "22 July 2010"
1707+__author__ = "claude.duhr@durham.ac.uk"
1708+
1709+import cmath
1710+from object_library import all_functions, Function
1711+
1712+#
1713+# shortcuts for functions from cmath
1714+#
1715+
1716+complexconjugate = Function(name = 'complexconjugate',
1717+ arguments = ('z',),
1718+ expression = 'z.conjugate()')
1719+
1720+
1721+re = Function(name = 're',
1722+ arguments = ('z',),
1723+ expression = 'z.real')
1724+
1725+im = Function(name = 'im',
1726+ arguments = ('z',),
1727+ expression = 'z.imag')
1728+
1729+# New functions (trigonometric)
1730+
1731+sec = Function(name = 'sec',
1732+ arguments = ('z',),
1733+ expression = '1./cmath.cos(z)')
1734+
1735+asec = Function(name = 'asec',
1736+ arguments = ('z',),
1737+ expression = 'cmath.acos(1./z)')
1738+
1739+csc = Function(name = 'csc',
1740+ arguments = ('z',),
1741+ expression = '1./cmath.sin(z)')
1742+
1743+acsc = Function(name = 'acsc',
1744+ arguments = ('z',),
1745+ expression = 'cmath.asin(1./z)')
1746+
1747+cot = Function(name = 'cot',
1748+ arguments = ('z',),
1749+ expression = '1./cmath.tan(z)')
1750+
1751+# Heaviside theta function
1752+
1753+theta_function = Function(name = 'theta_function',
1754+ arguments = ('x','y','z'),
1755+ expression = 'y if x else z')
1756+
1757+# Auxiliary functions for NLO
1758+
1759+cond = Function(name = 'cond',
1760+ arguments = ('condition','ExprTrue','ExprFalse'),
1761+ expression = '(ExprTrue if condition==0.0 else ExprFalse)')
1762+
1763+reglog = Function(name = 'reglog',
1764+ arguments = ('z'),
1765+ expression = '(0.0 if z==0.0 else cmath.log(z))')
1766+
1767
1768=== added file 'models/taudecay_UFO/lorentz.py'
1769--- models/taudecay_UFO/lorentz.py 1970-01-01 00:00:00 +0000
1770+++ models/taudecay_UFO/lorentz.py 2014-03-24 03:30:32 +0000
1771@@ -0,0 +1,14 @@
1772+# This file was automatically created by FeynRules 2.0.6
1773+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (February 23, 2011)
1774+# Date: Wed 18 Dec 2013 14:14:59
1775+
1776+
1777+from object_library import all_lorentz, Lorentz
1778+
1779+from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot
1780+
1781+
1782+FFS1 = Lorentz(name = 'FFS1',
1783+ spins = [ 2, 2, 1 ],
1784+ structure = 'P(-1,3)*Gamma(-1,2,-2)*ProjM(-2,1)')
1785+
1786
1787=== added file 'models/taudecay_UFO/object_library.py'
1788--- models/taudecay_UFO/object_library.py 1970-01-01 00:00:00 +0000
1789+++ models/taudecay_UFO/object_library.py 2014-03-24 03:30:32 +0000
1790@@ -0,0 +1,377 @@
1791+##
1792+##
1793+## Feynrules Header
1794+##
1795+##
1796+##
1797+##
1798+##
1799+
1800+import cmath
1801+import re
1802+
1803+class UFOError(Exception):
1804+ """Exception raised if when inconsistencies are detected in the UFO model."""
1805+ pass
1806+
1807+class UFOBaseClass(object):
1808+ """The class from which all FeynRules classes are derived."""
1809+
1810+ require_args = []
1811+
1812+ def __init__(self, *args, **options):
1813+ assert(len(self.require_args) == len (args))
1814+
1815+ for i, name in enumerate(self.require_args):
1816+ setattr(self, name, args[i])
1817+
1818+ for (option, value) in options.items():
1819+ setattr(self, option, value)
1820+
1821+ def get(self, name):
1822+ return getattr(self, name)
1823+
1824+ def set(self, name, value):
1825+ setattr(self, name, value)
1826+
1827+ def get_all(self):
1828+ """Return a dictionary containing all the information of the object"""
1829+ return self.__dict__
1830+
1831+ def __str__(self):
1832+ return self.name
1833+
1834+ def nice_string(self):
1835+ """ return string with the full information """
1836+ return '\n'.join(['%s \t: %s' %(name, value) for name, value in self.__dict__.items()])
1837+
1838+ def __repr__(self):
1839+ replacements = [
1840+ ('+','__plus__'),
1841+ ('-','__minus__'),
1842+ ('@','__at__'),
1843+ ('!','__exclam__'),
1844+ ('?','__quest__'),
1845+ ('*','__star__'),
1846+ ('~','__tilde__')
1847+ ]
1848+ text = self.name
1849+ for orig,sub in replacements:
1850+ text = text.replace(orig,sub)
1851+ return text
1852+
1853+
1854+
1855+all_particles = []
1856+
1857+class Particle(UFOBaseClass):
1858+ """A standard Particle"""
1859+
1860+ require_args=['pdg_code', 'name', 'antiname', 'spin', 'color', 'mass', 'width', 'texname', 'antitexname', 'charge']
1861+
1862+ require_args_all = ['pdg_code', 'name', 'antiname', 'spin', 'color', 'mass', 'width', 'texname', 'antitexname','counterterm','charge', 'line', 'propagating', 'goldstoneboson', 'propagator']
1863+
1864+ def __init__(self, pdg_code, name, antiname, spin, color, mass, width, texname,
1865+ antitexname, charge , line=None, propagating=True, counterterm=None, goldstoneboson=False,
1866+ propagator=None, **options):
1867+
1868+ args= (pdg_code, name, antiname, spin, color, mass, width, texname,
1869+ antitexname, float(charge))
1870+
1871+ UFOBaseClass.__init__(self, *args, **options)
1872+
1873+ global all_particles
1874+ all_particles.append(self)
1875+
1876+ self.propagating = propagating
1877+ self.goldstoneboson= goldstoneboson
1878+
1879+ self.selfconjugate = (name == antiname)
1880+ if not line:
1881+ self.line = self.find_line_type()
1882+ else:
1883+ self.line = line
1884+
1885+ if propagator:
1886+ if isinstance(propagator, dict):
1887+ self.propagator = propagator
1888+ else:
1889+ self.propagator = {0: propagator, 1: propagator}
1890+
1891+ def find_line_type(self):
1892+ """ find how we draw a line if not defined
1893+ valid output: dashed/straight/wavy/curly/double/swavy/scurly
1894+ """
1895+
1896+ spin = self.spin
1897+ color = self.color
1898+
1899+ #use default
1900+ if spin == 1:
1901+ return 'dashed'
1902+ elif spin == 2:
1903+ if not self.selfconjugate:
1904+ return 'straight'
1905+ elif color == 1:
1906+ return 'swavy'
1907+ else:
1908+ return 'scurly'
1909+ elif spin == 3:
1910+ if color == 1:
1911+ return 'wavy'
1912+
1913+ else:
1914+ return 'curly'
1915+ elif spin == 5:
1916+ return 'double'
1917+ elif spin == -1:
1918+ return 'dotted'
1919+ else:
1920+ return 'dashed' # not supported yet
1921+
1922+ def anti(self):
1923+ if self.selfconjugate:
1924+ raise Exception('%s has no anti particle.' % self.name)
1925+ outdic = {}
1926+ for k,v in self.__dict__.iteritems():
1927+ if k not in self.require_args_all:
1928+ outdic[k] = -v
1929+ if self.color in [1,8]:
1930+ newcolor = self.color
1931+ else:
1932+ newcolor = -self.color
1933+
1934+ return Particle(-self.pdg_code, self.antiname, self.name, self.spin, newcolor, self.mass, self.width,
1935+ self.antitexname, self.texname, -self.charge, self.line, self.propagating, self.goldstoneboson, **outdic)
1936+
1937+
1938+
1939+all_parameters = []
1940+
1941+class Parameter(UFOBaseClass):
1942+
1943+ require_args=['name', 'nature', 'type', 'value', 'texname']
1944+
1945+ def __init__(self, name, nature, type, value, texname, lhablock=None, lhacode=None):
1946+
1947+ args = (name,nature,type,value,texname)
1948+
1949+ UFOBaseClass.__init__(self, *args)
1950+
1951+ args=(name,nature,type,value,texname)
1952+
1953+ global all_parameters
1954+ all_parameters.append(self)
1955+
1956+ if (lhablock is None or lhacode is None) and nature == 'external':
1957+ raise Exception('Need LHA information for external parameter "%s".' % name)
1958+ self.lhablock = lhablock
1959+ self.lhacode = lhacode
1960+
1961+all_CTparameters = []
1962+
1963+class CTParameter(UFOBaseClass):
1964+
1965+ require_args=['name', 'nature,', 'type', 'value', 'texname']
1966+
1967+ def __init__(self, name, type, value, texname):
1968+
1969+ args = (name,'internal',type,value,texname)
1970+
1971+ UFOBaseClass.__init__(self, *args)
1972+
1973+ args=(name,'internal',type,value,texname)
1974+
1975+ self.nature='interal'
1976+
1977+ global all_CTparameters
1978+ all_CTparameters.append(self)
1979+
1980+ def finite(self):
1981+ try:
1982+ return self.value[0]
1983+ except KeyError:
1984+ return 'ZERO'
1985+
1986+ def pole(self, x):
1987+ try:
1988+ return self.value[-x]
1989+ except KeyError:
1990+ return 'ZERO'
1991+
1992+all_vertices = []
1993+
1994+class Vertex(UFOBaseClass):
1995+
1996+ require_args=['name', 'particles', 'color', 'lorentz', 'couplings']
1997+
1998+ def __init__(self, name, particles, color, lorentz, couplings, **opt):
1999+
2000+ args = (name, particles, color, lorentz, couplings)
2001+
2002+ UFOBaseClass.__init__(self, *args, **opt)
2003+
2004+ args=(particles,color,lorentz,couplings)
2005+
2006+ global all_vertices
2007+ all_vertices.append(self)
2008+
2009+all_CTvertices = []
2010+
2011+class CTVertex(UFOBaseClass):
2012+
2013+ require_args=['name', 'particles', 'color', 'lorentz', 'couplings', 'type', 'loop_particles']
2014+
2015+ def __init__(self, name, particles, color, lorentz, couplings, type, loop_particles, **opt):
2016+
2017+ args = (name, particles, color, lorentz, couplings, type, loop_particles)
2018+
2019+ UFOBaseClass.__init__(self, *args, **opt)
2020+
2021+ args=(particles,color,lorentz,couplings, type, loop_particles)
2022+
2023+ global all_CTvertices
2024+ all_CTvertices.append(self)
2025+
2026+all_couplings = []
2027+
2028+class Coupling(UFOBaseClass):
2029+
2030+ require_args=['name', 'value', 'order']
2031+
2032+ require_args_all=['name', 'value', 'order', 'loop_particles', 'counterterm']
2033+
2034+ def __init__(self, name, value, order, **opt):
2035+
2036+ args =(name, value, order)
2037+ UFOBaseClass.__init__(self, *args, **opt)
2038+ global all_couplings
2039+ all_couplings.append(self)
2040+
2041+ def value(self):
2042+ return self.pole(0)
2043+
2044+ def pole(self, x):
2045+ """ the self.value attribute can be a dictionary directly specifying the Laurent serie using normal
2046+ parameter or just a string which can possibly contain CTparameter defining the Laurent serie."""
2047+
2048+ if isinstance(self.value,dict):
2049+ if -x in self.value.keys():
2050+ return self.value[-x]
2051+ else:
2052+ return 'ZERO'
2053+
2054+ CTparam=None
2055+ for param in all_CTparameters:
2056+ pattern=re.compile(r"(?P<first>\A|\*|\+|\-|\()(?P<name>"+param.name+r")(?P<second>\Z|\*|\+|\-|\))")
2057+ numberOfMatches=len(pattern.findall(self.value))
2058+ if numberOfMatches==1:
2059+ if not CTparam:
2060+ CTparam=param
2061+ else:
2062+ raise UFOError, "UFO does not support yet more than one occurence of CTParameters in the couplings values."
2063+ elif numberOfMatches>1:
2064+ raise UFOError, "UFO does not support yet more than one occurence of CTParameters in the couplings values."
2065+
2066+ if not CTparam:
2067+ if x==0:
2068+ return self.value
2069+ else:
2070+ return 'ZERO'
2071+ else:
2072+ if CTparam.pole(x)=='ZERO':
2073+ return 'ZERO'
2074+ else:
2075+ def substitution(matchedObj):
2076+ return matchedObj.group('first')+"("+CTparam.pole(x)+")"+matchedObj.group('second')
2077+ pattern=re.compile(r"(?P<first>\A|\*|\+|\-|\()(?P<name>"+CTparam.name+r")(?P<second>\Z|\*|\+|\-|\))")
2078+ return pattern.sub(substitution,self.value)
2079+
2080+all_lorentz = []
2081+
2082+class Lorentz(UFOBaseClass):
2083+
2084+ require_args=['name','spins','structure']
2085+
2086+ def __init__(self, name, spins, structure='external', **opt):
2087+ args = (name, spins, structure)
2088+ UFOBaseClass.__init__(self, *args, **opt)
2089+
2090+ global all_lorentz
2091+ all_lorentz.append(self)
2092+
2093+
2094+all_functions = []
2095+
2096+class Function(object):
2097+
2098+ def __init__(self, name, arguments, expression):
2099+
2100+ global all_functions
2101+ all_functions.append(self)
2102+
2103+ self.name = name
2104+ self.arguments = arguments
2105+ self.expr = expression
2106+
2107+ def __call__(self, *opt):
2108+
2109+ for i, arg in enumerate(self.arguments):
2110+ exec('%s = %s' % (arg, opt[i] ))
2111+
2112+ return eval(self.expr)
2113+
2114+all_orders = []
2115+
2116+class CouplingOrder(object):
2117+
2118+ def __init__(self, name, expansion_order, hierarchy, perturbative_expansion = 0):
2119+
2120+ global all_orders
2121+ all_orders.append(self)
2122+
2123+ self.name = name
2124+ self.expansion_order = expansion_order
2125+ self.hierarchy = hierarchy
2126+ self.perturbative_expansion = perturbative_expansion
2127+
2128+all_decays = []
2129+
2130+class Decay(UFOBaseClass):
2131+ require_args = ['particle','partial_widths']
2132+
2133+ def __init__(self, particle, partial_widths, **opt):
2134+ args = (particle, partial_widths)
2135+ UFOBaseClass.__init__(self, *args, **opt)
2136+
2137+ global all_decays
2138+ all_decays.append(self)
2139+
2140+ # Add the information directly to the particle
2141+ particle.partial_widths = partial_widths
2142+
2143+all_form_factors = []
2144+
2145+class FormFactor(UFOBaseClass):
2146+ require_args = ['name','type','value']
2147+
2148+ def __init__(self, name, type, value, **opt):
2149+ args = (name, type, value)
2150+ UFOBaseClass.__init__(self, *args, **opt)
2151+
2152+ global all_form_factors
2153+ all_form_factors.append(self)
2154+
2155+
2156+all_propagators = []
2157+
2158+class Propagator(UFOBaseClass):
2159+
2160+ require_args = ['name','numerator','denominator']
2161+
2162+ def __init__(self, name, numerator, denominator=None, **opt):
2163+ args = (name, numerator, denominator)
2164+ UFOBaseClass.__init__(self, *args, **opt)
2165+
2166+ global all_propagators
2167+ all_propagators.append(self)
2168
2169=== added file 'models/taudecay_UFO/param_card.dat'
2170--- models/taudecay_UFO/param_card.dat 1970-01-01 00:00:00 +0000
2171+++ models/taudecay_UFO/param_card.dat 2014-03-24 03:30:32 +0000
2172@@ -0,0 +1,66 @@
2173+######################################################################
2174+## PARAM_CARD AUTOMATICALY GENERATED BY THE UFO #####################
2175+######################################################################
2176+
2177+###################################
2178+## INFORMATION FOR SMINPUTS
2179+###################################
2180+Block SMINPUTS
2181+ 2 1.166379e-05 # Gf
2182+
2183+###################################
2184+## INFORMATION FOR MASS
2185+###################################
2186+Block MASS
2187+ 15 1.776820e+00 # MTA
2188+ 111 1.349766e-01 # Mpi0
2189+ 211 1.395702e-01 # Mpic
2190+## Not dependent paramater.
2191+## Those values should be edited following analytical the
2192+## analytical expression. Some generator could simply ignore
2193+## those values and use the analytical expression
2194+ 16 0.000000 # vt : 0.0
2195+
2196+###################################
2197+## INFORMATION FOR DECAY
2198+###################################
2199+DECAY 15 2.265000e-12
2200+## Not dependent paramater.
2201+## Those values should be edited following analytical the
2202+## analytical expression. Some generator could simply ignore
2203+## those values and use the analytical expression
2204+DECAY 16 0.000000 # vt : 0.0
2205+DECAY 211 0.000000 # pi+ : 0.0
2206+DECAY 111 0.000000 # pi0 : 0.0
2207+
2208+###################################
2209+## INFORMATION FOR CKMBLOCK
2210+###################################
2211+Block CKMBLOCK
2212+ 1 2.277360e-01 # cabi
2213+
2214+###################################
2215+## INFORMATION FOR FRBLOCK
2216+###################################
2217+Block FRBlock
2218+ 1 1.304100e-01 # F1
2219+ 2 1.000000e+00 # F2
2220+ 3 1.000000e+00 # F3
2221+ 4 1.000000e+00 # Fr1
2222+ 5 1.000000e+00 # Fr2
2223+ 6 1.000000e+00 # G1
2224+ 7 1.000000e+00 # G2
2225+#===========================================================
2226+# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)
2227+#===========================================================
2228+
2229+Block QNUMBERS 211 # pi+
2230+ 1 3 # 3 times electric charge
2231+ 2 1 # number of spin states (2S+1)
2232+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
2233+ 4 1 # Particle/Antiparticle distinction (0=own anti)
2234+Block QNUMBERS 111 # pi0
2235+ 1 0 # 3 times electric charge
2236+ 2 1 # number of spin states (2S+1)
2237+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
2238+ 4 0 # Particle/Antiparticle distinction (0=own anti)
2239
2240=== added file 'models/taudecay_UFO/parameters.py'
2241--- models/taudecay_UFO/parameters.py 1970-01-01 00:00:00 +0000
2242+++ models/taudecay_UFO/parameters.py 2014-03-24 03:30:32 +0000
2243@@ -0,0 +1,123 @@
2244+# This file was automatically created by FeynRules 2.0.6
2245+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (February 23, 2011)
2246+# Date: Wed 18 Dec 2013 14:14:59
2247+
2248+
2249+
2250+from object_library import all_parameters, Parameter
2251+
2252+
2253+from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot
2254+
2255+# This is a default parameter object representing 0.
2256+ZERO = Parameter(name = 'ZERO',
2257+ nature = 'internal',
2258+ type = 'real',
2259+ value = '0.0',
2260+ texname = '0')
2261+
2262+# User-defined parameters.
2263+cabi = Parameter(name = 'cabi',
2264+ nature = 'external',
2265+ type = 'real',
2266+ value = 0.227736,
2267+ texname = '\\theta _c',
2268+ lhablock = 'CKMBLOCK',
2269+ lhacode = [ 1 ])
2270+
2271+Gf = Parameter(name = 'Gf',
2272+ nature = 'external',
2273+ type = 'real',
2274+ value = 0.000011663787,
2275+ texname = 'G_f',
2276+ lhablock = 'SMINPUTS',
2277+ lhacode = [ 2 ])
2278+
2279+F1 = Parameter(name = 'F1',
2280+ nature = 'external',
2281+ type = 'real',
2282+ value = 0.13041,
2283+ texname = 'F_1',
2284+ lhablock = 'FRBlock',
2285+ lhacode = [ 1 ])
2286+
2287+F2 = Parameter(name = 'F2',
2288+ nature = 'external',
2289+ type = 'real',
2290+ value = 1.,
2291+ texname = 'F_2',
2292+ lhablock = 'FRBlock',
2293+ lhacode = [ 2 ])
2294+
2295+F3 = Parameter(name = 'F3',
2296+ nature = 'external',
2297+ type = 'real',
2298+ value = 1.,
2299+ texname = 'F_3',
2300+ lhablock = 'FRBlock',
2301+ lhacode = [ 3 ])
2302+
2303+Fr1 = Parameter(name = 'Fr1',
2304+ nature = 'external',
2305+ type = 'real',
2306+ value = 1.,
2307+ texname = 'F_{23}',
2308+ lhablock = 'FRBlock',
2309+ lhacode = [ 4 ])
2310+
2311+Fr2 = Parameter(name = 'Fr2',
2312+ nature = 'external',
2313+ type = 'real',
2314+ value = 1.,
2315+ texname = 'F_{13}',
2316+ lhablock = 'FRBlock',
2317+ lhacode = [ 5 ])
2318+
2319+G1 = Parameter(name = 'G1',
2320+ nature = 'external',
2321+ type = 'real',
2322+ value = 1.,
2323+ texname = 'G_{23}',
2324+ lhablock = 'FRBlock',
2325+ lhacode = [ 6 ])
2326+
2327+G2 = Parameter(name = 'G2',
2328+ nature = 'external',
2329+ type = 'real',
2330+ value = 1.,
2331+ texname = 'G_{13}',
2332+ lhablock = 'FRBlock',
2333+ lhacode = [ 7 ])
2334+
2335+MTA = Parameter(name = 'MTA',
2336+ nature = 'external',
2337+ type = 'real',
2338+ value = 1.77682,
2339+ texname = '\\text{MTA}',
2340+ lhablock = 'MASS',
2341+ lhacode = [ 15 ])
2342+
2343+Mpic = Parameter(name = 'Mpic',
2344+ nature = 'external',
2345+ type = 'real',
2346+ value = 0.13957018,
2347+ texname = '\\text{Mpic}',
2348+ lhablock = 'MASS',
2349+ lhacode = [ 211 ])
2350+
2351+Mpi0 = Parameter(name = 'Mpi0',
2352+ nature = 'external',
2353+ type = 'real',
2354+ value = 0.1349766,
2355+ texname = '\\text{Mpi0}',
2356+ lhablock = 'MASS',
2357+ lhacode = [ 111 ])
2358+
2359+WTA = Parameter(name = 'WTA',
2360+ nature = 'external',
2361+ type = 'real',
2362+ value = 2.265e-12,
2363+ texname = '\\text{WTA}',
2364+ lhablock = 'DECAY',
2365+ lhacode = [ 15 ])
2366+
2367
2368=== added file 'models/taudecay_UFO/particles.py'
2369--- models/taudecay_UFO/particles.py 1970-01-01 00:00:00 +0000
2370+++ models/taudecay_UFO/particles.py 2014-03-24 03:30:32 +0000
2371@@ -0,0 +1,65 @@
2372+# This file was automatically created by FeynRules 2.0.6
2373+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (February 23, 2011)
2374+# Date: Wed 18 Dec 2013 14:14:59
2375+
2376+
2377+from __future__ import division
2378+from object_library import all_particles, Particle
2379+import parameters as Param
2380+
2381+import propagators as Prop
2382+
2383+vt = Particle(pdg_code = 16,
2384+ name = 'vt',
2385+ antiname = 'vt~',
2386+ spin = 2,
2387+ color = 1,
2388+ mass = Param.ZERO,
2389+ width = Param.ZERO,
2390+ texname = 'vt',
2391+ antitexname = 'vt~',
2392+ charge = 0,
2393+ LeptonNumber = 1)
2394+
2395+vt__tilde__ = vt.anti()
2396+
2397+ta__minus__ = Particle(pdg_code = 15,
2398+ name = 'ta-',
2399+ antiname = 'ta+',
2400+ spin = 2,
2401+ color = 1,
2402+ mass = Param.MTA,
2403+ width = Param.WTA,
2404+ texname = 'ta-',
2405+ antitexname = 'ta+',
2406+ charge = -1,
2407+ LeptonNumber = 1)
2408+
2409+ta__plus__ = ta__minus__.anti()
2410+
2411+pi__plus__ = Particle(pdg_code = 211,
2412+ name = 'pi+',
2413+ antiname = 'pi-',
2414+ spin = 1,
2415+ color = 1,
2416+ mass = Param.Mpic,
2417+ width = Param.ZERO,
2418+ texname = 'pi+',
2419+ antitexname = 'pi-',
2420+ charge = 1,
2421+ LeptonNumber = 0)
2422+
2423+pi__minus__ = pi__plus__.anti()
2424+
2425+pi0 = Particle(pdg_code = 111,
2426+ name = 'pi0',
2427+ antiname = 'pi0',
2428+ spin = 1,
2429+ color = 1,
2430+ mass = Param.Mpi0,
2431+ width = Param.ZERO,
2432+ texname = 'pi0',
2433+ antitexname = 'pi0',
2434+ charge = 0,
2435+ LeptonNumber = 0)
2436+
2437
2438=== added file 'models/taudecay_UFO/propagators.py'
2439--- models/taudecay_UFO/propagators.py 1970-01-01 00:00:00 +0000
2440+++ models/taudecay_UFO/propagators.py 2014-03-24 03:30:32 +0000
2441@@ -0,0 +1,35 @@
2442+# This file was automatically created by FeynRules 1.7.69
2443+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (November 6, 2010)
2444+# Date: Mon 1 Oct 2012 14:58:26
2445+
2446+from object_library import all_propagators, Propagator
2447+
2448+
2449+# define only once the denominator since this is always the same
2450+denominator = "P('mu', id) * P('mu', id) - Mass(id) * Mass(id) + complex(0,1) * Mass(id) * Width(id)"
2451+
2452+# propagator for the scalar
2453+S = Propagator(name = "S",
2454+ numerator = "complex(0,1)",
2455+ denominator = denominator
2456+ )
2457+
2458+# propagator for the incoming fermion # the one for the outcomming is computed on the flight
2459+F = Propagator(name = "F",
2460+ numerator = "complex(0,1) * (Gamma('mu', s1, s2) * P('mu', id) + Mass(id) * Identity(s1, s2))",
2461+ denominator = denominator
2462+ )
2463+
2464+# massive vector in the unitary gauge, can't be use for massless particles
2465+V1 = Propagator(name = "V1",
2466+ numerator = "complex(0,1) * (-1 * Metric(l1, l2) + Metric(l1,'mu')* P('mu', id) * P(l2, id) / Mass(id)**2 ",
2467+ denominator = denominator
2468+ )
2469+
2470+# massless vector and massive vector in unitary gauge
2471+V2 = Propagator(name = "V2",
2472+ numerator = "complex(0,-1) * Metric(l1, l2)",
2473+ denominator = "P('mu', id) * P('mu', id)"
2474+ )
2475+
2476+
2477
2478=== added file 'models/taudecay_UFO/taudecay_UFO.log'
2479--- models/taudecay_UFO/taudecay_UFO.log 1970-01-01 00:00:00 +0000
2480+++ models/taudecay_UFO/taudecay_UFO.log 2014-03-24 03:30:32 +0000
2481@@ -0,0 +1,68 @@
2482+# This file was automatically created by FeynRules 2.0.6
2483+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (February 23, 2011)
2484+# Date: Wed 18 Dec 2013 14:14:58
2485+
2486+
2487+#
2488+# This is the logfile for the model taudecay
2489+
2490+# Authors: K. Mawatari, J. Nakamura
2491+# Model version: 1.0
2492+# Checking the Quantum numbers
2493+ * Electric charge defined.
2494+# Checking the Lagrangians
2495+ * All Lagrangians are ok.
2496+#
2497+# Particle definitions
2498+#
2499+
2500+ * No particles removed. All particles correspond to GenInt setup.
2501+
2502+
2503+
2504+# Compulsory PDG codes:
2505+ * Class SM leptons incomplete. 11, 13 missing.
2506+ * Class SM neutrinos incomplete. 12, 14 missing.
2507+ * Class SM quarks incomplete. 1, 2, 3, 4, 5, 6 missing.
2508+ * Class SM gauge bosons incomplete. 21, 22, 23, 24 missing.
2509+#
2510+# Parameter definitions
2511+#
2512+
2513+ * All parameters are ok.
2514+
2515+
2516+# Vertices
2517+ * Calling FeynmanRules for 1 Lagrangians.
2518+ * Number of classes vertices: 2
2519+ * Number of flavored vertices: 2
2520+ * Saved vertices in InterfaceRun[ 1 ].
2521+ * Checked QNumber conservation.
2522+ - Quantum number LeptonNumber conserved in all vertices.
2523+ - Quantum number Q conserved in all vertices.
2524+ * particles.py written.
2525+ * parameters.py written.
2526+#
2527+# Vertex definitions
2528+#
2529+
2530+ * 2 vertices written.
2531+ * vertices.py written.
2532+#
2533+# Lorentz structure definitions
2534+#
2535+
2536+ * 1 lorentz structure written.
2537+ * lorentz.py written.
2538+#
2539+# Coupling definitions
2540+#
2541+
2542+ * 1 coupling written.
2543+ * couplings.py written.
2544+#
2545+# Coupling order definitions
2546+#
2547+
2548+ * 0 couplings orders written.
2549+ * coupling_orders.py written.
2550
2551=== added file 'models/taudecay_UFO/vertices.py'
2552--- models/taudecay_UFO/vertices.py 1970-01-01 00:00:00 +0000
2553+++ models/taudecay_UFO/vertices.py 2014-03-24 03:30:32 +0000
2554@@ -0,0 +1,23 @@
2555+# This file was automatically created by FeynRules 2.0.6
2556+# Mathematica version: 8.0 for Mac OS X x86 (64-bit) (February 23, 2011)
2557+# Date: Wed 18 Dec 2013 14:14:59
2558+
2559+
2560+from object_library import all_vertices, Vertex
2561+import particles as P
2562+import couplings as C
2563+import lorentz as L
2564+
2565+
2566+V_1 = Vertex(name = 'V_1',
2567+ particles = [ P.vt__tilde__, P.ta__minus__, P.pi__plus__ ],
2568+ color = [ '1' ],
2569+ lorentz = [ L.FFS1 ],
2570+ couplings = {(0,0):C.GC_1})
2571+
2572+V_2 = Vertex(name = 'V_2',
2573+ particles = [ P.ta__plus__, P.vt, P.pi__minus__ ],
2574+ color = [ '1' ],
2575+ lorentz = [ L.FFS1 ],
2576+ couplings = {(0,0):C.GC_1})
2577+
2578
2579=== added file 'models/taudecay_UFO/write_param_card.py'
2580--- models/taudecay_UFO/write_param_card.py 1970-01-01 00:00:00 +0000
2581+++ models/taudecay_UFO/write_param_card.py 2014-03-24 03:30:32 +0000
2582@@ -0,0 +1,207 @@
2583+
2584+__date__ = "02 Aug 2012"
2585+__author__ = 'olivier.mattelaer@uclouvain.be'
2586+
2587+from function_library import *
2588+
2589+class ParamCardWriter(object):
2590+
2591+ header = \
2592+ """######################################################################\n""" + \
2593+ """## PARAM_CARD AUTOMATICALY GENERATED BY THE UFO #####################\n""" + \
2594+ """######################################################################\n"""
2595+
2596+ def __init__(self, filename, list_of_parameters=None, generic=False):
2597+ """write a valid param_card.dat"""
2598+
2599+ if not list_of_parameters:
2600+ from parameters import all_parameters
2601+ list_of_parameters = [param for param in all_parameters if \
2602+ param.nature=='external']
2603+
2604+ self.generic_output = generic
2605+ if generic:
2606+ self.define_not_dep_param(list_of_parameters)
2607+
2608+
2609+ self.fsock = open(filename, 'w')
2610+ self.fsock.write(self.header)
2611+
2612+ self.write_card(list_of_parameters)
2613+ self.fsock.close()
2614+
2615+ def define_not_dep_param(self, list_of_parameters):
2616+ """define self.dep_mass and self.dep_width in case that they are
2617+ requested in the param_card.dat"""
2618+ from particles import all_particles
2619+
2620+ self.dep_mass = [(part, part.mass) for part in all_particles \
2621+ if part.pdg_code > 0 and \
2622+ part.mass not in list_of_parameters]
2623+ self.dep_width = [(part, part.width) for part in all_particles\
2624+ if part.pdg_code > 0 and \
2625+ part.width not in list_of_parameters]
2626+
2627+ @staticmethod
2628+ def order_param(obj1, obj2):
2629+ """ order parameter of a given block """
2630+
2631+ maxlen = min([len(obj1.lhacode), len(obj2.lhacode)])
2632+
2633+ for i in range(maxlen):
2634+ if obj1.lhacode[i] < obj2.lhacode[i]:
2635+ return -1
2636+ elif obj1.lhacode[i] == obj2.lhacode[i]:
2637+ return 0
2638+ else:
2639+ return 1
2640+ #identical up to the first finish
2641+ if len(obj1.lhacode) > len(obj2.lhacode):
2642+ return 1
2643+ elif len(obj1.lhacode) == len(obj2.lhacode):
2644+ return 0
2645+ else:
2646+ return -1
2647+
2648+ def write_card(self, all_ext_param):
2649+ """ """
2650+
2651+ # list all lhablock
2652+ all_lhablock = set([param.lhablock for param in all_ext_param])
2653+
2654+ # ordonate lhablock alphabeticaly
2655+ all_lhablock = list(all_lhablock)
2656+ all_lhablock.sort()
2657+ # put at the beginning SMINPUT + MASS + DECAY
2658+ for name in ['DECAY', 'MASS','SMINPUTS']:
2659+ if name in all_lhablock:
2660+ all_lhablock.remove(name)
2661+ all_lhablock.insert(0, name)
2662+
2663+ for lhablock in all_lhablock:
2664+ self.write_block(lhablock)
2665+ need_writing = [ param for param in all_ext_param if \
2666+ param.lhablock == lhablock]
2667+ need_writing.sort(self.order_param)
2668+ [self.write_param(param, lhablock) for param in need_writing]
2669+
2670+ if self.generic_output:
2671+ if lhablock in ['MASS', 'DECAY']:
2672+ self.write_dep_param_block(lhablock)
2673+
2674+ if self.generic_output:
2675+ self.write_qnumber()
2676+
2677+ def write_block(self, name):
2678+ """ write a comment for a block"""
2679+
2680+ self.fsock.writelines(
2681+ """\n###################################""" + \
2682+ """\n## INFORMATION FOR %s""" % name.upper() +\
2683+ """\n###################################\n"""
2684+ )
2685+ if name!='DECAY':
2686+ self.fsock.write("""Block %s \n""" % name)
2687+
2688+ def write_param(self, param, lhablock):
2689+
2690+ lhacode=' '.join(['%3s' % key for key in param.lhacode])
2691+ if lhablock != 'DECAY':
2692+ text = """ %s %e # %s \n""" % (lhacode, complex(param.value).real, param.name )
2693+ else:
2694+ text = '''DECAY %s %e \n''' % (lhacode, complex(param.value).real)
2695+ self.fsock.write(text)
2696+
2697+
2698+
2699+
2700+ def write_dep_param_block(self, lhablock):
2701+ import cmath
2702+ from parameters import all_parameters
2703+ from particles import all_particles
2704+ for parameter in all_parameters:
2705+ exec("%s = %s" % (parameter.name, parameter.value))
2706+ text = "## Not dependent paramater.\n"
2707+ text += "## Those values should be edited following analytical the \n"
2708+ text += "## analytical expression. Some generator could simply ignore \n"
2709+ text += "## those values and use the analytical expression\n"
2710+
2711+ if lhablock == 'MASS':
2712+ data = self.dep_mass
2713+ prefix = " "
2714+ else:
2715+ data = self.dep_width
2716+ prefix = "DECAY "
2717+
2718+ for part, param in data:
2719+ if isinstance(param.value, str):
2720+ value = complex(eval(param.value)).real
2721+ else:
2722+ value = param.value
2723+
2724+ text += """%s %s %f # %s : %s \n""" %(prefix, part.pdg_code,
2725+ value, part.name, param.value)
2726+ # If more than a particles has the same mass/width we need to write it here
2727+ # as well
2728+ if lhablock == 'MASS':
2729+ arg = 'mass'
2730+ done = [part for (part, param) in self.dep_mass]
2731+ else:
2732+ arg = 'width'
2733+ done = [part for (part, param) in self.dep_width]
2734+ for particle in all_particles:
2735+ if particle.pdg_code <0:
2736+ continue
2737+ is_define = True
2738+ if particle not in done:
2739+ if getattr(particle, arg).lhacode[0] != particle.pdg_code:
2740+ is_define = False
2741+ if not is_define:
2742+ value = float(particle.get(arg).value )
2743+ name = particle.get(arg).name
2744+ text += """%s %s %f # %s : %s \n""" %(prefix, particle.pdg_code,
2745+ value, particle.name, name)
2746+
2747+
2748+
2749+
2750+ self.fsock.write(text)
2751+
2752+ sm_pdg = [1,2,3,4,5,6,11,12,13,13,14,15,16,21,22,23,24,25]
2753+ data="""Block QNUMBERS %(pdg)d # %(name)s
2754+ 1 %(charge)d # 3 times electric charge
2755+ 2 %(spin)d # number of spin states (2S+1)
2756+ 3 %(color)d # colour rep (1: singlet, 3: triplet, 8: octet)
2757+ 4 %(antipart)d # Particle/Antiparticle distinction (0=own anti)\n"""
2758+
2759+ def write_qnumber(self):
2760+ """ write qnumber """
2761+ from particles import all_particles
2762+ import particles
2763+ print particles.__file__
2764+ text="""#===========================================================\n"""
2765+ text += """# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)\n"""
2766+ text += """#===========================================================\n\n"""
2767+
2768+ for part in all_particles:
2769+ if part.pdg_code in self.sm_pdg or part.pdg_code < 0:
2770+ continue
2771+ text += self.data % {'pdg': part.pdg_code,
2772+ 'name': part.name,
2773+ 'charge': 3 * part.charge,
2774+ 'spin': part.spin,
2775+ 'color': part.color,
2776+ 'antipart': part.name != part.antiname and 1 or 0}
2777+
2778+ self.fsock.write(text)
2779+
2780+
2781+
2782+
2783+
2784+
2785+
2786+if '__main__' == __name__:
2787+ ParamCardWriter('./param_card.dat', generic=True)
2788+ print 'write ./param_card.dat'
2789+
2790
2791=== added file 'models/usermod.py'
2792--- models/usermod.py 1970-01-01 00:00:00 +0000
2793+++ models/usermod.py 2014-03-24 03:30:32 +0000
2794@@ -0,0 +1,864 @@
2795+################################################################################
2796+#
2797+# Copyright (c) 2011 The MadGraph Development team and Contributors
2798+#
2799+# This file is a part of the MadGraph 5 project, an application which
2800+# automatically generates Feynman diagrams and matrix elements for arbitrary
2801+# high-energy processes in the Standard Model and beyond.
2802+#
2803+# It is subject to the MadGraph license which should accompany this
2804+# distribution.
2805+#
2806+# For more information, please visit: http://madgraph.phys.ucl.ac.be
2807+#
2808+################################################################################
2809+""" Set of Tool in order to modify a given UFO model.
2810+ (mainly by adding-suppressing interactions and allow to modify by text the
2811+ different part of the model. Check of consistency of the model are performed.
2812+ This produce a new valid UFO model in output.
2813+"""
2814+
2815+import glob
2816+import logging
2817+import os
2818+import re
2819+import sys
2820+
2821+import madgraph.iolibs.files as files
2822+import madgraph.various.misc as misc
2823+import models as ufomodels
2824+import models.import_ufo as import_ufo
2825+import models.check_param_card as check_param_card
2826+
2827+pjoin =os.path.join
2828+logger = logging.getLogger('madgraph.model')
2829+
2830+class USRMODERROR(Exception): pass
2831+
2832+class UFOModel(object):
2833+ """ The class storing the current status of the model """
2834+
2835+ def __init__(self, modelpath, addon='__1'):
2836+ """load the model from a valid UFO directory (otherwise keep everything
2837+ as empty."""
2838+
2839+ self.modelpath = modelpath
2840+ model = ufomodels.load_model(modelpath)
2841+
2842+ # Check the validity of the model. Too old UFO (before UFO 1.0)
2843+ if not hasattr(model, 'all_orders'):
2844+ raise USRMODERROR, 'Base Model doesn\'t follows UFO convention (no couplings_order information)\n' +\
2845+ 'MG5 is able to load such model but NOT to the add model feature.'
2846+ if isinstance(model.all_particles[0].mass, basestring):
2847+ raise USRMODERROR, 'Base Model doesn\'t follows UFO convention (Mass/Width of particles are string name, not object)\n' +\
2848+ 'MG5 is able to load such model but NOT to the add model feature.'
2849+
2850+
2851+ self.particles = model.all_particles
2852+ if any(hasattr(p, 'loop_particles') for p in self.particles):
2853+ raise USRMODERROR, 'Base Model doesn\'t follows UFO convention '
2854+ self.vertices = model.all_vertices
2855+ self.couplings = model.all_couplings
2856+ self.lorentz = model.all_lorentz
2857+ self.parameters = model.all_parameters
2858+ self.Parameter = self.parameters[0].__class__
2859+ self.orders = model.all_orders
2860+
2861+ self.functions = model.all_functions
2862+ self.new_external = []
2863+ # UFO optional file
2864+ if hasattr(model, 'all_propagators'):
2865+ self.propagators = model.all_propagators
2866+ else:
2867+ self.propagators = []
2868+
2869+ # UFO NLO extension
2870+ if hasattr(model, 'all_CTvertices'):
2871+ self.CTvertices = model.all_CTvertices
2872+ else:
2873+ self.CTvertices = []
2874+
2875+ #translate for how to write the python file
2876+ if 'self.expr = expression' in open(pjoin(self.modelpath, 'object_library.py')).read():
2877+ self.translate = {'expr': 'expression'}
2878+ else:
2879+ self.translate = {}
2880+
2881+ #translate for the expression of the UFO model
2882+ self.old_new = {}
2883+ self.addon = addon
2884+
2885+ # particle id -> object
2886+ self.particle_dict = {}
2887+ for particle in self.particles:
2888+ self.particle_dict[particle.pdg_code] = particle
2889+
2890+ # path to all model that should be used for the Fortran file.
2891+ self.all_path = [self.modelpath]
2892+
2893+ def write(self, outputdir):
2894+ """ """
2895+ if not os.path.exists(outputdir):
2896+ os.mkdir(outputdir)
2897+ files.cp(os.path.join(self.modelpath, '__init__.py'), outputdir)
2898+ files.cp(os.path.join(self.modelpath, 'object_library.py'), outputdir)
2899+ files.cp(os.path.join(self.modelpath, 'write_param_card.py'), outputdir)
2900+
2901+ self.write_particles(outputdir)
2902+ self.write_vertices(outputdir)
2903+ self.write_couplings(outputdir)
2904+ self.write_lorentz(outputdir)
2905+ self.write_parameters(outputdir)
2906+ self.write_orders(outputdir)
2907+ self.write_functions(outputdir)
2908+ self.write_propagators(outputdir)
2909+ self.write_ctvertices(outputdir)
2910+
2911+ self.write_external_files(outputdir)
2912+ self.write_restrict_card(outputdir)
2913+
2914+
2915+ def write_restrict_card(self, outputdir):
2916+ """ propagate model restriction of the original model. """
2917+
2918+ restrict_list = [l for l in os.listdir(self.modelpath) if l.startswith('restrict_')]
2919+ if not self.new_external:
2920+ # no new entry in the card => just copy the restrict_card.dat
2921+ for p in restrict_list:
2922+ files.cp(pjoin(self.modelpath, p), outputdir)
2923+
2924+ else:
2925+ # need to add the parameter and ensure that they will not be restricted!
2926+ for p in restrict_list:
2927+ param_card = check_param_card.ParamCard(pjoin(self.modelpath, p))
2928+ for parameter in self.new_external:
2929+ block = parameter.lhablock
2930+ lhaid = parameter.lhacode
2931+ value = parameter.value
2932+ if value == 0:
2933+ value = 1e-99
2934+ elif value == 1:
2935+ value = 9.999999e-1
2936+ param_card.add_param(block.lower(), lhaid, value, 'from addon')
2937+ # all added -> write it
2938+ param_card.write(pjoin(outputdir, p))
2939+
2940+
2941+
2942+
2943+
2944+
2945+
2946+
2947+ def format_param(self, param):
2948+ """convert param to string in order to have it written correctly for the
2949+ UFO file"""
2950+
2951+ if isinstance(param, basestring):
2952+ return "'%s'" % param.replace('\'', '\\\'').replace('\"', '\\\"')
2953+ elif isinstance(param, int) or isinstance(param, float) or \
2954+ isinstance(param, complex):
2955+ return "%s" % param
2956+ elif isinstance(param, list):
2957+ return '[%s]' % ', '.join(self.format_param(p) for p in param)
2958+ elif isinstance(param, tuple):
2959+ if len(param) == 1:
2960+ return '(%s,)' % self.format_param(param[0])
2961+ else:
2962+ return '(%s)' % ','.join([self.format_param(p) for p in param])
2963+ elif isinstance(param, dict):
2964+ return '{%s}' % ','.join(['%s: %s' % (self.format_param(key), self.format_param(value)) for key, value in param.items()])
2965+ elif param.__class__.__name__ == 'Parameter':
2966+ return 'Param.%s' % param.__repr__()
2967+ elif param.__class__.__name__ == 'Coupling':
2968+ return 'C.%s' % param.__repr__()
2969+ elif param.__class__.__name__ == 'Lorentz':
2970+ return 'L.%s' % param.__repr__()
2971+ elif param.__class__.__name__ == 'Particle':
2972+ return 'P.%s' % param.__repr__()
2973+ elif param is None:
2974+ return 'None'
2975+ else:
2976+ raise Exception, '%s unknow type for writting UFO' % param.__class__.__name__
2977+
2978+
2979+
2980+ def create_data_text(self, obj):
2981+ """ create the data associate to the object"""
2982+ # Most of the object comes from the UFOBASECLASS
2983+ # BUT NOT ALL (some object) need to deal with both
2984+
2985+ nb_space = 0
2986+ if hasattr(obj, 'require_args_all'):
2987+ args = obj.require_args_all
2988+ elif hasattr(obj, 'require_args'):
2989+ args = obj.require_args
2990+ else:
2991+ args = []
2992+ if args:
2993+ text = """%s = %s(""" % (obj.__repr__(), obj.__class__.__name__)
2994+ else:
2995+ text = """%s = %s(""" % (obj.name, obj.__class__.__name__)
2996+
2997+
2998+ for data in args:
2999+ if data in self.translate:
3000+ data = self.translate[data]
3001+ if not nb_space:
3002+ add_space = len(text)
3003+ else:
3004+ add_space = 0
3005+
3006+ try:
3007+ expr = getattr(obj, data)
3008+ except:
3009+ if data in ['counterterm', 'propagator', 'loop_particles']:
3010+ expr = None
3011+ setattr(obj, data, None)
3012+ else:
3013+ raise
3014+ name =str(data)
3015+ if name in self.translate:
3016+ name = self.translate[name]
3017+ #if data == 'lhablock':
3018+ # print data, type(self.format_param(getattr(obj, data)))
3019+ text += '%s%s = %s,\n' % (' ' * nb_space,name, self.format_param(getattr(obj, data)))
3020+ nb_space += add_space
3021+
3022+ if hasattr(obj, 'get_all'):
3023+ other_attr = [name for name in obj.get_all().keys()
3024+ if name not in args]
3025+ else:
3026+ other_attr = obj.__dict__.keys()
3027+
3028+ for data in other_attr:
3029+ name =str(data)
3030+ if name in ['partial_widths', 'loop_particles']:
3031+ continue
3032+ if name in self.translate:
3033+ name = self.translate[name]
3034+ if not nb_space:
3035+ add_space = len(text)
3036+ else:
3037+ add_space = 0
3038+ text += '%s%s = %s,\n' % (' ' * nb_space, name, self.format_param(getattr(obj, data)))
3039+ nb_space += add_space
3040+
3041+ text = text[:-2] + ')\n\n'
3042+
3043+ return text
3044+
3045+ def create_file_content(self, datalist):
3046+ """ """
3047+ return '\n'.join([self.create_data_text(obj) for obj in datalist])
3048+
3049+
3050+ def write_particles(self, outputdir):
3051+ """ """
3052+ text = """
3053+# This file was automatically created by The UFO_usermod
3054+
3055+from __future__ import division
3056+from object_library import all_particles, Particle
3057+import parameters as Param
3058+
3059+"""
3060+ text += self.create_file_content(self.particles)
3061+ ff = open(os.path.join(outputdir, 'particles.py'), 'w')
3062+ ff.writelines(text)
3063+ ff.close()
3064+ return
3065+
3066+ def write_vertices(self, outputdir):
3067+ """ """
3068+ text = """
3069+# This file was automatically created by The UFO_usermod
3070+
3071+from object_library import all_vertices, Vertex
3072+import particles as P
3073+import couplings as C
3074+import lorentz as L
3075+
3076+"""
3077+ text += self.create_file_content(self.vertices)
3078+ ff = open(os.path.join(outputdir, 'vertices.py'), 'w')
3079+ ff.writelines(text)
3080+ ff.close()
3081+ return
3082+
3083+ def write_ctvertices(self, outputdir):
3084+ """ """
3085+
3086+ if not self.CTvertices:
3087+ return
3088+
3089+ text = """
3090+# This file was automatically created by The UFO_usermod
3091+
3092+from object_library import all_vertices, all_CTvertices, Vertex, CTVertex
3093+import particles as P
3094+import couplings as C
3095+import lorentz as L
3096+
3097+"""
3098+ text += self.create_file_content(self.CTvertices)
3099+ ff = open(os.path.join(outputdir, 'CT_vertices.py'), 'w')
3100+ ff.writelines(text)
3101+ ff.close()
3102+ return
3103+
3104+
3105+ def write_couplings(self, outputdir):
3106+ """ """
3107+ text = """
3108+# This file was automatically created by The UFO_usermod
3109+
3110+from object_library import all_couplings, Coupling
3111+"""
3112+ text += self.create_file_content(self.couplings)
3113+ ff = open(os.path.join(outputdir, 'couplings.py'), 'w')
3114+ ff.writelines(text)
3115+ ff.close()
3116+ return
3117+
3118+ def write_lorentz(self, outputdir):
3119+ """ """
3120+ text = """
3121+# This file was automatically created by The UFO_usermod
3122+
3123+from object_library import all_lorentz, Lorentz
3124+"""
3125+
3126+ text += self.create_file_content(self.lorentz)
3127+ ff = open(os.path.join(outputdir, 'lorentz.py'), 'w')
3128+ ff.writelines(text)
3129+ ff.close()
3130+ return
3131+
3132+ def write_parameters(self, outputdir):
3133+ """ """
3134+ text = """
3135+# This file was automatically created by The UFO_usermod
3136+
3137+from object_library import all_parameters, Parameter
3138+"""
3139+
3140+ text += self.create_file_content(self.parameters)
3141+ ff = open(os.path.join(outputdir, 'parameters.py'), 'w')
3142+ ff.writelines(text)
3143+ ff.close()
3144+ return
3145+
3146+ def write_orders(self, outputdir):
3147+ """ """
3148+ text = """
3149+# This file was automatically created by The UFO_usermod
3150+
3151+from object_library import all_orders, CouplingOrder
3152+"""
3153+
3154+ text += self.create_file_content(self.orders)
3155+ ff = open(os.path.join(outputdir, 'coupling_orders.py'), 'w')
3156+ ff.writelines(text)
3157+ ff.close()
3158+ return
3159+
3160+ def write_functions(self, outputdir):
3161+ """ """
3162+ text = """
3163+# This file was automatically created by The UFO_usermod
3164+
3165+import cmath
3166+from object_library import all_functions, Function
3167+
3168+"""
3169+
3170+ text += self.create_file_content(self.functions)
3171+ ff = open(os.path.join(outputdir, 'function_library.py'), 'w')
3172+ ff.writelines(text)
3173+ ff.close()
3174+ return
3175+
3176+ def write_propagators(self, outputdir):
3177+ """ """
3178+
3179+ text = """
3180+# This file was automatically created by The UFO_usermod
3181+from object_library import all_propagators, Propagator
3182+"""
3183+
3184+ text += self.create_file_content(self.propagators)
3185+ ff = open(os.path.join(outputdir, 'propagators.py'), 'w')
3186+ ff.writelines(text)
3187+ ff.close()
3188+ return
3189+
3190+ def write_external_files(self, outputdir):
3191+ """Copy/merge the routines written in Fortran/C++/pyhton"""
3192+
3193+ #1. Special case for the formfactor written in Fortran
3194+ re_fct = re.compile('''^\s{7,70}[\w\s]*function (\w*)\(''',re.M+re.I)
3195+ present_fct = set()
3196+ for dirpath in self.all_path:
3197+ if os.path.exists(pjoin(dirpath, 'Fortran', 'functions.f')):
3198+ text = open(pjoin(dirpath, 'Fortran', 'functions.f')).read()
3199+ new_fct = re_fct.findall(text)
3200+ nb_old = len(present_fct)
3201+ nb_added = len(new_fct)
3202+ new_fct = set([f.lower() for f in new_fct])
3203+ present_fct.update(new_fct)
3204+ if len(present_fct) < nb_old + nb_added:
3205+ logger.critical('''Some Functions in functions.f are define in more than one model.
3206+ This require AT LEAST manual modification of the resulting file. But more likely the
3207+ model need to be consider as un-physical! Use it very carefully.''')
3208+
3209+ if not os.path.exists(pjoin(outputdir, 'Fortran')):
3210+ os.mkdir(pjoin(outputdir, 'Fortran'))
3211+ fsock = open(pjoin(outputdir, 'Fortran'),'a')
3212+ fsock.write(text)
3213+ fsock.close()
3214+
3215+ #2. Ohter files present in Fortran/Cpp/Python directory
3216+ # ASk user to handle it if any!
3217+ for dirpath in self.all_path:
3218+ for subdir in ['Fortran', 'CPP', 'Python']:
3219+ if os.path.exists(pjoin(dirpath, subdir)):
3220+ for filepath in os.listdir(pjoin(dirpath, subdir)):
3221+ if filepath == 'functions.f':
3222+ continue
3223+ if '.' not in filepath:
3224+ continue
3225+ logger.warning('Manual HELAS routine associated to the model. Those are not modified automaticaly!! So you need to manually checked them')
3226+ nb = 0
3227+ name, extension = filepath.rsplit('.', 1)
3228+
3229+ while 1:
3230+ filename = '%s%s%s' %(name, '.moved' * nb, extension)
3231+ if os.path.exists(pjoin(outputdir, subdir, filename)):
3232+ nb+=1
3233+ else:
3234+ break
3235+ if not os.path.exists(pjoin(outputdir, subdir)):
3236+ os.mkdir(pjoin(outputdir, subdir))
3237+ files.cp(pjoin(dirpath, subdir, filepath), pjoin(outputdir, subdir, filename))
3238+
3239+ def get_particle(self, name):
3240+ """ """
3241+ for part in self.particles:
3242+ if part.name == name:
3243+ return part
3244+
3245+ raise USRMODERROR, 'no particle %s in the model' % name
3246+
3247+ def add_parameter(self, parameter):
3248+ """wrapper to call the correct function"""
3249+
3250+ if parameter.nature == 'internal':
3251+ self.add_internal_parameter(parameter)
3252+ else:
3253+ self.add_external_parameter(parameter)
3254+
3255+ def add_particle(self, particle):
3256+ """Add a particle in a consistent way"""
3257+
3258+ name = particle.name
3259+ old_part = next((p for p in self.particles if p.name==name), None)
3260+ if old_part:
3261+ #Check if the two particles have the same pdgcode
3262+ if old_part.pdg_code == particle.pdg_code:
3263+ particle.replace = old_part
3264+ return self.check_mass_width_of_particle(old_part, particle)
3265+ else:
3266+ logger.warning('The particle name \'%s\' is present in both model with different pdg code' % name)
3267+ logger.warning('The particle coming from the plug-in model will be rename to \'%s%s\'' % (name, self.addon))
3268+ particle.name = '%s%s' % (name, self.addon)
3269+ self.particles.append(particle)
3270+ return
3271+
3272+ pdg = particle.pdg_code
3273+ if pdg in self.particle_dict:
3274+ particle.replace = self.particle_dict[pdg]
3275+ return self.check_mass_width_of_particle(self.particle_dict[pdg], particle)
3276+ else:
3277+ self.particles.append(particle)
3278+
3279+
3280+ def check_mass_width_of_particle(self, p_base, p_plugin):
3281+
3282+ # Check the mass
3283+ if p_base.mass.name != p_plugin.mass.name:
3284+ #different name but actually the same
3285+ if p_plugin.mass.name in self.old_new:
3286+ if self.old_new[p_plugin.mass.name] != p_base.mass.name:
3287+ raise USRMODERROR, 'Some inconsistency in the mass assignment in the model: equivalent of %s is %s != %s ' % ( p_plugin.mass.name, self.old_new[p_plugin.mass.name], p_base.mass.name)
3288+ elif p_base.mass.name.lower() == 'zero':
3289+ p_base.mass = p_plugin.mass
3290+ elif p_plugin.mass.name.lower() == 'zero':
3291+ pass
3292+ else:
3293+ raise USRMODERROR, 'Some inconsistency in the mass assignment in the model\n' + \
3294+ ' Mass: %s and %s\n' %(p_base.mass.name, p_plugin.mass.name) + \
3295+ ' conflict name %s\n' % self.old_new + \
3296+ ' pdg_code: %s %s' % (p_base.pdg_code, p_plugin.pdg_code)
3297+ # Check the width
3298+ if p_base.width.name != p_plugin.width.name:
3299+ #different name but actually the same
3300+ if p_plugin.width.name in self.old_new:
3301+ if self.old_new[p_plugin.width.name] != p_base.width.name:
3302+ raise USRMODERROR, 'Some inconsistency in the mass assignment in the model'
3303+ elif p_base.width.name.lower() == 'zero':
3304+ p_base.width = p_plugin.width
3305+ elif p_plugin.width.name.lower() == 'zero':
3306+ pass
3307+ else:
3308+ raise USRMODERROR, 'Some inconsistency in the mass assignment in the model'
3309+
3310+ return
3311+
3312+ def add_external_parameter(self, parameter):
3313+ """adding a param_card parameter inside the current model.
3314+ if the parameter block/lhcode already exists then just do nothing
3315+ (but if the name are different then keep the info for future translation)
3316+ If the name already exists in the model. raise an exception.
3317+ """
3318+
3319+ name = parameter.name
3320+ # check if a parameter already has this name
3321+ old_param = next((p for p in self.parameters if p.name==name), None)
3322+ if old_param:
3323+ if old_param.lhablock == parameter.lhablock and \
3324+ old_param.lhacode == parameter.lhacode:
3325+ return #Nothing to do!
3326+ else:
3327+ logger.info('The two model defines the parameter \'%s\'\n' % parameter.name +
3328+ ' the original model for %s :%s\n' %(old_param.lhablock, old_param.lhacode)+
3329+ ' the plugin for %s :%s\n' %(parameter.lhablock,parameter.lhacode)+
3330+ ' We will rename the one from the plugin to %s%s' % (parameter.name, self.addon))
3331+ if old_param.nature == 'internal':
3332+ logger.warning('''The parameter %s is actually an internal parameter of the base model.
3333+ his value is given by %s.
3334+ If those two parameters are expected to be identical, you need to provide the value in the param_card according to this formula.
3335+ ''')
3336+ #add the parameter with a new name.
3337+ self.old_new[parameter.name] = '%s%s' % (parameter.name, self.addon)
3338+ parameter.name = '%s%s' % (parameter.name, self.addon)
3339+ #
3340+ #self.parameters.append(parameter)
3341+ #return
3342+
3343+ #check if a parameter already has this lhablock/code information
3344+ old_param = next((p for p in self.parameters if p.lhacode==parameter.lhacode \
3345+ and p.lhablock==parameter.lhablock), None)
3346+ if old_param:
3347+ logger.info('The two model defines the block \'%s\' with id \'%s\' with different parameter name \'%s\', \'%s\'\n'\
3348+ % (old_param.lhablock, old_param.lhacode, parameter.name, old_param.name) + \
3349+ ' We will merge those two parameters in a single one')
3350+ if parameter.name in self.old_new.values():
3351+ key = [k for k in self.old_new if self.old_new[k] == parameter.name][0]
3352+ self.old_new[key] = old_param.name
3353+ self.old_new[parameter.name] = old_param.name
3354+ else:
3355+ self.old_new[parameter.name] = old_param.name
3356+ # self.add_internal_parameter(iden_param)
3357+
3358+ else:
3359+ #Just add the new parameter to the current list
3360+ self.parameters.append(parameter)
3361+ self.new_external.append(parameter)
3362+
3363+ def add_internal_parameter(self, parameter):
3364+ """ add a parameter of type internal """
3365+
3366+ name = parameter.name
3367+ # check if a parameter already has this name
3368+ old_param = next((p for p in self.parameters if p.name==name), None)
3369+ if old_param:
3370+ if old_param.value == parameter.value:
3371+ return #Nothing to do!
3372+ else:
3373+ if self.old_new:
3374+ pattern = re.compile(r'\b(%s)\b' % '|'.join(self.old_new.keys()))
3375+ def replace(matchobj):
3376+ return self.old_new[matchobj.group(0)]
3377+ parameter.value = pattern.sub(replace, parameter.value)
3378+ self.old_new[parameter.name] = '%s%s' % (parameter.name, self.addon)
3379+
3380+ parameter.name = '%s%s' % (parameter.name, self.addon)
3381+ self.parameters.append(parameter)
3382+ return
3383+
3384+ # No name conflict:
3385+ if self.old_new:
3386+ pattern = re.compile(r'\b(%s)\b' % '|'.join(self.old_new.keys()))
3387+ def replace(matchobj):
3388+ return self.old_new[matchobj.group(0)]
3389+ parameter.value = pattern.sub(replace, parameter.value)
3390+
3391+ self.parameters.append(parameter)
3392+
3393+
3394+
3395+
3396+ def add_coupling(self, coupling):
3397+ """add one coupling"""
3398+
3399+ # avoid name duplication
3400+ name = coupling.name
3401+ same_name = next((p for p in self.couplings if p.name==name), None)
3402+ if same_name:
3403+ coupling.name = '%s%s' % (coupling.name, self.addon)
3404+
3405+ if self.old_new:
3406+ pattern = re.compile(r'\b(%s)\b' % '|'.join(self.old_new.keys()))
3407+ def replace(matchobj):
3408+ return self.old_new[matchobj.group(0)]
3409+ coupling.value = pattern.sub(replace, coupling.value)
3410+
3411+ old_coupling = next((p for p in self.couplings if p.value==coupling.value), None)
3412+
3413+ if old_coupling:
3414+ coupling.replace = old_coupling #tag for replacement
3415+ else:
3416+ self.couplings.append(coupling)
3417+
3418+ def add_coupling_order(self, coupling_order):
3419+ """adding a new coupling order inside the model"""
3420+
3421+ name = coupling_order.name
3422+ same_name = next((p for p in self.orders if p.name==name), None)
3423+ if same_name:
3424+ if coupling_order.hierarchy != same_name.hierarchy:
3425+ logger.warning('%s has different hierarchy use the minimal value (%s, %s) => %s' \
3426+ % (name, same_name.hierarchy, coupling_order.hierarchy,
3427+ min(same_name.hierarchy, coupling_order.hierarchy)))
3428+ same_name.hierarchy = min(same_name.hierarchy, coupling_order.hierarchy)
3429+ if coupling_order.expansion_order != same_name.expansion_order:
3430+ logger.warning('%s has different expansion_order use the minimal value (%s, %s) => %s' \
3431+ % (name, coupling_order.expansion_order, same_name.expansion_order,
3432+ min(same_name.expansion_order, coupling_order.expansion_order)))
3433+ same_name.expansion_order = min(same_name.expansion_order, coupling_order.expansion_order)
3434+ if hasattr(same_name, 'perturbative_expansion') and same_name.perturbative_expansion:
3435+ logger.info('%s will be forbidden to run at NLO' % same_name.name)
3436+ same_name.perturbative_expansion = 0
3437+
3438+
3439+ else:
3440+ self.orders.append(coupling_order)
3441+
3442+ def add_lorentz(self, lorentz):
3443+ """add one coupling"""
3444+
3445+ # avoid name duplication
3446+ name = lorentz.name
3447+ same_name = next((p for p in self.lorentz if p.name==name), None)
3448+ if same_name:
3449+ lorentz.name = '%s%s' % (lorentz.name, self.addon)
3450+
3451+ if self.old_new:
3452+ pattern = re.compile(r'\b(%s)\b' % '|'.join(self.old_new.keys()))
3453+ def replace(matchobj):
3454+ return self.old_new[matchobj.group(0)]
3455+ lorentz.structure = pattern.sub(replace, lorentz.structure)
3456+
3457+ old_lor = next((p for p in self.lorentz
3458+ if p.structure==lorentz.structure and p.spins == lorentz.spins),
3459+ None)
3460+
3461+ if old_lor:
3462+ lorentz.replace = old_lor #tag for replacement
3463+ else:
3464+ self.lorentz.append(lorentz)
3465+
3466+ def add_interaction(self, interaction):
3467+ """Add one interaction to the model. This is UNCONDITIONAL!
3468+ if the same interaction is in the model this means that the interaction
3469+ will appear twice. This is now weaken if both interaction are exactly identical!
3470+ (EXACT same color/lorentz/coupling expression)
3471+ """
3472+
3473+ #0. check name:
3474+ name = interaction.name
3475+ same_name = next((p for p in self.vertices if p.name==name), None)
3476+ if same_name:
3477+ interaction.name = '%s%s' % (interaction.name, self.addon)
3478+
3479+ #1. check particles translation
3480+ particles = [p.replace if hasattr(p, 'replace') else p for p in interaction.particles]
3481+ interaction.particles = particles
3482+
3483+ #2. check the lorentz structure
3484+ lorentz = [l.replace if hasattr(l, 'replace') else l for l in interaction.lorentz]
3485+ interaction.lorentz = lorentz
3486+
3487+ #3. check the couplings
3488+ couplings = [(key, c.replace) if hasattr(c, 'replace') else (key, c)
3489+ for key, c in interaction.couplings.items()]
3490+ interaction.couplings = dict(couplings)
3491+
3492+ #4. Try to avoid duplication of interaction:
3493+ # A crash is raised if the same particles have already the some lorentz structure
3494+ # at the same coupling order:
3495+ get_pdg = lambda vertex: sorted([p.pdg_code for p in vertex.particles])
3496+ id_part = get_pdg(interaction)
3497+ iden_vertex = [v for v in self.vertices if get_pdg(v) == id_part]
3498+ iden = False
3499+ nb_coupling = len(interaction.couplings)
3500+ keys = interaction.couplings.keys() # to have a fixed order!
3501+
3502+ get_lor_and_color = lambda i: (interaction.lorentz[keys[i][1]].structure,
3503+ interaction.color[keys[i][0]])
3504+ for v in iden_vertex:
3505+ if len(v.couplings) != nb_coupling:
3506+ continue
3507+ found = []
3508+ for ((i,j), coup) in v.couplings.items():
3509+ new_lorentz = v.lorentz[j].structure
3510+ new_color = v.color[i]
3511+ k=0
3512+ same = [k for k in range(nb_coupling) if k not in found and
3513+ get_lor_and_color(k) == (new_lorentz, new_color)]
3514+ if not same:
3515+ break
3516+ else:
3517+ for k in same:
3518+ if interaction.couplings[keys[k]] == coup:
3519+ found.append(k)
3520+ break
3521+ else:
3522+ # check only the coupling order
3523+ for k in same:
3524+ if interaction.couplings[keys[k]].order == coup.order:
3525+ found.append(k)
3526+ warning = """Did NOT add interaction %s since same particles/lorentz/color/coupling order
3527+ BUT did not manage to ensure that the coupling is the same. couplings expression:
3528+ base model: %s
3529+ addon model: %s
3530+ """ % (id_part, coup.value, interaction.couplings[keys[k]].value)
3531+ logger.warning(warning)
3532+ found.append(k)
3533+ break
3534+ else:
3535+ pass
3536+ # mat
3537+ else:
3538+ # all found one identical...
3539+ return
3540+
3541+ logger.info('Adding interaction for the following particles: %s' % id_part)
3542+
3543+
3544+
3545+
3546+ self.vertices.append(interaction)
3547+
3548+ def add_CTinteraction(self, interaction):
3549+ """Add one interaction to the model. This is UNCONDITIONAL!
3550+ if the same interaction is in the model this means that the interaction
3551+ will appear twice."""
3552+
3553+ #0. check name:
3554+ name = interaction.name
3555+ same_name = next((p for p in self.vertices if p.name==name), None)
3556+ if same_name:
3557+ interaction.name = '%s%s' % (interaction.name, self.addon)
3558+
3559+ #1. check particles translation
3560+ particles = [p.replace if hasattr(p, 'replace') else p for p in interaction.particles]
3561+ interaction.particles = particles
3562+
3563+ #2. check the lorentz structure
3564+ lorentz = [l.replace if hasattr(l, 'replace') else l for l in interaction.lorentz]
3565+ interaction.lorentz = lorentz
3566+
3567+ #3. check the couplings
3568+ couplings = [(key, c.replace) if hasattr(c, 'replace') else (key, c)
3569+ for key, c in interaction.couplings.items()]
3570+ interaction.couplings = dict(couplings)
3571+
3572+
3573+ #4. check the loop_particles
3574+ loop_particles=[ [p.replace if hasattr(p, 'replace') else p for p in plist]
3575+ for plist in interaction.loop_particles]
3576+ interaction.loop_particles = loop_particles
3577+ self.CTvertices.append(interaction)
3578+
3579+
3580+ def add_model(self, model=None, path=None):
3581+ """add another model in the current one"""
3582+
3583+ self.new_external = []
3584+ if path:
3585+ model = ufomodels.load_model(path)
3586+
3587+ if not model:
3588+ raise USRMODERROR, 'Need a valid Model'
3589+
3590+ # Check the validity of the model. Too old UFO (before UFO 1.0)
3591+ if not hasattr(model, 'all_orders'):
3592+ raise USRMODERROR, 'Add-on Model doesn\'t follows UFO convention (no couplings_order information)\n' +\
3593+ 'MG5 is able to load such model but NOT to the add model feature.'
3594+ if isinstance(model.all_particles[0].mass, basestring):
3595+ raise USRMODERROR, 'Add-on Model doesn\'t follows UFO convention (Mass/Width of particles are string name, not object)\n' +\
3596+ 'MG5 is able to load such model but NOT to the add model feature.'
3597+
3598+ for order in model.all_orders:
3599+ if hasattr(order, 'perturbative_expansion') and order.perturbative_expansion:
3600+ raise USRMODERROR, 'Add-on model can not be loop model.'
3601+
3602+ for order in model.all_orders:
3603+ self.add_coupling_order(order)
3604+ for parameter in model.all_parameters:
3605+ self.add_parameter(parameter)
3606+ for coupling in model.all_couplings:
3607+ self.add_coupling(coupling)
3608+ for lorentz in model.all_lorentz:
3609+ self.add_lorentz(lorentz)
3610+ for particle in model.all_particles:
3611+ self.add_particle(particle)
3612+ for vertex in model.all_vertices:
3613+ self.add_interaction(vertex)
3614+
3615+ self.all_path.append(path)
3616+
3617+ return
3618+
3619+# def add_particle_from_model(self, model, name):
3620+# """add the particles NAME from model model (either path or object)
3621+# names can be either the name of one particle or a list of particle name
3622+# """
3623+#
3624+# if isinstance(model, basestring):
3625+# model = UFOModel(self.modelpath)
3626+#
3627+#
3628+# if isinstance(name, list):
3629+# [self.add_particles(self.modelpath, name) for name in names]
3630+# return
3631+#
3632+# # Check Validity
3633+# part = self.get_particle(name)
3634+# if self.particles_dict.has_key(part.pdg_code):
3635+# raise USRMODERROR, 'The model contains already a particle with pdg_code %s.' % part.pdg_code
3636+#
3637+# # Add the particles to model
3638+# self.particles.append(part)
3639+# self.particles_dict[part.pdg_code] = part
3640+#
3641+# # Loop over the interactions of the other model and add (if possible) the interactions
3642+# #associated to the new particles
3643+# possibility = [v for v in vertex if part in v.particles]
3644+#
3645+# for vertex in possibility:
3646+# # Check that all particles are define in the model
3647+# for particles in vertex.particles:
3648+# if particles.pdg_code not in self.particles_dict:
3649+# continue
3650+# # Add the interactions/lorentz structure/coupling
3651+# self.vertices.append(vertex)
3652+# # NEED WORK!!!!!
3653+
3654+
3655+
3656+
3657+
3658+
3659
3660=== modified file 'tests/input_files/LoopSMTest/particles.py'
3661--- tests/input_files/LoopSMTest/particles.py 2012-02-14 00:46:07 +0000
3662+++ tests/input_files/LoopSMTest/particles.py 2014-03-24 03:30:32 +0000
3663@@ -280,31 +280,24 @@
3664 tt__plus__ = tt__minus__.anti()
3665
3666
3667+# Wavefunction renormalization
3668+
3669+b.loop_particles = [[[5,21]]]
3670+b.counterterm = {(1,0,0):CTParam.bWcft_UV.value}
3671+
3672+t.loop_particles = [[[6,21]]]
3673+t.counterterm = {(1,0,0):CTParam.tWcft_UV.value}
3674+
3675+G.loop_particles = [[[5]],[[6]]]
3676+G.counterterm = {(1,0,0):CTParam.GWcft_UV_b.value,(1,0,1):CTParam.GWcft_UV_t.value}
3677+
3678 # Set counterterms values
3679
3680-Param.MT.loop_particles= [[[t,G]]]
3681-Param.MT.counterterm = {(1,0):CTParam.tMass_UV.value}
3682-Param.MB.loop_particles= [[[b,G]]]
3683-Param.MB.counterterm = {(1,0):CTParam.bMass_UV.value}
3684-Param.G.loop_particles = [[[u],[d],[c],[s]],[[b]],[[t]],[[G]]]
3685-Param.G.counterterm = {(1,0):CTParam.G_UVq.value,(1,1):CTParam.G_UVb.value,(1,2):CTParam.G_UVt.value,(1,3):CTParam.G_UVg.value}
3686-
3687-# Wavefunction renormalization
3688-
3689-b.loop_particles = [[[b,G]]]
3690-b.counterterm = {(1,0):CTParam.bWcft_UV.value}
3691-
3692-t.loop_particles = [[[t,G]]]
3693-t.counterterm = {(1,0):CTParam.tWcft_UV.value}
3694-
3695-G.loop_particles = [[[b]],[[t]]]
3696-G.counterterm = {(1,0):CTParam.GWcft_UV_b.value,(1,1):CTParam.GWcft_UV_t.value}
3697-
3698-Param.MB.loop_particles= [[[b,G]]]
3699-Param.MB.counterterm = {(1,0):CTParam.bMass_UV.value}
3700-
3701-Param.MT.loop_particles= [[[t,G]]]
3702-Param.MT.counterterm = {(1,0):CTParam.tMass_UV.value}
3703-
3704-Param.G.loop_particles = [[[u],[d],[c],[s]],[[b]],[[t]],[[G]]],
3705-Param.G.counterterm = {(1,0):CTParam.G_UVq.value,(1,1):CTParam.G_UVb.value,(1,2):CTParam.G_UVt.value,(1,3):CTParam.G_UVg.value},
3706+Param.MB.loop_particles= [[[5,21]]]
3707+Param.MB.counterterm = {(1,0,0):CTParam.bMass_UV.value}
3708+
3709+Param.MT.loop_particles= [[[6,21]]]
3710+Param.MT.counterterm = {(1,0,0):CTParam.tMass_UV.value}
3711+
3712+Param.G.loop_particles = [[[2],[1],[3],[4]],[[5]],[[6]],[[21]]],
3713+Param.G.counterterm = {(1,0,0):CTParam.G_UVq.value,(1,0,1):CTParam.G_UVb.value,(1,0,2):CTParam.G_UVt.value,(1,0,3):CTParam.G_UVg.value},
3714
3715=== modified file 'tests/time_db'
3716--- tests/time_db 2014-03-19 20:30:31 +0000
3717+++ tests/time_db 2014-03-24 03:30:32 +0000
3718@@ -1,5 +1,4 @@
3719 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasDiagramTest testMethod=test_setget_diagram_exceptions>]> 0.000161170959473
3720-<__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_edit_card.TestEditCardCmd testMethod=test_modif_madweight_card>]> 0.015398979187
3721 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_invalid_operations_for_add>]> 0.0435810089111
3722 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestVertexPoint testMethod=test_remove_line>]> 8.89301300049e-05
3723 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestFeynmanLine testMethod=test_get_length>]> 0.000235080718994
3724@@ -11,7 +10,6 @@
3725 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_import_v4.ProcCardV4ReaderTest testMethod=test_line_creation>]> 0.0172848701477
3726 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorFactorTest testMethod=test_f_product>]> 0.00337600708008
3727 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMatrixElementTest testMethod=test_generate_helas_diagrams_uux_gepem>]> 0.0183539390564
3728-<__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_edit_card.TestEditCardCmd testMethod=test_autocompletion>]> 0.0173709392548
3729 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestFKSDiagramTag testMethod=test_diagram_tag_uu_uug>]> 0.0557870864868
3730 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorObjectTest testMethod=test_T_simplify>]> 0.000298023223877
3731 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_standalone_cpp_output>]> 2.42965912819
3732@@ -36,7 +34,6 @@
3733 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorStringTest testMethod=test_simplify>]> 0.000159025192261
3734 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_cpp.IOExportPythia8Test testMethod=test_write_process_cc_file>]> 0.0698401927948
3735 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_diagram_generation.LoopDiagramGenerationTest testMethod=test_diagram_generation_gg_ng>]> 1.61963582039
3736-<__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_with_old_mg5_version.OLDMG5Comparator testMethod=test_short_sm>]> 6.53617286682
3737 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_import_ufo.TestRestrictModel testMethod=test_put_parameters_to_zero>]> 0.0871658325195
3738 <__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_cmd.TestValidCmd testMethod=test_InvalidCmd>]> 0.300333976746
3739 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMultiProcessTest testMethod=test_decay_chain_different_order3>]> 0.0537929534912
3740@@ -56,7 +53,7 @@
3741 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_madevent.TestMECmdShell testMethod=test_e_e_collision>]> 36.1715919971
3742 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_madevent_ufo_aloha>]> 8.15419101715
3743 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_majorana_conjugate_process>]> 0.116066932678
3744-<__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_gauge.GaugeComparator testMethod=test_short_gauge>]> 30.4052541256
3745+<__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_madevent.TestMadEventCmd testMethod=test_card_type_recognition>]> 0.0509171485901
3746 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_group_subprocs.SubProcessGroupTest testMethod=test_even_more_special_group_decay_chain>]> 0.344223976135
3747 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.ModelTest testMethod=test_get_interaction>]> 0.000319004058838
3748 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_base.TestFKSProcess testMethod=test_FKSMultiProcess_no_fsr>]> 0.15252494812
3749@@ -75,7 +72,6 @@
3750 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_AbstractModel testMethod=test_generate_ab_amplitudes>]> 0.394317865372
3751 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestVertexPoint testMethod=test_def_level>]> 8.58306884766e-05
3752 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_rambo.test_wavefunctions testMethod=test_V>]> 0.000189065933228
3753-<__main__.TestSuiteModified tests=[<tests.parallel_tests.test_ML5.ML5Test testMethod=test_short_ML5_sm_vs_stored_ML5>]> 148.365936041
3754 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=testsumaddadd>]> 0.000109910964966
3755 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMatrixElementTest testMethod=test_get_conjugate_index>]> 0.00273394584656
3756 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorObjectTest testMethod=test_Tr_simplify>]> 0.000442028045654
3757@@ -95,6 +91,7 @@
3758 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.DiagramTest testMethod=test_diagram_list>]> 0.000178098678589
3759 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_drawing.TestLoopDrawer testMethod=test_flipping>]> 0.0031681060791
3760 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.ProcessTest testMethod=test_setget_process_correct>]> 0.000624895095825
3761+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.TestModUFO testMethod=test_add_external_parameters>]> 0.00190401077271
3762 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestFeynmanLine testMethod=test_hasordinate_wronginput>]> 0.000245809555054
3763 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_base.TestFKSProcess testMethod=test_find_fks_j_from_i>]> 0.0350108146667
3764 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.testLorentzObject testMethod=test_spin2propagator5>]> 0.182165145874
3765@@ -103,11 +100,13 @@
3766 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.IOExportV4Test testMethod=test_export_group_decay_chains>]> 0.378351926804
3767 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_amp.ColorAmpTest testMethod=test_color_flow_string>]> 0.00816702842712
3768 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.testLorentzObject testMethod=test_part_spin32propagator>]> 0.0205278396606
3769+<<<<<<< TREE
3770 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_madweight.TestMadWeight testMethod=test_mw_wproduction>]> 11.4712297916
3771 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_IOTest_examples.IOTest_SimpleExamples testMethod=testIO_MyCustomNameIOTestWithPathRegExpr>]> 0.00521206855774
3772+=======
3773+>>>>>>> MERGE-SOURCE
3774 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_drawing.TestLoopDrawer testMethod=test_NLO_draw_uux_uuxddx>]> 0.00144910812378
3775 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_generate_events_nlo_py6_stdhep>]> 38.5469400883
3776-<__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_ufo_parsers.UFOParserTest testMethod=test_parse_fortran_IfElseStruct>]> 0.000214099884033
3777 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMatrixElementTest testMethod=test_fermionfactor_emep_emepemep>]> 0.24795794487
3778 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasDecayChainProcessTest testMethod=test_helas_forbidden_s_channel_decay_chain>]> 0.178428888321
3779 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasAmplitudeTest testMethod=test_values_for_prop>]> 0.000174999237061
3780@@ -121,10 +120,15 @@
3781 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_diquark_models.TestColorTripletModel testMethod=test_check_u_t_antitrip_g>]> 0.479106903076
3782 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorFactorTest testMethod=test_T_f_product>]> 0.00395798683167
3783 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_process_checks.TestMatrixElementChecker testMethod=test_failed_process>]> 1.92713904381
3784+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.TestModUFO testMethod=test_write_particles>]> 0.044410943985
3785 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DiagramGenerationTest testMethod=test_coupling_orders_uux_ddxng>]> 0.389806032181
3786 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_drawing_eps.TestDrawingOption testMethod=test_option_6g>]> 0.0658371448517
3787+<<<<<<< TREE
3788 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayParticleList testMethod=test_convert>]> 0.000968933105469
3789 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_IOTest_examples.IOTestExampleWithSetUp testMethod=testIO_IOTestWrappedWithSetUP>]> 0.00829696655273
3790+=======
3791+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayParticleList testMethod=test_convert>]> 0.000968933105469
3792+>>>>>>> MERGE-SOURCE
3793 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_exporters.IOExportMadLoopUnitTest testMethod=test_IOTests>]> 12.0391700268
3794 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.TestIdentifyMETagFKS testMethod=test_identify_me_tag_qq_qg>]> 0.0854730606079
3795 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorStringTest testMethod=test_replace_indices>]> 0.000101089477539
3796@@ -157,6 +161,7 @@
3797 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_import_ufo.TestBenchmarkModel testMethod=test_use_as_benchmark>]> 0.165615081787
3798 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_base.TestFKSProcess testMethod=test_FKSMultiProcess_add>]> 0.199738025665
3799 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DiagramGenerationTest testMethod=test_combine_legs_gluons>]> 0.00331091880798
3800+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.TestModUFO testMethod=test_add_parameters>]> 0.00129199028015
3801 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorFactorTest testMethod=test_d_product>]> 0.00334000587463
3802 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestFKSCommon testMethod=test_find_pert_particles_interactionsi_mssm>]> 7.10099411011
3803 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_misc.IOMiscTest testMethod=test_parse_info_str_error>]> 8.82148742676e-05
3804@@ -175,6 +180,7 @@
3805 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMatrixElementTest testMethod=test_fermionfactor_emep_emepa>]> 0.0428278446198
3806 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_configs_long_decay>]> 0.0534508228302
3807 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayModel testMethod=test_read_param_card>]> 2.07473993301
3808+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.TestModUFO testMethod=test_write_orders>]> 0.00566101074219
3809 <__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_cmd.TestExtendedCmd testMethod=test_the_exit_from_child_cmd2>]> 0.000120162963867
3810 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_import_ufo.TestRestrictModel testMethod=test_detect_identical_parameters>]> 0.0867898464203
3811 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_import_ufo.TestRestrictModel testMethod=test_merge_identical_parameters>]> 0.0875990390778
3812@@ -192,7 +198,7 @@
3813 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMultiProcessTest testMethod=test_decay_chain_different_order1>]> 0.0381689071655
3814 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_configs_8fs>]> 0.104753017426
3815 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_amp.ColorAmpTest testMethod=test_colorize_uux_ggg>]> 0.0345070362091
3816-<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.VertexTest testMethod=test_vertex_list>]> 7.5101852417e-05
3817+<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorStringTest testMethod=test_to_immutable>]> 5.88893890381e-05
3818 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_pythonwriter>]> 0.0264060497284
3819 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMultiProcessTest testMethod=test_complete_decay_chain_process>]> 0.748803853989
3820 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_generate_events_nlo_hw6_split>]> 85.3567028046
3821@@ -202,18 +208,18 @@
3822 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.testLorentzObject testMethod=test_power>]> 0.00031304359436
3823 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestMultVariable testMethod=testsummultadd>]> 0.000144004821777
3824 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_drawing.TestLoopDrawer testMethod=test_NLO_draw_all_reconstructed_gg_gg>]> 0.0375239849091
3825+<__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestLinkRBConfSM testMethod=test_link_udxwpg_udxwp>]> 0.0118889808655
3826 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_drawing.TestLoopDrawer testMethod=test_NLO_draw_uux_guux>]> 0.0011990070343
3827 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.test_aloha_creation testMethod=test_aloha_multiple_lorentz_and_symmetry>]> 0.0302782058716
3828 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DecayChainAmplitudeTest testMethod=test_setget_process_exceptions>]> 0.000777006149292
3829 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestVariable testMethod=testsumvaradd>]> 7.20024108887e-05
3830 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=testsumaddmult>]> 0.000133991241455
3831 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayParticle testMethod=test_find_vertexlist>]> 0.113565921783
3832-<__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_ufo_parsers.UFOParserTest testMethod=test_parse_fortran_IfElseStruct_MP>]> 0.0654561519623
3833 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_helas_objects.LoopHelasMatrixElementTest testMethod=test_helas_diagrams_ddx_uux>]> 1.11160707474
3834 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_helas_objects.LoopHelasMatrixElementTest testMethod=test_helas_diagrams_gg_wpwmttx>]> 1.00893592834
3835-<__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_edit_card.TestEditCardCmd testMethod=test_modif_param_card>]> 0.0154800415039
3836 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestSomeObjectProperty testMethod=testmassisdiffaswidth>]> 0.000320911407471
3837 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.ProcessTest testMethod=test_shell_string>]> 0.000377893447876
3838+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.TestModUFO testMethod=test_add_particle>]> 0.00152111053467
3839 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.test_aloha_wavefunctions testMethod=test_OR>]> 0.000894069671631
3840 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.ParticleTest testMethod=test_setget_particle_exceptions>]> 0.000194072723389
3841 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorStringTest testMethod=test_representation>]> 5.88893890381e-05
3842@@ -234,6 +240,7 @@
3843 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_group_subprocs.SubProcessGroupTest testMethod=test_group_decay_chains>]> 0.438848972321
3844 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_F77writer_complex_mass_scheme>]> 0.0254271030426
3845 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_calculate_xsect_nlo>]> 11.7403600216
3846+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.TestModUFO testMethod=test_write_vertices>]> 0.53790307045
3847 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasDecayChainProcessTest testMethod=test_helas_decay_chain_process>]> 0.479960918427
3848 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMultiProcessTest testMethod=test_decay_processes_different_is_particles>]> 0.0413808822632
3849 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMultiProcessTest testMethod=test_helas_multi_process>]> 0.0335440635681
3850@@ -243,6 +250,7 @@
3851 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_cpp.IOExportPythia8Test testMethod=test_write_dec_multiprocess_files>]> 0.481742143631
3852 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_pythonwriter_complex_mass_scheme>]> 0.095272064209
3853 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.testLorentzObject testMethod=testscalarmanipulation>]> 0.000458955764771
3854+<__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_generate_helas_diagrams_zz_n1n1>]> 0.0138208866119
3855 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestFeynmanDiagram testMethod=test_phi4_vertex>]> 0.000259876251221
3856 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.ModelTest testMethod=test_dictionaries>]> 0.000564098358154
3857 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.MultiProcessTest testMethod=test_multiparticle_stop_decay>]> 0.01522397995
3858@@ -250,9 +258,9 @@
3859 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.ProcessDefinitionTest testMethod=test_setget_process_definition_exceptions>]> 0.000463008880615
3860 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestMultVariable testMethod=testsummultint>]> 9.48905944824e-05
3861 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestFKSCommon testMethod=test_combine_ij>]> 0.00774097442627
3862+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_import_ufo.TestImportUFONoSideEffect testMethod=test_ImportUFONoSideEffectNLO>]> 0.303053855896
3863 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestSomeObjectProperty testMethod=test_parity_for_epsilon>]> 0.000375032424927
3864 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_multiple_lorentz_structures_with_fermion_flow_clash>]> 0.034786939621
3865-<__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_gauge.GaugeComparator testMethod=test_short_cross_gauge>]> 115.8441329
3866 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_Cppwriter_C>]> 0.034628868103
3867 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=testmultaddint>]> 0.000109910964966
3868 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestSomeObjectProperty testMethod=testConjugateOperator>]> 0.0886290073395
3869@@ -290,11 +298,9 @@
3870 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMultiProcessTest testMethod=test_decay_chain_different_pdgs>]> 0.0846738815308
3871 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DecayChainAmplitudeTest testMethod=test_setget_process_correct>]> 0.000761985778809
3872 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorStringTest testMethod=test_product>]> 9.89437103271e-05
3873-<__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_generate_events_name>]> 44.6062128544
3874 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=test_factorization3>]> 0.000184774398804
3875 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayParticle testMethod=test_getsetvertexlist_correct>]> 0.112138986588
3876 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_Channel testMethod=test_findchannels>]> 8.38987207413
3877-<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestMultVariable testMethod=testsummulvar>]> 0.000131845474243
3878 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_check_singletop_fastjet>]> 140.989368916
3879 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestFeynmanLine testMethod=test_domain_intersection_failure>]> 0.000155925750732
3880 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.test_aloha_creation testMethod=test_mssm_subset_creation>]> 0.190835952759
3881@@ -352,17 +358,16 @@
3882 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestLorentzObjectRepresentation testMethod=test_sumofLorentzObj>]> 0.00670909881592
3883 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.VertexTest testMethod=test_setget_vertex_correct>]> 5.50746917725e-05
3884 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_pythonwriter_spin3half>]> 0.154654026031
3885-<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorStringTest testMethod=test_to_immutable>]> 5.88893890381e-05
3886+<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.VertexTest testMethod=test_vertex_list>]> 7.5101852417e-05
3887 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_madloop.TestCmdLoop testMethod=test_ML_check_timing_epem_ttx>]> 14.4036149979
3888 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_drawing.LoopDiagramDrawerTest testMethod=test_fuse_line>]> 0.00980591773987
3889 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=testmultaddmult>]> 0.000133991241455
3890-<__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell1 testMethod=test_import_model>]> 0.106930971146
3891 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.MultiLegTest testMethod=test_representation>]> 5.91278076172e-05
3892 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_model_equivalence.TestModelCreation testMethod=test_all>]> 0.951196908951
3893 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorObjectTest testMethod=test_epsilon_object>]> 0.000172138214111
3894 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.test_aloha_creation testMethod=test_aloha_FFV>]> 0.10179400444
3895 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMatrixElementTest testMethod=test_process_init>]> 0.00924706459045
3896-<__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_generate_helas_diagrams_zz_n1n1>]> 0.0138208866119
3897+<__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_import_banner_command>]> 1.45100903511
3898 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_fks.IOExportFKSTest testMethod=test_write_ij_lines>]> 0.0146369934082
3899 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_base.TestFKSProcess testMethod=test_find_reals>]> 0.0384328365326
3900 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.security_issue.TestSecurity testMethod=test_security_scan>]> 0.276997804642
3901@@ -372,10 +377,13 @@
3902 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_split_evt_gen>]> 6.80820512772
3903 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_Channel testMethod=test_get_initialfinal>]> 0.125761032104
3904 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_base.TestFKSProcess testMethod=test_generate_reals_no_combine>]> 0.184464216232
3905+<<<<<<< TREE
3906 <__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_with_old_mg5_version.OLDMG5Comparator testMethod=test_short_cross_sm2>]> 23.508852005
3907+=======
3908+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestMultVariable testMethod=testsummulvar>]> 0.000131845474243
3909+>>>>>>> MERGE-SOURCE
3910 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasAmplitudeTest testMethod=test_sign_flips_to_order>]> 8.08238983154e-05
3911 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_Fortranwriter_spin3half>]> 0.154531002045
3912-<__main__.TestSuiteModified tests=[<tests.parallel_tests.test_madweight.TestMadWeight testMethod=test_short_mw_wa_refine>]> 11.0905270576
3913 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_change_number_format_cpp>]> 0.000547170639038
3914 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=testmultaddvar_legacy>]> 0.00015115737915
3915 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_fks.IOExportFKSTest testMethod=test_write_nfksconfigs_file>]> 0.0158369541168
3916@@ -386,11 +394,14 @@
3917 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestMultVariable testMethod=testsummultmul>]> 0.000133991241455
3918 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_shower_card.TestShowerCard testMethod=test_shower_card_py8_analyse>]> 0.000602960586548
3919 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_generate_helas_diagrams_enu_enu>]> 0.008131980896
3920+<<<<<<< TREE
3921 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_import_ufo.TestRestrictModel testMethod=test_merge_iden_couplings>]> 0.0879130363464
3922 <__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_gauge.GaugeComparatorLoop testMethod=test_short_gauge_loop>]> 37.5182161331
3923+=======
3924+<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasAmplitudeTest testMethod=test_setget_amplitude_exceptions>]> 0.000211000442505
3925+>>>>>>> MERGE-SOURCE
3926 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMatrixElementTest testMethod=test_get_base_amplitude>]> 0.140361070633
3927 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorObjectTest testMethod=test_standard>]> 3.79085540771e-05
3928-<__main__.TestSuiteModified tests=[<tests.parallel_tests.test_madweight.TestMadWeight testMethod=test_short_mw_tt_semi>]> 125.299013853
3929 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_link_to_ufo.TestUFOExpressionParsers testMethod=test_convert_number_to_cpp>]> 0.0238170623779
3930 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_matrix_4g_decay_chain_process>]> 0.395421028137
3931 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_save_model.IOSaveModel testMethod=test_error_particle_save>]> 4.19616699219e-05
3932@@ -429,7 +440,6 @@
3933 <__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_cmd.TestValidCmd testMethod=test_cleaning_history>]> 0.000346899032593
3934 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_generate_events_lo_py6_stdhep>]> 53.4534900188
3935 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell1 testMethod=test_config>]> 0.0454940795898
3936-<__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_madweight.Testmadweight testMethod=test_tt_semi>]> 8.710709095
3937 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMultiProcessTest testMethod=test_decay_chain_different_order2>]> 0.0539619922638
3938 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_amp.ColorSquareTest testMethod=test_color_matrix_Nc_restrictions>]> 0.0706989765167
3939 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DiagramGenerationTest testMethod=test_expand_list_list>]> 0.00169205665588
3940@@ -440,6 +450,7 @@
3941 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_generate_events_shower_scripts>]> 31.1297941208
3942 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.UFO_model_to_mg4_Test testMethod=test_case_sensitive>]> 0.122036933899
3943 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestMultVariable testMethod=testequality>]> 0.000127077102661
3944+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.Test_ADDON_UFO testMethod=test_add_external_parameters>]> 0.00169491767883
3945 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestLinkRBConfSM testMethod=test_link_uuddg_uudd>]> 0.0242109298706
3946 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_IOTest_examples.IOTest_SimpleExamples testMethod=testIO_MyCustomNameIOTestWrappedWithReturnPath>]> 0.00258612632751
3947 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.ProcessTest testMethod=test_representation>]> 0.00148892402649
3948@@ -449,7 +460,7 @@
3949 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.test_aloha_creation testMethod=test_use_of_library_spin2>]> 0.103766918182
3950 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestLorentzObjectRepresentation testMethod=testtensorialproductspin>]> 0.070338010788
3951 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestLorentzObjectRepresentation testMethod=testeinsteinsum2>]> 0.00269603729248
3952-<__main__.TestSuiteModified tests=[<tests.unit_tests.madweight.test_permutation.TestPermutation testMethod=test_all_permutation>]> 0.000955820083618
3953+<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.InteractionTest testMethod=test_setget_interaction_correct>]> 0.000202894210815
3954 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestLinkRBConfSM testMethod=test_link_ddxwpduxgg_gdxwpuxgg>]> 1.28763198853
3955 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_IdentifyHelasTag testMethod=test_helas_helpers>]> 0.0438580513
3956 <__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_with_old_mg5_version.OLDMG5Comparator testMethod=test_mg5_sm_22>]> 360.097683191
3957@@ -500,7 +511,10 @@
3958 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_calculate_xsect_lo>]> 26.0977950096
3959 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_base.TestFKSProcess testMethod=test_FKSRealProcess_init>]> 0.0786809921265
3960 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_helas_diagrams_gg_gogo_go_tt1x_t_wpb>]> 0.0463981628418
3961+<<<<<<< TREE
3962 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.MultiProcessTest testMethod=test_heft_multiparticle_pp_hnj>]> 0.326533079147
3963+=======
3964+>>>>>>> MERGE-SOURCE
3965 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_save_load>]> 1.68547606468
3966 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_diagram_generation.LoopDiagramFDStructTest testMethod=test_gg_5gglgl_bubble_tag>]> 0.00427198410034
3967 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_generate_helas_diagrams_ea_ae>]> 0.0131080150604
3968@@ -512,6 +526,7 @@
3969 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestFeynmanDiagram testMethod=test_no_cutting_line>]> 0.0152459144592
3970 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_drawing.TestLoopDrawer testMethod=test_loop_convert_diagram>]> 0.000792026519775
3971 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestLinkRBConfHEFT testMethod=test_sort_proc>]> 0.0744910240173
3972+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.TestModUFO2 testMethod=test_add_particle>]> 0.00068187713623
3973 <__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_with_old_mg5_version.OLDMG5Comparator testMethod=test_short_mssm>]> 11.2124068737
3974 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.InteractionTest testMethod=test_setget_interaction_exceptions>]> 0.000231027603149
3975 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_save_model.IOSaveModel testMethod=test_interaction_save>]> 0.000285148620605
3976@@ -524,7 +539,7 @@
3977 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMultiProcessTest testMethod=test_multistage_decay_chain_process>]> 0.203777074814
3978 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_4fermion_models.TestTchannelModels testMethod=test_uu_to_tt_tch>]> 7.79628753662e-05
3979 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_check_param_card.TestConvertSLAH testMethod=test_convert_to_mg5>]> 0.0130620002747
3980-<__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_import_banner_command>]> 1.45100903511
3981+<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DiagramGenerationTest testMethod=test_decay_process_generation>]> 0.0119822025299
3982 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_diagram_symmetry.TestDiagramSymmetry testMethod=test_find_symmetry_gg_tt_fullylept>]> 0.189878940582
3983 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_check_param_card.TestParamCard testMethod=test_mod_param>]> 0.000418901443481
3984 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestLorentzObjectRepresentation testMethod=test_split>]> 0.00737619400024
3985@@ -538,6 +553,7 @@
3986 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_output_madevent_directory>]> 16.0076999664
3987 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayModel testMethod=test_find_vertexlist>]> 1.92569303513
3988 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.VertexTest testMethod=test_values_for_prop>]> 8.10623168945e-05
3989+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=testsumaddvar>]> 0.000104904174805
3990 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=testsumaddint>]> 9.20295715332e-05
3991 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestSimplify testMethod=testsimplifyMultLorentz>]> 0.0104720592499
3992 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_helas_objects.testFKSHelasObjects testMethod=test_fks_helas_real_process_init>]> 0.16713809967
3993@@ -547,6 +563,7 @@
3994 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMultiProcessTest testMethod=test_majorana_decay_chain_process>]> 0.136888980865
3995 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_4fermion_models.TestTchannelModels testMethod=test_uu_to_ttg_tch>]> 4.60147857666e-05
3996 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DiagramGenerationTest testMethod=test_forbidden_s_channel_uux_uuxng>]> 0.0782489776611
3997+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.TestModUFO2 testMethod=test_add_external_parameters>]> 0.00142097473145
3998 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestLorentzObjectRepresentation testMethod=testgetrepresentation>]> 0.00228095054626
3999 <__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_with_old_mg5_version.OLDMG5Comparator testMethod=test_mg5_sm_23_p3>]> 27.4707448483
4000 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_fks.IOExportFKSTest testMethod=test_write_matrix_element_fks>]> 0.0163419246674
4001@@ -577,7 +594,6 @@
4002 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_generate_helas_diagrams_uux_gepem_no_optimization>]> 0.0196721553802
4003 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_diquark_models.TestColorSextetModel testMethod=test_uu_to_six_g>]> 0.172813892365
4004 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_cpp.IOExportPythia8Test testMethod=test_write_cpp_go_process_cc_file>]> 0.0690608024597
4005-<__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_split_evt_gen_zeroev>]> 67.6156620979
4006 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.testLorentzObject testMethod=testTraceofObject>]> 0.000325918197632
4007 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_cpp.IOExportPythia8Test testMethod=test_write_process_h_file>]> 0.0427629947662
4008 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_leshouche_sextet_diquarks>]> 2.94189381599
4009@@ -587,12 +603,12 @@
4010 <__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_with_old_mg5_version.OLDMG5Comparator testMethod=test_mg5_sm_23_p2>]> 750.973557949
4011 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_cmd.TestInstall testMethod=test_install_update>]> 0.00136995315552
4012 <__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_cmd.TestValidCmd testMethod=test_shell_and_continuation_line>]> 0.0123059749603
4013-<__main__.TestSuiteModified tests=[<tests.unit_tests.madweight.test_export_v4.TestMadWeight testMethod=test_ungrouping_lepton>]> 0.0430071353912
4014 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.MultiProcessTest testMethod=test_multiparticle_mirror_pp_3j>]> 0.479301929474
4015 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_diagram_symmetry.TestDiagramSymmetry testMethod=test_rotate_momenta>]> 0.533701896667
4016 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_fks.IOExportFKSTest testMethod=test_get_fks_j_from_i_lines>]> 2.00525093079
4017 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_madevent_subproc_group_decay_chain>]> 8.28355312347
4018 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_pythonwriter_C>]> 0.0504019260406
4019+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.Test_ADDON_UFO testMethod=test_couplings>]> 0.000942945480347
4020 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_pythonwriter_Plorentz>]> 0.0568020343781
4021 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DiagramGenerationTest testMethod=test_diagram_generation_ue_dve>]> 0.00433206558228
4022 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_link_to_ufo.TestUFOExpressionParsers testMethod=test_parse_to_fortran>]> 0.0236949920654
4023@@ -613,7 +629,6 @@
4024 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayParticle testMethod=test_values_for_prop>]> 0.110687971115
4025 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_helas_objects.testFKSHelasObjects testMethod=test_get_fks_info_list>]> 0.993493080139
4026 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestVertexPoint testMethod=test_isexternal>]> 0.000101089477539
4027-<__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_launch_amcatnlo_name>]> 49.5285630226
4028 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_change_number_format_fortran>]> 0.000572919845581
4029 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_madevent.TestMEfromfile testMethod=test_decay_width_nlo_model>]> 14.2313911915
4030 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_generate_helas_diagrams_uu_susu>]> 0.0135440826416
4031@@ -630,7 +645,7 @@
4032 <__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_gauge.GaugeComparator testMethod=test_gauge_2>]> 400.482264042
4033 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_pythonwriter_4_fermion>]> 0.0460660457611
4034 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_drawing_eps.TestDrawingOption testMethod=test_option_6g_second>]> 0.0498158931732
4035-<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.InteractionTest testMethod=test_setget_interaction_correct>]> 0.000202894210815
4036+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_import_ufo.TestImportUFONoSideEffect testMethod=test_ImportUFONoSideEffectLO>]> 0.00247716903687
4037 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.ModelTest testMethod=test_setget_model_error>]> 0.000347852706909
4038 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_FO_analyse_card.TestFOAnalyseCard testMethod=test_analyse_card_analyse>]> 0.000509977340698
4039 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_generate_loop.TestGenerateLoopFKS testMethod=test_generate_virtuals_single_process>]> 1.24343204498
4040@@ -646,9 +661,13 @@
4041 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_generate_events_lo_hw6_stdhep>]> 10.500576973
4042 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.testLorentzObject testMethod=test_spin2propagator3>]> 0.0653259754181
4043 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestLinkRBConfSM testMethod=test_link_butdg_butd>]> 0.0965809822083
4044-<__main__.TestSuiteModified tests=[<tests.parallel_tests.test_madweight.TestMadWeight testMethod=test_short_mw_tt_full_lept>]> 29.0376198292
4045 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_IdentifyHelasTag testMethod=test_helas_comparison>]> 0.225214958191
4046-<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_write_param.TestParamWrittingWithRestrict testMethod=test_define_not_dep_param>]> 0.0751221179962
4047+<<<<<<< TREE
4048+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_write_param.TestParamWrittingWithRestrict testMethod=test_define_not_dep_param>]> 0.0751221179962
4049+=======
4050+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_write_param.TestParamWrittingWithRestrict testMethod=test_define_not_dep_param>]> 0.0751221179962
4051+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.Test_ADDON_UFO testMethod=test_interaction>]> 0.000688076019287
4052+>>>>>>> MERGE-SOURCE
4053 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_fks.IOExportFKSTest testMethod=test_write_b_sf_fks>]> 2.02799201012
4054 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.MultiProcessTest testMethod=test_representation>]> 0.00421714782715
4055 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_fks.IOExportFKSTest testMethod=test_write_leshouche_info_file>]> 0.0922110080719
4056@@ -663,26 +682,29 @@
4057 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_madevent.TestMEfromPdirectory testMethod=test_run_fromP>]> 21.0784730911
4058 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.MultiProcessTest testMethod=test_wrong_multiparticle>]> 0.00848388671875
4059 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.DiagramTest testMethod=test_setget_diagram_correct>]> 9.48905944824e-05
4060-<__main__.TestSuiteModified tests=[<tests.unit_tests.madweight.test_export_v4.TestMadWeight testMethod=test_modification_to_cuts>]> 0.0898389816284
4061+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestVariable testMethod=testsumvarvar>]> 6.89029693604e-05
4062 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_fks.IOExportFKSTest testMethod=test_den_factor_lines>]> 2.02332401276
4063 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_check_generate_eventsnlo_py6pt_fsr>]> 16.2141349316
4064 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.MultiProcessTest testMethod=test_setget_process_exceptions>]> 0.000932931900024
4065 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasAmplitudeTest testMethod=test_setget_amplitude_exceptions>]> 0.000211000442505
4066 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_aloha_MP_mode>]> 0.0349721908569
4067+<<<<<<< TREE
4068 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMatrixElementTest testMethod=test_setget_matrix_element_exceptions>]> 0.00100207328796
4069+=======
4070+<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorObjectTest testMethod=test_delta6_simplify>]> 8.51154327393e-05
4071+>>>>>>> MERGE-SOURCE
4072 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_AbstractModel testMethod=test_add_ab_particle>]> 0.127122163773
4073 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.MultiLegTest testMethod=test_setget_multi_leg_correct>]> 6.60419464111e-05
4074 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMatrixElementTest testMethod=test_complicated_majorana_process>]> 0.110619068146
4075 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestMultVariable testMethod=testdealingwithpower1>]> 0.000165939331055
4076-<__main__.TestSuiteModified tests=[<tests.unit_tests.madweight.test_permutation.TestPermutation testMethod=test_permutation_from_id>]> 0.0379128456116
4077 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DiagramGenerationTest testMethod=test_diagram_generation_identical_interactions>]> 0.0405609607697
4078 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_madevent.TestMECmdShell testMethod=test_width_computation>]> 13.0126650333
4079-<__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_check_html_long_process_strings>]> 20.4391908646
4080 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_shower_card.TestShowerCard testMethod=test_shower_card_py8>]> 0.000524997711182
4081 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_madevent.TestMEfromfile testMethod=test_add_time_of_flight>]> 19.5163040161
4082 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayModel testMethod=test_setget>]> 2.0447640419
4083 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_invalid_operations_for_output>]> 0.0474369525909
4084 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.testLorentzObject testMethod=test_spin2propagator2>]> 0.152077913284
4085+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.Test_ADDON_UFO testMethod=test_add_particle>]> 0.000722885131836
4086 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_fks.IOExportFKSTest testMethod=test_write_leshouche_file>]> 0.00247812271118
4087 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_generate_events_lo_hwpp_set>]> 29.2329268456
4088 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_read_madgraph4_proc_card>]> 0.877720832825
4089@@ -704,7 +726,6 @@
4090 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestFKSCommon testMethod=test_split_leg>]> 0.00107002258301
4091 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestVariable testMethod=testrsumvarvar>]> 7.60555267334e-05
4092 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorStringTest testMethod=test_complex_conjugate>]> 8.20159912109e-05
4093-<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.test_aloha_creation testMethod=test_aloha_VVS>]> 0.0273261070251
4094 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_group_subprocs.SubProcessGroupTest testMethod=test_special_group_decay_chain>]> 0.162132024765
4095 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_helas_objects.testFKSHelasObjects testMethod=test_fks_helas_multi_process_ppz>]> 1.70217895508
4096 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.AmplitudeTest testMethod=test_setget_amplitude_correct>]> 0.00019097328186
4097@@ -715,7 +736,7 @@
4098 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayModel testMethod=test_particles_type>]> 1.96593403816
4099 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DecayChainAmplitudeTest testMethod=test_unused_decays_in_decay_chain_pp_jj>]> 0.199378967285
4100 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestFKSCommon testMethod=test_find_splittings>]> 0.0126750469208
4101-<__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_madweight.Testmadweight testMethod=test_zh>]> 8.19490408897
4102+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=test_factorization>]> 0.000458955764771
4103 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_import_ufo.TestRestrictModel testMethod=test_locate_couplings>]> 0.0886061191559
4104 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_model_reader.TestModelReader testMethod=test_set_parameters_and_couplings>]> 0.0923321247101
4105 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_import_ufo.TestImportUFO testMethod=test_expansion_order>]> 0.0448379516602
4106@@ -723,15 +744,13 @@
4107 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_diagram_generation.LoopDiagramGenerationTest testMethod=test_CT_vertices_generation_gg_gg>]> 1.53292918205
4108 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_generate_helas_diagrams_WWWWA>]> 0.132983922958
4109 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.ModelTest testMethod=test_pass_in_standard_name>]> 0.0025041103363
4110-<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=test_factorization>]> 0.000458955764771
4111-<__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_with_old_mg5_version.OLDMG5Comparator testMethod=test_short_cross_sm3>]> 36.7921011448
4112 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMatrixElementTest testMethod=test_multi_amp_majorana_process>]> 0.00927495956421
4113 <__main__.TestSuiteModified tests=[<tests.unit_tests.loop.test_loop_helas_objects.LoopHelasMatrixElementTest testMethod=test_helas_diagrams_gg_ggg>]> 0.551722049713
4114 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_IOTest_examples.IOTestExampleWithSetUp testMethod=testIO_MyHandwrittenIOTest>]> 0.000919103622437
4115 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestVariable testMethod=testmultvarMult>]> 8.82148742676e-05
4116 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_import_v4.IOImportV4Test testMethod=test_full_import>]> 0.0387060642242
4117 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_algebra.ColorStringTest testMethod=test_from_immutable>]> 0.000111818313599
4118-<__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_with_old_mg5_version.OLDMG5Comparator testMethod=test_short_heft>]> 10.1859381199
4119+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_usermod.TestModUFO testMethod=test_write_model>]> 0.0592589378357
4120 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_generate_helas_diagrams_gb_t1go_tttxn1x1m>]> 0.135241031647
4121 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.ProcessDefinitionTest testMethod=test_values_for_prop>]> 0.000351905822754
4122 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestFeynmanDiagram testMethod=test_creation_from_cmd>]> 0.0318400859833
4123@@ -767,12 +786,12 @@
4124 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestMultVariable testMethod=test_obj_are_not_modified>]> 0.000224113464355
4125 <__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_cmd.TestValidCmd testMethod=test_check_generate>]> 0.00097393989563
4126 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestFKSCommon testMethod=test_find_particles_interactions_no_ghosts>]> 0.457952976227
4127-<__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_madweight.TestMadWeight testMethod=test_mw_wjjproduction>]> 14.5608379841
4128+<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.MultiProcessTest testMethod=test_heft_multiparticle_pp_hnj>]> 0.326533079147
4129 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestFKSCommon testMethod=test_legs_to_color_link_string>]> 0.00512909889221
4130 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestFKSCommon testMethod=test_sort_fksleglist>]> 0.00221490859985
4131 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_rambo.test_wavefunctions testMethod=test_I>]> 0.000235080718994
4132 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_4fermion_models.TestSchannelModels testMethod=test_uu_to_tt_sch>]> 0.152179956436
4133-<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAddVariable testMethod=testsumaddvar>]> 0.000104904174805
4134+<__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestFeynmanDiagram testMethod=test_creation_from_cmd>]> 0.0318400859833
4135 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.LegTest testMethod=test_representation>]> 7.29560852051e-05
4136 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_files.TestFilesGestion testMethod=test_is_uptodate>]> 1.0137488842
4137 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestAlohaWriter testMethod=test_aloha_get_name>]> 0.030855178833
4138@@ -788,8 +807,6 @@
4139 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_diagram_symmetry.TestDiagramSymmetry testMethod=test_find_symmetry_qq_qqg_with_subprocess_group>]> 0.406945943832
4140 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_check_param_card.TestParamCardRule testMethod=test_check_param>]> 0.0894939899445
4141 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestSomeObjectProperty testMethod=test_other>]> 4.31537628174e-05
4142-<__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_edit_card.TestEditCardCmd testMethod=test_modif_run_card>]> 0.0163931846619
4143-<__main__.TestSuiteModified tests=[<tests.unit_tests.interface.test_madevent.TestMadEventCmd testMethod=test_card_type_recognition>]> 0.0509171485901
4144 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_vector_clash_majorana_process>]> 0.012188911438
4145 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd.TestCmdShell2 testMethod=test_output_standalone_directory>]> 8.03073692322
4146 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayModel testMethod=test_find_full_sm_decay_groups>]> 5.82679080963
4147@@ -799,26 +816,24 @@
4148 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_import_ufo.TestRestrictModel testMethod=test_remove_couplings>]> 0.0872521400452
4149 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_group_subprocs.SubProcessGroupTest testMethod=test_single_decay_combinations>]> 0.0449919700623
4150 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_decay.Test_DecayParticle testMethod=test_setgetinit_exceptions>]> 0.111714839935
4151-<__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestLinkRBConfSM testMethod=test_link_udxwpg_udxwp>]> 0.0118889808655
4152+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestMultVariable testMethod=testmultmultint>]> 0.000134944915771
4153 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasWavefunctionTest testMethod=test_values_for_prop>]> 0.000183820724487
4154 <__main__.TestSuiteModified tests=[<tests.unit_tests.madspin.test_madspin.TestBanner testMethod=test_extract_info>]> 0.00151705741882
4155-<__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_ufo_parsers.UFOParserTest testMethod=test_parse_info_str_error>]> 0.0325899124146
4156+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.test_aloha_creation testMethod=test_aloha_VVS>]> 0.0273261070251
4157 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_shower_card.TestShowerCard testMethod=test_shower_card_py6>]> 0.000173807144165
4158-<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestVariable testMethod=testsumvarvar>]> 6.89029693604e-05
4159+<__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.testLorentzObject testMethod=test_mass_overmass>]> 0.00163412094116
4160 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_python.IOExportPythonTest testMethod=test_get_python_matrix_methods>]> 0.0204730033875
4161 <__main__.TestSuiteModified tests=[<tests.unit_tests.madspin.test_madspin.TestEvent testMethod=test_madspin_event>]> 0.00227999687195
4162 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_helas_objects.HelasMatrixElementTest testMethod=test_fermionfactor_epem_sepsemepem>]> 0.074609041214
4163 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_aloha.TestSomeObjectProperty testMethod=testGammaAlgebraDefinition>]> 1.01560497284
4164 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_color_amp.ColorAmpTest testMethod=test_color_flow_string_epsilon>]> 0.00355815887451
4165 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_drawing.TestVertexPoint testMethod=test_add_line>]> 0.000107049942017
4166-<__main__.TestSuiteModified tests=[<tests.parallel_tests.compare_with_old_mg5_version.OLDMG5Comparator testMethod=test_short_cross_sm1>]> 38.1165001392
4167 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_diagram_generation.DiagramGenerationTest testMethod=test_diagram_generation_uux_gg>]> 0.00705409049988
4168 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestFKSDiagramTag testMethod=test_reorder_permutation>]> 5.41210174561e-05
4169 <__main__.TestSuiteModified tests=[<tests.unit_tests.fks.test_fks_common.TestLinkRBConfSM testMethod=test_link_uuuug_guug>]> 0.0394339561462
4170 <__main__.TestSuiteModified tests=[<tests.unit_tests.various.test_check_param_card.TestParamCardRule testMethod=test_read_write_param_card>]> 0.00176000595093
4171 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_v4.FullHelasOutputTest testMethod=test_configs_4f_decay>]> 0.0363750457764
4172 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_misc.IOMiscTest testMethod=test_parse_info_str_correct>]> 0.000116109848022
4173-<__main__.TestSuiteModified tests=[<tests.parallel_tests.test_madweight.TestMadWeight testMethod=test_short_mw_wa>]> 11.9575219154
4174 <__main__.TestSuiteModified tests=[<tests.unit_tests.core.test_base_objects.LegTest testMethod=test_setget_leg_exceptions>]> 0.000114917755127
4175 <__main__.TestSuiteModified tests=[<tests.unit_tests.iolibs.test_export_fks.IOExportFKSTest testMethod=test_write_nexternal_file>]> 0.000472784042358
4176 <__main__.TestSuiteModified tests=[<tests.acceptance_tests.test_cmd_amcatnlo.TestMECmdShell testMethod=test_check_ppzjj>]> 59.9299731255
4177
4178=== modified file 'tests/unit_tests/various/test_import_ufo.py'
4179--- tests/unit_tests/various/test_import_ufo.py 2013-11-29 07:28:53 +0000
4180+++ tests/unit_tests/various/test_import_ufo.py 2014-03-24 03:30:32 +0000
4181@@ -25,6 +25,7 @@
4182 import models.import_ufo as import_ufo
4183 import models.model_reader as model_reader
4184 import madgraph.iolibs.export_v4 as export_v4
4185+import models as ufomodels
4186
4187 _file_path = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]
4188
4189@@ -74,6 +75,61 @@
4190 model = import_ufo.import_model(sm_path + '-no_masses')
4191 self.assertEqual(model.get_nflav(), 5)
4192
4193+class TestImportUFONoSideEffect(unittest.TestCase):
4194+ """Test class for the the possible side effect on a UFO model loaded when
4195+ converting it to a MG5 model"""
4196+
4197+ def test_ImportUFONoSideEffectLO(self):
4198+ """Checks that there are no side effects of the import of the LO UFO sm"""
4199+ ufo_model = ufomodels.load_model(import_ufo.find_ufo_path('sm'),False)
4200+ original_all_particles = copy.copy(ufo_model.all_particles)
4201+ original_all_vertices = copy.copy(ufo_model.all_vertices)
4202+ original_all_couplings = copy.copy(ufo_model.all_couplings)
4203+ original_all_lorentz = copy.copy(ufo_model.all_lorentz)
4204+ original_all_parameters = copy.copy(ufo_model.all_parameters)
4205+ original_all_orders = copy.copy(ufo_model.all_orders)
4206+ original_all_functions = copy.copy(ufo_model.all_functions)
4207+
4208+ ufo2mg5_converter = import_ufo.UFOMG5Converter(ufo_model)
4209+ model = ufo2mg5_converter.load_model()
4210+ parameters, couplings = import_ufo.OrganizeModelExpression(ufo_model).main()
4211+
4212+ self.assertEqual(original_all_particles,ufo_model.all_particles)
4213+ self.assertEqual(original_all_vertices,ufo_model.all_vertices)
4214+ self.assertEqual(original_all_couplings,ufo_model.all_couplings)
4215+ self.assertEqual(original_all_lorentz,ufo_model.all_lorentz)
4216+ self.assertEqual(original_all_parameters,ufo_model.all_parameters)
4217+ self.assertEqual(original_all_orders,ufo_model.all_orders)
4218+ self.assertEqual(original_all_functions,ufo_model.all_functions)
4219+
4220+ def test_ImportUFONoSideEffectNLO(self):
4221+ """Checks that there are no side effects of the import of the NLO UFO sm"""
4222+ ufo_model = ufomodels.load_model(import_ufo.find_ufo_path('loop_sm'),False)
4223+ original_all_particles = copy.copy(ufo_model.all_particles)
4224+ original_all_vertices = copy.copy(ufo_model.all_vertices)
4225+ original_all_couplings = copy.copy(ufo_model.all_couplings)
4226+ original_all_lorentz = copy.copy(ufo_model.all_lorentz)
4227+ original_all_parameters = copy.copy(ufo_model.all_parameters)
4228+ original_all_orders = copy.copy(ufo_model.all_orders)
4229+ original_all_functions = copy.copy(ufo_model.all_functions)
4230+ original_all_CTvertices = copy.copy(ufo_model.all_CTvertices)
4231+ original_all_CTparameters = copy.copy(ufo_model.all_CTparameters)
4232+
4233+
4234+ ufo2mg5_converter = import_ufo.UFOMG5Converter(ufo_model)
4235+ model = ufo2mg5_converter.load_model()
4236+ parameters, couplings = import_ufo.OrganizeModelExpression(ufo_model).main()
4237+
4238+ self.assertEqual(original_all_particles,ufo_model.all_particles)
4239+ self.assertEqual(original_all_vertices,ufo_model.all_vertices)
4240+# self.assertEqual(original_all_couplings,ufo_model.all_couplings)
4241+ self.assertEqual(original_all_lorentz,ufo_model.all_lorentz)
4242+ self.assertEqual(original_all_parameters,ufo_model.all_parameters)
4243+ self.assertEqual(original_all_orders,ufo_model.all_orders)
4244+ self.assertEqual(original_all_functions,ufo_model.all_functions)
4245+ self.assertEqual(original_all_CTvertices,ufo_model.all_CTvertices)
4246+ self.assertEqual(original_all_CTparameters,ufo_model.all_CTparameters)
4247+
4248 #===============================================================================
4249 # TestRestrictModel
4250 #===============================================================================
4251
4252=== added file 'tests/unit_tests/various/test_usermod.py'
4253--- tests/unit_tests/various/test_usermod.py 1970-01-01 00:00:00 +0000
4254+++ tests/unit_tests/various/test_usermod.py 2014-03-24 03:30:32 +0000
4255@@ -0,0 +1,883 @@
4256+################################################################################
4257+#
4258+# Copyright (c) 2009 The MadGraph Development team and Contributors
4259+#
4260+# This file is a part of the MadGraph 5 project, an application which
4261+# automatically generates Feynman diagrams and matrix elements for arbitrary
4262+# high-energy processes in the Standard Model and beyond.
4263+#
4264+# It is subject to the MadGraph license which should accompany this
4265+# distribution.
4266+#
4267+# For more information, please visit: http://madgraph.phys.ucl.ac.be
4268+#
4269+################################################################################
4270+"""Unit test Library for importing and restricting model"""
4271+from __future__ import division
4272+
4273+import copy
4274+import os
4275+import sys
4276+import time
4277+import tempfile
4278+import shutil
4279+
4280+import tests.unit_tests as unittest
4281+import madgraph.core.base_objects as base_objects
4282+import models.import_ufo as import_ufo
4283+import models.usermod as usermod
4284+import models.model_reader as model_reader
4285+import madgraph.iolibs.export_v4 as export_v4
4286+
4287+_file_path = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]
4288+pjoin = os.path.join
4289+
4290+import cmath
4291+
4292+#
4293+# UFO CLASS SINCE THEY WILL BE USEFULL!
4294+#
4295+
4296+class UFOBaseClass(object):
4297+ """The class from which all FeynRules classes are derived."""
4298+
4299+ require_args = []
4300+
4301+ def __init__(self, *args, **options):
4302+ assert(len(self.require_args) == len (args))
4303+
4304+ for i, name in enumerate(self.require_args):
4305+ setattr(self, name, args[i])
4306+
4307+ for (option, value) in options.items():
4308+ setattr(self, option, value)
4309+
4310+ def get(self, name):
4311+ return getattr(self, name)
4312+
4313+ def set(self, name, value):
4314+ setattr(self, name, value)
4315+
4316+ def get_all(self):
4317+ """Return a dictionary containing all the information of the object"""
4318+ return self.__dict__
4319+
4320+ def __str__(self):
4321+ return self.name
4322+
4323+ def nice_string(self):
4324+ """ return string with the full information """
4325+ return '\n'.join(['%s \t: %s' %(name, value) for name, value in self.__dict__.items()])
4326+
4327+ def __repr__(self):
4328+ replacements = [
4329+ ('+','__plus__'),
4330+ ('-','__minus__'),
4331+ ('@','__at__'),
4332+ ('!','__exclam__'),
4333+ ('?','__quest__'),
4334+ ('*','__star__'),
4335+ ('~','__tilde__')
4336+ ]
4337+ text = self.name
4338+ for orig,sub in replacements:
4339+ text = text.replace(orig,sub)
4340+ return text
4341+
4342+
4343+
4344+all_particles = []
4345+
4346+
4347+
4348+class Particle(UFOBaseClass):
4349+ """A standard Particle"""
4350+
4351+ require_args=['pdg_code', 'name', 'antiname', 'spin', 'color', 'mass', 'width', 'texname', 'antitexname', 'charge']
4352+
4353+ require_args_all = ['pdg_code', 'name', 'antiname', 'spin', 'color', 'mass', 'width', 'texname', 'antitexname', 'charge', 'line', 'propagating', 'goldstoneboson']
4354+
4355+ def __init__(self, pdg_code, name, antiname, spin, color, mass, width, texname,
4356+ antitexname, charge , line=None, propagating=True, goldstoneboson=False, **options):
4357+
4358+ args= (pdg_code, name, antiname, spin, color, mass, width, texname,
4359+ antitexname, float(charge))
4360+
4361+ UFOBaseClass.__init__(self, *args, **options)
4362+
4363+ global all_particles
4364+ all_particles.append(self)
4365+
4366+ self.propagating = propagating
4367+ self.goldstoneboson= goldstoneboson
4368+
4369+ self.selfconjugate = (name == antiname)
4370+ if 1: #not line:
4371+ self.line = self.find_line_type()
4372+ else:
4373+ self.line = line
4374+
4375+
4376+
4377+
4378+ def find_line_type(self):
4379+ """ find how we draw a line if not defined
4380+ valid output: dashed/straight/wavy/curly/double/swavy/scurly
4381+ """
4382+
4383+ spin = self.spin
4384+ color = self.color
4385+
4386+ #use default
4387+ if spin == 1:
4388+ return 'dashed'
4389+ elif spin == 2:
4390+ if not self.selfconjugate:
4391+ return 'straight'
4392+ elif color == 1:
4393+ return 'swavy'
4394+ else:
4395+ return 'scurly'
4396+ elif spin == 3:
4397+ if color == 1:
4398+ return 'wavy'
4399+
4400+ else:
4401+ return 'curly'
4402+ elif spin == 5:
4403+ return 'double'
4404+ elif spin == -1:
4405+ return 'dotted'
4406+ else:
4407+ return 'dashed' # not supported yet
4408+
4409+ def anti(self):
4410+ if self.selfconjugate:
4411+ raise Exception('%s has no anti particle.' % self.name)
4412+ outdic = {}
4413+ for k,v in self.__dict__.iteritems():
4414+ if k not in self.require_args_all:
4415+ outdic[k] = -v
4416+ if self.color in [1,8]:
4417+ newcolor = self.color
4418+ else:
4419+ newcolor = -self.color
4420+
4421+ return Particle(-self.pdg_code, self.antiname, self.name, self.spin, newcolor, self.mass, self.width,
4422+ self.antitexname, self.texname, -self.charge, self.line, self.propagating, self.goldstoneboson, **outdic)
4423+
4424+
4425+
4426+all_parameters = []
4427+
4428+class Parameter(UFOBaseClass):
4429+
4430+ require_args=['name', 'nature', 'type', 'value', 'texname']
4431+
4432+ def __init__(self, name, nature, type, value, texname, lhablock=None, lhacode=None):
4433+
4434+ args = (name,nature,type,value,texname)
4435+
4436+ UFOBaseClass.__init__(self, *args)
4437+
4438+ args=(name,nature,type,value,texname)
4439+
4440+ global all_parameters
4441+ all_parameters.append(self)
4442+
4443+ if (lhablock is None or lhacode is None) and nature == 'external':
4444+ raise Exception('Need LHA information for external parameter "%s".' % name)
4445+ self.lhablock = lhablock
4446+ self.lhacode = lhacode
4447+
4448+all_vertices = []
4449+
4450+class Vertex(UFOBaseClass):
4451+
4452+ require_args=['name', 'particles', 'color', 'lorentz', 'couplings']
4453+
4454+ def __init__(self, name, particles, color, lorentz, couplings, **opt):
4455+
4456+ args = (name, particles, color, lorentz, couplings)
4457+
4458+ UFOBaseClass.__init__(self, *args, **opt)
4459+
4460+ args=(particles,color,lorentz,couplings)
4461+
4462+ global all_vertices
4463+ all_vertices.append(self)
4464+
4465+all_couplings = []
4466+
4467+class Coupling(UFOBaseClass):
4468+
4469+ require_args=['name', 'value', 'order']
4470+
4471+ def __init__(self, name, value, order, **opt):
4472+
4473+ args =(name, value, order)
4474+ UFOBaseClass.__init__(self, *args, **opt)
4475+ global all_couplings
4476+ all_couplings.append(self)
4477+
4478+
4479+
4480+all_lorentz = []
4481+
4482+class Lorentz(UFOBaseClass):
4483+
4484+ require_args=['name','spins','structure']
4485+
4486+ def __init__(self, name, spins, structure='external', **opt):
4487+ args = (name, spins, structure)
4488+ UFOBaseClass.__init__(self, *args, **opt)
4489+
4490+ global all_lorentz
4491+ all_lorentz.append(self)
4492+
4493+
4494+all_functions = []
4495+
4496+class Function(object):
4497+
4498+ def __init__(self, name, arguments, expression):
4499+
4500+ global all_functions
4501+ all_functions.append(self)
4502+
4503+ self.name = name
4504+ self.arguments = arguments
4505+ self.expr = expression
4506+
4507+ def __call__(self, *opt):
4508+
4509+ for i, arg in enumerate(self.arguments):
4510+ exec('%s = %s' % (arg, opt[i] ))
4511+
4512+ return eval(self.expr)
4513+
4514+all_orders = []
4515+
4516+class CouplingOrder(object):
4517+
4518+ def __init__(self, name, expansion_order, hierarchy, perturbative_expansion = 0):
4519+
4520+ global all_orders
4521+ all_orders.append(self)
4522+
4523+ self.name = name
4524+ self.expansion_order = expansion_order
4525+ self.hierarchy = hierarchy
4526+
4527+all_decays = []
4528+
4529+class Decay(UFOBaseClass):
4530+ require_args = ['particle','partial_widths']
4531+
4532+ def __init__(self, particle, partial_widths, **opt):
4533+ args = (particle, partial_widths)
4534+ UFOBaseClass.__init__(self, *args, **opt)
4535+
4536+ global all_decays
4537+ all_decays.append(self)
4538+
4539+ # Add the information directly to the particle
4540+ particle.partial_widths = partial_widths
4541+
4542+all_form_factors = []
4543+
4544+class FormFactor(UFOBaseClass):
4545+ require_args = ['name','type','value']
4546+
4547+ def __init__(self, name, type, value, **opt):
4548+ args = (name, type, value)
4549+ UFOBaseClass.__init__(self, *args, **opt)
4550+
4551+ global all_form_factors
4552+ all_form_factors.append(self)
4553+
4554+
4555+
4556+#===============================================================================
4557+# Test The UFO usermod package
4558+#===============================================================================
4559+class TestModUFO(unittest.TestCase):
4560+ """Test class for the USERMOD object"""
4561+
4562+
4563+ def setUp(self):
4564+
4565+ self.path = tempfile.mkdtemp(prefix='unitest_usermod')
4566+
4567+ #Read the full SM
4568+ self.sm_path = import_ufo.find_ufo_path('sm')
4569+ self.base_model = usermod.UFOModel(self.sm_path)
4570+
4571+ def tearDown(self):
4572+
4573+ shutil.rmtree(self.path)
4574+
4575+
4576+ def test_write_model(self):
4577+ """ Check that we can write all the require UFO files """
4578+
4579+ output = pjoin(self.path, 'usrmod')
4580+ self.base_model.write(output)
4581+ sm_path = import_ufo.find_ufo_path('sm')
4582+ self.assertEqual(12,
4583+ len([1 for name in os.listdir(sm_path) if name.endswith('.py')]),
4584+ 'New file in UFO format, usrmod need to be modified')
4585+
4586+ self.assertEqual(11,
4587+ len([1 for name in os.listdir(output) if name.endswith('.py')]))
4588+
4589+ sys.path.insert(0, os.path.dirname(output))
4590+ import usrmod
4591+
4592+
4593+ def compare(self, text1, text2, optional=[], default={}):
4594+ """ """
4595+
4596+ texts= [text1, text2]
4597+ data = []
4598+
4599+ for text in texts:
4600+ curr_data = []
4601+ data.append(curr_data)
4602+ curr_object = {}
4603+ for line in text.split('\n'):
4604+ line = line.strip()
4605+ if line.endswith(',') or line.endswith(')'):
4606+ line = line[:-1]
4607+
4608+ if (line.count('=') == 2 and line.count('(') == 1):
4609+ if curr_object:
4610+ curr_data.append(curr_object)
4611+ curr_object = dict(default)
4612+ k,value = line.split('(')[1].split('=')
4613+ curr_object[k.strip()] = value.strip()
4614+ elif line.count('=') == 1:
4615+ k,value = line.split('=')
4616+ curr_object[k.strip()] = value.strip()
4617+ else:
4618+ if curr_object:
4619+ curr_data.append(curr_object)
4620+
4621+ for element in data[0]:
4622+ #print element, type(element)
4623+ for i in range(1, len(data)):
4624+ #for element2 in data[i]:
4625+ # print element2,
4626+ # if element == element2:
4627+ # print 'identical'
4628+ # break
4629+ # else:
4630+ # print 'different'
4631+ #else:
4632+ # self.assertFalse(True)
4633+ self.assertTrue(element in data[i])
4634+
4635+
4636+ def test_write_orders(self):
4637+ """Check that the content of the file is valid"""
4638+
4639+ output = self.path
4640+ self.base_model.write_orders(output)
4641+ filename = os.path.join(output, 'coupling_orders.py')
4642+ text = open(os.path.join(filename)).read()
4643+
4644+ target = """
4645+# This file was automatically created by The UFO_usermod
4646+
4647+from object_library import all_orders, CouplingOrder
4648+QCD = CouplingOrder(name = 'QCD',
4649+ expansion_order = 99,
4650+ hierarchy = 1,
4651+ perturbative_expansion = 0)
4652+
4653+
4654+QED = CouplingOrder(name = 'QED',
4655+ expansion_order = 99,
4656+ hierarchy = 2,
4657+ perturbative_expansion = 0)
4658+
4659+"""
4660+
4661+ self.compare(target, text, default={'perturbative_expansion':'0'})
4662+
4663+
4664+
4665+
4666+
4667+ def test_write_particles(self):
4668+ """Check that the content of the file is valid"""
4669+
4670+ output = self.path
4671+ self.base_model.write_particles(output)
4672+ filename = os.path.join(output, 'particles.py')
4673+ text = open(os.path.join(filename)).read()
4674+ target = open(pjoin(self.sm_path, 'particles.py')).read()
4675+
4676+
4677+
4678+ #format the ouptut
4679+ target = target.replace('0.0,','0,')
4680+ target = target.replace('1/3,','0.333333333333,')
4681+ target = target.replace('2/3,','0.666666666667,')
4682+ target = target.split('\n')
4683+ target = [l.strip() for l in target
4684+ if l.strip() and not l.strip().startswith('#') and
4685+ not l.split('=')[0].strip() in ['line', 'propagating', 'goldstoneboson', 'GoldstoneBoson','selfconjugate']]
4686+ duplicate = []
4687+ target = [l for l in target if not '.anti()' in l or duplicate.append(l.split('=')[0].strip())]
4688+
4689+ text = text.replace('.0,',',')
4690+ text = text.split('\n')
4691+ text = [l.strip() for l in text
4692+ if l.strip() and not l.strip().startswith('#') and
4693+ not l.split('=')[0].strip() in ['line', 'propagating', 'goldstoneboson', 'GoldstoneBoson','selfconjugate']]
4694+
4695+ keep = True
4696+ new_text = []
4697+ for line in text:
4698+ if 'Particle' in line:
4699+ if line.split('=')[0].strip() in duplicate:
4700+ keep = False
4701+ else:
4702+ keep = True
4703+ if not keep:
4704+ continue
4705+ else:
4706+ new_text.append(line)
4707+ text=new_text
4708+
4709+
4710+ self.assertEqual(target, text)
4711+
4712+ def test_write_vertices(self):
4713+ """Check that the content of the file is valid"""
4714+
4715+ output = self.path
4716+ self.base_model.vertices = self.base_model.vertices[:2]
4717+ self.base_model.write_vertices(output)
4718+ filename = os.path.join(output, 'vertices.py')
4719+ text = open(os.path.join(filename)).read()
4720+ target = """V_1 = Vertex(name = 'V_1',
4721+ particles = [P.G0, P.G0, P.G0, P.G0],
4722+ color = ['1'],
4723+ lorentz = [L.SSSS1],
4724+ couplings = {(0,0): C.GC_33})
4725+
4726+
4727+V_2 = Vertex(name = 'V_2',
4728+ particles = [P.G0, P.G0, P.G__minus__, P.G__plus__],
4729+ color = ['1'],
4730+ lorentz = [L.SSSS1],
4731+ couplings = {(0,0): C.GC_31})
4732+ """
4733+
4734+
4735+
4736+#===============================================================================
4737+# Test The UFO usermod package
4738+#===============================================================================
4739+class Test_ADDON_UFO(unittest.TestCase):
4740+ """Test class for the USERMOD object"""
4741+
4742+
4743+ def setUp(self):
4744+
4745+ self.path = tempfile.mkdtemp(prefix='unitest_usermod')
4746+
4747+ #Read the full SM
4748+ self.sm_path = import_ufo.find_ufo_path('sm')
4749+ self.base_model = usermod.UFOModel(self.sm_path)
4750+
4751+ def tearDown(self):
4752+
4753+ shutil.rmtree(self.path)
4754+
4755+ def test_add_particle(self):
4756+ """Check that we can an external parameter consistently"""
4757+
4758+ #ZERO is define in all model => we should just do nothing
4759+ ZERO = Parameter(name = 'ZERO',
4760+ nature = 'internal',
4761+ type = 'real',
4762+ value = '0.0',
4763+ texname = '0')
4764+
4765+ MH = Parameter(name = 'MH',
4766+ nature = 'external',
4767+ type = 'real',
4768+ value = 125,
4769+ texname = '\\text{MH}',
4770+ lhablock = 'MASS',
4771+ lhacode = [ 25 ])
4772+
4773+ WH = Parameter(name = 'WH',
4774+ nature = 'external',
4775+ type = 'real',
4776+ value = 125,
4777+ texname = '\\text{MH}',
4778+ lhablock = 'WIDTH',
4779+ lhacode = [ 25 ])
4780+
4781+ H = Particle(pdg_code = 25,
4782+ name = 'H',
4783+ antiname = 'H',
4784+ spin = 1,
4785+ color = 1,
4786+ mass = MH,
4787+ width = WH,
4788+ texname = 'H',
4789+ antitexname = 'H',
4790+ charge = 0,
4791+ GhostNumber = 0,
4792+ LeptonNumber = 0,
4793+ Y = 0)
4794+
4795+ number_particles = len(self.base_model.particles)
4796+
4797+ #Add a particle which is exactly the Higgs like in the Standard Model
4798+ self.base_model.add_particle(H)
4799+ self.assertEqual( number_particles, len(self.base_model.particles))
4800+
4801+ #Same name but different pid ->add but with rename
4802+ H = Particle(pdg_code = 26,
4803+ name = 'H',
4804+ antiname = 'H',
4805+ spin = 1,
4806+ color = 1,
4807+ mass = MH,
4808+ width = WH,
4809+ texname = 'H',
4810+ antitexname = 'H',
4811+ charge = 0,
4812+ GhostNumber = 0,
4813+ LeptonNumber = 0,
4814+ Y = 0)
4815+ self.base_model.add_particle(H)
4816+ self.assertEqual( number_particles+1, len(self.base_model.particles))
4817+ number_particles+=1
4818+ self.assertEqual(H.name, 'H__1')
4819+
4820+ #Different name and different pid keep it
4821+ H = Particle(pdg_code = 26,
4822+ name = 'H2',
4823+ antiname = 'H2',
4824+ spin = 1,
4825+ color = 1,
4826+ mass = MH,
4827+ width = WH,
4828+ texname = 'H',
4829+ antitexname = 'H',
4830+ charge = 0,
4831+ GhostNumber = 0,
4832+ LeptonNumber = 0,
4833+ Y = 0)
4834+ self.base_model.add_particle(H)
4835+ self.assertEqual( number_particles+1, len(self.base_model.particles))
4836+ number_particles+=1
4837+ self.assertEqual(H.name, 'H2')
4838+ #Different name But different pid.
4839+ H = Particle(pdg_code = 25,
4840+ name = 'H3',
4841+ antiname = 'H3',
4842+ spin = 1,
4843+ color = 1,
4844+ mass = MH,
4845+ width = WH,
4846+ texname = 'H',
4847+ antitexname = 'H',
4848+ charge = 0,
4849+ GhostNumber = 0,
4850+ LeptonNumber = 0,
4851+ Y = 0)
4852+ self.base_model.add_particle(H)
4853+ self.assertEqual( number_particles, len(self.base_model.particles))
4854+ #number_particles+=1
4855+ self.assertEqual(H.name, 'H3')
4856+
4857+ ###################################################
4858+ ## ALL THOSE TEST WERE NOT CHEKING MASS / WIDTH ##
4859+ ###################################################
4860+ # plugin to zero -> keep the one of the model
4861+ H = Particle(pdg_code = 25,
4862+ name = 'H',
4863+ antiname = 'H',
4864+ spin = 1,
4865+ color = 1,
4866+ mass = ZERO,
4867+ width = ZERO,
4868+ texname = 'H',
4869+ antitexname = 'H',
4870+ charge = 0,
4871+ GhostNumber = 0,
4872+ LeptonNumber = 0,
4873+ Y = 0)
4874+ self.base_model.add_particle(H)
4875+ self.assertEqual( number_particles, len(self.base_model.particles))
4876+ self.assertEqual(H.name, 'H')
4877+ self.assertEqual(H.mass.name, 'ZERO')
4878+ true_higgs = self.base_model.particle_dict[25]
4879+ self.assertEqual(true_higgs.name, 'H')
4880+ self.assertEqual(true_higgs.mass.name, 'MH')
4881+
4882+ # base_model to zero -> keep the one of the plugin
4883+ M5 = Parameter(name = 'M5',
4884+ nature = 'external',
4885+ type = 'real',
4886+ value = 125,
4887+ texname = '\\text{MH}',
4888+ lhablock = 'MASS',
4889+ lhacode = [ 5 ])
4890+ W5 = Parameter(name = 'W5',
4891+ nature = 'external',
4892+ type = 'real',
4893+ value = 125,
4894+ texname = '\\text{MH}',
4895+ lhablock = 'DECAY',
4896+ lhacode = [ 5 ])
4897+ B = Particle(pdg_code = 5,
4898+ name = 'B',
4899+ antiname = 'B~',
4900+ spin = 1,
4901+ color = 1,
4902+ mass = M5,
4903+ width = W5,
4904+ texname = 'H',
4905+ antitexname = 'H',
4906+ charge = 0,
4907+ GhostNumber = 0,
4908+ LeptonNumber = 0,
4909+ Y = 0)
4910+
4911+ self.base_model.add_parameter(M5)
4912+ self.base_model.add_parameter(W5)
4913+ self.base_model.add_particle(B)
4914+ self.assertEqual( number_particles, len(self.base_model.particles))
4915+ # For the mass both are define, so this is should be a merge
4916+ self.assertEqual(B.name, 'B')
4917+ self.assertEqual(B.mass.name, 'M5')
4918+ true_b = self.base_model.particle_dict[5]
4919+ self.assertEqual(true_b.name, 'b')
4920+ self.assertEqual(true_b.mass.name, 'MB') # keep MB since M5 is merge on MB
4921+ self.assertEqual(self.base_model.old_new['M5'], 'MB')
4922+ # For the width the model one is zero => overwrite
4923+ self.assertEqual(B.name, 'B')
4924+ self.assertEqual(B.width.name, 'W5')
4925+ self.assertEqual(true_b.width.name, 'W5')
4926+
4927+
4928+
4929+
4930+
4931+ def test_add_external_parameters(self):
4932+ """Check that we can an external parameter consistently"""
4933+
4934+ nb_param = len(self.base_model.parameters)
4935+ #ZERO is define in all model => we should just do nothing
4936+ ZERO = Parameter(name = 'ZERO',
4937+ nature = 'internal',
4938+ type = 'real',
4939+ value = '0.0',
4940+ texname = '0')
4941+ # add it and check that nothing happen!
4942+ self.base_model.add_parameter(ZERO)
4943+ self.assertEqual(nb_param, len(self.base_model.parameters))
4944+
4945+
4946+ # MH is already define
4947+ MH = Parameter(name = 'MH',
4948+ nature = 'external',
4949+ type = 'real',
4950+ value = 125,
4951+ texname = '\\text{MH}',
4952+ lhablock = 'MASS',
4953+ lhacode = [ 25 ])
4954+
4955+ # add it and check that nothing happen!
4956+ self.base_model.add_parameter(MH)
4957+ self.assertEqual(nb_param, len(self.base_model.parameters))
4958+
4959+ # MH is already definebut has a different name ib both model
4960+ MH = Parameter(name = 'MH2',
4961+ nature = 'external',
4962+ type = 'real',
4963+ value = 125,
4964+ texname = '\\text{MH}',
4965+ lhablock = 'MASS',
4966+ lhacode = [ 25 ])
4967+
4968+ # add it and check that nothing happen!
4969+ self.base_model.add_parameter(MH)
4970+ self.assertEqual(nb_param, len(self.base_model.parameters))
4971+ # But the information should be present in the old->new dict
4972+ self.assertEqual(self.base_model.old_new['MH2'], 'MH')
4973+
4974+ # Add an internal parameter depending of MH2
4975+ GH = Parameter(name = 'GH',
4976+ nature = 'internal',
4977+ type = 'real',
4978+ texname = '\\text{MH}',
4979+ value = '25*MH2**2*AMH2*MH25')
4980+
4981+ self.base_model.add_parameter(GH)
4982+ self.assertEqual(nb_param+1, len(self.base_model.parameters))
4983+ #check that the expression of GH is correctly modified
4984+ self.assertEqual(GH.value, '25*MH**2*AMH2*MH25')
4985+ self.assertEqual(GH.name, 'GH')
4986+ nb_param = nb_param+1
4987+
4988+ # Add an internal parameter depending of MH2
4989+ # But with a name conflict
4990+ Gf = Parameter(name = 'Gf',
4991+ nature = 'internal',
4992+ type = 'real',
4993+ texname = '\\text{MH}',
4994+ value = '25*MH2**2*AMH2*MH25')
4995+
4996+ self.base_model.add_parameter(Gf)
4997+ self.assertEqual(nb_param+1, len(self.base_model.parameters))
4998+ #check that the expression of GH is correctly modified
4999+ self.assertEqual(Gf.value, '25*MH**2*AMH2*MH25')
5000+ self.assertEqual(Gf.name, 'Gf__1')
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: