herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
ColorFull::Orthogonal_basis Class Reference

This class is for containing orthogonal bases, i.e. More...

#include <Orthogonal_basis.h>

Inheritance diagram for ColorFull::Orthogonal_basis:

Public Member Functions

 Orthogonal_basis ()
 Default constructor, puts private variable orthogonal_basis=true and calls the constructor of Col_basis. More...
 
void scalar_product_matrix ()
 Calculates the scalar product matrix assuming the basis to be orthogonal. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
std::string diagonal_spm_file_name (const bool leading, const bool poly) const
 Creates a default filename for writing out diagonal scalar products. More...
 
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. More...
 
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. More...
 
- Public Member Functions inherited from ColorFull::Col_basis
 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_ampat (const int i) const
 Returns the Col_amp (basis vector) at place i.
 
Col_ampat (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. More...
 
void scalar_product_matrix_num ()
 This function works as scalar_product_matrix, but does the calculation numerically. More...
 
virtual void scalar_product_matrix_no_mem ()
 This function works like scalar_product_matrix, but does not use memoization. More...
 
void scalar_product_matrix_num_no_mem ()
 This function works like scalar_product_matrix_num, but does not use memoization. More...
 
void leading_scalar_product_matrix ()
 Finds the leading Nc scalar product matrices, leading_P_spm and leading_d_spm. More...
 
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. More...
 
std::string basis_file_name () const
 Returns a standard filename, used for writing out the basis to a file. More...
 
std::string spm_file_name (const bool leading, const bool poly) const
 Returns a standard filename, used for writing out scalar product matrices. More...
 
virtual void read_in_Col_basis (std::string filename)
 Function for reading in the basis from the file filename. More...
 
virtual void read_in_Col_basis ()
 Function for reading in the basis from default filename (see basis_file_name). More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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). More...
 
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. More...
 
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. More...
 
Poly_matr color_gamma (int p1, int p2)
 Function for calculating the color structure part of the soft anomalous dimension matrix. More...
 
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. More...
 
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. More...
 
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. More...
 

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. More...
 
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. More...
 
- Public Attributes inherited from ColorFull::Col_basis
int nq
 The number of qqbar-pairs, initially set to 0 and (possibly) changed with create_basis, or while reading in the basis. More...
 
int ng
 The number of gluons, initially set to 0 and (possibly) changed with create_basis, or while reading in the basis. More...
 
col_basis cb
 To actually contain the info about the basis vectors cb= vector1, vector2... More...
 
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. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ColorFull::Col_basis
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. More...
 
bool check_symmetry (const dmatr &matr) const
 Checking that a numerical (double) matrix (the scalar product matrix) is symmetric. More...
 
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. More...
 
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. More...
 
- Protected Attributes inherited from ColorFull::Col_basis
bool trace_basis
 
bool tree_level_gluon_basis
 
bool orthogonal_basis
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Orthogonal_basis()

ColorFull::Orthogonal_basis::Orthogonal_basis ( )
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.

Member Function Documentation

◆ decompose()

Poly_vec ColorFull::Orthogonal_basis::decompose ( const Col_amp Ca)
virtual

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.

◆ diagonal_scalar_product_matrix()

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.

◆ diagonal_spm_file_name()

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.

◆ scalar_product()

Polynomial ColorFull::Orthogonal_basis::scalar_product ( const Col_amp Ca1,
const Col_amp Ca2 
)
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.

◆ scalar_product_matrix() [1/2]

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.

◆ scalar_product_matrix() [2/2]

void ColorFull::Orthogonal_basis::scalar_product_matrix ( bool  save_P_spm,
bool  save_d_spm,
bool  use_mem 
)
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.

◆ scalar_product_num() [1/2]

cnum ColorFull::Orthogonal_basis::scalar_product_num ( const Col_amp Ca1,
const Col_amp Ca2 
)
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.

◆ scalar_product_num() [2/2]

cnum ColorFull::Orthogonal_basis::scalar_product_num ( const cvec &  v1,
const cvec &  v2 
)
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.

◆ write_out_diagonal_spm() [1/2]

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.

◆ write_out_diagonal_spm() [2/2]

void ColorFull::Orthogonal_basis::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.

The boolean variable leading should be true if Poly_vec only has leading Nc contributions. The filename is then modified accordingly.

Member Data Documentation

◆ diagonal_d_spm

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.

◆ diagonal_P_spm

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.


The documentation for this class was generated from the following file: