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

A class to contain one quark-line with gluons attached multiplying a Polynomial, Poly. More...

#include <Quark_line.h>

Public Member Functions

 Quark_line (const std::string str)
 Constructor used to set the color structure using a string. More...
 
 Quark_line ()
 Default constructor.
 
void read_in_Quark_line (std::string filename)
 Function for reading in the Quark_line from the file filename, uses Quark_line_of_str. More...
 
void write_out_Quark_line (std::string filename) const
 Function for writing out the Quark_line to a file with name filename. More...
 
int at (int j) const
 Returns the parton at place j. More...
 
uint size () const
 The size of the quark_line.
 
void clear ()
 Erase information in quark_line ql.
 
bool empty () const
 Is the quark_line empty?
 
void normal_order ()
 If the quark_line is open, there is nothing to do, else order with smallest gluon index first (use that the trace is cyclic). More...
 
void erase (int i)
 To erase the parton at place i.
 
void conjugate ()
 Conjugates the Quark_line by reversing the quark_line ql and conjugating the Polynomial Poly. More...
 
void append (int p)
 Appends parton p to the Quark_line.
 
void append (const std::vector< int > &in_ql)
 Appends a whole quark_line to the Quark_line.
 
void prepend (int p)
 Prepends parton p to the Quark_line.
 
void prepend (std::vector< int > in_ql)
 Prepends a whole quark_line to the Quark_line.
 
void insert (int j, int p)
 Inserting parton p at place j.
 
Quark_line before (int j) const
 Returns a Quark_line where the ql member is changed to contain only partons before place j. More...
 
Quark_line after (int j) const
 Returns a Quark_line where the ql member is changed to contain only partons after place j. More...
 
std::pair< Quark_line, Quark_linesplit_Quark_line (int j1, int j2) const
 Function for splitting a closed Quark_line into two Quark_lines. More...
 
int smallest (const Quark_line &Ql1, const Quark_line &Ql2) const
 Function for finding the "smallest" Quark_line of Ql1 and Ql2, used for deciding which Quark_line should stand first while normal ordering. More...
 
void contract_neighboring_gluons (int j)
 Contracts neighboring gluons in the Quark_line starting at j, only intended for closed Quark_lines. More...
 
void contract_neighboring_gluons ()
 Contracts neighboring gluons in a Quark_line starting at place 0, and checking all neighbors, only intended for closed Quark_lines. More...
 
