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

The full color amplitude is Scalar + Cs1+Cs2+Cs3... More...

#include <Col_amp.h>

Public Member Functions

 Col_amp ()
 Default constructor, sets Scalar=0, and leaves ca empty.
 
 Col_amp (const std::string str)
 Constructor taking a string as argument. More...
 
 Col_amp (Col_str Cs)
 Constructor converting a Col_str to a Col_amp.
 
void read_in_Col_amp (std::string filename)
 Reads in the Col_amp to the member ca from the file filename. More...
 
void write_out_Col_amp (std::string filename) const
 Function for writing out the Col_amp to a file with name filename. More...
 
const Col_strat (int i) const
 Returns the Col_str at place i.
 
Col_strat (int i)
 Returns the Col_str at place i.
 
uint size () const
 The size of the col_amp ca.
 
bool empty () const
 Is the col_amp empty?
 
void clear ()
 Erases the information in the col_amp.
 
void erase (int i)
 Erases the Col_str at place i.
 
void append (Col_str Cs)
 Appends a Col_str to the data member ca.
 
void append (col_amp ca_in)
 Appends the Col_strs in ca_in to the col_amp member ca.
 
bool gluons_only () const
 Checks if the Col_amp only contains gluons, i.e., if all Quark_lines are closed.
 
int n_gluon () const
 Returns the number of gluons in the Col_amp as the number of gluons in the first Col_str. More...
 
int n_quark () const
 Returns the number of quarks in the Col_amp as the number of quarks in the first Col_str. More...
 
int n_quark_check () const
 Returns the number of quarks in the Col_amp after checking that each Col_str has the same number of quarks. More...
 
int n_gluon_check () const
 Returns the number of gluons in the Col_amp after checking that each Col_str has the same number of gluons. More...
 
int longest_quark_line () const
 Returns the length of the longest Quark_line in any Col_str.
 
void remove_1_rings ()
 Remove Col_strs with quark_lines with just 1 gluon, they are 0 as Tr[t^a]=0.
 
void remove_0_rings ()
 Remove quark_lines with no gluons, they are Nc if closed, and defined to be 1 if open.
 
void remove_empty_Col_strs ()
 Removes empty Col_strs, an empty Col_str means that all indices have been contracted, so the Col_str is equal to its Polynomial, which is moved to the scalar part of the Col_amp. More...
 
void collect_col_strs ()
 Compares col_strs in a Col_amp to collect similar col_strs and only store once in ca. More...
 
void normal_order_col_strs ()
 Normal orders all col_strs in ca.
 
void normal_order ()
 Normal orders the individual col_strs and then orders the Col_strs using the order defined in the Col_str member function smallest. More...
 
void simplify ()
 Function for simplifying an amplitude, removes 0 and 1-rings, compares col_strs, removes Col_strs multiplying 0 and simplifies Polynomials of the individual Col_strs. More...
 
void conjugate ()
 Function for taking the conjugate of the Col_amp by conjugating each Col_str in ca and the Polynomial member Scalar. More...
 
void contract_next_neighboring_gluons ()
 Contracts up to next to neighboring gluons in each Quark_line in each Col_str in each Col_amp, only intended for closed Quark_lines. More...
 
void contract_2_rings ()
 Contract closed Quark_lines with only 2 gluons in each Quark_line in each Col_str in the Col_amp. More...
 
void contract_Quark_line_gluons ()
 Function for contracting gluon indices within the Quark_lines. More...
 
void contract_a_gluon ()
 Contracts one gluon, the first gluon in first Quark_line (in each Col_str), only intended for closed Quark_lines. More...
 
void contract_all_gluons ()
 Function for contracting all gluon indices in a Col_amp, only intended for closed Quark_lines. More...
 
void contract_quarks (const Col_amp &Ca1, const Col_amp &Ca2)
 Function for contracting the (anti-)quarks in Ca1 with those in Ca2. More...
 

Public Attributes

col_amp ca
 To actually contain the information about the Col_strs, ca=Cs1+Cs2+Cs3+... More...
 
Polynomial Scalar
 Scalar is Polynomial for collecting color factors appearing when the color structure has been fully contracted. More...
 

Private Member Functions

