herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
MatrixElement
Matchbox
ColorFull
Col_amp.h
1
// -*- C++ -*-
2
3
/*
4
* Col_amp.h
5
* Contains the declarations of the class Col_amp, related types and operators
6
* Created on: Jul 7, 2010
7
* Author: Malin Sjodahl
8
*/
9
10
#ifndef COLORFULL_Col_amp_h
11
#define COLORFULL_Col_amp_h
12
13
#include "Col_str.h"
14
15
namespace
ColorFull {
16
19
typedef
std::vector<Col_str> col_amp;
20
21
24
class
Col_amp
{
25
26
public
:
27
29
Col_amp
() {
Scalar
=
Scalar
* 0;}
30
38
Col_amp
(
const
std::string str ){
Col_amp_of_str
( str );}
39
41
Col_amp
(
Col_str
Cs ) {
42
Scalar
=
Scalar
* 0;
43
ca
.push_back(Cs);
44
}
45
48
col_amp
ca
;
49
54
Polynomial
Scalar
;
55
59
void
read_in_Col_amp
( std::string filename );
60
63
void
write_out_Col_amp
( std::string filename )
const
;
64
66
const
Col_str
&
at
(
int
i )
const
{
return
ca
.at(i); }
67
69
Col_str
&
at
(
int
i ) {
return
ca
.at(i);}
70
72
uint
size
()
const
{
return
ca
.size();}
73
75
bool
empty
()
const
{
return
ca
.empty(); }
76
78
void
clear
() {
ca
.clear(); }
79
81
void
erase
(
int
i );
82
84
void
append
(
Col_str
Cs ) {
ca
.push_back( Cs );}
85
87
void
append
( col_amp ca_in );
88
89
90
// Functions for probing the Col_amp
91
93
bool
gluons_only
()
const
;
94
98
int
n_gluon
()
const
;
99
103
int
n_quark
()
const
;
104
107
int
n_quark_check
()
const
;
108
111
int
n_gluon_check
()
const
;
112
114
int
longest_quark_line
()
const
;
115
116
// Functions for manipulating the Col_amp
117
119
void
remove_1_rings
();
120
122
void
remove_0_rings
();
123
127
void
remove_empty_Col_strs
();
128
131
void
collect_col_strs
();
132
134
void
normal_order_col_strs
();
135
139
void
normal_order
();
140
146
void
simplify
();
147
151
void
conjugate
();
152
155
void
contract_next_neighboring_gluons
( );
156
162
void
contract_2_rings
( );
163
166
void
contract_Quark_line_gluons
( );
167
170
void
contract_a_gluon
( );
171
174
void
contract_all_gluons
( );
175
178
void
contract_quarks
(
const
Col_amp
& Ca1,
const
Col_amp
& Ca2 );
179
180
private
:
181
182
186
void
contract_a_gluon
(
Col_str
& Cs );
187
193
void
contract_Quark_line_gluons
(
Quark_line
& Ql );
194
202
void
contract_Quark_line_gluons
(
Col_str
& Cs );
203
208
void
contract_all_gluons
(
Col_str
& Cs );
209
216
void
Col_amp_of_str
(
const
std::string str );
217
218
};
219
220
// Define operators involving Col_amp
221
223
std::ostream&
operator<<
( std::ostream& out,
const
col_amp & ca );
224
226
std::ostream&
operator<<
( std::ostream& out,
const
Col_amp
& Ca );
227
229
bool
operator==
(
const
Col_amp
& Ca1,
const
Col_amp
& Ca2 );
230
232
bool
operator!=(
const
Col_amp
& Ca1,
const
Col_amp
& Ca2 );
233
235
Col_amp
operator+
(
const
Col_amp
& Ca,
const
Col_str
& Cs );
236
238
Col_amp
operator+
(
const
Col_str
& Cs,
const
Col_amp
& Ca );
239
242
Col_amp
operator+
(
const
Col_amp
& Ca1,
const
Col_amp
& Ca2 );
243
245
Col_amp
operator+=(
Col_amp
& Ca,
const
Col_str
& Cs );
246
248
Col_amp
operator+=(
Col_amp
& Ca1,
const
Col_amp
& Ca2 );
249
252
Col_amp
operator-(
const
Col_amp
& Ca1,
const
Col_amp
& Ca2 );
253
255
Col_amp
operator-(
const
Col_amp
& Ca,
const
Col_str
& Cs );
256
258
Col_amp
operator-(
const
Col_amp
& Ca,
const
Col_str
& Cs );
259
261
Col_amp
operator*
(
const
Col_amp
& Ca,
const
int
i );
262
264
Col_amp
operator*
(
const
int
i,
const
Col_amp
& Ca );
265
267
Col_amp
operator*
(
const
Col_amp
& Ca,
const
cnum c );
268
270
Col_amp
operator*
(
const
cnum c,
const
Col_amp
& Ca );
271
273
Col_amp
operator*
(
const
Col_amp
& Ca,
const
double
d );
274
276
Col_amp
operator*
(
const
double
d,
const
Col_amp
& Ca );
277
279
Col_amp
operator*
(
const
Col_amp
& Ca,
const
Monomial
& Mon );
280
282
Col_amp
operator*
(
const
Monomial
& Mon,
const
Col_amp
& Ca );
283
285
Col_amp
operator*
(
const
Col_amp
& Ca,
const
Polynomial
& Poly );
286
288
Col_amp
operator*
(
const
Polynomial
& Poly,
const
Col_amp
& Ca );
289
291
Col_amp
operator*
(
const
Col_amp
& Ca,
const
Quark_line
& Ql );
292
294
Col_amp
operator*
(
const
Quark_line
& Ql,
const
Col_amp
& Ca );
295
297
Col_amp
operator*
(
const
Col_amp
& Ca,
const
Col_str
& Cs );
298
300
Col_amp
operator*
(
const
Col_str
& Cs,
const
Col_amp
& Ca );
301
303
Col_amp
operator*
(
const
Col_amp
& Ca1,
const
Col_amp
& Ca2 );
304
306
Col_amp
operator*=(
Col_amp
& Ca1,
const
Col_amp
& Ca2 );
307
308
}
// end namespace ColorFull
309
310
#endif
/* COLORFULL_Col_amp_h */
ColorFull::Col_amp
The full color amplitude is Scalar + Cs1+Cs2+Cs3... Col_amp is a class to contain info on several Col...
Definition:
Col_amp.h:24
ColorFull::Col_amp::Col_amp
Col_amp(const std::string str)
Constructor taking a string as argument.
Definition:
Col_amp.h:38
ColorFull::Col_amp::contract_a_gluon
void contract_a_gluon(Col_str &Cs)
Contracts one gluon, the first gluon in first Quark_line, only intended for closed Quark_lines.
ColorFull::Col_amp::gluons_only
bool gluons_only() const
Checks if the Col_amp only contains gluons, i.e., if all Quark_lines are closed.
ColorFull::Col_amp::contract_Quark_line_gluons
void contract_Quark_line_gluons(Quark_line &Ql)
Function for contracting gluon indices within the same Quark_line.
ColorFull::Col_amp::Col_amp_of_str
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.
ColorFull::Col_amp::n_quark_check
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 q...
ColorFull::Col_amp::contract_quarks
void contract_quarks(const Col_amp &Ca1, const Col_amp &Ca2)
Function for contracting the (anti-)quarks in Ca1 with those in Ca2.
ColorFull::Col_amp::contract_all_gluons
void contract_all_gluons()
Function for contracting all gluon indices in a Col_amp, only intended for closed Quark_lines.
ColorFull::Col_amp::at
const Col_str & at(int i) const
Returns the Col_str at place i.
Definition:
Col_amp.h:66
ColorFull::Col_amp::contract_all_gluons
void contract_all_gluons(Col_str &Cs)
Function for contracting all gluon indices in a Col_str, assumes quarks already contracted and is onl...
ColorFull::Col_amp::erase
void erase(int i)
Erases the Col_str at place i.
ColorFull::Col_amp::n_gluon
int n_gluon() const
Returns the number of gluons in the Col_amp as the number of gluons in the first Col_str.
ColorFull::Col_amp::Col_amp
Col_amp()
Default constructor, sets Scalar=0, and leaves ca empty.
Definition:
Col_amp.h:29
ColorFull::Col_amp::size
uint size() const
The size of the col_amp ca.
Definition:
Col_amp.h:72
ColorFull::Col_amp::normal_order
void normal_order()
Normal orders the individual col_strs and then orders the Col_strs using the order defined in the Col...
ColorFull::Col_amp::contract_next_neighboring_gluons
void contract_next_neighboring_gluons()
Contracts up to next to neighboring gluons in each Quark_line in each Col_str in each Col_amp,...
ColorFull::Col_amp::conjugate
void conjugate()
Function for taking the conjugate of the Col_amp by conjugating each Col_str in ca and the Polynomial...
ColorFull::Col_amp::read_in_Col_amp
void read_in_Col_amp(std::string filename)
Reads in the Col_amp to the member ca from the file filename.
ColorFull::Col_amp::clear
void clear()
Erases the information in the col_amp.
Definition:
Col_amp.h:78
ColorFull::Col_amp::write_out_Col_amp
void write_out_Col_amp(std::string filename) const
Function for writing out the Col_amp to a file with name filename.
ColorFull::Col_amp::empty
bool empty() const
Is the col_amp empty?
Definition:
Col_amp.h:75
ColorFull::Col_amp::n_quark
int n_quark() const
Returns the number of quarks in the Col_amp as the number of quarks in the first Col_str.
ColorFull::Col_amp::longest_quark_line
int longest_quark_line() const
Returns the length of the longest Quark_line in any Col_str.
ColorFull::Col_amp::contract_Quark_line_gluons
void contract_Quark_line_gluons()
Function for contracting gluon indices within the Quark_lines.
ColorFull::Col_amp::Scalar
Polynomial Scalar
Scalar is Polynomial for collecting color factors appearing when the color structure has been fully c...
Definition:
Col_amp.h:54
ColorFull::Col_amp::remove_empty_Col_strs
void remove_empty_Col_strs()
Removes empty Col_strs, an empty Col_str means that all indices have been contracted,...
ColorFull::Col_amp::at
Col_str & at(int i)
Returns the Col_str at place i.
Definition:
Col_amp.h:69
ColorFull::Col_amp::Col_amp
Col_amp(Col_str Cs)
Constructor converting a Col_str to a Col_amp.
Definition:
Col_amp.h:41
ColorFull::Col_amp::append
void append(col_amp ca_in)
Appends the Col_strs in ca_in to the col_amp member ca.
ColorFull::Col_amp::remove_1_rings
void remove_1_rings()
Remove Col_strs with quark_lines with just 1 gluon, they are 0 as Tr[t^a]=0.
ColorFull::Col_amp::contract_2_rings
void contract_2_rings()
Contract closed Quark_lines with only 2 gluons in each Quark_line in each Col_str in the Col_amp.
ColorFull::Col_amp::normal_order_col_strs
void normal_order_col_strs()
Normal orders all col_strs in ca.
ColorFull::Col_amp::ca
col_amp ca
To actually contain the information about the Col_strs, ca=Cs1+Cs2+Cs3+... .
Definition:
Col_amp.h:48
ColorFull::Col_amp::append
void append(Col_str Cs)
Appends a Col_str to the data member ca.
Definition:
Col_amp.h:84
ColorFull::Col_amp::remove_0_rings
void remove_0_rings()
Remove quark_lines with no gluons, they are Nc if closed, and defined to be 1 if open.
ColorFull::Col_amp::collect_col_strs
void collect_col_strs()
Compares col_strs in a Col_amp to collect similar col_strs and only store once in ca.
ColorFull::Col_amp::simplify
void simplify()
Function for simplifying an amplitude, removes 0 and 1-rings, compares col_strs, removes Col_strs mul...
ColorFull::Col_amp::contract_a_gluon
void contract_a_gluon()
Contracts one gluon, the first gluon in first Quark_line (in each Col_str), only intended for closed ...
ColorFull::Col_amp::n_gluon_check
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 g...
ColorFull::Col_amp::contract_Quark_line_gluons
void contract_Quark_line_gluons(Col_str &Cs)
Function for contracting gluon indices within the same Quark_line.
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::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+
XSecStat operator+(const XSecStat &x1, const XSecStat &x2)
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