Package madgraph :: Package core :: Module color_amp :: Class ColorMatrix
[hide private]
[frames] | no frames]

Class ColorMatrix

source code

object --+    
         |    
      dict --+
             |
            ColorMatrix

A color matrix, meaning a dictionary with pairs (i,j) as keys where i and j refer to elements of color basis objects. Values are Color Factor objects. Also contains two additional dictionaries, one with the fixed Nc representation of the matrix, and the other one with the "inverted" matrix, i.e. a dictionary where keys are values of the color matrix.

Instance Methods [hide private]
new empty dictionary

__init__(self, col_basis, col_basis2=None, Nc=3, Nc_power_min=None, Nc_power_max=None)
Initialize a color matrix with one or two color basis objects.
source code
 
build_matrix(self, Nc=3, Nc_power_min=None, Nc_power_max=None, is_symmetric=False)
Create the matrix using internal color basis objects.
source code
 
create_new_entry(self, struct1, struct2, Nc_power_min, Nc_power_max, Nc)
Create a new product result, and result with fixed Nc for two color basis entries.
source code
 
__str__(self)
Returns a nicely formatted string with the fixed Nc representation of the current matrix (only the real part)
source code
 
get_line_denominators(self)
Get a list with the denominators for the different lines in the color matrix
source code
 
get_line_numerators(self, line_index, den)
Returns a list of numerator for line line_index, assuming a common denominator den.
source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

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

Class Methods [hide private]
 
fix_summed_indices(self, struct1, struct2)
Returns a copy of the immutable Color String representation struct2 where summed indices are modified to avoid duplicates with those appearing in struct1.
source code
Static Methods [hide private]
 
lcm(a, b)
Return lowest common multiple.
source code
 
lcmm(*args)
Return lcm of args.
source code
Class Variables [hide private]
  _col_basis1 = None
hash(x)
  _col_basis2 = None
hash(x)
  col_matrix_fixed_Nc = {}
  inverted_col_matrix = {}

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, col_basis, col_basis2=None, Nc=3, Nc_power_min=None, Nc_power_max=None)
(Constructor)

source code 

Initialize a color matrix with one or two color basis objects. If only one color basis is given, the other one is assumed to be equal. As options, any value of Nc and minimal/maximal power of Nc can also be provided. Note that the min/max power constraint is applied only at the end, so that it does NOT speed up the calculation.

Returns:
new empty dictionary

Overrides: object.__init__

build_matrix(self, Nc=3, Nc_power_min=None, Nc_power_max=None, is_symmetric=False)

source code 

Create the matrix using internal color basis objects. Use the stored color basis objects and takes Nc and Nc_min/max parameters as __init__. If is_isymmetric is True, build only half of the matrix which is assumed to be symmetric.

create_new_entry(self, struct1, struct2, Nc_power_min, Nc_power_max, Nc)

source code 

Create a new product result, and result with fixed Nc for two color basis entries. Implement Nc power limits.

__str__(self)
(Informal representation operator)

source code 

Returns a nicely formatted string with the fixed Nc representation of the current matrix (only the real part)

Overrides: object.__str__

fix_summed_indices(self, struct1, struct2)
Class Method

source code 

Returns a copy of the immutable Color String representation struct2 where summed indices are modified to avoid duplicates with those appearing in struct1. Assumes internal summed indices are negative.