ThePEG  1.8.0
LorentzRotation.h
1 // -*- C++ -*-
2 //
3 // LorentzRotation.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_LorentzRotation_H
10 #define THEPEG_LorentzRotation_H
11 //
12 // This is the declaration of the LorentzRotation class.
13 //
14 #include "SpinOneLorentzRotation.h"
15 #include "SpinHalfLorentzRotation.h"
16 #include "LorentzRotation.fh"
17 
18 namespace ThePEG {
19 
28 
32  friend LorentzRotation inverseOf ( const LorentzRotation & lt );
33 
34 public:
35 
38 
43 
51  LorentzRotation (double bx, double by, double bz, double gamma=-1.)
52  : _half(bx,by,bz,gamma), _one(bx,by,bz,gamma) {}
53 
59  LorentzRotation (const Boost & b, double gamma=-1.)
60  : _half(b,gamma), _one(b,gamma) {}
62 
66  bool isIdentity() const {
67  return _half.isIdentity() && _one.isIdentity();
68  }
69 
74  LorentzRotation output;
75  output._half = _half.inverse();
76  output._one = _one.inverse();
77  return output;
78  }
79 
84  return *this=inverse();
85  }
86 
90  std::ostream & print( std::ostream & os ) const;
91 
94 
102  LorentzRotation & setBoost (double bx, double by, double bz, double gamma=-1.) {
103  _half.setBoost(bx,by,bz,gamma);
104  _one.setBoost(bx,by,bz,gamma);
105  return *this;
106  }
107 
113  LorentzRotation & setBoost (const Boost & b, double gamma=-1.) {
114  _half.setBoost(b,gamma);
115  _one.setBoost(b,gamma);
116  return *this;
117  }
118 
124  _half.setBoostX(boost);
125  _one.setBoost(boost,0,0);
126  return *this;
127  }
128 
134  _half.setBoostY(boost);
135  _one.setBoost(0,boost,0);
136  return *this;
137  }
138 
144  _half.setBoostZ(boost);
145  _one.setBoost(0,0,boost);
146  return *this;
147  }
148 
154  LorentzRotation & setRotate(double delta, const Axis & axis) {
155  _half.setRotate(delta,axis);
156  _one.setRotate(delta,axis);
157  return *this;
158  }
159 
164  LorentzRotation & setRotateX (double angle) {
165  _half.setRotateX(angle);
166  _one.setRotateX(angle);
167  return *this;
168  }
169 
174  LorentzRotation & setRotateY (double angle) {
175  _half.setRotateZ(angle);
176  _one.setRotateZ(angle);
177  return *this;
178  }
179 
184  LorentzRotation & setRotateZ (double angle) {
185  _half.setRotateZ(angle);
186  _one.setRotateZ(angle);
187  return *this;
188  }
190 
193 
197  const SpinHalfLorentzRotation & half() const { return _half; }
198 
202  const SpinOneLorentzRotation & one() const { return _one; }
203 
207  operator const SpinOneLorentzRotation & () const { return _one; }
209 
212 
216  double xx() const { return _one.xx(); }
217 
221  double xy() const { return _one.xy(); }
222 
226  double xz() const { return _one.xz(); }
227 
231  double xt() const { return _one.xt(); }
232 
236  double yx() const { return _one.yx(); }
237 
241  double yy() const { return _one.yy(); }
242 
246  double yz() const { return _one.yz(); }
247 
251  double yt() const { return _one.yt(); }
252 
256  double zx() const { return _one.zx(); }
257 
261  double zy() const { return _one.zy(); }
262 
266  double zz() const { return _one.zz(); }
267 
271  double zt() const { return _one.zt(); }
272 
276  double tx() const { return _one.tx(); }
277 
281  double ty() const { return _one.ty(); }
282 
286  double tz() const { return _one.tz(); }
287 
291  double tt() const { return _one.tt(); }
293 
299  Complex s1s1() const { return _half.s1s1(); }
300 
304  Complex s1s2() const { return _half.s1s2(); }
305 
309  Complex s1s3() const { return _half.s1s3(); }
310 
314  Complex s1s4() const { return _half.s1s4(); }
315 
319  Complex s2s1() const { return _half.s2s1(); }
320 
324  Complex s2s2() const { return _half.s2s2(); }
325 
329  Complex s2s3() const { return _half.s2s3(); }
330 
334  Complex s2s4() const { return _half.s2s4(); }
335 
339  Complex s3s1() const { return _half.s3s1(); }
340 
344  Complex s3s2() const { return _half.s3s2(); }
345 
349  Complex s3s3() const { return _half.s3s3(); }
350 
354  Complex s3s4() const { return _half.s3s4(); }
355 
359  Complex s4s1() const { return _half.s4s1(); }
360 
364  Complex s4s2() const { return _half.s4s2(); }
365 
369  Complex s4s3() const { return _half.s4s3(); }
370 
374  Complex s4s4() const { return _half.s4s4(); }
376 
377 
380 
384  template <typename Value>
386  operator*(const LorentzVector<Value> & lv) const { return one()*lv; }
387 
391  template <typename Value>
393  operator*(const Lorentz5Vector<Value> & lv) const { return one()*lv; }
394 
400  LorentzRotation output;
401  output._half = _half * lt._half;
402  output._one = _one * lt._one;
403  return output;
404  }
405 
410  _one *=lt._one;
411  _half*=lt._half;
412  return *this;
413  }
414 
419  _half.transform(lt._half);
420  _one.transform(lt._one);
421  return *this;
422  }
423 
427  LorentzRotation & rotateX(double delta) {
428  _half.rotateX(delta);
429  _one.rotateX(delta);
430  return *this;
431  }
432 
436  LorentzRotation & rotateY(double delta) {
437  _half.rotateY(delta);
438  _one.rotateY(delta);
439  return *this;
440  }
441 
445  LorentzRotation & rotateZ(double delta) {
446  _half.rotateZ(delta);
447  _one.rotateZ(delta);
448  return *this;
449  }
450 
454  LorentzRotation & rotate(double delta, const Axis & axis) {
455  _half.rotate(delta,axis);
456  _one.rotate(delta,axis);
457  return *this;
458  }
459 
463  LorentzRotation & boostX(double beta) {
464  _half.boostX(beta);
465  _one.boostX(beta);
466  return *this;
467  }
468 
472  LorentzRotation & boostY(double beta) {
473  _half.boostY(beta);
474  _one.boostY(beta);
475  return *this;
476  }
477 
481  LorentzRotation & boostZ(double beta) {
482  _half.boostZ(beta);
483  _one.boostZ(beta);
484  return *this;
485  }
486 
494  LorentzRotation & boost(double bx, double by, double bz, double gamma=-1.) {
495  _half.boost(bx,by,bz,gamma);
496  _one.boost(bx,by,bz,gamma);
497  return *this;
498  }
499 
505  LorentzRotation & boost(const Boost & bv, double gamma=-1.) {
506  _half.boost(bv,gamma);
507  _one.boost(bv,gamma);
508  return *this;
509  }
511 
512 private:
513 
518 
523 
524 };
525 
530  return lt.inverse();
531 }
532 
536 inline std::ostream & operator<< ( std::ostream & os,
537  const LorentzRotation& lt ) {
538  return lt.print(os);
539 }
540 
541 }
542 
543 #endif /* THEPEG_LorentzRotation_H */
544