herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
MatrixElement
Matchbox
ColorFull
Monomial.h
1
// -*- C++ -*-
2
/*
3
* Monomial.h
4
* Contains declaration of the class Monomial and associated types and operators
5
* Created on: Jul 7, 2010
6
* Author: Malin Sjodahl
7
*/
8
9
#ifndef COLORFULL_Monomial_h
10
#define COLORFULL_Monomial_h
11
12
#include "types.h"
13
14
15
namespace
ColorFull {
16
17
23
class
Monomial
{
24
public
:
25
27
Monomial
(){
28
pow_TR
=
pow_Nc
=
pow_CF
=0;
29
int_part
=1;
30
cnum_part
=1.0;
31
}
32
35
Monomial
(
double
dnum ){
36
pow_TR
=
pow_Nc
=
pow_CF
=0;
37
int_part
=1;
38
cnum_part
.real(dnum);
39
}
40
43
Monomial
(
int
num ){
44
pow_TR
=
pow_Nc
=
pow_CF
=0;
45
int_part
=num;
46
cnum_part
=1.0;
47
}
48
62
Monomial
( std::string str );
63
65
int
pow_TR
;
66
68
int
pow_Nc
;
69
71
int
pow_CF
;
72
74
int
int_part
;
75
77
cnum
cnum_part
;
78
81
void
conjugate
() {
82
cnum_part
=conj(
cnum_part
);
83
}
84
87
void
read_in_Monomial
( std::string filename );
88
89
92
void
write_out_Monomial
( std::string filename )
const
;
93
94
95
private
:
96
109
void
Monomial_of_str
( std::string str );
110
111
112
};
113
114
116
std::ostream&
operator<<
( std::ostream& out,
const
Monomial
& Mon );
117
121
Monomial
operator*
(
const
Monomial
& Mon,
const
int
i );
122
125
Monomial
operator*
(
const
int
i,
const
Monomial
& Mon );
126
130
Monomial
operator*
(
const
Monomial
& Mon,
const
cnum c );
131
133
Monomial
operator*
(
const
cnum c,
const
Monomial
& Mon );
134
138
Monomial
operator*
(
const
Monomial
& Mon,
const
double
d );
139
141
Monomial
operator*
(
const
double
d,
const
Monomial
& Mon );
142
146
Monomial
operator*
(
const
Monomial
& Mon1,
const
Monomial
& Mon2 );
147
151
Monomial
operator*=(
Monomial
& Mon,
const
int
i );
152
156
Monomial
operator*=(
Monomial
& Mon,
const
cnum c );
157
161
Monomial
operator*=(
Monomial
& Mon,
const
double
d );
162
165
Monomial
operator*=(
Monomial
& Mon1,
const
Monomial
& Mon2);
166
169
bool
operator==
(
const
Monomial
& Mon1,
const
Monomial
& Mon2 );
170
173
bool
operator!=(
const
Monomial
& Mon1,
const
Monomial
& Mon2 );
174
181
bool
operator<(
const
Monomial
& Mon1,
const
Monomial
& Mon2 );
182
183
}
184
185
#endif
/* COLORFULL_Monomial_h */
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::Monomial::conjugate
void conjugate()
Take the complex conjugate.
Definition:
Monomial.h:81
ColorFull::Monomial::write_out_Monomial
void write_out_Monomial(std::string filename) const
Function for writing out the Monomial to a file with name filename.
ColorFull::Monomial::cnum_part
cnum cnum_part
Complex number multiplying the monomial.
Definition:
Monomial.h:77
ColorFull::Monomial::Monomial
Monomial(double dnum)
Constructor using a double.
Definition:
Monomial.h:35
ColorFull::Monomial::Monomial
Monomial(std::string str)
Constructor taking a string as argument.
ColorFull::Monomial::read_in_Monomial
void read_in_Monomial(std::string filename)
Function for reading in the Monomial from the file filename, uses Monomial_of_str.
ColorFull::Monomial::Monomial_of_str
void Monomial_of_str(std::string str)
Function for makinga a Monomial from a string.
ColorFull::Monomial::int_part
int int_part
Integer multiplying the monomial, can be 0.
Definition:
Monomial.h:74
ColorFull::Monomial::Monomial
Monomial(int num)
Constructor using an int.
Definition:
Monomial.h:43
ColorFull::Monomial::Monomial
Monomial()
Default constructor sets int_part=cnum_part=1, and pow_Nc=pow_TR=pow_CF=0.
Definition:
Monomial.h:27
ColorFull::Monomial::pow_CF
int pow_CF
Power of CF=TR (Nc^2-1)/Nc.
Definition:
Monomial.h:71
ColorFull::Monomial::pow_TR
int pow_TR
Power of TR in Monomial.
Definition:
Monomial.h:65
ColorFull::Monomial::pow_Nc
int pow_Nc
Power of the number of colors.
Definition:
Monomial.h:68
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