~maddevelopers/mg5amcnlo/2.9.4

« back to all changes in this revision

Viewing changes to tests/parallel_tests/me_comparator.py

pass to v2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
################################################################################
2
2
#
3
 
# Copyright (c) 2009 The MadGraph Development team and Contributors
 
3
# Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors
4
4
#
5
 
# This file is a part of the MadGraph 5 project, an application which 
 
5
# This file is a part of the MadGraph5_aMC@NLO project, an application which 
6
6
# automatically generates Feynman diagrams and matrix elements for arbitrary
7
7
# high-energy processes in the Standard Model and beyond.
8
8
#
9
 
# It is subject to the MadGraph license which should accompany this 
 
9
# It is subject to the MadGraph5_aMC@NLO license which should accompany this 
10
10
# distribution.
11
11
#
12
 
# For more information, please visit: http://madgraph.phys.ucl.ac.be
 
12
# For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch
13
13
#
14
14
################################################################################
15
15
"""A set of objects to allow for easy comparisons of results from various ME
39
39
import madgraph.iolibs.save_load_object as save_load_object
40
40
 
41
41
import madgraph.interface.master_interface as cmd_interface
42
 
 
43
42
import madgraph.various.misc as misc
44
43
 
45
44
 
425
424
    def format_mg5_proc_card(self, proc_list, model, orders):
426
425
        """Create a proc_card.dat string following v5 conventions."""
427
426
 
428
 
        v5_string = "import model %s \n" % os.path.join(self.model_dir, model)
 
427
        if model != 'mssm':
 
428
            v5_string = "import model %s \n" % os.path.join(self.model_dir, model)
 
429
        else:
 
430
            v5_string = "import model %s \n" %  model
429
431
        v5_string += "set automatic_html_opening False\n"
430
432
        couplings = ' '.join(["%s=%i" % (k, v) for k, v in orders.items()])
431
433
 
609
611
    orders = {}
610
612
    energy = 1000
611
613
 
612
 
    def run(self, proc_list, model, orders, energy):
 
614
#    def run(self, proc_list, model, orders, energy):
 
615
    def run(self, *arg, **opt):
613
616
        """Simulate a run by simply returning res_list
614
617
        """
615
618
 
896
899
            res_str += self._fixed_string_length("%1.10e" % diff_fixw, col_size)
897
900
            res_str += self._fixed_string_length("%1.10e" % diff_feyn, col_size)
898
901
                        
899
 
            if diff_feyn < 1e-2 and diff_cms < 1e-6 and diff_fixw < 1e-4 and \
 
902
            if diff_feyn < 1e-2 and diff_cms < 1e-6 and diff_fixw < 1e-3 and \
900
903
               diff_unit < 1e-2:
901
904
                pass_proc += 1
902
905
                res_str += "Pass"
941
944
            diff_fixw = abs(list_res[2] - list_res[3]) / \
942
945
                       (list_res[2] + list_res[3] + 1e-99)
943
946
                       
944
 
            if diff_feyn > 1e-2 or diff_cms > 1e-6 or diff_fixw > 1e-4 or \
945
 
               diff_unit > 1e-2:                
 
947
            if diff_feyn > 1e-2 or diff_cms > 1e-6 or diff_fixw > 1e-3 or \
 
948
               diff_unit > 1e-2:          
946
949
                fail_str += proc+" "
947
950
 
948
951
        test_object.assertEqual(fail_str, "")    
1030
1033
 
1031
1034
    return res_list
1032
1035
 
1033
 
 
1034
 
 
1035
 
 
1036
 
 
1037
 
 
1038
 
 
1039
 
 
1040
 
 
1041
 
 
1042
 
 
1043