~maddevelopers/mg5amcnlo/2.7.4_array

« back to all changes in this revision

Viewing changes to madgraph/core/base_objects.py

  • Committer: olivier-mattelaer
  • Date: 2019-10-16 11:38:38 UTC
  • mfrom: (282.1.28 2.6.7)
  • Revision ID: olivier-mattelaer-20191016113838-6u4j5u3hn06rq2wc
pass to 2.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1023
1023
    
1024
1024
    mg5_name = False #store if particle name follow mg5 convention
1025
1025
    
 
1026
    def __init__(self, init_dict={}):
 
1027
        """Creates a new particle object. If a dictionary is given, tries to 
 
1028
        use it to give values to properties."""
 
1029
 
 
1030
        dict.__init__(self)
 
1031
        self.default_setup()
 
1032
 
 
1033
        assert isinstance(init_dict, dict), \
 
1034
                            "Argument %s is not a dictionary" % repr(init_dict)
 
1035
 
 
1036
 
 
1037
        for item in init_dict.keys():
 
1038
            self[item] = init_dict[item]
 
1039
    
1026
1040
    def default_setup(self):
1027
1041
 
1028
1042
        self['name'] = ""