Merge lp:~maddevelopers/mg5amcnlo/improve_restrict into lp:~maddevelopers/mg5amcnlo/release_candidate

Proposed by Olivier Mattelaer
Status: Merged
Merged at revision: 161
Proposed branch: lp:~maddevelopers/mg5amcnlo/improve_restrict
Merge into: lp:~maddevelopers/mg5amcnlo/release_candidate
Diff against target: 2596 lines (+1148/-805)
19 files modified
aloha/create_aloha.py (+11/-0)
bin/mg5 (+65/-61)
madgraph/core/base_objects.py (+3/-3)
madgraph/interface/cmd_interface.py (+29/-77)
madgraph/iolibs/export_v4.py (+0/-24)
madgraph/various/process_checks.py (+8/-2)
models/import_ufo.py (+149/-54)
models/model_reader.py (+2/-2)
models/mssm/parameters.py (+72/-0)
models/mssm/particles.py (+9/-9)
models/mssm/restrict_default.dat (+525/-0)
models/mssm/restrict_simplified.dat (+0/-525)
models/write_param_card.py (+69/-25)
tests/acceptance_tests/test_model_equivalence.py (+3/-3)
tests/input_files/restrict_sm.dat (+1/-1)
tests/unit_tests/core/test_base_objects.py (+1/-1)
tests/unit_tests/iolibs/test_export_v4.py (+4/-2)
tests/unit_tests/various/test_import_ufo.py (+107/-12)
tests/unit_tests/various/test_write_param.py (+90/-4)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/improve_restrict
Reviewer Review Type Date Requested Status
Johan Alwall (community) Needs Information
Review via email: mp+55263@code.launchpad.net

Description of the change

- Merge the mass-width-couplings with identical value during the restriction process.
- change the model name to the one use during the import.
- remove the restrict command.
- add set stdout_level (in order to change logger default inside the mg5 cmd).
- improve/debug the param_card writer.
- pass '-' to '_' when shorten long name.
- change default logging value when running in debug mode.
- change mg5 script to avoid double load of the history file.

To post a comment you must log in.
162. By Olivier Mattelaer

remove all link to the restrict_file (pointless since they are no restrict command anymore)

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

Hello Olivier,

This branch is really beautiful! I took the liberty to revert the mssm model to having light quark and lepton masses (in accordance to the SM) for the full model, and created a default restrict card corresponding to SPS1a (and therefore removed restrict_simplified, since this is then superfluous).

Only one question: In the "import" help text, there is no mention of the restrictions, and no reference to another help text to explain what is happening. I thought the idea was that the user should be able to read about the restrictions somewhere?

Please also make sure to include this info in the paper!

Many thanks!
Johan

review: Needs Information
163. By Olivier Mattelaer

correct the bug with InvalidCmd in check

164. By Olivier Mattelaer

merge with Johan mod

165. By Olivier Mattelaer

avoid double model load. Add information message for restriction model

166. By Johan Alwall

Fixed problem loading model file in aloha with restriction

167. By Johan Alwall

Added mention of restriction in help import, modified info for import_ufo

168. By Olivier Mattelaer

