Herwig 7.3.0
|
To contain a color basis, where each basis vector is a Col_amp. More...
#include <Col_basis.h>
Public Member Functions | |
Col_basis () | |
Default constructor. | |
virtual | ~Col_basis () |
Destructor. | |
bool | is_Trace_basis () const |
Is it a Trace_basis? | |
bool | is_Orthogonal_basis () const |
Is it an Orthogonal_basis? | |
bool | is_Tree_level_gluon_basis () const |
Is it a Tree_level_gluon_basis? | |
uint | size () const |
Returns the number of basis vectors. | |
const Col_amp & | at (const int i) const |
Returns the Col_amp (basis vector) at place i. | |
Col_amp & | at (const int i) |
Returns the Col_amp (basis vector) at place i. | |
bool | empty () const |
Is the col_basis empty? | |
void | clear () |
Erase the basis, stored in cb. | |
void | append (Col_amp Ca) |
Appends a Col_amp to the basis, stored in cb. | |
void | append (col_basis cb_in) |
Appends the Col_amps in cb_in to the col_basis member cb. | |
void | scalar_product_matrix () |
Function for calculating the scalar products matrix. | |
void | scalar_product_matrix_num () |
This function works as scalar_product_matrix, but does the calculation numerically. | |
virtual void | scalar_product_matrix_no_mem () |
This function works like scalar_product_matrix, but does not use memoization. | |
void | scalar_product_matrix_num_no_mem () |
This function works like scalar_product_matrix_num, but does not use memoization. | |
void | leading_scalar_product_matrix () |
Finds the leading Nc scalar product matrices, leading_P_spm and leading_d_spm. | |
virtual Polynomial | scalar_product (const Col_amp &Ca1, const Col_amp &Ca2) |
Function for calculating scalar products algebraically using the basis and the scalar product matrix (Poly_matr) in the basis. | |
virtual cnum | scalar_product_num (const Col_amp &Ca1, const Col_amp &Ca2) |
Function for calculating scalar products numerically, knowing the basis and the scalar product matrix in numerical form. | |
virtual cnum | scalar_product_num (const cvec &v1, const cvec &v2) |
Calculates the scalar product between numerical (complex) amplitudes v1, V2 using the numerical scalar product matrix, d_spm. | |
cnum | scalar_product_num_diagonal (const cvec &v1, const cvec &v2) |
Calculates the scalar product between numerical (complex) amplitudes v1, v2 using the numerical scalar product matrix, d_spm. | |
std::string | basis_file_name () const |
Returns a standard filename, used for writing out the basis to a file. | |
std::string | spm_file_name (const bool leading, const bool poly) const |
Returns a standard filename, used for writing out scalar product matrices. | |
virtual void | read_in_Col_basis (std::string filename) |
Function for reading in the basis from the file filename. | |
virtual void | read_in_Col_basis () |
Function for reading in the basis from default filename (see basis_file_name). | |
void | read_in_d_spm (std::string filename) |
Read in a numerical matrix from a file filename (see spm_file_name) and save it as a double matrix, dmatr, in the member variable d_spm. | |
void | read_in_d_spm () |
Read in a numerical matrix from a file with default filename (see spm_file_name) and save it as a double matrix, dmatr, in the member variable d_spm. | |
void | read_in_leading_d_spm (std::string filename) |
Read in a numerical matrix from the file filename and save it as a double matrix, dmatr, in the member variable leading_d_spm. | |
void | read_in_leading_d_spm () |
Read in a numerical matrix from a file with default filename (see spm_file_name) and save it as a double matrix, dmatr, in the member variable leading_d_spm. | |
void | read_in_P_spm (std::string filename) |
Read in a Polynomial matrix from the file filename and save it as a Poly_matr in the member variable P_spm. | |
void | read_in_P_spm () |
Read in a Polynomial matrix from a file with default filename (see spm_file_name) and save it as a Poly_matr in the member variable P_spm. | |
void | read_in_leading_P_spm (std::string filename) |
Read in a Polynomial matrix from a file with default filename (see spm_file_name) and save it as a Poly_matr in the member variable leading_P_spm. | |
void | read_in_leading_P_spm () |
Reads in a Polynomial matrix from default filename (see spm_file_name) and save it as a Poly_matr in the member variable leading_P_spm. | |
virtual void | write_out_Col_basis (std::string filename) const |
Function for writing out the basis to a file with name filename. | |
virtual void | write_out_Col_basis () const |
Function for writing out the basis to a file with default name (see basis_file_name). | |
void | write_out_d_spm (std::string filename) const |
Writes out d_spm to the file filename. | |
void | write_out_d_spm () const |
Writes out d_spm to the standard filename, see spm_file_name. | |
void | write_out_P_spm (std::string filename) const |
Writes out P_spm to the file filename. | |
void | write_out_P_spm () const |
Writes out P_spm to the standard filename, see spm_file_name. | |
void | write_out_leading_d_spm (std::string filename) const |
Writes out leading_d_spm to the file filename. | |
void | write_out_leading_d_spm () const |
Writes out leading_d_spm to the standard filename, see spm_file_name. | |
void | write_out_leading_P_spm (std::string filename) const |
Writes out leading_P_spm to the file filename. | |
void | write_out_leading_P_spm () const |
Writes out leading_P_spm to the standard filename, see spm_file_name. | |
void | simplify () |
Simplifies all the basis vectors by using simplify on the individual Col_amps in the basis. | |
virtual Poly_vec | decompose (const Col_amp &Ca) |
Each type of color basis has to implement a function for decomposing an amplitude in the color basis. | |
Col_amp | exchange_gluon (uint vec, int p1, int p2) |
Function for finding the resulting Col_amp after exchanging a gluon between parton p1 and parton p2 in the basis vector vec. | |
Poly_matr | color_gamma (int p1, int p2) |
Function for calculating the color structure part of the soft anomalous dimension matrix. | |
int | n_quark_check () const |
Returns the number of quarks in the Col_basis after checking that each Col_str in each Col_amp has the same number of quarks. | |
int | n_gluon_check () const |
Returns the number of gluons in the Col_basis after checking that each Col_str in each Col_amp has the same number of gluons. | |
void | rename_indices (Col_str &Cs1, Col_str &Cs2) const |
A function to rename the indices in two Col_strs, such that in the first they are called 1,2,3..., and in the second the relative order is kept. | |
Public Attributes | |
int | nq |
The number of qqbar-pairs, initially set to 0 and (possibly) changed with create_basis, or while reading in the basis. | |
int | ng |
The number of gluons, initially set to 0 and (possibly) changed with create_basis, or while reading in the basis. | |
col_basis | cb |
To actually contain the info about the basis vectors cb= vector1, vector2... . | |
Poly_matr | P_spm |
To contain the Polynomial version of the scalar product matrix. | |
Poly_matr | leading_P_spm |
To contain the Polynomial version of the leading part of the scalar product matrix. | |
dmatr | d_spm |
To contain the double version of the scalar product matrix. | |
dmatr | leading_d_spm |
To contain the double version of the leading part of the scalar product matrix. | |
Col_functions | Col_fun |
To contain the set of Col_functions used. | |
Protected Member Functions | |
virtual void | scalar_product_matrix (bool save_P_spm, bool save_d_spm, bool use_mem) |
The underlying function for calculation of scalar product matrices. | |
virtual Polynomial | ij_entry (const int i, const int j) const |
Calculates element i,j in scalar product matrix using the scalar product. | |
bool | check_diagonal (const dmatr &matr) const |
Checking that a numerical (double) matrix is diagonal. | |
bool | check_symmetry (const dmatr &matr) const |
Checking that a numerical (double) matrix (the scalar product matrix) is symmetric. | |
void | check_spm () const |
Makes consistency checks on the scalar product matrix. | |
void | Col_basis_of_str (std::string str) |
Converts a text string (in a file) to a basis, used by the read_in_basis functions. | |
virtual std::ostream & | write_out_Col_basis_to_stream (std::ostream &out) const |
Function for writing out the basis in a human readable format to an ostream. | |
Protected Attributes | |
bool | trace_basis |
bool | tree_level_gluon_basis |
bool | orthogonal_basis |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Col_basis &Cb) |
The operator << for Col_basis operator must be able to access the write_out_Col_basis_to_stream operator. | |
To contain a color basis, where each basis vector is a Col_amp.
Technically the color information is contained in the member cb, which is a vector of Col_amps, a col_basis.
Definition at line 24 of file Col_basis.h.
|
inline |
|
inlinevirtual |
Destructor.
Definition at line 38 of file Col_basis.h.
|
inline |
Appends a Col_amp to the basis, stored in cb.
Definition at line 92 of file Col_basis.h.
References cb.
|
inline |
Returns the Col_amp (basis vector) at place i.
Definition at line 83 of file Col_basis.h.
References cb.
|
inline |
Returns the Col_amp (basis vector) at place i.
Definition at line 80 of file Col_basis.h.
References cb.
|
protected |
Checking that a numerical (double) matrix is diagonal.
Used for the leading version of the scalar product matrix. Returns true if the matrix is diagonal and false otherwise.
|
protected |
Checking that a numerical (double) matrix (the scalar product matrix) is symmetric.
Returns true if the matrix is symmetric and false otherwise.
|
inline |
Poly_matr ColorFull::Col_basis::color_gamma | ( | int | p1, |
int | p2 | ||
) |
Function for calculating the color structure part of the soft anomalous dimension matrix.
First calculates the effect of gluon exchange on a basis vector and then decomposes the result into the basis. For this to work the basis must clearly contain all resulting basis vectors, meaning for example that it can not be used for Tree_level_gluon_basis. The function is only available for the Trace_basis and the Orthogonal_basis classes. The ij-component of the resulting matrix gives the amplitude for ending up in component i if starting in component j.
Each type of color basis has to implement a function for decomposing an amplitude in the color basis.
Reimplemented in ColorFull::Orthogonal_basis, and ColorFull::Trace_type_basis.
|
inline |
|
protectedvirtual |
Calculates element i,j in scalar product matrix using the scalar product.
Reimplemented in ColorFull::Tree_level_gluon_basis.
|
inline |
Is it an Orthogonal_basis?
Definition at line 71 of file Col_basis.h.
|
inline |
Is it a Trace_basis?
Definition at line 68 of file Col_basis.h.
|
inline |
Is it a Tree_level_gluon_basis?
Definition at line 74 of file Col_basis.h.
void ColorFull::Col_basis::leading_scalar_product_matrix | ( | ) |
Finds the leading Nc scalar product matrices, leading_P_spm and leading_d_spm.
If the polynomial scalar product matrix, P_spm has been calculated, P_spm is used, otherwise P_spm is first calculated and the leading Nc limit is then taken of P_spm.
|
virtual |
Function for reading in the basis from default filename (see basis_file_name).
Reimplemented in ColorFull::Tree_level_gluon_basis.
|
virtual |
Function for reading in the basis from the file filename.
The basis should be in human readable format, of form:
0 [{1,3,4,2}]
1 [{1,4,3,2}]
2 [{1,2}(3,4)]
i.e. first basis vector number 0,1,2..., then the Col_amp corresponding to the basis vector in question. The Col_amps may consist of several Col_strs, for example
0 [(1,2,3,4)]+[(1,4,3,2)]
1 [(1,2,4,3)]+[(1,3,4,2)]
2 [(1,3,4,2)]+[(1,2,4,3)]
and each Col_str may also contain a Polynomial. (The Polynomial should multiply the whole col_str, rather than a quark_line inside the []-brackets.)
Reimplemented in ColorFull::Tree_level_gluon_basis.
void ColorFull::Col_basis::read_in_d_spm | ( | ) |
Read in a numerical matrix from a file with default filename (see spm_file_name) and save it as a double matrix, dmatr, in the member variable d_spm.
The file should be in the format {{d11,...,d1n},
...,
{dn1,....dnn}},
and may contain comment lines starting with # at the top.
void ColorFull::Col_basis::read_in_d_spm | ( | std::string | filename | ) |
Read in a numerical matrix from a file filename (see spm_file_name) and save it as a double matrix, dmatr, in the member variable d_spm.
The file should be in the format
{{d11,...,d1n},
...,
{dn1,....dnn}},
and may contain comment lines starting with # at the top.
void ColorFull::Col_basis::read_in_leading_d_spm | ( | ) |
Read in a numerical matrix from a file with default filename (see spm_file_name) and save it as a double matrix, dmatr, in the member variable leading_d_spm.
The file should be in the format
{{d11,0,...,0},
...,
{0,0,....dnn}},
and may contain comment lines starting with # at the top.
void ColorFull::Col_basis::read_in_leading_d_spm | ( | std::string | filename | ) |
Read in a numerical matrix from the file filename and save it as a double matrix, dmatr, in the member variable leading_d_spm.
The file should be in the format
{{d11,0,...,0},
...,
{0,0,....dnn}},
and may contain comment lines starting with # at the top.
void ColorFull::Col_basis::read_in_leading_P_spm | ( | ) |
Reads in a Polynomial matrix from default filename (see spm_file_name) and save it as a Poly_matr in the member variable leading_P_spm.
The file should be in the format
{{Poly11,0...,0},
...,
{0,...,Polynn}},
and may contain comment lines starting with # at the top.
void ColorFull::Col_basis::read_in_leading_P_spm | ( | std::string | filename | ) |
Read in a Polynomial matrix from a file with default filename (see spm_file_name) and save it as a Poly_matr in the member variable leading_P_spm.
The file should be in the format
{{Poly11,0...,0},
...,
{0,...,Polynn}},
and may contain comment lines starting with # at the top.
void ColorFull::Col_basis::read_in_P_spm | ( | ) |
Read in a Polynomial matrix from a file with default filename (see spm_file_name) and save it as a Poly_matr in the member variable P_spm.
The file should be in the format
{{Poly11,...,Poly1n},
...,
{Polyn1,...,Polynn}},
and may contain comment lines starting with # at the top.
void ColorFull::Col_basis::read_in_P_spm | ( | std::string | filename | ) |
Read in a Polynomial matrix from the file filename and save it as a Poly_matr in the member variable P_spm.
The file should be in the format
{{Poly11,...,Poly1n},
...,
{Polyn1,...,Polynn}},
and may contain comment lines starting with # at the top.
|
virtual |
Function for calculating scalar products algebraically using the basis and the scalar product matrix (Poly_matr) in the basis.
(Does add implicit conjugated part for Tree_level_gluon_basis, as these terms are contained in the matrix of scalar products.)
Reimplemented in ColorFull::Orthogonal_basis.
void ColorFull::Col_basis::scalar_product_matrix | ( | ) |
Function for calculating the scalar products matrix.
This function loops over all basis vectors and stores the value of the scalar product between basis vector i and basis vector j in the i,j -entry in P_spm and d_spm. The calculation is done using memoization. The symmetry of the scalar product matrix is not used for the calculation, instead it is checked that the resulting matrix is indeed symmetric.
|
protectedvirtual |
The underlying function for calculation of scalar product matrices.
Calculation depends on the arguments: save_P_spm, save_d_spm and use_mem. If save_P_spm is true the Polynomial scalar product matrix is saved to P_spm. If save_d_spm is true, the numerical scalar product matrix is saved to d_spm. The leading_d_spm is only calculated and written out if save_P_spm is true. If use_mem is true memoization is used in order to calculate a color topology only once.
Reimplemented in ColorFull::Orthogonal_basis.
void ColorFull::Col_basis::scalar_product_matrix_num | ( | ) |
This function works as scalar_product_matrix, but does the calculation numerically.
It hence only calculates d_spm.
|
virtual |
Function for calculating scalar products numerically, knowing the basis and the scalar product matrix in numerical form.
(Does add implicit conjugated part for Tree_level_gluon_basis, as these terms are contained in the matrix of scalar products.)
Reimplemented in ColorFull::Orthogonal_basis.
|
virtual |
Calculates the scalar product between numerical (complex) amplitudes v1, V2 using the numerical scalar product matrix, d_spm.
The vectors thus needs to be expressed in the basis contained in cb. (Does add implicit conjugated part for Tree_level_gluon_basis, as these terms are contained in the matrix of scalar products.)
Reimplemented in ColorFull::Orthogonal_basis.
cnum ColorFull::Col_basis::scalar_product_num_diagonal | ( | const cvec & | v1, |
const cvec & | v2 | ||
) |
Calculates the scalar product between numerical (complex) amplitudes v1, v2 using the numerical scalar product matrix, d_spm.
Assumes that there are only diagonal contributions. This is useful for calculations in leading Nc limit. (Does add implicit conjugated part for Tree_level_gluon_basis, as these terms are contained in the matrix of scalar products.)
|
inline |
std::string ColorFull::Col_basis::spm_file_name | ( | const bool | leading, |
const bool | poly | ||
) | const |
Returns a standard filename, used for writing out scalar product matrices.
If leading is true, "_l" is appended to the filename. If "poly" is true "P_" is added to the filename, and if it is false "d_", as in double, is added to the filename.
|
virtual |
Function for writing out the basis to a file with default name (see basis_file_name).
Reimplemented in ColorFull::Tree_level_gluon_basis.
|
virtual |
Function for writing out the basis to a file with name filename.
Reimplemented in ColorFull::Tree_level_gluon_basis.
|
protectedvirtual |
Function for writing out the basis in a human readable format to an ostream.
Reimplemented in ColorFull::Tree_level_gluon_basis.
col_basis ColorFull::Col_basis::cb |
Col_functions ColorFull::Col_basis::Col_fun |
To contain the set of Col_functions used.
Definition at line 65 of file Col_basis.h.
dmatr ColorFull::Col_basis::d_spm |
To contain the double version of the scalar product matrix.
Definition at line 59 of file Col_basis.h.
dmatr ColorFull::Col_basis::leading_d_spm |
To contain the double version of the leading part of the scalar product matrix.
Definition at line 62 of file Col_basis.h.
Poly_matr ColorFull::Col_basis::leading_P_spm |
To contain the Polynomial version of the leading part of the scalar product matrix.
Definition at line 56 of file Col_basis.h.
int ColorFull::Col_basis::ng |
The number of gluons, initially set to 0 and (possibly) changed with create_basis, or while reading in the basis.
Definition at line 46 of file Col_basis.h.
Referenced by Col_basis(), and ColorFull::Trace_basis::initialize().
int ColorFull::Col_basis::nq |
The number of qqbar-pairs, initially set to 0 and (possibly) changed with create_basis, or while reading in the basis.
Definition at line 42 of file Col_basis.h.
Referenced by Col_basis(), and ColorFull::Trace_basis::initialize().
|
protected |
Definition at line 349 of file Col_basis.h.
Poly_matr ColorFull::Col_basis::P_spm |
To contain the Polynomial version of the scalar product matrix.
Definition at line 53 of file Col_basis.h.
|
protected |
Definition at line 347 of file Col_basis.h.
|
protected |
Definition at line 348 of file Col_basis.h.