Package madgraph :: Package core :: Module base_objects :: Class ParticleList
[hide private]
[frames] | no frames]

Class ParticleList

source code

   object --+        
            |        
         list --+    
                |    
PhysicsObjectList --+
                    |
                   ParticleList

A class to store lists of particles.

Nested Classes [hide private]

Inherited from PhysicsObjectList: PhysicsObjectListError

Instance Methods [hide private]
 
is_valid_element(self, obj)
Test if object obj is a valid Particle for the list.
source code
 
find_name(self, name)
Try to find a particle with the given name.
source code
 
generate_ref_dict(self)
Generate a dictionary of part/antipart pairs (as keys) and 0 (as value)
source code
 
generate_dict(self)
Generate a dictionary from particle id to particle.
source code

Inherited from PhysicsObjectList: __init__, __str__, append

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

is_valid_element(self, obj)

source code 

Test if object obj is a valid Particle for the list.

Overrides: PhysicsObjectList.is_valid_element

find_name(self, name)

source code 

Try to find a particle with the given name. Check both name and antiname. If a match is found, return the a copy of the corresponding particle (first one in the list), with the is_part flag set accordingly. None otherwise.

generate_dict(self)

source code 

Generate a dictionary from particle id to particle. Include antiparticles.