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 
115 
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 */