~maddevelopers/mg5amcnlo/2.9.4

« back to all changes in this revision

Viewing changes to tests/parallel_tests/madevent_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
103
103
                return 'str'
104
104
 
105
105
 
106
 
        prop_col_size = 17
 
106
        proc_col_size = 17
107
107
        for proc in self.results[0]:
108
 
            if len(proc) + 1 > prop_col_size:
 
108
            if len(proc) + 1 > proc_col_size:
109
109
                proc_col_size = len(proc) + 1
110
110
        
111
111
        col_size = 17
115
115
 
116
116
        failed_prop_list = []
117
117
 
118
 
        res_str = "\n" + self._fixed_string_length("Checked", prop_col_size) + \
 
118
        res_str = "\n" + self._fixed_string_length("Checked", proc_col_size) + \
119
119
                ''.join([self._fixed_string_length(runner.name, col_size) for \
120
120
                           runner in self.me_runners]) + \
121
121
                  self._fixed_string_length("Relative diff.", col_size) + \
130
130
                    succeed = False
131
131
                else:
132
132
                    loc_results.append(self.results[i][prop])
133
 
            res_str += '\n' + self._fixed_string_length(proc, prop_col_size)+ \
 
133
            res_str += '\n' + self._fixed_string_length(proc, proc_col_size)+ \
134
134
                       ''.join([self._fixed_string_length(str(res),
135
135
                                               col_size) for res in loc_results])
136
136
            if not succeed:
475
475
    def format_mg5_proc_card(self, proc_list, model, orders):
476
476
        """Create a proc_card.dat string following v5 conventions."""
477
477
 
478
 
        v5_string = "import model %s\n" % os.path.join(self.model_dir, model)
 
478
        if model != 'mssm':
 
479
            v5_string = "import model %s\n" % os.path.join(self.model_dir, model)
 
480
        else:
 
481
            v5_string = "import model %s\n" % model
479
482
        v5_string += "set automatic_html_opening False\n"
480
483
        couplings = ' '.join(["%s=%i" % (k, v) for k, v in orders.items()])
481
484
 
518
521
                filepath = dir_name+'/SubProcesses/'+name+'/results.dat'
519
522
            for line in file(filepath):
520
523
                splitline=line.split()
521
 
                if len(splitline)==8:
522
 
                     output['cross_'+name]=splitline[0]
 
524
                #if len(splitline)==8:
 
525
                output['cross_'+name]=splitline[0]
523
526
        return output
524
527
 
525
528
class MG5OldRunner(MG5Runner):