void contract_a_gluon (Col_str &Cs)
 Contracts one gluon, the first gluon in first Quark_line, only intended for closed Quark_lines. More...
 
void contract_Quark_line_gluons (Quark_line &Ql)
 Function for contracting gluon indices within the same Quark_line. More...
 
void contract_Quark_line_gluons (Col_str &Cs)
 Function for contracting gluon indices within the same Quark_line. More...
 
void contract_all_gluons (Col_str &Cs)
 Function for contracting all gluon indices in a Col_str, assumes quarks already contracted and is only intended for closed Quark_lines. More...
 
void Col_amp_of_str (const std::string str)
 Converts a text string to a Col_amp, used by string constructor, and by read_in_Col_amp. More...
 

Detailed Description

The full color amplitude is Scalar + Cs1+Cs2+Cs3...

Col_amp is a class to contain info on several Col_strs, a color amplitude.

Definition at line 24 of file Col_amp.h.

Constructor & Destructor Documentation

◆ Col_amp()

ColorFull::Col_amp::Col_amp ( const std::string  str)
inline

Constructor taking a string as argument.

The string should be of form Polynomial1* col_str1 + Polynomial2*col_str2, for example: Col_amp Ca("13*Nc*[(1, 3, 4, 2)] +2 TR 5 Nc^(-3) [(1, 4) (3, 2)]"). (The Polynomials should multiply the whole col_strs in square brackets, rather than a quark_line inside the []-brackets.)

Definition at line 38 of file Col_amp.h.

References Col_amp_of_str().

Member Function Documentation

◆ Col_amp_of_str()

void ColorFull::Col_amp::Col_amp_of_str ( const std::string  str)
private

Converts a text string to a Col_amp, used by string constructor, and by read_in_Col_amp.

The string should be of form Polynomial1* col_str1 + Polynomial2 col_str2, for example: Col_amp Ca("13*Nc*[(1,3,4,2)] +2 TR 5 Nc^(-3) [(1,4) (3,2)]").

Referenced by append(), and Col_amp().

◆ collect_col_strs()

void ColorFull::Col_amp::collect_col_strs ( )

Compares col_strs in a Col_amp to collect similar col_strs and only store once in ca.

Referenced by append().

◆ conjugate()

void ColorFull::Col_amp::conjugate ( )

Function for taking the conjugate of the Col_amp by conjugating each Col_str in ca and the Polynomial member Scalar.

Referenced by append().

◆ contract_2_rings()

void ColorFull::Col_amp::contract_2_rings ( )

Contract closed Quark_lines with only 2 gluons in each Quark_line in each Col_str in the Col_amp.

This removes the 2-ring, replaces one of the gluon indices and multiplies with a factor tr[t^a t^a]=TR (no sum). only intended for fully contractable Col_strs.

Referenced by append().

◆ contract_a_gluon() [1/2]

void ColorFull::Col_amp::contract_a_gluon ( )

Contracts one gluon, the first gluon in first Quark_line (in each Col_str), only intended for closed Quark_lines.

Referenced by append().

◆ contract_a_gluon() [2/2]

void ColorFull::Col_amp::contract_a_gluon ( Col_str Cs)
private

Contracts one gluon, the first gluon in first Quark_line, only intended for closed Quark_lines.

This function is a member of Col_amp as the result is contained in this Col_amp.

◆ contract_all_gluons() [1/2]

void ColorFull::Col_amp::contract_all_gluons ( )

Function for contracting all gluon indices in a Col_amp, only intended for closed Quark_lines.

Referenced by append().

◆ contract_all_gluons() [2/2]

void ColorFull::Col_amp::contract_all_gluons ( Col_str Cs)
private

Function for contracting all gluon indices in a Col_str, assumes quarks already contracted and is only intended for closed Quark_lines.

This function is a member of Col_amp as the result is contained in this Col_amp.

◆ contract_next_neighboring_gluons()

void ColorFull::Col_amp::contract_next_neighboring_gluons ( )

Contracts up to next to neighboring gluons in each Quark_line in each Col_str in each Col_amp, only intended for closed Quark_lines.

Referenced by append().

◆ contract_Quark_line_gluons() [1/3]

