herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
MatrixElement
Matchbox
ColorFull
Col_str.h
1
// -*- C++ -*-
2
/*
3
* Col_str.h
4
* Contains declaration of the class Col_str and associated types and operators.
5
* Created on: Jul 7, 2010
6
* Author: Malin Sjodahl
7
*/
8
9
#ifndef COLORFULL_Col_str_h
10
#define COLORFULL_Col_str_h
11
12
#include "Quark_line.h"
13
14
namespace
ColorFull {
15
20
typedef
std::vector < Quark_line > col_str;
21
22
26
class
Col_str
{
27
public
:
28
30
Col_str
(){};
31
38
Col_str
(
const
std::string str );
39
41
Col_str
(
Quark_line
Ql ) {
cs
.push_back(Ql);}
42
46
col_str
cs
;
47
49
Polynomial
Poly
;
50
52
const
Quark_line
&
at
(
int
i )
const
{
return
cs
.at(i);}
53
55
Quark_line
&
at
(
int
i ) {
return
cs
.at(i);}
56
58
int
at
(
int
i,
int
j )
const
;
59
61
uint
size
()
const
{
return
cs
.size(); }
62
64
bool
empty
()
const
{
return
cs
.empty(); }
65
67
void
clear
() {
cs
.clear(); }
68
70
void
erase
(
int
i );
71
73
void
erase
(
int
i,
int
j );
74
76
void
erase
(std::pair<int, int> place);
77
79
void
append
(
Quark_line
Ql ) {
cs
.push_back( Ql ); }
80
83
void
insert
(
int
i,
int
j,
int
part_num );
84
86
void
append
( col_str cs_in );
87
89
void
read_in_Col_str
( std::string filename );
90
93
void
write_out_Col_str
( std::string filename )
const
;
94
96
std::pair<int, int>
find_parton
(
int
part_num )
const
;
97
99
bool
neighbor
(
int
p1,
int
p2 )
const
;
100
102
bool
right_neighbor
(
int
p1,
int
p2 )
const
;
103
105
bool
left_neighbor
(
int
p1,
int
p2 )
const
;
106
108
void
replace
(
int
old_ind,
int
new_ind );
109
115
std::string
find_kind
(
int
p )
const
;
116
118
bool
gluons_only
()
const
;
119
122
int
n_gluon
()
const
;
123
126
int
n_quark
()
const
;
127
133
void
normal_order
();
134
148
int
smallest
(
const
Col_str
& Cs1,
const
Col_str
& Cs2 )
const
;
149
151
int
longest_quark_line
()
const
;
152
154
void
remove_1_rings
();
155
157
void
remove_0_rings
();
158
163
void
simplify
();
164
167
void
conjugate
();
168
172
void
contract_next_neighboring_gluons
( );
173
178
void
contract_2_rings
( );
179
182
void
contract_quarks
(
const
Col_str
Cs1,
const
Col_str
Cs2 );
183
184
185
private
:
186
191
int
compare_quark_lines
(
int
i1,
int
i2 )
const
;
192
195
void
Col_str_of_str
(
const
std::string str );
196
200
void
col_str_of_str
( std::string );
201
202
};
//end class Col_str
203
204
210
bool
operator==
(
const
col_str & cs1,
const
col_str & cs2);
211
214
bool
operator!=(
const
col_str & cs1,
const
col_str & cs2);
215
217
std::ostream&
operator<<
( std::ostream& out,
const
col_str & cs );
218
220
Col_str
operator*
(
const
Col_str
& Cs,
const
int
i );
221
223
Col_str
operator*
(
const
int
i,
const
Col_str
& Cs );
224
226
Col_str
operator*
(
const
Col_str
& Cs,
const
double
d );
227
229
Col_str
operator*
(
const
double
d,
const
Col_str
& Cs );
230
232
Col_str
operator*
(
const
Col_str
& Cs,
const
cnum c);
233
235
Col_str
operator*
(
const
cnum c,
const
Col_str
& Cs );
236
238
Col_str
operator*
(
const
Col_str
& Cs,
const
Monomial
& Mon );
239
241
Col_str
operator*
(
const
Monomial
& Mon,
const
Col_str
& Cs);
242
244
Col_str
operator*
(
const
Col_str
& Cs,
const
Polynomial
& Poly );
245
247
Col_str
operator*
(
const
Polynomial
& Poly,
const
Col_str
& Cs );
248
250
Col_str
operator*
(
const
Col_str
& Cs,
const
Quark_line
& Ql);
251
253
Col_str
operator*
(
const
Quark_line
& Ql,
const
Col_str
& Cs );
254
256
Col_str
operator*
(
const
Col_str
& Cs1,
const
Col_str
& Cs2 );
257
260
Col_str
operator*
(
const
Quark_line
& Ql1,
const
Quark_line
& Ql2 );
261
263
std::ostream&
operator<<
(std::ostream& out,
const
Col_str
& Cs);
264
269
bool
operator==
(
const
Col_str
& Cs1,
const
Col_str
& Cs2 );
270
273
bool
operator!=(
const
Col_str
& Cs1,
const
Col_str
& Cs2 );
274
275
}
276
277
#endif
/* COLORFULL_Col_str_h */
ColorFull::Col_str
A class to contain ONE color structure, a direct product of Quark_lines, multiplying a Polynomial,...
Definition:
Col_str.h:26
ColorFull::Col_str::clear
void clear()
Erase information in col_str.
Definition:
Col_str.h:67
ColorFull::Col_str::append
void append(Quark_line Ql)
Appends a Quark_line to data member cs.
Definition:
Col_str.h:79
ColorFull::Col_str::read_in_Col_str
void read_in_Col_str(std::string filename)
Function for reading in the Col_str from the file filename.
ColorFull::Col_str::Col_str_of_str
void Col_str_of_str(const std::string str)
Function to allow setting the color structure by using a string.
ColorFull::Col_str::remove_0_rings
void remove_0_rings()
Removes Quark_lines without partons, equal to Nc (closed) or 1 (open).
ColorFull::Col_str::erase
void erase(std::pair< int, int > place)
Erases a parton at location place.
ColorFull::Col_str::at
const Quark_line & at(int i) const
Returns the Quark_line at place i.
Definition:
Col_str.h:52
ColorFull::Col_str::Col_str
Col_str()
Default constructor, leaves cs empty.
Definition:
Col_str.h:30
ColorFull::Col_str::empty
bool empty() const
Is the col_str empty?
Definition:
Col_str.h:64
ColorFull::Col_str::n_gluon
int n_gluon() const
Counts the number of gluons in a Col_str.
ColorFull::Col_str::at
int at(int i, int j) const
Returns the parton at place j in Quark_line i.
ColorFull::Col_str::write_out_Col_str
void write_out_Col_str(std::string filename) const
Function for writing out the Col_str to a file with name filename.
ColorFull::Col_str::erase
void erase(int i, int j)
Erases the parton at place i, j.
ColorFull::Col_str::append
void append(col_str cs_in)
Append the content of a col_str to the cs of the Col_str.
ColorFull::Col_str::at
Quark_line & at(int i)
Returns the Quark_line at place i.
Definition:
Col_str.h:55
ColorFull::Col_str::remove_1_rings
void remove_1_rings()
Removes Quark_lines with only one gluon as Tr(t^a)=0.
ColorFull::Col_str::neighbor
bool neighbor(int p1, int p2) const
Function for telling if the partons p1 and p2 are neighbors.
ColorFull::Col_str::find_parton
std::pair< int, int > find_parton(int part_num) const
Locates the parton with number part_num in a Col_str.
ColorFull::Col_str::conjugate
void conjugate()
Function for conjugating the Col_str by conjugating each Quark_line in cs, as well as the Polynomial ...
ColorFull::Col_str::simplify
void simplify()
Removes 0 and 1-rings, moves factors multiplying the individual Quark_lines to multiply the col_str i...
ColorFull::Col_str::Col_str
Col_str(const std::string str)
Constructor for setting the color structure using a string.
ColorFull::Col_str::right_neighbor
bool right_neighbor(int p1, int p2) const
Function for telling if parton p2 stands to the right of parton p1.
ColorFull::Col_str::cs
col_str cs
For containing the information about the color structure, a direct product of Quark_lines,...
Definition:
Col_str.h:46
ColorFull::Col_str::compare_quark_lines
int compare_quark_lines(int i1, int i2) const
Function to tell which quark_line should stand first in normal order.
ColorFull::Col_str::insert
void insert(int i, int j, int part_num)
To insert the parton part_num in quark_line i at place j.
ColorFull::Col_str::col_str_of_str
void col_str_of_str(std::string)
Setting the col_str member cs (i.e.
ColorFull::Col_str::smallest
int smallest(const Col_str &Cs1, const Col_str &Cs2) const
Finds out the "smallest" Col_str of two Col_strs, i.e.
ColorFull::Col_str::replace
void replace(int old_ind, int new_ind)
Replaces the parton index old_ind with new_ind.
ColorFull::Col_str::n_quark
int n_quark() const
Counts the number of quarks (=number of anti-quarks) in a Col_str.
ColorFull::Col_str::size
uint size() const
The size of the col_str.
Definition:
Col_str.h:61
ColorFull::Col_str::gluons_only
bool gluons_only() const
Checks if the amplitude only has gluons, i.e. if all Quark_lines are closed.
ColorFull::Col_str::left_neighbor
bool left_neighbor(int p1, int p2) const
Function for telling if parton p2 stands to the left of parton p1.
ColorFull::Col_str::normal_order
void normal_order()
Normal orders the Col_str by first normal order individual Quark_lines and then normal order differen...
ColorFull::Col_str::contract_quarks
void contract_quarks(const Col_str Cs1, const Col_str Cs2)
Function for contracting quarks between two color structures Cs1 and Cs2.
ColorFull::Col_str::contract_next_neighboring_gluons
void contract_next_neighboring_gluons()
Contracts neighboring and next to neighboring gluons in each Quark_line in the Col_str,...
ColorFull::Col_str::erase
void erase(int i)
Erases the Quark_line at place i.
ColorFull::Col_str::longest_quark_line
int longest_quark_line() const
Returns the length of the longest Quark_line in the Col_str.
ColorFull::Col_str::find_kind
std::string find_kind(int p) const
Finds out if a parton is a quark, anti-quark or a gluon, returns "q", "qbar" or "g" respectively.
ColorFull::Col_str::contract_2_rings
void contract_2_rings()
Function for contracting gluon indices in closed Quark_lines with only 2 gluons.
ColorFull::Col_str::Poly
Polynomial Poly
Polynomial factor multiplying the whole product of quark-lines.
Definition:
Col_str.h:49
ColorFull::Col_str::Col_str
Col_str(Quark_line Ql)
Make a Col_str of a Quark_line.
Definition:
Col_str.h:41
ColorFull::Monomial
A class to contain the factor of form TR^a*Nc^b*CF^c*int_part*cnum_part, where the powers a,...
Definition:
Monomial.h:23
ColorFull::Polynomial
For containing a Polynomial (in Nc, CF and TR), as a sum of Monomials.
Definition:
Polynomial.h:30
ColorFull::Quark_line
A class to contain one quark-line with gluons attached multiplying a Polynomial, Poly.
Definition:
Quark_line.h:31
ThePEG::operator==
bool operator==(const LorentzVector< Value > &a, const LorentzVector< Value > &b)
ThePEG::operator*
string operator*(double, string)
ThePEG::operator<<
ostream & operator<<(ostream &, const Collision &)
Generated on Thu Jun 20 2024 17:50:52 for Herwig by
1.9.6