~maddevelopers/mg5amcnlo/new_clustering

« back to all changes in this revision

Viewing changes to tests/input_files/loop_smgrav/write_param_card.py

  • Committer: Rikkert Frederix
  • Date: 2021-09-09 15:51:40 UTC
  • mfrom: (78.75.502 3.2.1)
  • Revision ID: frederix@physik.uzh.ch-20210909155140-rg6umfq68h6h47cf
merge with 3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
 
2
from __future__ import absolute_import
 
3
from __future__ import print_function
 
4
from six.moves import range
2
5
__date__ = "3 june 2010"
3
6
__author__ = 'olivier.mattelaer@uclouvain.be'
4
7
 
5
 
from function_library import *
 
8
from .function_library import *
6
9
 
7
10
class ParamCardWriter(object):
8
11
    
15
18
        """write a valid param_card.dat"""
16
19
        
17
20
        if not list_of_parameters:
18
 
            from parameters import all_parameters
 
21
            from .parameters import all_parameters
19
22
            list_of_parameters = [param for param in all_parameters if \
20
23
                                                       param.nature=='external']
21
24
        
32
35
    def define_not_dep_param(self, list_of_parameters):
33
36
        """define self.dep_mass and self.dep_width in case that they are 
34
37
        requested in the param_card.dat"""
35
 
        from particles import all_particles
 
38
        from .particles import all_particles
36
39
        
37
40
        self.dep_mass = [(part, part.mass) for part in all_particles \
38
41
                            if part.pdg_code > 0 and \
116
119
    
117
120
    def write_dep_param_block(self, lhablock):
118
121
        import cmath
119
 
        from parameters import all_parameters
 
122
        from .parameters import all_parameters
120
123
        for parameter in all_parameters:
121
124
            exec("%s = %s" % (parameter.name, parameter.value))
122
125
        text = "##  Not dependent paramater.\n"
149
152
    
150
153
    def write_qnumber(self):
151
154
        """ write qnumber """
152
 
        from particles import all_particles
153
 
        import particles
154
 
        print particles.__file__
 
155
        from .particles import all_particles
 
156
        from . import particles
 
157
        print(particles.__file__)
155
158
        text="""#===========================================================\n"""
156
159
        text += """# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)\n"""
157
160
        text += """#===========================================================\n\n"""
177
180
            
178
181
if '__main__' == __name__:
179
182
    ParamCardWriter('./param_card.dat', generic=True)
180
 
    print 'write ./param_card.dat'
 
183
    print('write ./param_card.dat')
181
184