|
ThePEG
1.8.0
|
A Direction object can be used to specify that some following operations should be assumed to be performed with the z-direction of the momenta reversed.
More...
#include <Direction.h>
Public Types | |
| enum | Dir { Neg = -1, Negative = -1, Undefined = 0, Pos = 1, Positive = 1 } |
| The enum defining the directions. More... | |
Public Member Functions | |
| Direction (Dir newDirection) | |
| Create an object with a given direction. | |
| Direction (double rnd) | |
| Create an object with a positive direction if rnd > 0.5, otherwise set the negative direction. | |
| Direction (bool p) | |
| Create an object with a positive direction if p is true, otherwise set the negative direction. | |
| ~Direction () | |
| Destructure makeing the static variable undefined. | |
Static Public Member Functions | |
| static void | set (Dir newDirection) |
| Set the direction. | |
| static void | reverse () |
| Reverse the direction. | |
| static bool | pos () |
| Return true if the direction is positive. | |
| static bool | neg () |
| Return true if the direction is negative (reversed). | |
| static Dir | dir () |
| Return the direction. | |
Private Member Functions | |
| Direction () | |
| Default ctors and assignment is private and not implemented. | |
| Direction (const Direction &) | |
| Default ctors and assignment is private and not implemented. | |
| Direction & | operator= (const Direction &) |
| Default ctors and assignment is private and not implemented. | |
Static Private Attributes | |
| static Dir | theDirection = Direction<I>::Undefined |
| The direction. | |
A Direction object can be used to specify that some following operations should be assumed to be performed with the z-direction of the momenta reversed.
As an example, if Direction<0>::pos() is true, the method Lorentz5Momentum::dirPlus() will return the positive, light-cone component, and Lorentz5Momentum::dirMinus() the negative, while if Direction<0>::pos() is false the behavior of the methods are reversed.
Direction is templated with an integer template argument (default = 0), and only one object per class can be instatiated at the time. Attempts to instatiate a second object of a Direction class will result in an exception being thrown. To have several different directions classes with different template arguments must be instantiated. Direction<0> is reserved for Lorentz5Momentum. Attempts to use the static methods of a Direction class when no object has been instatiated will result in an exception being thrown.
Definition at line 41 of file Direction.h.
| enum ThePEG::Direction::Dir |
The enum defining the directions.
| Enumerator | |
|---|---|
| Neg |
Reversed direction. |
| Negative |
Reversed direction. |
| Undefined |
No direction has been defined. |
| Pos |
Standard (positive) direction. |
| Positive |
Standard (positive) direction. |
Definition at line 46 of file Direction.h.
1.8.9.1