correct the bug in case of multiple load of model. and fix acceptance test

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'aloha/create_aloha.py'
2--- aloha/create_aloha.py 2011-02-10 01:07:57 +0000
3+++ aloha/create_aloha.py 2011-03-31 16:37:30 +0000
4@@ -292,6 +292,17 @@
5 def __init__(self, model_name, write_dir=None):
6 """ load the UFO model and init the dictionary """
7
8+ # Extract the model name if combined with restriction
9+ model_name_pattern = re.compile("^(?P<name>.+)-(?P<rest>[\w\d_]+)$")
10+ model_name_re = model_name_pattern.match(model_name)
11+ if model_name_re:
12+ name = model_name_re.group('name')
13+ rest = model_name_re.group("rest")
14+ if rest == 'full' or \
15+ os.path.isfile(os.path.join(root_path, "models", name,
16+ "restrict_%s.dat" % rest)):
17+ model_name = model_name_re.group("name")
18+
19 # load the UFO model
20 python_pos = 'models.%s' % model_name
21 __import__(python_pos)
22
23=== modified file 'bin/mg5'
24--- bin/mg5 2011-03-24 15:47:30 +0000
25+++ bin/mg5 2011-03-31 16:37:30 +0000
26@@ -24,44 +24,7 @@
27 Please upgrate your version of python.')
28
29 import os
30-
31-
32-
33-try:
34- import readline
35-except ImportError:
36- try:
37- import pyreadline as readline
38- except:
39- print "For tab completion and history, install module readline."
40-else:
41- import rlcompleter
42-
43- if 'r261:67515' in sys.version and 'GCC 4.2.1 (Apple Inc. build 5646)' in sys.version:
44- readline.parse_and_bind("bind ^I rl_complete")
45- readline.__doc__ = 'libedit'
46-
47- elif hasattr(readline, '__doc__'):
48- if 'libedit' not in readline.__doc__:
49- readline.parse_and_bind("tab: complete")
50- else:
51- readline.parse_and_bind("bind ^I rl_complete")
52- else:
53- readline.__doc__ = 'GNU'
54- readline.parse_and_bind("tab: complete")
55-
56- # charge history file
57- try:
58- history_file = os.path.join(os.environ['HOME'], '.mg5history')
59- readline.read_history_file(history_file)
60- except:
61- pass
62-
63 import optparse
64-import logging
65-import logging.config
66-
67-import subprocess
68
69 # Get the parent directory (mg root) of the script real path (bin)
70 # and add it to the current PYTHONPATH
71@@ -76,7 +39,7 @@
72 parser.add_option("-l", "--logging", default='INFO',
73 help="logging level (DEBUG|INFO|WARNING|ERROR|CRITICAL) [%default]")
74 parser.add_option("-f", "--file", default='',
75- help="Use script file FILE")
76+ help="Use script file FILE")
77 parser.add_option("-d", "--mgme_dir", default='', dest = 'mgme_dir',
78 help="Use MG_ME directory MGME_DIR")
79 parser.add_option("","--web", action="store_true", default=False, dest='web', \
80@@ -93,6 +56,42 @@
81 subprocess.call([sys.executable] + ['-O'] + sys.argv)
82 sys.exit()
83
84+import logging
85+import logging.config
86+import subprocess
87+
88+
89+try:
90+ import readline
91+except ImportError:
92+ try:
93+ import pyreadline as readline
94+ except:
95+ print "For tab completion and history, install module readline."
96+else:
97+ import rlcompleter
98+
99+ if 'r261:67515' in sys.version and 'GCC 4.2.1 (Apple Inc. build 5646)' in sys.version:
100+ readline.parse_and_bind("bind ^I rl_complete")
101+ readline.__doc__ = 'libedit'
102+
103+ elif hasattr(readline, '__doc__'):
104+ if 'libedit' not in readline.__doc__:
105+ readline.parse_and_bind("tab: complete")
106+ else:
107+ readline.parse_and_bind("bind ^I rl_complete")
108+ else:
109+ readline.__doc__ = 'GNU'
110+ readline.parse_and_bind("tab: complete")
111+
112+ # charge history file
113+ try:
114+ history_file = os.path.join(os.environ['HOME'], '.mg5history')
115+ readline.read_history_file(history_file)
116+ except:
117+ pass
118+
119+
120 if __debug__:
121 print 'Running MG5 in debug mode'
122
123@@ -100,6 +99,8 @@
124 # Set logging level according to the logging level given by options
125 #logging.basicConfig(level=vars(logging)[options.logging])
126 try:
127+ if __debug__ and options.logging == 'INFO':
128+ options.logging = 'DEBUG'
129 logging.config.fileConfig(os.path.join(root_path, 'madgraph', 'interface', '.mg5_logging.conf'))
130 logging.root.setLevel(eval('logging.' + options.logging))
131 logging.getLogger('madgraph').setLevel(eval('logging.' + options.logging))
132@@ -108,29 +109,32 @@
133 import madgraph.interface.cmd_interface as cmd_interface
134
135 # Call the cmd interface main loop
136-if options.file or args:
137- # They are an input file
138- if args:
139- input_file = args[0]
140- else:
141- input_file = options.file
142- if options.web:
143- cmd_line = cmd_interface.MadGraphCmdWeb()
144- cmd_line.use_rawinput == False
145- cmd_line.run_cmd('import command ' + input_file)
146- sys.exit()
147- else:
148- cmd_line = cmd_interface.MadGraphCmdShell(mgme_dir = options.mgme_dir)
149- cmd_line.use_rawinput == False
150- cmd_line.run_cmd('import command ' + input_file)
151- sys.exit()
152-else:
153- # Interactive mode
154- if options.web:
155- cmd_interface.MadGraphCmdWeb().cmdloop()
156- else:
157- cmd_interface.MadGraphCmdShell(mgme_dir = options.mgme_dir).cmdloop()
158-
159+try:
160+ if options.file or args:
161+ # They are an input file
162+ if args:
163+ input_file = args[0]
164+ else:
165+ input_file = options.file
166+ if options.web:
167+ cmd_line = cmd_interface.MadGraphCmdWeb()
168+ cmd_line.use_rawinput == False
169+ cmd_line.run_cmd('import command ' + input_file)
170+ sys.exit()
171+ else:
172+ cmd_line = cmd_interface.MadGraphCmdShell(mgme_dir = options.mgme_dir)
173+ cmd_line.use_rawinput == False
174+ cmd_line.run_cmd('import command ' + input_file)
175+ sys.exit()
176+ else:
177+ # Interactive mode
178+ if options.web:
179+ cmd_interface.MadGraphCmdWeb().cmdloop()
180+ else:
181+ cmd_interface.MadGraphCmdShell(mgme_dir = options.mgme_dir).cmdloop()
182+except KeyboardInterrupt:
183+ print 'writting history and quit on KeyboardInterrupt'
184+ pass
185 try:
186 readline.set_history_length(100)
187 readline.write_history_file(history_file)
188
189=== modified file 'madgraph/core/base_objects.py'
190--- madgraph/core/base_objects.py 2011-03-20 20:39:57 +0000
191+++ madgraph/core/base_objects.py 2011-03-31 16:37:30 +0000
192@@ -1668,11 +1668,11 @@
193 # Too long name are problematic so restrict them to a maximal of 70 char
194 if len(mystr) > 64 and main:
195 if schannel and forbid:
196- return self.shell_string(True, False, False)+ '-%s' % self['uid']
197+ return self.shell_string(True, False, False)+ '_%s' % self['uid']
198 elif schannel:
199- return self.shell_string(False, False, False)+'-%s' % self['uid']
200+ return self.shell_string(False, False, False)+'_%s' % self['uid']
201 else:
202- return mystr[:64]+'-%s' % self['uid']
203+ return mystr[:64]+'_%s' % self['uid']
204
205
206
207
208=== modified file 'madgraph/interface/cmd_interface.py'
209--- madgraph/interface/cmd_interface.py 2011-03-24 16:15:56 +0000
210+++ madgraph/interface/cmd_interface.py 2011-03-31 16:37:30 +0000
211@@ -250,23 +250,24 @@
212 logger.info("-- load information from file FILENAME")
213
214 def help_import(self):
215-
216 logger.info("syntax: import " + "|".join(self._import_formats) + \
217 " FILENAME")
218 logger.info("-- imports file(s) in various formats")
219 logger.info("")
220- logger.info(" import model MODEL [-modelname]:")
221- logger.info(" Import a UFO or MG4 model.")
222+ logger.info(" import model MODEL[-RESTRICTION] [-modelname]:")
223+ logger.info(" Import a UFO model.")
224 logger.info(" MODEL should be a valid UFO model name")
225- logger.info(" -modelname keeps the original")
226- logger.info(" particle names for the model")
227+ logger.info(" Model restrictions are specified by MODEL-RESTRICTION")
228+ logger.info(" with the file restrict_RESTRICTION.dat in the model dir.")
229+ logger.info(" By default, restrict_default.dat is used.")
230+ logger.info(" Specify model_name-full to get unrestricted model.")
231+ logger.info(" -modelname keeps the original particle names for the model")
232 logger.info("")
233 logger.info(" import model_v4 MODEL [-modelname] :")
234 logger.info(" Import an MG4 model.")
235 logger.info(" Model should be the name of the model")
236 logger.info(" or the path to theMG4 model directory")
237- logger.info(" -modelname keeps the original")
238- logger.info(" particle names for the model")
239+ logger.info(" -modelname keeps the original particle names for the model")
240 logger.info("")
241 logger.info(" import proc_v4 [PATH] :" )
242 logger.info(" Execute MG5 based on a proc_card.dat in MG4 format.")
243@@ -372,13 +373,6 @@
244 logger.info("syntax: define multipart_name [=] part_name_list")
245 logger.info("-- define a multiparticle")
246 logger.info(" Example: define p = g u u~ c c~ d d~ s s~ b b~")
247-
248- def help_restrict(self):
249- logger.info("syntax: restrict [model] param_card")
250- logger.info(' Suppress in the model all the interactions with zero')
251- logger.info(' couplings according to the param_card given in parameter.')
252- logger.info(' All zero parameter of the param_card are also suppress of')
253- logger.info(' the model.')
254
255 def help_history(self):
256 logger.info("syntax: history [FILEPATH|clean|.] ")
257@@ -404,6 +398,7 @@
258 logger.info(" of the quarks given in multi_part_label.")
259 logger.info(" These processes give negligible contribution to the")
260 logger.info(" cross section but have subprocesses/channels.")
261+
262 def help_shell(self):
263 logger.info("syntax: shell CMD (or ! CMD)")
264 logger.info("-- run the shell command CMD and catch output")
265@@ -721,7 +716,12 @@
266 if args[1] not in self._multiparticles.keys():
267 raise self.InvalidCmd('ignore_six_quark_processes needs ' + \
268 'a multiparticle name as argument')
269-
270+
271+ if args[0] in ['stdout_level']:
272+ if args[1] not in ['DEBUG','INFO','WARNING','ERROR','CRITICAL']:
273+ raise self.InvalidCmd('output_level needs ' + \
274+ 'a valid level')
275+
276 def check_output(self, args):
277 """ check the validity of the line"""
278
279@@ -768,31 +768,6 @@
280
281 self._export_dir = os.path.realpath(self._export_dir)
282
283- def check_restrict(self,args):
284- """ check the format: restrict [model] param_card.dat"""
285-
286- if len(args) > 2:
287- self.help_restrict()
288- raise self.InvalidCmd, 'Wrong restrict format'
289-
290- if len(args) == 2:
291- if args[0] != "model":
292- self.help_restrict()
293- raise self.InvalidCmd, 'Wrong restrict format'
294- else:
295- del args[0]
296-
297- if self._model_v4_path:
298- raise self.InvalidCmd, 'Operation not possible with v4 model. ' + \
299- 'Please use a UFO model as a starting point'
300-
301- if self._restrict_file:
302- raise MadGraph5Error, 'This model is already restricted to the ' + \
303- 'card %s. In order to always keep track ' % self._restrict_file + \
304- 'of model modifications. We forbids multiple restrictions files.'
305-
306- if not os.path.isfile(args[0]):
307- raise self.InvalidCmd, 'path \"%s\" is not a file' % args[0]
308
309 def get_default_path(self):
310 """Set self._export_dir to the default (\'auto\') path"""
311@@ -1001,20 +976,6 @@
312 couplings = [c + "=" for c in self._couplings] + ['@','$','/','>']
313 return self.list_completion(text, self._particle_names + \
314 self._multiparticles.keys() + couplings)
315-
316- def complete_restrict(self, text, line, begidx, endidx):
317- "Complete the restrict command"
318-
319- args = split_arg(line[0:begidx])
320-
321- if len(args) == 1 and text == 'model'[:len(text)]:
322- return ['model ']
323-
324- # Directory continuation
325- return self.path_completion(text,
326- os.path.join('.',*[a for a in args if a.endswith(os.path.sep)]),
327- only_dirs = False)
328-
329
330 def complete_check(self, text, line, begidx, endidx):
331 "Complete the add command"
332@@ -1206,8 +1167,11 @@
333 if args[1] in ['group_subprocesses_output']:
334 return self.list_completion(text, ['False', 'True'])
335
336- if args[1] in ['ignore_six_quark_processes']:
337+ elif args[1] in ['ignore_six_quark_processes']:
338 return self.list_completion(text, self._multiparticles.keys())
339+
340+ elif args[1] == 'stdout_level':
341+ return self.list_completion(text, ['DEBUG','INFO','WARNING','ERROR','CRITICAL'])
342
343 def complete_shell(self, text, line, begidx, endidx):
344 """ add path for shell """
345@@ -1360,7 +1324,8 @@
346 _export_formats = _v4_export_formats + ['standalone_cpp', 'pythia8',
347 'pythia8_model']
348 _set_options = ['group_subprocesses_output',
349- 'ignore_six_quark_processes']
350+ 'ignore_six_quark_processes',
351+ 'stdout_level']
352 # Variables to store object information
353 _curr_model = None #base_objects.Model()
354 _curr_amps = diagram_generation.AmplitudeList()
355@@ -1381,7 +1346,6 @@
356 _export_format = 'madevent'
357 _mgme_dir = MG4DIR
358 _comparisons = None
359- _restrict_file = None
360
361 def __init__(self, mgme_dir = '', *completekey, **stdin):
362 """ add a tracker of the history """
363@@ -2183,7 +2147,6 @@
364 self._curr_amps = diagram_generation.AmplitudeList()
365 self._curr_matrix_elements = helas_objects.HelasMultiProcess()
366 # Import model
367- self._restrict_file = None
368 if args[0].endswith('_v4'):
369 self._curr_model, self._model_v4_path = \
370 import_v4.import_model(args[1], self._mgme_dir)
371@@ -2202,8 +2165,6 @@
372 self._curr_model)
373 # Automatically turn on subprocess grouping
374 self.do_set('group_subprocesses_output True')
375-
376- self.import_ufo_model(args[1])
377
378 if '-modelname' not in args:
379 self._curr_model.pass_particles_name_in_mg_default()
380@@ -2516,11 +2477,17 @@
381 ",".join([\
382 self._curr_model.get_particle(q).get('name') \
383 for q in self._options[args[0]]]))
384- if args[0] == 'group_subprocesses_output':
385+
386+ elif args[0] == 'group_subprocesses_output':
387 self._options[args[0]] = eval(args[1])
388 logger.info('Set group_subprocesses_output to %s' % \
389 str(self._options[args[0]]))
390-
391+
392+ elif args[0] == "stdout_level":
393+ logging.root.setLevel(eval('logging.' + args[1]))
394+ logging.getLogger('madgraph').setLevel(eval('logging.' + args[1]))
395+ logger.info('set output information to level: %s' % args[1])
396+
397 def do_output(self, line):
398 """Initialize a new Template or reinitialize one"""
399
400@@ -2558,11 +2525,9 @@
401 self._curr_exporter = export_v4.ProcessExporterFortranME(\
402 self._mgme_dir, self._export_dir,
403 not noclean)
404- self._curr_exporter.cp_model_restriction(self._restrict_file)
405 elif self._export_format in ['standalone', 'matrix']:
406 self._curr_exporter = export_v4.ProcessExporterFortranSA(\
407 self._mgme_dir, self._export_dir,not noclean)
408- self._curr_exporter.cp_model_restriction(self._restrict_file)
409 elif self._export_format == 'standalone_cpp':
410 export_cpp.setup_cpp_standalone_dir(self._export_dir, self._curr_model)
411 elif not os.path.isdir(self._export_dir):
412@@ -2830,19 +2795,6 @@
413 logger.info('for information about how to generate events from this process.')
414 logger.info('You can also use the launch command.')
415
416- def do_restrict(self, line):
417- """ from a param_card.dat remove all zero interactions
418- and all zero external parameter."""
419-
420- args = split_arg(line)
421- # Check args validity
422- self.check_restrict(args)
423-
424-
425- self._curr_model = import_ufo.RestrictModel(self._curr_model)
426- self._curr_model.restrict_model(args[0])
427- self._restrict_file = args[0]
428-
429
430 def do_help(self, line):
431 """ propose some usefull possible action """
432
433=== modified file 'madgraph/iolibs/export_v4.py'
434--- madgraph/iolibs/export_v4.py 2011-03-24 16:15:56 +0000
435+++ madgraph/iolibs/export_v4.py 2011-03-31 16:37:30 +0000
436@@ -143,30 +143,6 @@
437 ff.write(text)
438 ff.close()
439
440- #===============================================================================
441- # Copy the model restriction in the Model Directory
442- #===============================================================================
443- def cp_model_restriction(self, file_path):
444- """Copy the model restriction in the Model Directory."""
445-
446- if not file_path:
447- return
448-
449- assert os.path.isfile(file_path)
450- assert os.path.isdir(os.path.join(self.dir_path,'Source','MODEL'))
451-
452- output_path = os.path.join(self.dir_path,'Source','MODEL','restrict_model.dat')
453-
454- header="""#*********************************************************************
455- # THIS FILE WAS USED TO RESTRICT THE ORIGINAL MODEL
456- # PLEASE DON'T EDIT THIS FILE. HE IS IMPORTANT IN ORDER TO BE ABLE
457- # TO REPRODUCE THE RESULT IN THE FUTURE.
458- #*********************************************************************\n"""
459- ff = open(output_path,'w')
460- ff.writelines(header)
461- ff.writelines(open(file_path).read())
462- ff.close()
463-
464 #===========================================================================
465 # Create jpeg diagrams, html pages,proc_card_mg5.dat and madevent.tar.gz
466 #===========================================================================
467
468=== modified file 'madgraph/various/process_checks.py'
469--- madgraph/various/process_checks.py 2011-03-24 16:15:56 +0000
470+++ madgraph/various/process_checks.py 2011-03-31 16:37:30 +0000
471@@ -208,7 +208,7 @@
472
473 # Evaluate the matrix element for the momenta p
474 exec("data = Matrix_%s()" % process.shell_string())
475- if output == "m2":
476+ if output == "m2":
477 return data.smatrix(p, self.full_model), data.amp2
478 else:
479 m2 = data.smatrix(p, self.full_model)
480@@ -762,7 +762,13 @@
481 legs = process.get('legs')
482 # Generate a process with these legs
483 # Generate the amplitude for this process
484- amplitude = diagram_generation.Amplitude(process)
485+ try:
486+ amplitude = diagram_generation.Amplitude(process)
487+ except InvalidCmd:
488+ logging.info("No diagrams for %s" % \
489+ process.nice_string().replace('Process', 'process'))
490+ return None
491+
492 if not amplitude.get('diagrams'):
493 # This process has no diagrams; go to next process
494 logging.info("No diagrams for %s" % \
495
496=== modified file 'models/import_ufo.py'
497--- models/import_ufo.py 2011-03-19 21:33:51 +0000
498+++ models/import_ufo.py 2011-03-31 16:37:30 +0000
499@@ -59,7 +59,7 @@
500
501 def import_model(model_name):
502 """ a practical and efficient way to import a model"""
503-
504+
505 # check if this is a valid path or if this include restriction file
506 try:
507 model_path = find_ufo_path(model_name)
508@@ -69,13 +69,16 @@
509 split = model_name.split('-')
510 model_name = '-'.join([text for text in split[:-1]])
511 model_path = find_ufo_path(model_name)
512-
513- restrict_file = os.path.join(model_path, 'restrict_%s.dat'% split[-1])
514+ restrict_name = split[-1]
515+
516+ restrict_file = os.path.join(model_path, 'restrict_%s.dat'% restrict_name)
517+
518 #if restriction is full, then we by pass restriction (avoid default)
519 if split[-1] == 'full':
520 restrict_file = None
521 else:
522 # Check if by default we need some restrictions
523+ restrict_name = ""
524 if os.path.exists(os.path.join(model_path,'restrict_default.dat')):
525 restrict_file = os.path.join(model_path,'restrict_default.dat')
526 else:
527@@ -83,21 +86,20 @@
528
529 #import the FULL model
530 model = import_full_model(model_path)
531-
532+ # restore the model name
533+ if restrict_name:
534+ model["name"] += '-' + restrict_name
535+
536 #restrict it if needed
537 if restrict_file:
538- # but doing this in silence
539- old_level = logger_mod.level
540- if old_level < 30:
541- logger_mod.setLevel(30) # WARNING
542-
543+ logger.info('Restrict model %s with file %s.' % (model_name, restrict_file))
544+ if logger_mod.getEffectiveLevel() > 10:
545+ logger.info('Run \"set stdout_level DEBUG\" before import for more information.')
546+
547 # Modify the mother class of the object in order to allow restriction
548 model = RestrictModel(model)
549 model.restrict_model(restrict_file)
550
551- # put logger in normal mode
552- logger_mod.setLevel(old_level)
553-
554 return model
555
556 def import_full_model(model_path):
557@@ -253,11 +255,11 @@
558 # Import particles content:
559 particles = [self.model.get_particle(particle.pdg_code) \
560 for particle in interaction_info.particles]
561-
562+
563 if None in particles:
564 # Interaction with a ghost/goldstone
565 return
566-
567+
568 particles = base_objects.ParticleList(particles)
569
570 # Import Lorentz content:
571@@ -578,19 +580,37 @@
572
573 class RestrictModel(model_reader.ModelReader):
574 """ A class for restricting a model for a given param_card.
575- Two rules apply:
576+ rules applied:
577 - Vertex with zero couplings are throw away
578- - external parameter with zero input are changed into internal parameter."""
579+ - external parameter with zero/one input are changed into internal parameter.
580+ - identical coupling/mass/width are replace in the model by a unique one
581+ """
582+
583+ def default_setup(self):
584+ """define default value"""
585+ self.del_coup = []
586+ super(RestrictModel, self).default_setup()
587
588 def restrict_model(self, param_card):
589 """apply the model restriction following param_card"""
590-
591 # compute the value of all parameters
592 self.set_parameters_and_couplings(param_card)
593-
594+ # associte to each couplings the associated vertex: def self.coupling_pos
595+ self.locate_coupling()
596 # deal with couplings
597- zero_couplings = self.detect_zero_couplings()
598- self.remove_couplings(zero_couplings)
599+ zero_couplings, iden_couplings = self.detect_identical_couplings()
600+
601+ # remove the out-dated interactions
602+ self.remove_interactions(zero_couplings)
603+
604+ # replace in interactions identical couplings
605+ for iden_coups in iden_couplings:
606+ self.merge_iden_couplings(iden_coups)
607+
608+ # remove zero couplings and other pointless couplings
609+ self.del_coup += zero_couplings
610+ self.remove_couplings(self.del_coup)
611+
612
613 # deal with parameters
614 parameters = self.detect_special_parameters()
615@@ -599,18 +619,46 @@
616 # deal with identical parameters
617 iden_parameters = self.detect_identical_parameters()
618 for iden_param in iden_parameters:
619- self.merge_identical_parameters(iden_param)
620-
621-
622- def detect_zero_couplings(self):
623+ self.merge_iden_parameters(iden_param)
624+
625+
626+ def locate_coupling(self):
627+ """ create a dict couplings_name -> vertex """
628+
629+ self.coupling_pos = {}
630+ for vertex in self['interactions']:
631+ for key, coupling in vertex['couplings'].items():
632+ if coupling in self.coupling_pos:
633+ if vertex not in self.coupling_pos[coupling]:
634+ self.coupling_pos[coupling].append(vertex)
635+ else:
636+ self.coupling_pos[coupling] = [vertex]
637+
638+ return self.coupling_pos
639+
640+ def detect_identical_couplings(self):
641 """return a list with the name of all vanishing couplings"""
642
643+ dict_value_coupling = {}
644+ iden_key = set()
645 zero_coupling = []
646+ iden_coupling = []
647
648 for name, value in self['coupling_dict'].items():
649 if value == 0:
650 zero_coupling.append(name)
651- return zero_coupling
652+ continue
653+
654+ if value in dict_value_coupling:
655+ iden_key.add(value)
656+ dict_value_coupling[value].append(name)
657+ else:
658+ dict_value_coupling[value] = [name]
659+
660+ for key in iden_key:
661+ iden_coupling.append(dict_value_coupling[key])
662+
663+ return zero_coupling, iden_coupling
664
665
666 def detect_special_parameters(self):
667@@ -657,11 +705,34 @@
668 output.append(block_value_to_var[key])
669
670 return output
671-
672- def merge_identical_parameters(self, parameters):
673+
674+
675+ def merge_iden_couplings(self, couplings):
676+ """merge the identical couplings in the interactions"""
677+
678+
679+ logger_mod.debug(' Fuse the Following coupling (they have the same value): %s '% \
680+ ', '.join([obj for obj in couplings]))
681+
682+ main = couplings[0]
683+ self.del_coup += couplings[1:] # add the other coupl to the suppress list
684+
685+ for coupling in couplings[1:]:
686+ # check if param is linked to an interaction
687+ if coupling not in self.coupling_pos:
688+ continue
689+ # replace the coupling, by checking all coupling of the interaction
690+ vertices = self.coupling_pos[coupling]
691+ for vertex in vertices:
692+ for key, value in vertex['couplings'].items():
693+ if value == coupling:
694+ vertex['couplings'][key] = main
695+
696+
697+ def merge_iden_parameters(self, parameters):
698 """ merge the identical parameters given in argument """
699
700- logger_mod.info('Parameters set to identical values: %s '% \
701+ logger_mod.debug('Parameters set to identical values: %s '% \
702 ', '.join([obj.name for obj in parameters]))
703
704 # Extract external parameters
705@@ -673,40 +744,64 @@
706 ', '.join([param.name for param in parameters])
707 expr = obj.name
708 continue
709- # delete the old parameters
710- external_parameters.remove(obj)
711+ # delete the old parameters
712+ external_parameters.remove(obj)
713 # replace by the new one pointing of the first obj of the class
714 new_param = base_objects.ModelVariable(obj.name, expr, 'real')
715 self['parameters'][()].insert(0, new_param)
716
717-
718- def remove_couplings(self, zero_couplings):
719+ # For Mass-Width, we need also to replace the mass-width in the particles
720+ #This allows some optimization for multi-process.
721+ if parameters[0].lhablock in ['MASS','DECAY']:
722+ new_name = parameters[0].name
723+ if parameters[0].lhablock == 'MASS':
724+ arg = 'mass'
725+ else:
726+ arg = 'width'
727+ change_name = [p.name for p in parameters[1:]]
728+ [p.set(arg, new_name) for p in self['particle_dict'].values()
729+ if p[arg] in change_name]
730+
731+ def remove_interactions(self, zero_couplings):
732 """ remove the interactions associated to couplings"""
733
734- # clean the interactions
735- for interaction in self['interactions'][:]:
736- modified = False
737- for key, coupling in interaction['couplings'].items()[:]:
738- if coupling in zero_couplings:
739- modified = True
740- del interaction['couplings'][key]
741-
742- if modified:
743- part_name = [part['name'] for part in interaction['particles']]
744- orders = ['%s=%s' % (order,value)
745- for order,value in interaction['orders'].items()]
746- if not interaction['couplings']:
747- logger_mod.info('remove interactions: %s at order: %s' % \
748- (' '.join(part_name),', '.join(orders)))
749- self['interactions'].remove(interaction)
750- elif modified:
751- logger_mod.info('modify interactions: %s at order: %s' % \
752- (' '.join(part_name),', '.join(orders)))
753+ mod = []
754+ for coup in zero_couplings:
755+ # some coupling might be not related to any interactions
756+ if coup not in self.coupling_pos:
757+ coup, self.coupling_pos.keys()
758+ continue
759+ for vertex in self.coupling_pos[coup]:
760+ modify = False
761+ for key, coupling in vertex['couplings'].items():
762+ if coupling in zero_couplings:
763+ modify=True
764+ del vertex['couplings'][key]
765+ if modify:
766+ mod.append(vertex)
767+
768+ # print usefull log and clean the empty interaction
769+ for vertex in mod:
770+ part_name = [part['name'] for part in vertex['particles']]
771+ orders = ['%s=%s' % (order,value) for order,value in vertex['orders'].items()]
772+
773+ if not vertex['couplings']:
774+ logger_mod.debug('remove interactions: %s at order: %s' % \
775+ (' '.join(part_name),', '.join(orders)))
776+ self['interactions'].remove(vertex)
777+ else:
778+ logger_mod.debug('modify interactions: %s at order: %s' % \
779+ (' '.join(part_name),', '.join(orders)))
780+
781+ return
782+
783+ def remove_couplings(self, couplings):
784 #clean the coupling list:
785 for name, data in self['couplings'].items():
786 for coupling in data[:]:
787- if coupling.name in zero_couplings:
788+ if coupling.name in couplings:
789 data.remove(coupling)
790+
791
792 def fix_parameter_values(self, zero_parameters, one_parameters):
793 """ Remove all instance of the parameters in the model and replace it by
794@@ -774,9 +869,9 @@
795 for param in special_parameters:
796 #by pass parameter still in use
797 if param in used:
798- logger_mod.info('fix parameter value: %s' % param)
799+ logger_mod.debug('fix parameter value: %s' % param)
800 continue
801- logger_mod.info('remove parameters: %s' % param)
802+ logger_mod.debug('remove parameters: %s' % param)
803 data = self['parameters'][param_info[param]['dep']]
804 data.remove(param_info[param]['obj'])
805
806
807=== modified file 'models/model_reader.py'
808--- models/model_reader.py 2011-03-20 14:41:56 +0000
809+++ models/model_reader.py 2011-03-31 16:37:30 +0000
810@@ -159,6 +159,7 @@
811 for key in keys:
812 derived_parameters += self['parameters'][key]
813
814+
815 # Now calculate derived parameters
816 for param in derived_parameters:
817 exec("locals()[\'%s\'] = %s" % (param.name, param.expr))
818@@ -172,13 +173,12 @@
819 for particle in self.get('particles'):
820 if particle.is_fermion() and particle.get('self_antipart') and \
821 particle.get('width').lower() != 'zero' and \
822- eval(particle.get('mass')) < 0:
823+ eval(particle.get('mass')).real < 0:
824 exec("locals()[\'%(width)s\'] = -abs(%(width)s)" % \
825 {'width': particle.get('width')})
826
827 # Extract couplings
828 couplings = sum(self['couplings'].values(), [])
829-
830 # Now calculate all couplings
831 for coup in couplings:
832 exec("locals()[\'%s\'] = %s" % (coup.name, coup.expr))
833
834=== modified file 'models/mssm/parameters.py'
835--- models/mssm/parameters.py 2011-03-24 16:28:45 +0000
836+++ models/mssm/parameters.py 2011-03-31 16:37:30 +0000
837@@ -833,6 +833,46 @@
838 lhablock = 'MASS',
839 lhacode = [ 37 ])
840
841+Mve = Parameter(name = 'Mve',
842+ nature = 'external',
843+ type = 'real',
844+ value = 0.,
845+ texname = '\\text{Mve}',
846+ lhablock = 'MASS',
847+ lhacode = [ 12 ])
848+
849+Mvm = Parameter(name = 'Mvm',
850+ nature = 'external',
851+ type = 'real',
852+ value = 0.,
853+ texname = '\\text{Mvm}',
854+ lhablock = 'MASS',
855+ lhacode = [ 14 ])
856+
857+Mvt = Parameter(name = 'Mvt',
858+ nature = 'external',
859+ type = 'real',
860+ value = 0.,
861+ texname = '\\text{Mvt}',
862+ lhablock = 'MASS',
863+ lhacode = [ 16 ])
864+
865+Me = Parameter(name = 'Me',
866+ nature = 'external',
867+ type = 'real',
868+ value = 0.,
869+ texname = '\\text{Me}',
870+ lhablock = 'MASS',
871+ lhacode = [ 11 ])
872+
873+Mm = Parameter(name = 'Mm',
874+ nature = 'external',
875+ type = 'real',
876+ value = 0.,
877+ texname = '\\text{Mm}',
878+ lhablock = 'MASS',
879+ lhacode = [ 13 ])
880+
881 Mta = Parameter(name = 'Mta',
882 nature = 'external',
883 type = 'real',
884@@ -841,6 +881,22 @@
885 lhablock = 'MASS',
886 lhacode = [ 15 ])
887
888+MU = Parameter(name = 'MU',
889+ nature = 'external',
890+ type = 'real',
891+ value = 0.,
892+ texname = 'M',
893+ lhablock = 'MASS',
894+ lhacode = [ 2 ])
895+
896+MC = Parameter(name = 'MC',
897+ nature = 'external',
898+ type = 'real',
899+ value = 0.,
900+ texname = '\\text{MC}',
901+ lhablock = 'MASS',
902+ lhacode = [ 4 ])
903+
904 MT = Parameter(name = 'MT',
905 nature = 'external',
906 type = 'real',
907@@ -849,6 +905,22 @@
908 lhablock = 'MASS',
909 lhacode = [ 6 ])
910
911+MD = Parameter(name = 'MD',
912+ nature = 'external',
913+ type = 'real',
914+ value = 0.,
915+ texname = '\\text{MD}',
916+ lhablock = 'MASS',
917+ lhacode = [ 1 ])
918+
919+MS = Parameter(name = 'MS',
920+ nature = 'external',
921+ type = 'real',
922+ value = 0.,
923+ texname = '\\text{MS}',
924+ lhablock = 'MASS',
925+ lhacode = [ 3 ])
926+
927 MB = Parameter(name = 'MB',
928 nature = 'external',
929 type = 'real',
930
931=== modified file 'models/mssm/particles.py'
932--- models/mssm/particles.py 2011-03-24 16:28:45 +0000
933+++ models/mssm/particles.py 2011-03-31 16:37:30 +0000
934@@ -248,7 +248,7 @@
935 antiname = 've~',
936 spin = 2,
937 color = 1,
938- mass = Param.ZERO,
939+ mass = Param.Mve,
940 width = Param.ZERO,
941 texname = 've',
942 antitexname = 've',
943@@ -263,7 +263,7 @@
944 antiname = 'vm~',
945 spin = 2,
946 color = 1,
947- mass = Param.ZERO,
948+ mass = Param.Mvm,
949 width = Param.ZERO,
950 texname = 'vm',
951 antitexname = 'vm',
952@@ -278,7 +278,7 @@
953 antiname = 'vt~',
954 spin = 2,
955 color = 1,
956- mass = Param.ZERO,
957+ mass = Param.Mvt,
958 width = Param.ZERO,
959 texname = 'vt',
960 antitexname = 'vt',
961@@ -293,7 +293,7 @@
962 antiname = 'e+',
963 spin = 2,
964 color = 1,
965- mass = Param.ZERO,
966+ mass = Param.Me,
967 width = Param.ZERO,
968 texname = 'e-',
969 antitexname = 'e-',
970@@ -308,7 +308,7 @@
971 antiname = 'mu+',
972 spin = 2,
973 color = 1,
974- mass = Param.ZERO,
975+ mass = Param.Mm,
976 width = Param.ZERO,
977 texname = 'mu-',
978 antitexname = 'mu-',
979@@ -338,7 +338,7 @@
980 antiname = 'u~',
981 spin = 2,
982 color = 3,
983- mass = Param.ZERO,
984+ mass = Param.MU,
985 width = Param.ZERO,
986 texname = 'u',
987 antitexname = 'u',
988@@ -353,7 +353,7 @@
989 antiname = 'c~',
990 spin = 2,
991 color = 3,
992- mass = Param.ZERO,
993+ mass = Param.MC,
994 width = Param.ZERO,
995 texname = 'c',
996 antitexname = 'c',
997@@ -383,7 +383,7 @@
998 antiname = 'd~',
999 spin = 2,
1000 color = 3,
1001- mass = Param.ZERO,
1002+ mass = Param.MD,
1003 width = Param.ZERO,
1004 texname = 'd',
1005 antitexname = 'd',
1006@@ -398,7 +398,7 @@
1007 antiname = 's~',
1008 spin = 2,
1009 color = 3,
1010- mass = Param.ZERO,
1011+ mass = Param.MS,
1012 width = Param.ZERO,
1013 texname = 's',
1014 antitexname = 's',
1015
1016=== added file 'models/mssm/restrict_default.dat'
1017--- models/mssm/restrict_default.dat 1970-01-01 00:00:00 +0000
1018+++ models/mssm/restrict_default.dat 2011-03-31 16:37:30 +0000
1019@@ -0,0 +1,525 @@
1020+######################################################################
1021+## PARAM_CARD AUTOMATICALY GENERATED BY THE UFO #####################
1022+######################################################################
1023+
1024+###################################
1025+## INFORMATION FOR USQMIX
1026+###################################
1027+Block USQMIX
1028+ 1 1 1.000000e+00 # RRu11
1029+ 2 2 1.000000e+00 # RRu22
1030+ 3 3 5.536450e-01 # RRu33
1031+ 3 6 8.327528e-01 # RRu36
1032+ 4 4 1.000000e+00 # RRu44
1033+ 5 5 1.000000e+00 # RRu55
1034+ 6 3 8.327528e-01 # RRu63
1035+ 6 6 -5.536450e-01 # RRu66
1036+
1037+###################################
1038+## INFORMATION FOR MSL2
1039+###################################
1040+Block MSL2
1041+ 1 1 3.815567e+04 # RmL211
1042+ 2 2 3.815567e+04 # RmL222
1043+ 3 3 3.782868e+04 # RmL233
1044+
1045+###################################
1046+## INFORMATION FOR DECAY
1047+###################################
1048+DECAY 23 2.411433e+00
1049+DECAY 24 2.002822e+00
1050+DECAY 1000022 0.000000e+00
1051+DECAY 1000023 2.077700e-02
1052+DECAY 1000025 1.915985e+00
1053+DECAY 1000035 2.585851e+00
1054+DECAY 1000024 1.704145e-02
1055+DECAY 1000037 2.486895e+00
1056+DECAY 1000021 5.506754e+00
1057+DECAY 25 1.986108e-03
1058+DECAY 35 5.748014e-01
1059+DECAY 36 6.321785e-01
1060+DECAY 37 5.469628e-01
1061+DECAY 6 1.561950e+00
1062+DECAY 1000012 1.498816e-01
1063+DECAY 1000014 1.498816e-01
1064+DECAY 1000016 1.475190e-01
1065+DECAY 1000011 2.136822e-01
1066+DECAY 1000013 2.136822e-01
1067+DECAY 1000015 1.483273e-01
1068+DECAY 2000011 2.161216e-01
1069+DECAY 2000013 2.161216e-01
1070+DECAY 2000015 2.699061e-01
1071+DECAY 1000002 5.477195e+00
1072+DECAY 1000004 5.477195e+00
1073+DECAY 1000006 2.021596e+00
1074+DECAY 2000002 1.152973e+00
1075+DECAY 2000004 1.152973e+00
1076+DECAY 2000006 7.373133e+00
1077+DECAY 1000001 5.312788e+00
1078+DECAY 1000003 5.312788e+00
1079+DECAY 1000005 3.736276e+00
1080+DECAY 2000001 2.858123e-01
1081+DECAY 2000003 2.858123e-01
1082+DECAY 2000005 8.015663e-01
1083+## Not dependent paramater.
1084+## Those values should be edited following analytical the
1085+## analytical expression. Some generator could simply ignore
1086+## those values and use the analytical expression
1087+DECAY 22 0.000000 # a : 0.0
1088+DECAY 21 0.000000 # g : 0.0
1089+DECAY 250 0.000000 # G0 : 0.0
1090+DECAY 251 0.000000 # G+ : 0.0
1091+DECAY 12 0.000000 # ve : 0.0
1092+DECAY 14 0.000000 # vm : 0.0
1093+DECAY 16 0.000000 # vt : 0.0
1094+DECAY 11 0.000000 # e- : 0.0
1095+DECAY 13 0.000000 # mu- : 0.0
1096+DECAY 15 0.000000 # tau- : 0.0
1097+DECAY 2 0.000000 # u : 0.0
1098+DECAY 4 0.000000 # c : 0.0
1099+DECAY 1 0.000000 # d : 0.0
1100+DECAY 3 0.000000 # s : 0.0
1101+DECAY 5 0.000000 # b : 0.0
1102+DECAY 9000001 0.000000 # ghG : 0.0
1103+DECAY 9000002 0.000000 # ghA : 0.0
1104+
1105+###################################
1106+## INFORMATION FOR DSQMIX
1107+###################################
1108+Block DSQMIX
1109+ 1 1 1.000000e+00 # RRd11
1110+ 2 2 1.000000e+00 # RRd22
1111+ 3 3 9.387379e-01 # RRd33
1112+ 3 6 3.446319e-01 # RRd36
1113+ 4 4 1.000000e+00 # RRd44
1114+ 5 5 1.000000e+00 # RRd55
1115+ 6 3 -3.446319e-01 # RRd63
1116+ 6 6 9.387379e-01 # RRd66
1117+
1118+###################################
1119+## INFORMATION FOR MSOFT
1120+###################################
1121+Block MSOFT
1122+ 1 1.013965e+02 # RMx1
1123+ 2 1.915042e+02 # RMx2
1124+ 3 5.882630e+02 # RMx3
1125+ 21 3.233749e+04 # mHu2
1126+ 22 -1.288001e+05 # mHd2
1127+
1128+###################################
1129+## INFORMATION FOR YE
1130+###################################
1131+Block YE
1132+ 3 3 1.008908e-01 # Rye33
1133+
1134+###################################
1135+## INFORMATION FOR YD
1136+###################################
1137+Block YD
1138+ 3 3 1.388402e-01 # Ryd33
1139+
1140+###################################
1141+## INFORMATION FOR VCKM
1142+###################################
1143+Block VCKM
1144+ 1 1 1.000000e+00 # RCKM11
1145+ 2 2 1.000000e+00 # RCKM22
1146+ 3 3 1.000000e+00 # RCKM33
1147+
1148+###################################
1149+## INFORMATION FOR YU
1150+###################################
1151+Block YU
1152+ 3 3 8.928445e-01 # Ryu33
1153+
1154+###################################
1155+## INFORMATION FOR NMIX
1156+###################################
1157+Block NMIX
1158+ 1 1 9.863644e-01 # RNN11
1159+ 1 2 -5.311036e-02 # RNN12
1160+ 1 3 1.464340e-01 # RNN13
1161+ 1 4 -5.311861e-02 # RNN14
1162+ 2 1 9.935054e-02 # RNN21
1163+ 2 2 9.449493e-01 # RNN22
1164+ 2 3 -2.698467e-01 # RNN23
1165+ 2 4 1.561507e-01 # RNN24
1166+ 3 1 -6.033880e-02 # RNN31
1167+ 3 2 8.770049e-02 # RNN32
1168+ 3 3 6.958775e-01 # RNN33
1169+ 3 4 7.102270e-01 # RNN34
1170+ 4 1 -1.165071e-01 # RNN41
1171+ 4 2 3.107390e-01 # RNN42
1172+ 4 3 6.492260e-01 # RNN43
1173+ 4 4 -6.843778e-01 # RNN44
1174+
1175+###################################
1176+## INFORMATION FOR TU
1177+###################################
1178+Block TU
1179+ 3 3 -4.447525e+02 # Rtu33
1180+
1181+###################################
1182+## INFORMATION FOR SELMIX
1183+###################################
1184+Block SELMIX
1185+ 1 1 1.000000e+00 # RRl11
1186+ 2 2 1.000000e+00 # RRl22
1187+ 3 3 2.824872e-01 # RRl33
1188+ 3 6 9.592711e-01 # RRl36
1189+ 4 4 1.000000e+00 # RRl44
1190+ 5 5 1.000000e+00 # RRl55
1191+ 6 3 9.592711e-01 # RRl63
1192+ 6 6 -2.824872e-01 # RRl66
1193+
1194+###################################
1195+## INFORMATION FOR MASS
1196+###################################
1197+Block MASS
1198+ 23 9.118760e+01 # MZ
1199+ 24 7.982901e+01 # MW
1200+ 1000022 9.668807e+01 # Mneu1
1201+ 1000023 1.810882e+02 # Mneu2
1202+ 1000025 -3.637560e+02 # Mneu3
1203+ 1000035 3.817294e+02 # Mneu4
1204+ 1000024 1.816965e+02 # Mch1
1205+ 1000037 3.799393e+02 # Mch2
1206+ 1000021 6.077137e+02 # Mgo
1207+ 25 1.108991e+02 # MH01
1208+ 35 3.999601e+02 # MH02
1209+ 36 3.995839e+02 # MA0
1210+ 37 4.078790e+02 # MH
1211+ 12 0.000000e+00 # Mve
1212+ 14 0.000000e+00 # Mvm
1213+ 16 0.000000e+00 # Mvt
1214+ 11 0.000000e+00 # Me
1215+ 13 0.000000e+00 # Mm
1216+ 15 1.777000e+00 # Mta
1217+ 2 0.000000e+00 # MU
1218+ 4 0.000000e+00 # MC
1219+ 6 1.750000e+02 # MT
1220+ 1 0.000000e+00 # MD
1221+ 3 0.000000e+00 # MS
1222+ 5 4.889917e+00 # MB
1223+ 1000012 1.852583e+02 # Msn1
1224+ 1000014 1.852583e+02 # Msn2
1225+ 1000016 1.847085e+02 # Msn3
1226+ 1000011 2.029157e+02 # Msl1
1227+ 1000013 2.029157e+02 # Msl2
1228+ 1000015 1.344909e+02 # Msl3
1229+ 2000011 1.441028e+02 # Msl4
1230+ 2000013 1.441028e+02 # Msl5
1231+ 2000015 2.068678e+02 # Msl6
1232+ 1000002 5.611190e+02 # Msu1
1233+ 1000004 5.611190e+02 # Msu2
1234+ 1000006 3.996685e+02 # Msu3
1235+ 2000002 5.492593e+02 # Msu4
1236+ 2000004 5.492593e+02 # Msu5
1237+ 2000006 5.857858e+02 # Msu6
1238+ 1000001 5.684411e+02 # Msd1
1239+ 1000003 5.684411e+02 # Msd2
1240+ 1000005 5.130652e+02 # Msd3
1241+ 2000001 5.452285e+02 # Msd4
1242+ 2000003 5.452285e+02 # Msd5
1243+ 2000005 5.437267e+02 # Msd6
1244+## Not dependent paramater.
1245+## Those values should be edited following analytical the
1246+## analytical expression. Some generator could simply ignore
1247+## those values and use the analytical expression
1248+ 22 0.000000 # a : 0.0
1249+ 21 0.000000 # g : 0.0
1250+ 9000001 0.000000 # ghG : 0.0
1251+ 9000002 0.000000 # ghA : 0.0
1252+
1253+###################################
1254+## INFORMATION FOR TD
1255+###################################
1256+Block TD
1257+ 3 3 -1.106937e+02 # Rtd33
1258+
1259+###################################
1260+## INFORMATION FOR TE
1261+###################################
1262+Block TE
1263+ 3 3 -2.540197e+01 # Rte33
1264+
1265+###################################
1266+## INFORMATION FOR MSE2
1267+###################################
1268+Block MSE2
1269+ 1 1 1.863063e+04 # RmE211
1270+ 2 2 1.863063e+04 # RmE222
1271+ 3 3 1.796764e+04 # RmE233
1272+
1273+###################################
1274+## INFORMATION FOR UMIX
1275+###################################
1276+Block UMIX
1277+ 1 1 9.168349e-01 # RUU11
1278+ 1 2 -3.992666e-01 # RUU12
1279+ 2 1 3.992666e-01 # RUU21
1280+ 2 2 9.168349e-01 # RUU22
1281+
1282+###################################
1283+## INFORMATION FOR SNUMIX
1284+###################################
1285+Block SNUMIX
1286+ 1 1 1.000000e+00 # RRn11
1287+ 2 2 1.000000e+00 # RRn22
1288+ 3 3 1.000000e+00 # RRn33
1289+
1290+###################################
1291+## INFORMATION FOR MSQ2
1292+###################################
1293+Block MSQ2
1294+ 1 1 2.998367e+05 # RmQ211
1295+ 2 2 2.998367e+05 # RmQ222
1296+ 3 3 2.487654e+05 # RmQ233
1297+
1298+###################################
1299+## INFORMATION FOR SMINPUTS
1300+###################################
1301+Block SMINPUTS
1302+ 1 1.279340e+02 # aEWM1
1303+ 3 1.180000e-01 # aS
1304+
1305+###################################
1306+## INFORMATION FOR MSU2
1307+###################################
1308+Block MSU2
1309+ 1 1 2.803821e+05 # RmU211
1310+ 2 2 2.803821e+05 # RmU222
1311+ 3 3 1.791371e+05 # RmU233
1312+
1313+###################################
1314+## INFORMATION FOR VMIX
1315+###################################
1316+Block VMIX
1317+ 1 1 9.725578e-01 # RVV11
1318+ 1 2 -2.326612e-01 # RVV12
1319+ 2 1 2.326612e-01 # RVV21
1320+ 2 2 9.725578e-01 # RVV22
1321+
1322+###################################
1323+## INFORMATION FOR MSD2
1324+###################################
1325+Block MSD2
1326+ 1 1 2.736847e+05 # RmD211
1327+ 2 2 2.736847e+05 # RmD222
1328+ 3 3 2.702620e+05 # RmD233
1329+
1330+###################################
1331+## INFORMATION FOR FRALPHA
1332+###################################
1333+Block FRALPHA
1334+ 1 -1.138252e-01 # alp
1335+
1336+###################################
1337+## INFORMATION FOR UPMNS
1338+###################################
1339+Block UPMNS
1340+ 1 1 1.000000e+00 # RMNS11
1341+ 2 2 1.000000e+00 # RMNS22
1342+ 3 3 1.000000e+00 # RMNS33
1343+
1344+###################################
1345+## INFORMATION FOR HMIX
1346+###################################
1347+Block HMIX
1348+ 1 3.576810e+02 # RMUH
1349+ 2 9.748624e+00 # tb
1350+ 4 1.664391e+05 # MA2
1351+#===========================================================
1352+# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)
1353+#===========================================================
1354+
1355+Block QNUMBERS 1000022 # n1
1356+ 1 0 # 3 times electric charge
1357+ 2 6 # number of spin states (2S+1)
1358+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1359+ 4 0 # Particle/Antiparticle distinction (0=own anti)
1360+Block QNUMBERS 1000023 # n2
1361+ 1 0 # 3 times electric charge
1362+ 2 6 # number of spin states (2S+1)
1363+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1364+ 4 0 # Particle/Antiparticle distinction (0=own anti)
1365+Block QNUMBERS 1000025 # n3
1366+ 1 0 # 3 times electric charge
1367+ 2 6 # number of spin states (2S+1)
1368+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1369+ 4 0 # Particle/Antiparticle distinction (0=own anti)
1370+Block QNUMBERS 1000035 # n4
1371+ 1 0 # 3 times electric charge
1372+ 2 6 # number of spin states (2S+1)
1373+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1374+ 4 0 # Particle/Antiparticle distinction (0=own anti)
1375+Block QNUMBERS 1000024 # x1+
1376+ 1 3 # 3 times electric charge
1377+ 2 6 # number of spin states (2S+1)
1378+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1379+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1380+Block QNUMBERS 1000037 # x2+
1381+ 1 3 # 3 times electric charge
1382+ 2 6 # number of spin states (2S+1)
1383+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1384+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1385+Block QNUMBERS 1000021 # go
1386+ 1 0 # 3 times electric charge
1387+ 2 6 # number of spin states (2S+1)
1388+ 3 8 # colour rep (1: singlet, 3: triplet, 8: octet)
1389+ 4 0 # Particle/Antiparticle distinction (0=own anti)
1390+Block QNUMBERS 35 # h02
1391+ 1 0 # 3 times electric charge
1392+ 2 3 # number of spin states (2S+1)
1393+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1394+ 4 0 # Particle/Antiparticle distinction (0=own anti)
1395+Block QNUMBERS 36 # A0
1396+ 1 0 # 3 times electric charge
1397+ 2 3 # number of spin states (2S+1)
1398+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1399+ 4 0 # Particle/Antiparticle distinction (0=own anti)
1400+Block QNUMBERS 37 # H+
1401+ 1 3 # 3 times electric charge
1402+ 2 3 # number of spin states (2S+1)
1403+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1404+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1405+Block QNUMBERS 250 # G0
1406+ 1 0 # 3 times electric charge
1407+ 2 3 # number of spin states (2S+1)
1408+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1409+ 4 0 # Particle/Antiparticle distinction (0=own anti)
1410+Block QNUMBERS 251 # G+
1411+ 1 3 # 3 times electric charge
1412+ 2 3 # number of spin states (2S+1)
1413+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1414+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1415+Block QNUMBERS 1000012 # sv1
1416+ 1 0 # 3 times electric charge
1417+ 2 3 # number of spin states (2S+1)
1418+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1419+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1420+Block QNUMBERS 1000014 # sv2
1421+ 1 0 # 3 times electric charge
1422+ 2 3 # number of spin states (2S+1)
1423+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1424+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1425+Block QNUMBERS 1000016 # sv3
1426+ 1 0 # 3 times electric charge
1427+ 2 3 # number of spin states (2S+1)
1428+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1429+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1430+Block QNUMBERS 1000011 # sl1-
1431+ 1 -3 # 3 times electric charge
1432+ 2 3 # number of spin states (2S+1)
1433+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1434+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1435+Block QNUMBERS 1000013 # sl2-
1436+ 1 -3 # 3 times electric charge
1437+ 2 3 # number of spin states (2S+1)
1438+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1439+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1440+Block QNUMBERS 1000015 # sl3-
1441+ 1 -3 # 3 times electric charge
1442+ 2 3 # number of spin states (2S+1)
1443+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1444+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1445+Block QNUMBERS 2000011 # sl4-
1446+ 1 -3 # 3 times electric charge
1447+ 2 3 # number of spin states (2S+1)
1448+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1449+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1450+Block QNUMBERS 2000013 # sl5-
1451+ 1 -3 # 3 times electric charge
1452+ 2 3 # number of spin states (2S+1)
1453+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1454+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1455+Block QNUMBERS 2000015 # sl6-
1456+ 1 -3 # 3 times electric charge
1457+ 2 3 # number of spin states (2S+1)
1458+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1459+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1460+Block QNUMBERS 1000002 # su1
1461+ 1 2 # 3 times electric charge
1462+ 2 3 # number of spin states (2S+1)
1463+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1464+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1465+Block QNUMBERS 1000004 # su2
1466+ 1 2 # 3 times electric charge
1467+ 2 3 # number of spin states (2S+1)
1468+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1469+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1470+Block QNUMBERS 1000006 # su3
1471+ 1 2 # 3 times electric charge
1472+ 2 3 # number of spin states (2S+1)
1473+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1474+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1475+Block QNUMBERS 2000002 # su4
1476+ 1 2 # 3 times electric charge
1477+ 2 3 # number of spin states (2S+1)
1478+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1479+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1480+Block QNUMBERS 2000004 # su5
1481+ 1 2 # 3 times electric charge
1482+ 2 3 # number of spin states (2S+1)
1483+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1484+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1485+Block QNUMBERS 2000006 # su6
1486+ 1 2 # 3 times electric charge
1487+ 2 3 # number of spin states (2S+1)
1488+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1489+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1490+Block QNUMBERS 1000001 # sd1
1491+ 1 -1 # 3 times electric charge
1492+ 2 3 # number of spin states (2S+1)
1493+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1494+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1495+Block QNUMBERS 1000003 # sd2
1496+ 1 -1 # 3 times electric charge
1497+ 2 3 # number of spin states (2S+1)
1498+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1499+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1500+Block QNUMBERS 1000005 # sd3
1501+ 1 -1 # 3 times electric charge
1502+ 2 3 # number of spin states (2S+1)
1503+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1504+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1505+Block QNUMBERS 2000001 # sd4
1506+ 1 -1 # 3 times electric charge
1507+ 2 3 # number of spin states (2S+1)
1508+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1509+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1510+Block QNUMBERS 2000003 # sd5
1511+ 1 -1 # 3 times electric charge
1512+ 2 3 # number of spin states (2S+1)
1513+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1514+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1515+Block QNUMBERS 2000005 # sd6
1516+ 1 -1 # 3 times electric charge
1517+ 2 3 # number of spin states (2S+1)
1518+ 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1519+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1520+Block QNUMBERS 9000001 # ghG
1521+ 1 0 # 3 times electric charge
1522+ 2 -3 # number of spin states (2S+1)
1523+ 3 8 # colour rep (1: singlet, 3: triplet, 8: octet)
1524+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1525+Block QNUMBERS 9000002 # ghA
1526+ 1 0 # 3 times electric charge
1527+ 2 -3 # number of spin states (2S+1)
1528+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1529+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1530+Block QNUMBERS 9000003 # ghZ
1531+ 1 0 # 3 times electric charge
1532+ 2 -3 # number of spin states (2S+1)
1533+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1534+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1535+Block QNUMBERS 9000004 # ghWp
1536+ 1 3 # 3 times electric charge
1537+ 2 -3 # number of spin states (2S+1)
1538+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1539+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1540+Block QNUMBERS 9000005 # ghWm
1541+ 1 -3 # 3 times electric charge
1542+ 2 -3 # number of spin states (2S+1)
1543+ 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1544+ 4 1 # Particle/Antiparticle distinction (0=own anti)
1545
1546=== removed file 'models/mssm/restrict_simplified.dat'
1547--- models/mssm/restrict_simplified.dat 2011-03-20 14:41:56 +0000
1548+++ models/mssm/restrict_simplified.dat 1970-01-01 00:00:00 +0000
1549@@ -1,525 +0,0 @@
1550-######################################################################
1551-## PARAM_CARD AUTOMATICALY GENERATED BY THE UFO #####################
1552-######################################################################
1553-
1554-###################################
1555-## INFORMATION FOR USQMIX
1556-###################################
1557-Block USQMIX
1558- 1 1 1.000000e+00 # RRu11
1559- 2 2 1.000000e+00 # RRu22
1560- 3 3 5.536450e-01 # RRu33
1561- 3 6 8.327528e-01 # RRu36
1562- 4 4 1.000000e+00 # RRu44
1563- 5 5 1.000000e+00 # RRu55
1564- 6 3 8.327528e-01 # RRu63
1565- 6 6 -5.536450e-01 # RRu66
1566-
1567-###################################
1568-## INFORMATION FOR MSL2
1569-###################################
1570-Block MSL2
1571- 1 1 3.815567e+04 # RmL211
1572- 2 2 3.815567e+04 # RmL222
1573- 3 3 3.782868e+04 # RmL233
1574-
1575-###################################
1576-## INFORMATION FOR DECAY
1577-###################################
1578-DECAY 23 2.411433e+00
1579-DECAY 24 2.002822e+00
1580-DECAY 1000022 0.000000e+00
1581-DECAY 1000023 2.077700e-02
1582-DECAY 1000025 1.915985e+00
1583-DECAY 1000035 2.585851e+00
1584-DECAY 1000024 1.704145e-02
1585-DECAY 1000037 2.486895e+00
1586-DECAY 1000021 5.506754e+00
1587-DECAY 25 1.986108e-03
1588-DECAY 35 5.748014e-01
1589-DECAY 36 6.321785e-01
1590-DECAY 37 5.469628e-01
1591-DECAY 6 1.561950e+00
1592-DECAY 1000012 1.498816e-01
1593-DECAY 1000014 1.498816e-01
1594-DECAY 1000016 1.475190e-01
1595-DECAY 1000011 2.136822e-01
1596-DECAY 1000013 2.136822e-01
1597-DECAY 1000015 1.483273e-01
1598-DECAY 2000011 2.161216e-01
1599-DECAY 2000013 2.161216e-01
1600-DECAY 2000015 2.699061e-01
1601-DECAY 1000002 5.477195e+00
1602-DECAY 1000004 5.477195e+00
1603-DECAY 1000006 2.021596e+00
1604-DECAY 2000002 1.152973e+00
1605-DECAY 2000004 1.152973e+00
1606-DECAY 2000006 7.373133e+00
1607-DECAY 1000001 5.312788e+00
1608-DECAY 1000003 5.312788e+00
1609-DECAY 1000005 3.736276e+00
1610-DECAY 2000001 2.858123e-01
1611-DECAY 2000003 2.858123e-01
1612-DECAY 2000005 8.015663e-01
1613-## Not dependent paramater.
1614-## Those values should be edited following analytical the
1615-## analytical expression. Some generator could simply ignore
1616-## those values and use the analytical expression
1617-DECAY 22 0.000000 # a : 0.0
1618-DECAY 21 0.000000 # g : 0.0
1619-DECAY 250 0.000000 # G0 : 0.0
1620-DECAY 251 0.000000 # G+ : 0.0
1621-DECAY 12 0.000000 # ve : 0.0
1622-DECAY 14 0.000000 # vm : 0.0
1623-DECAY 16 0.000000 # vt : 0.0
1624-DECAY 11 0.000000 # e- : 0.0
1625-DECAY 13 0.000000 # mu- : 0.0
1626-DECAY 15 0.000000 # tau- : 0.0
1627-DECAY 2 0.000000 # u : 0.0
1628-DECAY 4 0.000000 # c : 0.0
1629-DECAY 1 0.000000 # d : 0.0
1630-DECAY 3 0.000000 # s : 0.0
1631-DECAY 5 0.000000 # b : 0.0
1632-DECAY 9000001 0.000000 # ghG : 0.0
1633-DECAY 9000002 0.000000 # ghA : 0.0
1634-
1635-###################################
1636-## INFORMATION FOR DSQMIX
1637-###################################
1638-Block DSQMIX
1639- 1 1 1.000000e+00 # RRd11
1640- 2 2 1.000000e+00 # RRd22
1641- 3 3 9.387379e-01 # RRd33
1642- 3 6 3.446319e-01 # RRd36
1643- 4 4 1.000000e+00 # RRd44
1644- 5 5 1.000000e+00 # RRd55
1645- 6 3 -3.446319e-01 # RRd63
1646- 6 6 9.387379e-01 # RRd66
1647-
1648-###################################
1649-## INFORMATION FOR MSOFT
1650-###################################
1651-Block MSOFT
1652- 1 1.013965e+02 # RMx1
1653- 2 1.915042e+02 # RMx2
1654- 3 5.882630e+02 # RMx3
1655- 21 3.233749e+04 # mHu2
1656- 22 -1.288001e+05 # mHd2
1657-
1658-###################################
1659-## INFORMATION FOR YE
1660-###################################
1661-Block YE
1662- 3 3 1.008908e-01 # Rye33
1663-
1664-###################################
1665-## INFORMATION FOR YD
1666-###################################
1667-Block YD
1668- 3 3 1.388402e-01 # Ryd33
1669-
1670-###################################
1671-## INFORMATION FOR VCKM
1672-###################################
1673-Block VCKM
1674- 1 1 1.000000e+00 # RCKM11
1675- 2 2 1.000000e+00 # RCKM22
1676- 3 3 1.000000e+00 # RCKM33
1677-
1678-###################################
1679-## INFORMATION FOR YU
1680-###################################
1681-Block YU
1682- 3 3 8.928445e-01 # Ryu33
1683-
1684-###################################
1685-## INFORMATION FOR NMIX
1686-###################################
1687-Block NMIX
1688- 1 1 9.863644e-01 # RNN11
1689- 1 2 -5.311036e-02 # RNN12
1690- 1 3 1.464340e-01 # RNN13
1691- 1 4 -5.311861e-02 # RNN14
1692- 2 1 9.935054e-02 # RNN21
1693- 2 2 9.449493e-01 # RNN22
1694- 2 3 -2.698467e-01 # RNN23
1695- 2 4 1.561507e-01 # RNN24
1696- 3 1 -6.033880e-02 # RNN31
1697- 3 2 8.770049e-02 # RNN32
1698- 3 3 6.958775e-01 # RNN33
1699- 3 4 7.102270e-01 # RNN34
1700- 4 1 -1.165071e-01 # RNN41
1701- 4 2 3.107390e-01 # RNN42
1702- 4 3 6.492260e-01 # RNN43
1703- 4 4 -6.843778e-01 # RNN44
1704-
1705-###################################
1706-## INFORMATION FOR TU
1707-###################################
1708-Block TU
1709- 3 3 -4.447525e+02 # Rtu33
1710-
1711-###################################
1712-## INFORMATION FOR SELMIX
1713-###################################
1714-Block SELMIX
1715- 1 1 1.000000e+00 # RRl11
1716- 2 2 1.000000e+00 # RRl22
1717- 3 3 2.824872e-01 # RRl33
1718- 3 6 9.592711e-01 # RRl36
1719- 4 4 1.000000e+00 # RRl44
1720- 5 5 1.000000e+00 # RRl55
1721- 6 3 9.592711e-01 # RRl63
1722- 6 6 -2.824872e-01 # RRl66
1723-
1724-###################################
1725-## INFORMATION FOR MASS
1726-###################################
1727-Block MASS
1728- 23 9.118760e+01 # MZ
1729- 24 7.982901e+01 # MW
1730- 1000022 9.668807e+01 # Mneu1
1731- 1000023 1.810882e+02 # Mneu2
1732- 1000025 -3.637560e+02 # Mneu3
1733- 1000035 3.817294e+02 # Mneu4
1734- 1000024 1.816965e+02 # Mch1
1735- 1000037 3.799393e+02 # Mch2
1736- 1000021 6.077137e+02 # Mgo
1737- 25 1.108991e+02 # MH01
1738- 35 3.999601e+02 # MH02
1739- 36 3.995839e+02 # MA0
1740- 37 4.078790e+02 # MH
1741- 12 0.000000e+00 # Mve
1742- 14 0.000000e+00 # Mvm
1743- 16 0.000000e+00 # Mvt
1744- 11 0.000000e+00 # Me
1745- 13 0.000000e+00 # Mm
1746- 15 1.777000e+00 # Mta
1747- 2 0.000000e+00 # MU
1748- 4 0.000000e+00 # MC
1749- 6 1.750000e+02 # MT
1750- 1 0.000000e+00 # MD
1751- 3 0.000000e+00 # MS
1752- 5 4.889917e+00 # MB
1753- 1000012 1.852583e+02 # Msn1
1754- 1000014 1.852583e+02 # Msn2
1755- 1000016 1.847085e+02 # Msn3
1756- 1000011 2.029157e+02 # Msl1
1757- 1000013 2.029157e+02 # Msl2
1758- 1000015 1.344909e+02 # Msl3
1759- 2000011 1.441028e+02 # Msl4
1760- 2000013 1.441028e+02 # Msl5
1761- 2000015 2.068678e+02 # Msl6
1762- 1000002 5.611190e+02 # Msu1
1763- 1000004 5.611190e+02 # Msu2
1764- 1000006 3.996685e+02 # Msu3
1765- 2000002 5.611190e+02 # Msu4
1766- 2000004 5.492593e+02 # Msu5
1767- 2000006 3.996685e+02 # Msu6
1768- 1000001 5.684411e+02 # Msd1
1769- 1000003 5.684411e+02 # Msd2
1770- 1000005 5.130652e+02 # Msd3
1771- 2000001 5.684411e+02 # Msd4
1772- 2000003 5.684411e+02 # Msd5
1773- 2000005 5.130652e+02 # Msd6
1774-## Not dependent paramater.
1775-## Those values should be edited following analytical the
1776-## analytical expression. Some generator could simply ignore
1777-## those values and use the analytical expression
1778- 22 0.000000 # a : 0.0
1779- 21 0.000000 # g : 0.0
1780- 9000001 0.000000 # ghG : 0.0
1781- 9000002 0.000000 # ghA : 0.0
1782-
1783-###################################
1784-## INFORMATION FOR TD
1785-###################################
1786-Block TD
1787- 3 3 -1.106937e+02 # Rtd33
1788-
1789-###################################
1790-## INFORMATION FOR TE
1791-###################################
1792-Block TE
1793- 3 3 -2.540197e+01 # Rte33
1794-
1795-###################################
1796-## INFORMATION FOR MSE2
1797-###################################
1798-Block MSE2
1799- 1 1 1.863063e+04 # RmE211
1800- 2 2 1.863063e+04 # RmE222
1801- 3 3 1.796764e+04 # RmE233
1802-
1803-###################################
1804-## INFORMATION FOR UMIX
1805-###################################
1806-Block UMIX
1807- 1 1 9.168349e-01 # RUU11
1808- 1 2 -3.992666e-01 # RUU12
1809- 2 1 3.992666e-01 # RUU21
1810- 2 2 9.168349e-01 # RUU22
1811-
1812-###################################
1813-## INFORMATION FOR SNUMIX
1814-###################################
1815-Block SNUMIX
1816- 1 1 1.000000e+00 # RRn11
1817- 2 2 1.000000e+00 # RRn22
1818- 3 3 1.000000e+00 # RRn33
1819-
1820-###################################
1821-## INFORMATION FOR MSQ2
1822-###################################
1823-Block MSQ2
1824- 1 1 2.998367e+05 # RmQ211
1825- 2 2 2.998367e+05 # RmQ222
1826- 3 3 2.487654e+05 # RmQ233
1827-
1828-###################################
1829-## INFORMATION FOR SMINPUTS
1830-###################################
1831-Block SMINPUTS
1832- 1 1.279340e+02 # aEWM1
1833- 3 1.180000e-01 # aS
1834-
1835-###################################
1836-## INFORMATION FOR MSU2
1837-###################################
1838-Block MSU2
1839- 1 1 2.803821e+05 # RmU211
1840- 2 2 2.803821e+05 # RmU222
1841- 3 3 1.791371e+05 # RmU233
1842-
1843-###################################
1844-## INFORMATION FOR VMIX
1845-###################################
1846-Block VMIX
1847- 1 1 9.725578e-01 # RVV11
1848- 1 2 -2.326612e-01 # RVV12
1849- 2 1 2.326612e-01 # RVV21
1850- 2 2 9.725578e-01 # RVV22
1851-
1852-###################################
1853-## INFORMATION FOR MSD2
1854-###################################
1855-Block MSD2
1856- 1 1 2.736847e+05 # RmD211
1857- 2 2 2.736847e+05 # RmD222
1858- 3 3 2.702620e+05 # RmD233
1859-
1860-###################################
1861-## INFORMATION FOR FRALPHA
1862-###################################
1863-Block FRALPHA
1864- 1 -1.138252e-01 # alp
1865-
1866-###################################
1867-## INFORMATION FOR UPMNS
1868-###################################
1869-Block UPMNS
1870- 1 1 1.000000e+00 # RMNS11
1871- 2 2 1.000000e+00 # RMNS22
1872- 3 3 1.000000e+00 # RMNS33
1873-
1874-###################################
1875-## INFORMATION FOR HMIX
1876-###################################
1877-Block HMIX
1878- 1 3.576810e+02 # RMUH
1879- 2 9.748624e+00 # tb
1880- 4 1.664391e+05 # MA2
1881-#===========================================================
1882-# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)
1883-#===========================================================
1884-
1885-Block QNUMBERS 1000022 # n1
1886- 1 0 # 3 times electric charge
1887- 2 6 # number of spin states (2S+1)
1888- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1889- 4 0 # Particle/Antiparticle distinction (0=own anti)
1890-Block QNUMBERS 1000023 # n2
1891- 1 0 # 3 times electric charge
1892- 2 6 # number of spin states (2S+1)
1893- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1894- 4 0 # Particle/Antiparticle distinction (0=own anti)
1895-Block QNUMBERS 1000025 # n3
1896- 1 0 # 3 times electric charge
1897- 2 6 # number of spin states (2S+1)
1898- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1899- 4 0 # Particle/Antiparticle distinction (0=own anti)
1900-Block QNUMBERS 1000035 # n4
1901- 1 0 # 3 times electric charge
1902- 2 6 # number of spin states (2S+1)
1903- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1904- 4 0 # Particle/Antiparticle distinction (0=own anti)
1905-Block QNUMBERS 1000024 # x1+
1906- 1 3 # 3 times electric charge
1907- 2 6 # number of spin states (2S+1)
1908- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1909- 4 1 # Particle/Antiparticle distinction (0=own anti)
1910-Block QNUMBERS 1000037 # x2+
1911- 1 3 # 3 times electric charge
1912- 2 6 # number of spin states (2S+1)
1913- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1914- 4 1 # Particle/Antiparticle distinction (0=own anti)
1915-Block QNUMBERS 1000021 # go
1916- 1 0 # 3 times electric charge
1917- 2 6 # number of spin states (2S+1)
1918- 3 8 # colour rep (1: singlet, 3: triplet, 8: octet)
1919- 4 0 # Particle/Antiparticle distinction (0=own anti)
1920-Block QNUMBERS 35 # h02
1921- 1 0 # 3 times electric charge
1922- 2 3 # number of spin states (2S+1)
1923- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1924- 4 0 # Particle/Antiparticle distinction (0=own anti)
1925-Block QNUMBERS 36 # A0
1926- 1 0 # 3 times electric charge
1927- 2 3 # number of spin states (2S+1)
1928- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1929- 4 0 # Particle/Antiparticle distinction (0=own anti)
1930-Block QNUMBERS 37 # H+
1931- 1 3 # 3 times electric charge
1932- 2 3 # number of spin states (2S+1)
1933- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1934- 4 1 # Particle/Antiparticle distinction (0=own anti)
1935-Block QNUMBERS 250 # G0
1936- 1 0 # 3 times electric charge
1937- 2 3 # number of spin states (2S+1)
1938- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1939- 4 0 # Particle/Antiparticle distinction (0=own anti)
1940-Block QNUMBERS 251 # G+
1941- 1 3 # 3 times electric charge
1942- 2 3 # number of spin states (2S+1)
1943- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1944- 4 1 # Particle/Antiparticle distinction (0=own anti)
1945-Block QNUMBERS 1000012 # sv1
1946- 1 0 # 3 times electric charge
1947- 2 3 # number of spin states (2S+1)
1948- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1949- 4 1 # Particle/Antiparticle distinction (0=own anti)
1950-Block QNUMBERS 1000014 # sv2
1951- 1 0 # 3 times electric charge
1952- 2 3 # number of spin states (2S+1)
1953- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1954- 4 1 # Particle/Antiparticle distinction (0=own anti)
1955-Block QNUMBERS 1000016 # sv3
1956- 1 0 # 3 times electric charge
1957- 2 3 # number of spin states (2S+1)
1958- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1959- 4 1 # Particle/Antiparticle distinction (0=own anti)
1960-Block QNUMBERS 1000011 # sl1-
1961- 1 -3 # 3 times electric charge
1962- 2 3 # number of spin states (2S+1)
1963- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1964- 4 1 # Particle/Antiparticle distinction (0=own anti)
1965-Block QNUMBERS 1000013 # sl2-
1966- 1 -3 # 3 times electric charge
1967- 2 3 # number of spin states (2S+1)
1968- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1969- 4 1 # Particle/Antiparticle distinction (0=own anti)
1970-Block QNUMBERS 1000015 # sl3-
1971- 1 -3 # 3 times electric charge
1972- 2 3 # number of spin states (2S+1)
1973- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1974- 4 1 # Particle/Antiparticle distinction (0=own anti)
1975-Block QNUMBERS 2000011 # sl4-
1976- 1 -3 # 3 times electric charge
1977- 2 3 # number of spin states (2S+1)
1978- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1979- 4 1 # Particle/Antiparticle distinction (0=own anti)
1980-Block QNUMBERS 2000013 # sl5-
1981- 1 -3 # 3 times electric charge
1982- 2 3 # number of spin states (2S+1)
1983- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1984- 4 1 # Particle/Antiparticle distinction (0=own anti)
1985-Block QNUMBERS 2000015 # sl6-
1986- 1 -3 # 3 times electric charge
1987- 2 3 # number of spin states (2S+1)
1988- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
1989- 4 1 # Particle/Antiparticle distinction (0=own anti)
1990-Block QNUMBERS 1000002 # su1
1991- 1 2 # 3 times electric charge
1992- 2 3 # number of spin states (2S+1)
1993- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1994- 4 1 # Particle/Antiparticle distinction (0=own anti)
1995-Block QNUMBERS 1000004 # su2
1996- 1 2 # 3 times electric charge
1997- 2 3 # number of spin states (2S+1)
1998- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
1999- 4 1 # Particle/Antiparticle distinction (0=own anti)
2000-Block QNUMBERS 1000006 # su3
2001- 1 2 # 3 times electric charge
2002- 2 3 # number of spin states (2S+1)
2003- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
2004- 4 1 # Particle/Antiparticle distinction (0=own anti)
2005-Block QNUMBERS 2000002 # su4
2006- 1 2 # 3 times electric charge
2007- 2 3 # number of spin states (2S+1)
2008- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
2009- 4 1 # Particle/Antiparticle distinction (0=own anti)
2010-Block QNUMBERS 2000004 # su5
2011- 1 2 # 3 times electric charge
2012- 2 3 # number of spin states (2S+1)
2013- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
2014- 4 1 # Particle/Antiparticle distinction (0=own anti)
2015-Block QNUMBERS 2000006 # su6
2016- 1 2 # 3 times electric charge
2017- 2 3 # number of spin states (2S+1)
2018- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
2019- 4 1 # Particle/Antiparticle distinction (0=own anti)
2020-Block QNUMBERS 1000001 # sd1
2021- 1 -1 # 3 times electric charge
2022- 2 3 # number of spin states (2S+1)
2023- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
2024- 4 1 # Particle/Antiparticle distinction (0=own anti)
2025-Block QNUMBERS 1000003 # sd2
2026- 1 -1 # 3 times electric charge
2027- 2 3 # number of spin states (2S+1)
2028- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
2029- 4 1 # Particle/Antiparticle distinction (0=own anti)
2030-Block QNUMBERS 1000005 # sd3
2031- 1 -1 # 3 times electric charge
2032- 2 3 # number of spin states (2S+1)
2033- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
2034- 4 1 # Particle/Antiparticle distinction (0=own anti)
2035-Block QNUMBERS 2000001 # sd4
2036- 1 -1 # 3 times electric charge
2037- 2 3 # number of spin states (2S+1)
2038- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
2039- 4 1 # Particle/Antiparticle distinction (0=own anti)
2040-Block QNUMBERS 2000003 # sd5
2041- 1 -1 # 3 times electric charge
2042- 2 3 # number of spin states (2S+1)
2043- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
2044- 4 1 # Particle/Antiparticle distinction (0=own anti)
2045-Block QNUMBERS 2000005 # sd6
2046- 1 -1 # 3 times electric charge
2047- 2 3 # number of spin states (2S+1)
2048- 3 3 # colour rep (1: singlet, 3: triplet, 8: octet)
2049- 4 1 # Particle/Antiparticle distinction (0=own anti)
2050-Block QNUMBERS 9000001 # ghG
2051- 1 0 # 3 times electric charge
2052- 2 -3 # number of spin states (2S+1)
2053- 3 8 # colour rep (1: singlet, 3: triplet, 8: octet)
2054- 4 1 # Particle/Antiparticle distinction (0=own anti)
2055-Block QNUMBERS 9000002 # ghA
2056- 1 0 # 3 times electric charge
2057- 2 -3 # number of spin states (2S+1)
2058- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
2059- 4 1 # Particle/Antiparticle distinction (0=own anti)
2060-Block QNUMBERS 9000003 # ghZ
2061- 1 0 # 3 times electric charge
2062- 2 -3 # number of spin states (2S+1)
2063- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
2064- 4 1 # Particle/Antiparticle distinction (0=own anti)
2065-Block QNUMBERS 9000004 # ghWp
2066- 1 3 # 3 times electric charge
2067- 2 -3 # number of spin states (2S+1)
2068- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
2069- 4 1 # Particle/Antiparticle distinction (0=own anti)
2070-Block QNUMBERS 9000005 # ghWm
2071- 1 -3 # 3 times electric charge
2072- 2 -3 # number of spin states (2S+1)
2073- 3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
2074- 4 1 # Particle/Antiparticle distinction (0=own anti)
2075
2076=== modified file 'models/write_param_card.py'
2077--- models/write_param_card.py 2011-03-20 20:39:57 +0000
2078+++ models/write_param_card.py 2011-03-31 16:37:30 +0000
2079@@ -75,17 +75,39 @@
2080 """define self.dep_mass and self.dep_width in case that they are
2081 requested in the param_card.dat"""
2082
2083- give_m_info = lambda part: (part, self.param_dict[part["mass"]])
2084- give_w_info = lambda part: (part, self.param_dict[part["width"]])
2085 all_particles = self.model['particles']
2086
2087- #create list of mass - width
2088- self.dep_mass = [give_m_info(p) for p in all_particles
2089- if p['pdg_code'] > 0 and p['mass'] not in self.external]
2090- self.dep_width = [give_w_info(p) for p in all_particles
2091- if p['pdg_code'] > 0 and p['width'] not in self.external]
2092-
2093-
2094+ #
2095+ self.dep_mass, self.dep_width = [] , []
2096+ self.duplicate_mass, self.duplicate_width =[], []
2097+
2098+ def_param = []
2099+ # one loop for the mass
2100+ for p in all_particles:
2101+ mass = self.param_dict[p["mass"]]
2102+ if mass in def_param:
2103+ self.duplicate_mass.append((p, mass))
2104+ continue
2105+ elif p["mass"] != 'ZERO':
2106+ def_param.append(mass)
2107+ if p['mass'] not in self.external:
2108+ self.dep_mass.append((p, mass))
2109+
2110+ # one loop for the width
2111+ def_param = []
2112+ for p in all_particles:
2113+ width = self.param_dict[p["width"]]
2114+ if width in def_param:
2115+ self.duplicate_width.append((p, width))
2116+ continue
2117+ else:
2118+ if p["width"] != 'ZERO':
2119+ def_param.append(width)
2120+ if p['width'] not in self.external:
2121+ self.dep_width.append((p, width))
2122+
2123+
2124+
2125 @staticmethod
2126 def order_param(obj1, obj2):
2127 """ order parameter of a given block """
2128@@ -147,7 +169,7 @@
2129 self.write_block(cur_lhablock)
2130 #write the parameter
2131 self.write_param(param, cur_lhablock)
2132-
2133+ self.write_dep_param_block(cur_lhablock)
2134 self.write_qnumber()
2135
2136 def write_block(self, name):
2137@@ -184,27 +206,46 @@
2138 """writing the requested LHA parameter"""
2139
2140 if lhablock == 'MASS':
2141- data = self.dep_mass
2142+ data = self.dep_mass
2143 prefix = " "
2144 elif lhablock == 'DECAY':
2145 data = self.dep_width
2146 prefix = "DECAY "
2147 else:
2148 return
2149-
2150- text = "## Not dependent paramater.\n"
2151- text += "## Those values should be edited following the \n"
2152- text += "## analytical expression. MG5 ignore those values \n"
2153- text += "## but they are important for interfacing the output of MG5\n"
2154- text += "## to external program such as Pythia.\n"
2155-
2156+
2157+ text = ""
2158 for part, param in data:
2159 if self.model['parameter_dict'][param.name].imag:
2160 raise ParamCardWriterError, 'All Mass/Width Parameter should be real'
2161 value = complex(self.model['parameter_dict'][param.name]).real
2162 text += """%s %s %f # %s : %s \n""" %(prefix, part["pdg_code"],
2163- value, part["name"], param.value)
2164- self.fsock.write(text)
2165+ value, part["name"], param.expr)
2166+
2167+ # Add duplicate parameter
2168+ if lhablock == 'MASS':
2169+ data = self.duplicate_mass
2170+ name = 'mass'
2171+ elif lhablock == 'DECAY':
2172+ data = self.duplicate_width
2173+ name = 'width'
2174+
2175+ for part, param in data:
2176+ if self.model['parameter_dict'][param.name].imag:
2177+ raise ParamCardWriterError, 'All Mass/Width Parameter should be real'
2178+ value = complex(self.model['parameter_dict'][param.name]).real
2179+ text += """%s %s %f # %s : %s \n""" %(prefix, part["pdg_code"],
2180+ value, part["name"], part[name])
2181+
2182+ if not text:
2183+ return
2184+
2185+ pretext = "## Not dependent paramater.\n"
2186+ pretext += "## Those values should be edited following the \n"
2187+ pretext += "## analytical expression. MG5 ignore those values \n"
2188+ pretext += "## but they are important for interfacing the output of MG5\n"
2189+ pretext += "## to external program such as Pythia.\n"
2190+ self.fsock.write(pretext + text)
2191
2192
2193 def write_qnumber(self):
2194@@ -216,10 +257,8 @@
2195 else:
2196 return 1
2197
2198- text="""#===========================================================\n"""
2199- text += """# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)\n"""
2200- text += """#===========================================================\n\n"""
2201-
2202+
2203+ text = ""
2204 for part in self.model['particles']:
2205 if part["pdg_code"] in self.sm_pdg or part["pdg_code"] < 0:
2206 continue
2207@@ -229,8 +268,13 @@
2208 'spin': part["spin"],
2209 'color': part["color"],
2210 'antipart': is_anti(part['self_antipart'])}
2211+
2212+ if text:
2213+ pretext="""#===========================================================\n"""
2214+ pretext += """# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)\n"""
2215+ pretext += """#===========================================================\n\n"""
2216
2217- self.fsock.write(text)
2218+ self.fsock.write(pretext + text)
2219
2220
2221
2222
2223=== modified file 'tests/acceptance_tests/test_model_equivalence.py'
2224--- tests/acceptance_tests/test_model_equivalence.py 2011-03-24 15:44:58 +0000
2225+++ tests/acceptance_tests/test_model_equivalence.py 2011-03-31 16:37:30 +0000
2226@@ -329,7 +329,7 @@
2227 # solutions[variable] = [singlevalue]
2228 # else:
2229 # solutions[variable].append(singlevalue)
2230- self.assertEqual(nb_value, 127)
2231+ self.assertEqual(nb_value, 113)
2232
2233
2234
2235@@ -340,7 +340,7 @@
2236 alreadydefine = []
2237 for line in self.ReturnFile('intparam_definition.inc'):
2238 if 'ENDIF' in line:
2239- self.assertEqual(len(alreadydefine), 35)
2240+ self.assertEqual(len(alreadydefine), 31)
2241
2242 if '=' not in line:
2243 continue
2244@@ -351,7 +351,7 @@
2245 alreadydefine.append(new_def)
2246 alreadydefine = [name.lower() for name in alreadydefine]
2247 alreadydefine.sort()
2248- solution = ['aew ', 'ckm11 ', 'ckm22 ', 'ckm33 ', 'complexi ', 'conjg__ckm11 ', 'conjg__ckm22 ', 'conjg__ckm33 ', 'cw ', 'cw__exp__2 ', 'dum0 ', 'dum1 ', 'ee ', 'ee__exp__2 ', 'g ', 'g1 ', 'g__exp__2 ', 'gal(1) ', 'gal(2) ', 'gw ', 'gw__exp__2 ', 'lam ', 'mh__exp__2 ', 'muh ', 'mw ', 'mw__exp__2 ', 'mz__exp__2 ', 'mz__exp__4 ', 'sqrt__2 ', 'sqrt__aew ', 'sqrt__as ', 'sqrt__sw2 ', 'sw ', 'sw2 ', 'sw__exp__2 ', 'v ', 'v__exp__2 ', 'yb ', 'yt ', 'ytau ']
2249+ solution = ['aew ', 'ckm33 ', 'complexi ', 'conjg__ckm33 ', 'cw ', 'cw__exp__2 ', 'dum0 ', 'dum1 ', 'ee ', 'ee__exp__2 ', 'g ', 'g1 ', 'g__exp__2 ', 'gal(1) ', 'gal(2) ', 'gw ', 'gw__exp__2 ', 'lam ', 'mh__exp__2 ', 'muh ', 'mw ', 'mw__exp__2 ', 'mz__exp__2 ', 'mz__exp__4 ', 'sqrt__2 ', 'sqrt__aew ', 'sqrt__as ', 'sqrt__sw2 ', 'sw ', 'sw2 ', 'sw__exp__2 ', 'v ', 'v__exp__2 ', 'yb ', 'yt ', 'ytau ']
2250 self.assertEqual(alreadydefine, solution)
2251
2252
2253
2254=== modified file 'tests/input_files/restrict_sm.dat'
2255--- tests/input_files/restrict_sm.dat 2011-02-25 13:44:13 +0000
2256+++ tests/input_files/restrict_sm.dat 2011-03-31 16:37:30 +0000
2257@@ -47,4 +47,4 @@
2258 DECAY 6 0.000000e+00 # WT
2259 DECAY 23 2.441404e+00 # WZ
2260 DECAY 24 3.00e+00 # WW
2261-DECAY 25 5.753088e-03 # WH
2262+DECAY 25 2.441404e+00 # WH
2263
2264=== modified file 'tests/unit_tests/core/test_base_objects.py'
2265--- tests/unit_tests/core/test_base_objects.py 2011-03-15 09:38:24 +0000
2266+++ tests/unit_tests/core/test_base_objects.py 2011-03-31 16:37:30 +0000
2267@@ -1529,7 +1529,7 @@
2268 def test_long_shell_string(self):
2269 """Test Process nice_string representation"""
2270
2271- goal_str = '1_cc_ccc_c_cccc_c_cccc_c_cccc_c_cccc_c_cccc_c_cccc-4'
2272+ goal_str = '1_cc_ccc_c_cccc_c_cccc_c_cccc_c_cccc_c_cccc_c_cccc_4'
2273
2274 decay = copy.copy(self.myprocess)
2275 decay.set('legs', copy.deepcopy(decay.get('legs')))
2276
2277=== modified file 'tests/unit_tests/iolibs/test_export_v4.py'
2278--- tests/unit_tests/iolibs/test_export_v4.py 2011-03-24 16:15:56 +0000
2279+++ tests/unit_tests/iolibs/test_export_v4.py 2011-03-31 16:37:30 +0000
2280@@ -8167,11 +8167,13 @@
2281
2282 # internal params
2283 self.assertEqual(len(mg4_model.params_dep), 1)
2284- self.assertEqual(len(mg4_model.params_indep), 36)
2285+ self.assertEqual(len(mg4_model.params_indep), 32)
2286
2287 # couplings
2288 self.assertEqual(len(mg4_model.coups_dep), 3)
2289- self.assertEqual(len(mg4_model.coups_indep), 73)
2290+ sol= ['GC_1', 'GC_2', 'GC_3', 'GC_5', 'GC_6', 'GC_7', 'GC_8', 'GC_13', 'GC_14', 'GC_15', 'GC_16', 'GC_17', 'GC_18', 'GC_19', 'GC_20', 'GC_21', 'GC_22', 'GC_23', 'GC_33', 'GC_34', 'GC_35', 'GC_36', 'GC_37', 'GC_38', 'GC_39', 'GC_40', 'GC_41', 'GC_42', 'GC_43', 'GC_44', 'GC_45', 'GC_46', 'GC_47', 'GC_48', 'GC_49', 'GC_50', 'GC_51', 'GC_52', 'GC_53', 'GC_54', 'GC_55', 'GC_56', 'GC_57', 'GC_58', 'GC_59', 'GC_60', 'GC_61', 'GC_62', 'GC_63', 'GC_64', 'GC_67', 'GC_68', 'GC_69', 'GC_72', 'GC_96', 'GC_97', 'GC_100', 'GC_101', 'GC_102', 'GC_103', 'GC_104', 'GC_135', 'GC_136']
2291+
2292+ self.assertEqual(sol, [ p.name for p in mg4_model.coups_indep])
2293
2294
2295 # MG4 use G and not aS as it basic object for alphas related computation
2296
2297=== modified file 'tests/unit_tests/various/test_import_ufo.py'
2298--- tests/unit_tests/various/test_import_ufo.py 2011-03-19 21:33:51 +0000
2299+++ tests/unit_tests/various/test_import_ufo.py 2011-03-31 16:37:30 +0000
2300@@ -65,7 +65,7 @@
2301 def test_detect_identical_parameters(self):
2302 """ check that we detect correctly identical parameter """
2303
2304- expected=set([('MZ','MH')])
2305+ expected=set([('MZ','MH'), ('WZ','WH')])
2306 result = self.model.detect_identical_parameters()
2307 result = [tuple([obj.name for obj in obj_list]) for obj_list in result]
2308
2309@@ -75,7 +75,8 @@
2310 """check that we treat correctly the identical parameters"""
2311
2312 parameters = self.model.detect_identical_parameters()
2313- self.model.merge_identical_parameters(parameters[0])
2314+ self.model.merge_iden_parameters(parameters[0])
2315+ self.model.merge_iden_parameters(parameters[1])
2316
2317
2318 #check that both MZ and MH are not anymore in the external_parameter
2319@@ -92,20 +93,82 @@
2320 found += 1
2321 self.assertEqual(param.expr, keeped)
2322 self.assertEqual(found, 1)
2323+
2324+ # checked that the mass (and the width) of those particles identical
2325+ self.assertEqual(self.model['particle_dict'][23]['mass'],
2326+ self.model['particle_dict'][25]['mass'])
2327+ self.assertEqual(self.model['particle_dict'][23]['width'],
2328+ self.model['particle_dict'][25]['width'])
2329+
2330
2331
2332- def test_detect_zero_couplings(self):
2333+ def test_detect_zero_iden_couplings(self):
2334 """ check that detect zero couplings works"""
2335
2336-
2337+ zero, iden = self.model.detect_identical_couplings()
2338+
2339+ # check what is the zero coupling
2340 expected = set(['GC_86', 'GC_75', 'GC_74', 'GC_77', 'GC_76', 'GC_71', 'GC_70', 'GC_73', 'GC_72', 'GC_31', 'GC_30', 'GC_32', 'GC_79', 'GC_78', 'GC_88', 'GC_87', 'GC_89', 'GC_105', 'GC_126', 'GC_127', 'GC_124', 'GC_125', 'GC_123', 'GC_120', 'GC_121', 'GC_108', 'GC_109', 'GC_82', 'GC_83', 'GC_84', 'GC_85', 'GC_128', 'GC_129', 'GC_99', 'GC_106', 'GC_111', 'GC_98', 'GC_80', 'GC_28', 'GC_115', 'GC_81', 'GC_119', 'GC_26', 'GC_27', 'GC_68', 'GC_69', 'GC_114', 'GC_107', 'GC_113', 'GC_112', 'GC_135', 'GC_118', 'GC_131', 'GC_130', 'GC_133', 'GC_132', 'GC_117', 'GC_116', 'GC_95', 'GC_94', 'GC_93', 'GC_92', 'GC_91', 'GC_90'])
2341- result = set(self.model.detect_zero_couplings())
2342+ result = set(zero)
2343 for name in result:
2344 self.assertEqual(self.model['coupling_dict'][name], 0)
2345
2346 self.assertEqual(expected, result)
2347
2348-
2349+ # check what are the identical coupling
2350+ expected = [['GC_33', 'GC_29', 'GC_24', 'GC_25', 'GC_122', 'GC_134', 'GC_110'], ['GC_19', 'GC_66'], ['GC_18', 'GC_65'], ['GC_37', 'GC_12'], ['GC_49', 'GC_4'], ['GC_46', 'GC_62']]
2351+ expected.sort()
2352+ iden.sort()
2353+ self.assertEqual(expected, iden)
2354+
2355+ def test_locate_couplings(self):
2356+ """ check the creation of the coupling to vertex dict """
2357+
2358+ target = ['GC_33', 'GC_29', 'GC_24', 'GC_25', 'GC_122', 'GC_134', 'GC_110']
2359+ sol = {'GC_33':[41],
2360+ 'GC_29':[37],
2361+ 'GC_24':[63, 64, 65, 66, 67, 68],
2362+ 'GC_25':[33],
2363+ 'GC_122':[46],
2364+ 'GC_134':[50],
2365+ 'GC_110':[42]}
2366+
2367+ self.model.locate_coupling()
2368+ for coup in target:
2369+ self.assertTrue(coup in self.model.coupling_pos)
2370+ self.assertEqual(sol[coup], [v['id'] for v in self.model.coupling_pos[coup]])
2371+
2372+
2373+ def test_merge_iden_couplings(self):
2374+ """ check that the merged couplings are treated correctly:
2375+ suppression and replacement in the vertex """
2376+
2377+ self.model.locate_coupling()
2378+ zero, iden = self.model.detect_identical_couplings()
2379+
2380+ # Check that All the code/model is the one intended for this test
2381+ target = ['GC_33', 'GC_29', 'GC_24', 'GC_25', 'GC_122', 'GC_134', 'GC_110']
2382+ assert target in iden, 'test not up-to-date'
2383+ vertex_id = [33,37,41,42,46,50,63,64,65,66,67,68]
2384+
2385+
2386+ for id in vertex_id:
2387+ is_in_target = False
2388+ for coup in self.model.get_interaction(id)['couplings'].values():
2389+ if coup in target:
2390+ is_in_target = True
2391+ assert is_in_target == True, 'test not up-to-date'
2392+
2393+ # check now that everything is fine
2394+ self.model.merge_iden_couplings(target)
2395+ for id in vertex_id:
2396+ has_33 = False
2397+ for coup in self.model.get_interaction(id)['couplings'].values():
2398+ self.assertFalse(coup in target[1:])
2399+ if coup == 'GC_33':
2400+ has_33 = True
2401+ self.assertTrue(has_33, True)
2402+
2403 def test_remove_couplings(self):
2404 """ check that the detection of irrelevant interactions works """
2405
2406@@ -126,13 +189,38 @@
2407
2408 # make the real test
2409 result = self.model.remove_couplings(['GC_68','GC_11'])
2410+
2411+ for dep,data in self.model['couplings'].items():
2412+ for param in data:
2413+ self.assertFalse(param.name in ['GC_11', 'GC_68'])
2414+
2415+
2416+ def test_remove_interactions(self):
2417+ """ check that the detection of irrelevant interactions works """
2418+
2419+
2420+ # first test case where they are all deleted
2421+ # check that we have the valid model
2422+ input = self.model['interactions'][3] # four gluon
2423+ input2 = self.model['interactions'][28] # b b~ h
2424+ self.assertTrue('GC_11' in input['couplings'].values())
2425+ self.assertTrue('GC_68' in input2['couplings'].values())
2426+ found_6 = 0
2427+ found_34 = 0
2428+ for dep,data in self.model['couplings'].items():
2429+ for param in data:
2430+ if param.name == 'GC_11': found_6 +=1
2431+ elif param.name == 'GC_68': found_34 +=1
2432+ self.assertTrue(found_6>0)
2433+ self.assertTrue(found_34>0)
2434+
2435+ # make the real test
2436+ self.model.locate_coupling()
2437+ result = self.model.remove_interactions(['GC_68','GC_11'])
2438 self.assertFalse(input in self.model['interactions'])
2439 self.assertFalse(input2 in self.model['interactions'])
2440
2441- for dep,data in self.model['couplings'].items():
2442- for param in data:
2443- self.assertFalse(param.name in ['GC_11', 'GC_68'])
2444-
2445+
2446 # Now test case where some of them are deleted and some not
2447 input = self.model['interactions'][29] # d d~ Z
2448 input2 = self.model['interactions'][59] # e+ e- Z
2449@@ -140,7 +228,7 @@
2450 self.assertTrue('GC_34' in input['couplings'].values())
2451 self.assertTrue('GC_34' in input2['couplings'].values())
2452 self.assertTrue('GC_48' in input2['couplings'].values())
2453- result = self.model.remove_couplings(['GC_34','GC_48'])
2454+ result = self.model.remove_interactions(['GC_34','GC_48'])
2455 input = self.model['interactions'][29]
2456 self.assertTrue('GC_47' in input['couplings'].values())
2457 self.assertFalse('GC_34' in input['couplings'].values())
2458@@ -264,4 +352,11 @@
2459
2460 self.assertNotEqual(value['WW'], value2['WW'])
2461
2462-
2463+ def test_model_name(self):
2464+ """ test that the model name is correctly set """
2465+ self.assertEqual(self.base_model["name"], "sm")
2466+ model = import_ufo.import_model('sm-full')
2467+ self.assertEqual(model["name"], "sm-full")
2468+ model = import_ufo.import_model('sm-no_b_mass')
2469+ self.assertEqual(model["name"], "sm-no_b_mass")
2470+
2471
2472=== modified file 'tests/unit_tests/various/test_write_param.py'
2473--- tests/unit_tests/various/test_write_param.py 2011-03-20 20:39:57 +0000
2474+++ tests/unit_tests/various/test_write_param.py 2011-03-31 16:37:30 +0000
2475@@ -53,8 +53,6 @@
2476 def test_define_not_dep_param(self):
2477 """Check that we found all mass-width which are not external."""
2478
2479- self.writter.define_not_dep_param()
2480-
2481 for part, obj in self.writter.dep_mass:
2482 self.assertTrue(isinstance(part, base_objects.Particle))
2483 self.assertTrue(isinstance(obj, base_objects.ModelVariable))
2484@@ -81,6 +79,11 @@
2485 checked_width.remove(part['pdg_code'])
2486 self.assertEqual(checked_width, [])
2487
2488+ # Check the duplicate mass-width
2489+ self.assertEqual(self.writter.duplicate_mass, [])
2490+ self.assertEqual(self.writter.duplicate_width, [])
2491+
2492+
2493
2494 def test_order_param(self):
2495 """Check that we can correctly order two parameter."""
2496@@ -221,8 +224,16 @@
2497 for part, obj in self.writter.dep_mass:
2498 if part['pdg_code'] in checked_mass:
2499 checked_mass.remove(part['pdg_code'])
2500- self.assertEqual(len(checked_mass), 1)
2501+ self.assertEqual(len(checked_mass), 2)
2502 self.assertTrue(checked_mass[0] in [23,25])
2503+ self.assertTrue(checked_mass[1] in [23,25])
2504+
2505+ # Check that 23/25 are in a duplicate state
2506+ self.assertEqual(len(self.writter.duplicate_mass),1)
2507+ for part, obj in self.writter.duplicate_mass:
2508+ if part['pdg_code'] in checked_mass:
2509+ checked_mass.remove(part['pdg_code'])
2510+ self.assertEqual(len(checked_mass), 1)
2511
2512 if checked_mass[0] == 23:
2513 self.assertEqual(self.writter.param_dict['MH'].expr, 'MZ')
2514@@ -230,5 +241,80 @@
2515 self.assertEqual(self.writter.param_dict['MZ'].expr, 'MH')
2516
2517
2518-
2519+ def test_full_write(self):
2520+ """ test that we can write a file """
2521+
2522+ self.writter.write_card()
2523+
2524+ goal = ['',
2525+'###################################',
2526+'## INFORMATION FOR MASS',
2527+'###################################',
2528+'Block mass ',
2529+' 6 1.743000e+02 # MT ',
2530+' 15 1.777000e+00 # MTA ',
2531+' 23 9.118800e+01 # set of param :MZ, MH ',
2532+'## Not dependent paramater.',
2533+'## Those values should be edited following the ',
2534+'## analytical expression. MG5 ignore those values ',
2535+'## but they are important for interfacing the output of MG5',
2536+'## to external program such as Pythia.',
2537+' 12 0.000000 # ve : 0.0 ',
2538+' 14 0.000000 # vm : 0.0 ',
2539+' 16 0.000000 # vt : 0.0 ',
2540+' 11 0.000000 # e- : 0.0 ',
2541+' 13 0.000000 # m- : 0.0 ',
2542+' 2 0.000000 # u : 0.0 ',
2543+' 4 0.000000 # c : 0.0 ',
2544+' 1 0.000000 # d : 0.0 ',
2545+' 3 0.000000 # s : 0.0 ',
2546+' 5 0.000000 # b : 0.0 ',
2547+' 22 0.000000 # a : 0.0 ',
2548+' 24 80.419002 # w+ : cmath.sqrt(MZ__exp__2/2. + cmath.sqrt(MZ__exp__4/4. - (aEW*cmath.pi*MZ__exp__2)/(Gf*sqrt__2))) ',
2549+' 21 0.000000 # g : 0.0 ',
2550+' 25 91.188000 # h : MZ ',
2551+'',
2552+'###################################',
2553+'## INFORMATION FOR SMINPUTS',
2554+'###################################',
2555+'Block sminputs ',
2556+' 1 1.325070e+02 # aEWM1 ',
2557+' 2 1.166390e-05 # Gf ',
2558+' 3 1.180000e-01 # aS ',
2559+'',
2560+'###################################',
2561+'## INFORMATION FOR YUKAWA',
2562+'###################################',
2563+'Block yukawa ',
2564+' 6 1.645000e+02 # ymt ',
2565+' 15 1.777000e+00 # ymtau ',
2566+'',
2567+'###################################',
2568+'## INFORMATION FOR DECAY',
2569+'###################################',
2570+'DECAY 23 2.441404e+00 # set of param :WZ, WH ',
2571+'DECAY 24 3.000000e+00 # WW ',
2572+'## Not dependent paramater.',
2573+'## Those values should be edited following the ',
2574+'## analytical expression. MG5 ignore those values ',
2575+'## but they are important for interfacing the output of MG5',
2576+'## to external program such as Pythia.',
2577+'DECAY 12 0.000000 # ve : 0.0 ',
2578+'DECAY 14 0.000000 # vm : 0.0 ',
2579+'DECAY 16 0.000000 # vt : 0.0 ',
2580+'DECAY 11 0.000000 # e- : 0.0 ',
2581+'DECAY 13 0.000000 # m- : 0.0 ',
2582+'DECAY 15 0.000000 # tt- : 0.0 ',
2583+'DECAY 2 0.000000 # u : 0.0 ',
2584+'DECAY 4 0.000000 # c : 0.0 ',
2585+'DECAY 6 0.000000 # t : 0.0 ',
2586+'DECAY 1 0.000000 # d : 0.0 ',
2587+'DECAY 3 0.000000 # s : 0.0 ',
2588+'DECAY 5 0.000000 # b : 0.0 ',
2589+'DECAY 22 0.000000 # a : 0.0 ',
2590+'DECAY 21 0.000000 # g : 0.0 ',
2591+'DECAY 25 2.441404 # h : WZ ',
2592+'']
2593+
2594+ self.assertEqual(self.content.getvalue().split('\n'), goal)
2595
2596\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: