ThePEG  1.8.0
SpinHalfLorentzRotation.h
1 // -*- C++ -*-
2 //
3 // SpinHalfLorentzRotation.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 2 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef THEPEG_SpinHalfLorentzRotation_H
10 #define THEPEG_SpinHalfLorentzRotation_H
11 //
12 // This is the declaration of the SpinHalfLorentzRotation class.
13 //
14 #include "ThePEG/Helicity/HelicityDefinitions.h"
15 #include "ThreeVector.h"
16 
17 namespace ThePEG {
18 
32 
37 
38 public:
39 
42 
47 
55  SpinHalfLorentzRotation (double bx, double by, double bz, double gamma=-1.);
56 
62  SpinHalfLorentzRotation (const Boost & b,double gamma=-1.);
64 
68  bool isIdentity() const;
69 
74 
78  SpinHalfLorentzRotation & invert() { return *this = inverse(); }
79 
83  std::ostream & print( std::ostream & os ) const;
84 
87 
95  SpinHalfLorentzRotation & setBoost (double bx, double by, double bz,double gamma=-1.);
96 
102  SpinHalfLorentzRotation & setBoost (const Boost & b,double gamma=-1.);
103 
109 
114  SpinHalfLorentzRotation & setBoostY (double & boost);
115 
120  SpinHalfLorentzRotation & setBoostZ (double & boost);
121 
127  SpinHalfLorentzRotation & setRotate(double delta, const Axis & axis);
128 
133  SpinHalfLorentzRotation & setRotateX (double & angle);
134 
139  SpinHalfLorentzRotation & setRotateY (double & angle);
140 
145  SpinHalfLorentzRotation & setRotateZ (double & angle);
146 
148 
149 
155  Complex s1s1() const { return _mx[0][0]; }
156 
160  Complex s1s2() const { return _mx[0][1]; }
161 
165  Complex s1s3() const { return _mx[0][2]; }
166 
170  Complex s1s4() const { return _mx[0][3]; }
171 
175  Complex s2s1() const { return _mx[1][0]; }
176 
180  Complex s2s2() const { return _mx[1][1]; }
181 
185  Complex s2s3() const { return _mx[1][2]; }
186 
190  Complex s2s4() const { return _mx[1][3]; }
191 
195  Complex s3s1() const { return _mx[2][0]; }
196 
200  Complex s3s2() const { return _mx[2][1]; }
201 
205  Complex s3s3() const { return _mx[2][2]; }
206 
210  Complex s3s4() const { return _mx[2][3]; }
211 
215  Complex s4s1() const { return _mx[3][0]; }
216 
220  Complex s4s2() const { return _mx[3][1]; }
221 
225  Complex s4s3() const { return _mx[3][2]; }
226 
230  Complex s4s4() const { return _mx[3][3]; }
231 
235  Complex operator()(unsigned int i, unsigned int j) const {
236  assert(i<=3 && j<=3);
237  return _mx[i][j];
238  }
240 
241 
244 
250 
255 
260 
264  SpinHalfLorentzRotation & rotateX(double delta);
265 
269  SpinHalfLorentzRotation & rotateY(double delta);
270 
274  SpinHalfLorentzRotation & rotateZ(double delta);
275 
279  SpinHalfLorentzRotation & rotate(double delta, const Axis & axis);
280 
284  SpinHalfLorentzRotation & boostX(double beta);
285 
289  SpinHalfLorentzRotation & boostY(double beta);
290 
294  SpinHalfLorentzRotation & boostZ(double beta);
295 
303  SpinHalfLorentzRotation & boost(double bx, double by, double bz, double gamma=-1.);
304 
310  SpinHalfLorentzRotation & boost(const Boost & bv, double gamma=-1.);
312 
313 protected:
314 
323 
324 private:
325 
326 
330  vector<vector<Complex> > _mx;
331 };
332 
337  return lt.inverse();
338 }
339 
343 inline std::ostream & operator<< ( std::ostream & os,
344  const SpinHalfLorentzRotation& lt ) {
345  return lt.print(os);
346 }
347 
348 }
349 
350 #endif /* THEPEG_SpinHalfLorentzRotation_H */
Complex s1s4() const
The component.
SpinHalfLorentzRotation & boostY(double beta)
Pure boost along the y-axis; equivalent to LT = BoostX(beta) * LT.
SpinHalfLorentzRotation & setBoostZ(double &boost)
Specify a boost by the given factor along the z-axis.
vector< vector< Complex > > _mx
The members of the transformation matrix.
Complex s3s3() const
The component.
std::complex< double > Complex
ThePEG code should use Complex for all complex scalars.
Definition: Complex.h:23
SpinHalfLorentzRotation & rotateY(double delta)
Rotation around the y-axis; equivalent to LT = RotationY(delta) * LT.
SpinHalfLorentzRotation & setBoostY(double &boost)
Specify a boost by the given factor along the y-axis.
Complex s1s2() const
The component.
Complex s2s2() const
The component.
A 3-component vector.
Definition: ThreeVector.h:33
SpinHalfLorentzRotation & rotateX(double delta)
Rotation around the x-axis; equivalent to LT = RotationX(delta) * LT.
Complex s2s3() const
The component.
Complex operator()(unsigned int i, unsigned int j) const
Fortran style subscript operator.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
friend SpinHalfLorentzRotation inverseOf(const SpinHalfLorentzRotation &lt)
The external inverseOf needs to be a friend.
SpinHalfLorentzRotation inverse() const
Return the inverse.
SpinHalfLorentzRotation & transform(const SpinHalfLorentzRotation &)
Transform (similar to *= but a.transform(b) becomes a = b*a.
Complex s3s1() const
The component.
Complex s4s3() const
The component.
SpinHalfLorentzRotation & setBoostX(double &boost)
Specify a boost by the given factor along the x-axis.
Complex s4s2() const
The component.
SpinHalfLorentzRotation()
Default constructor.
contains the ThreeVector class.
SpinHalfLorentzRotation operator*(const SpinHalfLorentzRotation &lt) const
Product of two SpinHalfLorentzRotations (this) * lt - matrix multiplication.
Complex s3s4() const
The component.
SpinHalfLorentzRotation & setRotateZ(double &angle)
Specify a rotation by the given angle about the z-axis.
std::ostream & print(std::ostream &os) const
output operator
Complex s2s1() const
The component.
SpinHalfLorentzRotation & setRotate(double delta, const Axis &axis)
Specify a rotation about a general axis by the angle given.
SpinHalfLorentzRotation & invert()
Inverts the SpinHalfLorentzRotation matrix.
SpinHalfLorentzRotation & boostX(double beta)
Pure boost along the x-axis; equivalent to LT = BoostX(beta) * LT.
SpinHalfLorentzRotation & setRotateX(double &angle)
Specify a rotation by the given angle about the x-axis.
SpinHalfLorentzRotation & boostZ(double beta)
Pure boost along the z-axis; equivalent to LT = BoostX(beta) * LT.
SpinHalfLorentzRotation & boost(double bx, double by, double bz, double gamma=-1.)
General boost equivalent to LT = Boost(bx,by,bz) * LT.
bool isIdentity() const
Returns true if the Identity matrix.
SpinHalfLorentzRotation & setRotateY(double &angle)
Specify a rotation by the given angle about the y-axis.
SpinHalfLorentzRotation & rotateZ(double delta)
Rotation around the z-axis; equivalent to LT = RotationZ(delta) * LT.
vector< T > & operator<<(vector< T > &tv, const U &u)
Overload the left shift operator for vector to push_back objects to a vector.
Definition: Containers.h:179
The SpinHalfLorentzRotation class is designed to offer the same features as the HepLorentzRotation cl...
SpinHalfLorentzRotation & operator*=(const SpinHalfLorentzRotation &)
Multiply by and assign a*=b becomes a= a*b.
Complex s2s4() const
The component.
Complex s3s2() const
The component.
SpinHalfLorentzRotation & rotate(double delta, const Axis &axis)
Rotation around specified vector - LT = Rotation(delta,axis)*LT.
SpinHalfLorentzRotation & setBoost(double bx, double by, double bz, double gamma=-1.)
Specify the components of a Lorentz Boost.
Complex s1s1() const
The component.
Complex s4s4() const
The component.
Complex s1s3() const
The component.
Complex s4s1() const
The component.