#include <Angle.h>
|
| PhiAngle (double angle, double error) |
| Constructor using radian units.
|
|
bool | contains (const PhiAngle &angle) const |
| Check if two angles are compatible.
|
|
bool | containsIn (const PhiAngle &angle, double sigma) const |
| Check if two angles are compatible.
|
|
double | getAngle () const |
| Getter for the angle.
|
|
double | getError () const |
| Getter for the error of the angle.
|
|
double | getAngleInDeg () const |
| Getter for angle in degrees.
|
|
double | getErrorInDeg () const |
| Getter for the error of the angle in degrees.
|
|
- See also
- BaseAngle Phi specific.
Definition at line 106 of file Angle.h.
◆ PhiAngle()
Constructor using radian units.
Phi in [0, 2 * pi).
- Parameters
-
angle | phi angle |
error | error on the phi angle |
Definition at line 114 of file Angle.h.
115 {
116
120 }
BaseAngle(double angle, double error)
Constructor.
double m_angle
Angle in rad.
◆ contains()
bool contains |
( |
const PhiAngle & |
angle | ) |
const |
|
inline |
Check if two angles are compatible.
- Parameters
-
angle | second angle to compare |
- Returns
- true if within one standard deviation
Definition at line 126 of file Angle.h.
127 {
129 }
bool containsIn(const PhiAngle &angle, double sigma) const
Check if two angles are compatible.
◆ containsIn()
bool containsIn |
( |
const PhiAngle & |
angle, |
|
|
double |
sigma |
|
) |
| const |
|
inline |
Check if two angles are compatible.
- Parameters
-
angle | second angle to compare to |
sigma | width of the error band in standard deviations |
- Returns
- true if within sigma standard deviations
Definition at line 136 of file Angle.h.
137 {
138 double angularDistance, shortestAngularDistance, sigmaError;
139
140 angularDistance = std::abs(
m_angle - angle.getAngle());
141
142 if (angularDistance > TMath::Pi())
143 shortestAngularDistance = TMath::TwoPi() - angularDistance;
144 else
145 shortestAngularDistance = angularDistance;
146 sigmaError = sigma * (
m_error + angle.getError());
147 return shortestAngularDistance < sigmaError;
148 }
double m_error
Error in rad.
◆ getAngle()
double getAngle |
( |
| ) |
const |
|
inlineinherited |
Getter for the angle.
Definition at line 37 of file Angle.h.
◆ getAngleInDeg()
double getAngleInDeg |
( |
| ) |
const |
|
inlineinherited |
Getter for angle in degrees.
Definition at line 45 of file Angle.h.
45{
return m_angle * TMath::RadToDeg(); }
◆ getError()
double getError |
( |
| ) |
const |
|
inlineinherited |
Getter for the error of the angle.
Definition at line 41 of file Angle.h.
◆ getErrorInDeg()
double getErrorInDeg |
( |
| ) |
const |
|
inlineinherited |
Getter for the error of the angle in degrees.
Definition at line 49 of file Angle.h.
49{
return m_error * TMath::RadToDeg(); }
◆ m_angle
Angle in rad.
Definition at line 53 of file Angle.h.
◆ m_error
Error in rad.
Definition at line 54 of file Angle.h.
The documentation for this class was generated from the following file:
- framework/utilities/include/Angle.h