8 #ifndef Pythia8_HelicityBasics_H
9 #define Pythia8_HelicityBasics_H
13 #include "PythiaComplex.h"
14 #include "PythiaStdlib.h"
30 Wave4(complex v0, complex v1, complex v2, complex v3) {val[0] = v0;
31 val[1] = v1; val[2] = v2; val[3] = v3;}
32 Wave4(
Vec4 v) {val[0] = v.e(); val[1] = v.px(); val[2] = v.py();
37 complex& operator() (
int i) {
return val[i];}
41 val[1] + w.val[1], val[2] + w.val[2], val[3] + w.val[3]);}
45 val[1] - w.val[1], val[2] - w.val[2], val[3] - w.val[3]);}
48 Wave4 operator-() {
return Wave4(-val[0], -val[1], -val[2], -val[3]);}
51 complex operator*(
Wave4 w) {
return val[0] * w.val[0]
52 + val[1] * w.val[1] + val[2] * w.val[2] + val[3] * w.val[3];}
55 Wave4 operator*(complex s) {
return Wave4(val[0] * s, val[1] * s,
56 val[2] * s, val[3] * s);}
59 friend Wave4 operator*(complex s,
const Wave4& w);
62 Wave4 operator/(complex s) {
return Wave4(val[0] / s, val[1] / s,
63 val[2] / s, val[3] / s);}
66 Wave4 operator/(
double s) {
return Wave4(val[0] / s, val[1] / s,
78 friend ostream& operator<<(ostream& output,
Wave4 w);
92 ostream& operator<< (ostream& os,
Wave4 w);
114 complex& operator() (
int I,
int J) {
if (index[J] == I)
return val[J];
115 else return COMPLEXZERO; }
121 GammaMatrix operator*(complex s) {val[0] = s*val[0]; val[1] = s*val[1];
122 val[2] = s*val[2]; val[3] = s*val[3];
return *
this;}
128 GammaMatrix operator-(complex s) {val[0] = val[0] - s; val[1] = val[1] - s;
129 val[2] = val[2] - s; val[3] = val[3] - s;
return *
this;}
135 GammaMatrix operator+(complex s) {val[0] = val[0] + s; val[1] = val[1] + s;
136 val[2] = val[2] + s; val[3] = val[3] + s;
return *
this;}
142 friend ostream& operator<< (ostream& os,
GammaMatrix g);
175 int mother2In = 0,
int daughter1In = 0,
int daughter2In = 0,
176 int colIn = 0,
int acolIn = 0,
double pxIn = 0.,
177 double pyIn = 0.,
double pzIn = 0.,
double eIn = 0.,
178 double mIn = 0.,
double scaleIn = 0.,
ParticleData* ptr = 0)
179 :
Particle(idIn, statusIn, mother1In, mother2In, daughter1In, daughter2In,
180 colIn, acolIn, pxIn, pyIn, pzIn, eIn, mIn, scaleIn) {
181 if (ptr) { setPDTPtr(ptr); setPDEPtr(); }
182 rho = vector< vector<complex> >(spinType(),
183 vector<complex>(spinType(), 0));
184 D = vector< vector<complex> >(spinType(),
185 vector<complex>(spinType(), 0));
186 for (
int i = 0; i < spinType(); i++) { rho[i][i] = 0.5; D[i][i] = 1.;}
189 int daughter1In,
int daughter2In,
int colIn,
int acolIn,
Vec4 pIn,
190 double mIn = 0.,
double scaleIn = 0.,
ParticleData* ptr = 0)
191 :
Particle(idIn, statusIn, mother1In, mother2In, daughter1In, daughter2In,
192 colIn, acolIn, pIn, mIn, scaleIn) {
193 if (ptr) { setPDTPtr(ptr); setPDEPtr();}
194 rho = vector< vector<complex> >(spinType(),
195 vector<complex>(spinType(), 0));
196 D = vector< vector<complex> >(spinType(),
197 vector<complex>(spinType(), 0));
198 for (
int i = 0; i < spinType(); i++) { rho[i][i] = 0.5; D[i][i] = 1;}
202 if (ptr) { setPDTPtr(ptr); setPDEPtr();}
203 rho = vector< vector<complex> >(spinType(),
204 vector<complex>(spinType(), 0));
205 D = vector< vector<complex> >(spinType(),
206 vector<complex>(spinType(), 0));
207 for (
int i = 0; i < spinType(); i++) { rho[i][i] = 0.5; D[i][i] = 1;}
212 Wave4 waveBar(
int h);
213 void normalize(vector< vector<complex> >& m);
222 vector< vector<complex> > rho;
225 vector< vector<complex> > D;
230 static const double TOLERANCE;
238 #endif // end Pythia8_HelicityBasics_H