void contract_next_neighboring_gluons (int j)
 Contracts neighboring and next to neighboring gluons in the Quark_line, starting at place j (i.e. More...
 
void contract_next_neighboring_gluons ()
 Contracts neighboring and next to neighboring gluons in the Quark_line, starting with contracting neighbors, only intended for closed Quark_lines. More...
 

Public Attributes

quark_line ql
 To actually contain the color information, in order {q, g1, ... More...
 
Polynomial Poly
 Polynomial factor, multiplying the quark_line.
 
bool open
 Is the string open, with a q in the beginning and a qbar in the end, or not?
 

Private Member Functions

void Quark_line_of_str (const std::string str)
 Function used to set the color structure using a string. More...
 
void quark_line_of_str (std::string str)
 To make it easy to define a Quark_line using a string, used by Quark_line_of_str(std::string str) to set the quark_line member ql. More...
 

Detailed Description

A class to contain one quark-line with gluons attached multiplying a Polynomial, Poly.

The partons are ordered as {q,g1,g2...gn,qbar} for an open quark-line containing a q and a qbar, or (g1,g2...gn) for a closed quark-line with only gluons. The parton numbers are stored as components in a vector, a quark_line, whereas the member open contains information about it the quark-line is closed as a trace (true) or open, false.

Definition at line 31 of file Quark_line.h.

Constructor & Destructor Documentation

◆ Quark_line()

ColorFull::Quark_line::Quark_line ( const std::string  str)

Constructor used to set the color structure using a string.

The string should be of form Polynomial*quark_line, used as "Quark_line Ql("5*TR*Nc^2 {1,6,7,2}");" for an open Quark_line with a quark with number 1, two gluons with number 6 and 7, and a qbar with number 2. For a closed Quark_line with 3 gluons the syntax is "Quark_line Ql("(1,2,3)");". The integers should be positive. The Polynomial should be in such a shape that it is readable by the Polynomial( std::string ) constructor.

Member Function Documentation

◆ after()

Quark_line ColorFull::Quark_line::after ( int  j) const

Returns a Quark_line where the ql member is changed to contain only partons after place j.

Referenced by append().

◆ at()

int ColorFull::Quark_line::at ( int  j) const

Returns the parton at place j.

For closed quark_lines j may be between -size and 2*size.

Referenced by ColorFull::Col_str::at().

◆ before()

Quark_line ColorFull::Quark_line::before ( int  j) const

Returns a Quark_line where the ql member is changed to contain only partons before place j.

Referenced by append().

◆ conjugate()

void ColorFull::Quark_line::conjugate ( )

Conjugates the Quark_line by reversing the quark_line ql and conjugating the Polynomial Poly.

Referenced by empty().

◆ contract_neighboring_gluons() [1/2]

void ColorFull::Quark_line::contract_neighboring_gluons ( int  j)

Contracts neighboring gluons in the Quark_line starting at j, only intended for closed Quark_lines.

◆ contract_neighboring_gluons() [2/2]

void ColorFull::Quark_line::contract_neighboring_gluons ( )

Contracts neighboring gluons in a Quark_line starting at place 0, and checking all neighbors, only intended for closed Quark_lines.

Referenced by append().

◆ contract_next_neighboring_gluons() [1/2]

void ColorFull::Quark_line::contract_next_neighboring_gluons ( int  j)

Contracts neighboring and next to neighboring gluons in the Quark_line, starting at place j (i.e.

checking gluon j and j+2). Also looks for new neighbors, only intended for closed Quark_lines.

◆ contract_next_neighboring_gluons() [2/2]

void ColorFull::Quark_line::contract_next_neighboring_gluons ( )

Contracts neighboring and next to neighboring gluons in the Quark_line, starting with contracting neighbors, only intended for closed Quark_lines.

Referenced by append().

◆ normal_order()

void ColorFull::Quark_line::normal_order ( )

If the quark_line is open, there is nothing to do, else order with smallest gluon index first (use that the trace is cyclic).

Referenced by empty().

◆ Quark_line_of_str()

void ColorFull::Quark_line::Quark_line_of_str ( const std::string  str)
private

Function used to set the color structure using a string.

The string should be of form Polynomial*quark_line, used as "Quark_line Ql("Polynomial {5,6,7}");" for an open Quark_line with a quark with number 5, a gluon with number 6 and a qbar with number 7, and as "Quark_line Ql("(5,6,7)");" for 3 gluons attached to a quark line. The Polynomial should be in such a shape that it's readable by the Polynomial( std::string ) constructor.

Referenced by append().

◆ quark_line_of_str()

void ColorFull::Quark_line::quark_line_of_str ( std::string  str)
private

To make it easy to define a Quark_line using a string, used by Quark_line_of_str(std::string str) to set the quark_line member ql.

Referenced by append().

◆ read_in_Quark_line()

void ColorFull::Quark_line::read_in_Quark_line ( std::string  filename)

Function for reading in the Quark_line from the file filename, uses Quark_line_of_str.

◆ smallest()

int ColorFull::Quark_line::smallest ( const Quark_line Ql1,
const Quark_line Ql2 
) const

Function for finding the "smallest" Quark_line of Ql1 and Ql2, used for deciding which Quark_line should stand first while normal ordering.

Does NOT first normal order the Quark_lines. If only one is open, that Quark_line should stand first. If both are open or both are closed, the longest Quark_line should stand first. If the size is the same, the Quark_line with smallest starting number should stand first. If the first number is the same, check the 2nd number, then the 3rd... 1 is returned if Ql1 should stand first, and 2 if Ql2 should stand first. If Ql1==Ql2, 0 is returned.

Referenced by append().

◆ split_Quark_line()

std::pair<Quark_line, Quark_line> ColorFull::Quark_line::split_Quark_line ( int  j1,
int  j2 
) const

Function for splitting a closed Quark_line into two Quark_lines.

The gluons at j1 and j2 are removed in the split. May create 1-rings and 0-rings.

Referenced by append().

◆ write_out_Quark_line()

void ColorFull::Quark_line::write_out_Quark_line ( std::string  filename) const

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

Member Data Documentation

◆ ql

quark_line ColorFull::Quark_line::ql

To actually contain the color information, in order {q, g1, ...

gn, qbar} or (g1, ..., gn).

Definition at line 52 of file Quark_line.h.


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