thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
TmpTransform.h
1 // -*- C++ -*-
2 //
3 // TmpTransform.h is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2019 Leif Lonnblad
5 //
6 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef THEPEG_TmpTransform_H
10 #define THEPEG_TmpTransform_H
11 //
12 // This is the declaration of the TmpTransform class.
13 //
14 
15 #include "ThePEG/Config/ThePEG.h"
16 
17 namespace ThePEG {
18 
28 template <typename Ptr>
29 class TmpTransform {
30 
31 public:
32 
33 
38  TmpTransform(Ptr p, const LorentzRotation & r) : ptr(p), rot(r)
39  {
40  ptr->transform(rot);
41  }
42 
48  {
49  rot.invert();
50  ptr->transform(rot);
51  }
52 
53 private:
54 
59 
64 
65 private:
66 
71  TmpTransform & operator=(const TmpTransform &) = delete;
72 
77  TmpTransform();
78 
83  TmpTransform(const TmpTransform &);
84 
85 };
86 
87 }
88 
89 #endif /* THEPEG_TmpTransform_H */
LorentzRotation rot
The rotation performed in the constructor.
Definition: TmpTransform.h:63
TmpTransform(Ptr p, const LorentzRotation &r)
The contructor will call the transform(const LorentzRotation &) of an object pointed to by p with r a...
Definition: TmpTransform.h:38
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
TmpTransform & operator=(const TmpTransform &)=delete
The assignment operator is private and must never be called.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
This is the main config header file for ThePEG.
~TmpTransform()
The destructor performs the inverse of the transformation done in the constructor.
Definition: TmpTransform.h:47
LorentzRotation & invert()
Inverts the LorentzRotation matrix.
This is a wrapper class to be used to temporarily make a Lorentz transform of an object.
Definition: TmpTransform.h:29
TmpTransform()
The default constructor is private and must never be called.
Ptr is a templated class to provide typedefs for pointers types ThePEG should use for a given type...
Definition: Ptr.h:35
Ptr ptr
A pointer to the object being transformed.
Definition: TmpTransform.h:58