Herwig 7.3.0
|
This class is for containing orthogonal bases, i.e. More...
#include <Orthogonal_basis.h>
Public Member Functions | |
Orthogonal_basis () | |
Default constructor, puts private variable orthogonal_basis=true and calls the constructor of Col_basis. | |
void | scalar_product_matrix () |
Calculates the scalar product matrix assuming the basis to be orthogonal. | |
void | diagonal_scalar_product_matrix (bool save_P_diagonal_spm, bool save_d_diagonal_spm, bool use_mem) |
Calculates the diagonal entries in the scalar product matrix, and (depending on arguments), saves them to the member variables diagonal_P_spm and diagonal_d_spm. | |
Poly_vec | decompose (const Col_amp &Ca) |
The decomposition of a Col_amp in an orthogonal basis is done by calculating scalar products and dividing out the norm. | |
Polynomial | scalar_product (const Col_amp &Ca1, const Col_amp &Ca2) |
Function for calculating scalar products given the information about the basis and the scalar product matrix in the basis. | |
cnum | scalar_product_num (const Col_amp &Ca1, const Col_amp &Ca2) |
Function for calculating scalar products given the information about the basis and the scalar product matrix in numerical form. | |
cnum | scalar_product_num (const cvec &v1, const cvec &v2) |
Calculates the scalar product between decomposed amplitudes v1, V2 using the diagonal_d_spm diagonal numerical scalar product matrix. | |
std::string | diagonal_spm_file_name (const bool leading, const bool poly) const |
Creates a default filename for writing out diagonal scalar products. | |
void | write_out_diagonal_d_spm (std::string filename) const |
Writes out diagonal_d_spm to the file filename. | |
void | write_out_diagonal_d_spm () const |
Writes out diagonal_d_spm to the standard filename, see diagonal_spm_file_name. | |
void | write_out_diagonal_P_spm (std::string filename) const |
Writes out diagonal_P_spm to the file filename. | |
void | write_out_diagonal_P_spm () const |
Writes out diagonal_P_spm to the standard filename, see diagonal_spm_file_name. | |
void | write_out_diagonal_spm (const dvec &dv, const bool leading) const |
Function for writing out a dvec (the diagonal scalar products, diagonal_d_spm) to a file with standard filename given by diagonal_spm_file_name. | |
void | write_out_diagonal_spm (const Poly_vec &pv, const bool leading) const |
Function for writing out a Poly_vec (the diagonal scalar products, diagonal_d_spm) to a file with standard filename given by diagonal_spm_file_name. | |
![]() | |
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 | |
dvec | diagonal_d_spm |
To contain information about scalar products as a dvec, i.e., entry i is the square of vector i. | |
Poly_vec | diagonal_P_spm |
To contain information about scalar products as a Poly_vec, i.e., entry i is the square of vector i. | |
![]() | |
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. | |
Private Member Functions | |
void | scalar_product_matrix (bool save_P_spm, bool save_d_spm, bool use_mem) |
Function for calculating the scalar products matrix. | |
Additional Inherited Members | |
![]() | |
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. | |
![]() | |
bool | trace_basis |
bool | tree_level_gluon_basis |
bool | orthogonal_basis |
This class is for containing orthogonal bases, i.e.
bases where the scalar product matrix is diagonal. ColorFull has (currently) no functionality for creating orthogonal bases, but orthogonal bases can be read in using read_in _Col_basis.
Definition at line 22 of file Orthogonal_basis.h.
|
inline |
Default constructor, puts private variable orthogonal_basis=true and calls the constructor of Col_basis.
Definition at line 27 of file Orthogonal_basis.h.
The decomposition of a Col_amp in an orthogonal basis is done by calculating scalar products and dividing out the norm.
The norm is evaluated numerically.
Reimplemented from ColorFull::Col_basis.
void ColorFull::Orthogonal_basis::diagonal_scalar_product_matrix | ( | bool | save_P_diagonal_spm, |
bool | save_d_diagonal_spm, | ||
bool | use_mem | ||
) |
Calculates the diagonal entries in the scalar product matrix, and (depending on arguments), saves them to the member variables diagonal_P_spm and diagonal_d_spm.
This function is used by the Orthogonal_basis version of scalar_product_matrix.
std::string ColorFull::Orthogonal_basis::diagonal_spm_file_name | ( | const bool | leading, |
const bool | poly | ||
) | const |
Creates a default filename for writing out diagonal scalar products.
The boolean variable leading should be true if the name is for a leading Nc variable. The filename is then modified accordingly.
|
virtual |
Function for calculating scalar products given the information about the basis and the scalar product matrix in the basis.
The Col_amps are first decomposed using decompose, and then squared using the scalar product matrix P_spm. An orthogonal scalar product matrix is assumed.
Reimplemented from ColorFull::Col_basis.
void ColorFull::Orthogonal_basis::scalar_product_matrix | ( | ) |
Calculates the scalar product matrix assuming the basis to be orthogonal.
Calculates both the double (d_spm) and the Polynomial (P_spm) matrices and saves to default file names.
|
privatevirtual |
Function for calculating the scalar products matrix.
This function uses diagonal_scalar_product_matrix and saved the value of the diagonal scalar products between basis vector i and basis vector j in the i,j -entry in P_spm (if save P_spm is true) and d_spm (if save_d_spm is true). If use_mem is true, memoization is used.
Reimplemented from ColorFull::Col_basis.
|
virtual |
Function for calculating scalar products given the information about the basis and the scalar product matrix in numerical form.
The Col_amps are first decomposed using decompose, and then squared using diagonal_d_spm. For Orthogonal_basis, an orthogonal scalar product matrix is assumed.
Reimplemented from ColorFull::Col_basis.
|
virtual |
Calculates the scalar product between decomposed amplitudes v1, V2 using the diagonal_d_spm diagonal numerical scalar product matrix.
The vectors needs to be expressed in the basis contained in cb, i.e., the decomposition has to be known.
Reimplemented from ColorFull::Col_basis.
void ColorFull::Orthogonal_basis::write_out_diagonal_spm | ( | const dvec & | dv, |
const bool | leading | ||
) | const |
Function for writing out a dvec (the diagonal scalar products, diagonal_d_spm) to a file with standard filename given by diagonal_spm_file_name.
The boolean variable leading should be true if dv only has leading Nc contributions. The filename is then modified accordingly.
void ColorFull::Orthogonal_basis::write_out_diagonal_spm | ( | const Poly_vec & | pv, |
const bool | leading | ||
) | const |
dvec ColorFull::Orthogonal_basis::diagonal_d_spm |
To contain information about scalar products as a dvec, i.e., entry i is the square of vector i.
Definition at line 33 of file Orthogonal_basis.h.
Poly_vec ColorFull::Orthogonal_basis::diagonal_P_spm |
To contain information about scalar products as a Poly_vec, i.e., entry i is the square of vector i.
Definition at line 37 of file Orthogonal_basis.h.