herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
Orthogonal_basis.h
1 /*
2  * Orthogonal_basis.h
3  * Contains the declarations of the class Orthogonal_basis, related types and operators.
4  * Created on: May 25, 2013
5  * Author: Malin Sjodahl
6  */
7 
8 #ifndef COLORFULL_Orthogonal_basis_h
9 #define COLORFULL_Orthogonal_basis_h
10 
11 
12 #include "Col_basis.h"
13 
14 
15 namespace ColorFull {
16 
23 
24 public:
28  orthogonal_basis = true;
29  }
30 
34 
38 
39 
40  /******************** Functions for scalar products **********************/
41 
45  void scalar_product_matrix();
46 
52  void diagonal_scalar_product_matrix( bool save_P_diagonal_spm, bool save_d_diagonal_spm, bool use_mem );
53 
57  Poly_vec decompose( const Col_amp & Ca );
58 
64  Polynomial scalar_product( const Col_amp & Ca1, const Col_amp & Ca2 );
65 
72  cnum scalar_product_num( const Col_amp & Ca1, const Col_amp & Ca2 );
73 
78  cnum scalar_product_num( const cvec & v1, const cvec & v2 );
79 
80 
81  /******************** Functions for reading and writing **********************/
82 
86  std::string diagonal_spm_file_name( const bool leading, const bool poly ) const;
87 
89  void write_out_diagonal_d_spm( std::string filename ) const;
90 
92  void write_out_diagonal_d_spm( ) const;
93 
95  void write_out_diagonal_P_spm( std::string filename ) const;
96 
98  void write_out_diagonal_P_spm( ) const;
99 
104  void write_out_diagonal_spm( const dvec & dv, const bool leading ) const;
105 
110  void write_out_diagonal_spm( const Poly_vec & pv, const bool leading ) const;
111 
112 private:
113 
120  void scalar_product_matrix( bool save_P_spm, bool save_d_spm, bool use_mem );
121 
122 
123 };// end class Orthogonal_basis
124 
125 }// end namespace ColorFull
126 
127 
128 #endif /* COLORFULL_Orthogonal_basis_h */
dvec diagonal_d_spm
To contain information about scalar products as a dvec, i.e., entry i is the square of vector i...
To contain a color basis, where each basis vector is a Col_amp.
Definition: Col_basis.h:24
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...
Class for containing vector of Polynomials, and functions for Polynomial vectors. ...
Definition: Poly_vec.h:25
void write_out_diagonal_P_spm() const
Writes out diagonal_P_spm to the standard filename, see diagonal_spm_file_name.
void scalar_product_matrix()
Calculates the scalar product matrix assuming the basis to be orthogonal.
For containing a Polynomial (in Nc, CF and TR), as a sum of Monomials.
Definition: Polynomial.h:30
std::string diagonal_spm_file_name(const bool leading, const bool poly) const
Creates a default filename for writing out diagonal scalar products.
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...
This class is for containing orthogonal bases, i.e.
void write_out_diagonal_d_spm() const
Writes out diagonal_d_spm to the standard filename, see diagonal_spm_file_name.
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.
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 standar...
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...
The full color amplitude is Scalar + Cs1+Cs2+Cs3...
Definition: Col_amp.h:24
Orthogonal_basis()
Default constructor, puts private variable orthogonal_basis=true and calls the constructor of Col_bas...
Poly_vec decompose(const Col_amp &Ca)
The decomposition of a Col_amp in an orthogonal basis is done by calculating scalar products and divi...