void ColorFull::Col_amp::contract_Quark_line_gluons ( )

Function for contracting gluon indices within the Quark_lines.

Checks only for ONE pair in each Quark_line.

Referenced by append().

◆ contract_Quark_line_gluons() [2/3]

void ColorFull::Col_amp::contract_Quark_line_gluons ( Quark_line Ql)
private

Function for contracting gluon indices within the same Quark_line.

Checks only for ONE pair, i.e. if several gluon indices appear within the Quark_line, only one pair is contracted, only intended for closed Quark_lines. This function is a member of Col_amp as the result is a Col_amp.

◆ contract_Quark_line_gluons() [3/3]

void ColorFull::Col_amp::contract_Quark_line_gluons ( Col_str Cs)
private

Function for contracting gluon indices within the same Quark_line.

Checks only for ONE pair in each Quark_line in each Col_str, i.e. if several gluon indices appear within the Quark_line, only one pair is contracted. The function is only intended for closed Quark_lines. This function is a member of Col_amp as it saves the result in this Col_amp.

◆ contract_quarks()

void ColorFull::Col_amp::contract_quarks ( const Col_amp Ca1,
const Col_amp Ca2 
)

Function for contracting the (anti-)quarks in Ca1 with those in Ca2.

The results is saved in this Col_amp.

Referenced by append().

◆ n_gluon()

int ColorFull::Col_amp::n_gluon ( ) const

Returns the number of gluons in the Col_amp as the number of gluons in the first Col_str.

Note that the other Col_strs could have a different number of (contracted) gluons. (Intended for tree-level Col_ams with only one Col_str.)

Referenced by append().

◆ n_gluon_check()

int ColorFull::Col_amp::n_gluon_check ( ) const

Returns the number of gluons in the Col_amp after checking that each Col_str has the same number of gluons.

Referenced by append().

◆ n_quark()

int ColorFull::Col_amp::n_quark ( ) const

Returns the number of quarks in the Col_amp as the number of quarks in the first Col_str.

Note that the other Col_strs could have a different number of (contracted) quarks. (Intended for tree-level Col_ams with only one Col_str.)

Referenced by append().

◆ n_quark_check()

int ColorFull::Col_amp::n_quark_check ( ) const

Returns the number of quarks in the Col_amp after checking that each Col_str has the same number of quarks.

Referenced by append().

◆ normal_order()

void ColorFull::Col_amp::normal_order ( )

Normal orders the individual col_strs and then orders the Col_strs using the order defined in the Col_str member function smallest.

Referenced by append().

◆ read_in_Col_amp()

void ColorFull::Col_amp::read_in_Col_amp ( std::string  filename)

Reads in the Col_amp to the member ca from the file filename.

(This is for reading in an actual color amplitude, nothing is read in the the Polynomial member scalar.)

◆ remove_empty_Col_strs()

void ColorFull::Col_amp::remove_empty_Col_strs ( )

Removes empty Col_strs, an empty Col_str means that all indices have been contracted, so the Col_str is equal to its Polynomial, which is moved to the scalar part of the Col_amp.

Referenced by append().

◆ simplify()

void ColorFull::Col_amp::simplify ( )

Function for simplifying an amplitude, removes 0 and 1-rings, compares col_strs, removes Col_strs multiplying 0 and simplifies Polynomials of the individual Col_strs.

Referenced by append().

◆ write_out_Col_amp()

void ColorFull::Col_amp::write_out_Col_amp ( std::string  filename) const

Function for writing out the Col_amp to a file with name filename.

Member Data Documentation

◆ ca

col_amp ColorFull::Col_amp::ca

To actually contain the information about the Col_strs, ca=Cs1+Cs2+Cs3+...

Technically the ca is a vector of Col_strs, a col_amp.

Definition at line 48 of file Col_amp.h.

Referenced by append(), and Col_amp().

◆ Scalar

Polynomial ColorFull::Col_amp::Scalar

Scalar is Polynomial for collecting color factors appearing when the color structure has been fully contracted.

The full color amplitude is Scalar + Cs1+Cs2+Cs3.... Scalar should thus be non-zero only if all indices can be contracted.

Definition at line 54 of file Col_amp.h.

Referenced by Col_amp().


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