#include <Angle.h>
|
| ThetaAngle (double angle, double error) |
| Constructor using radian units.
|
|
bool | contains (const ThetaAngle &angle) const |
| Check if two angles are compatible.
|
|
bool | containsIn (const ThetaAngle &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 Theta specific.
Definition at line 63 of file Angle.h.
◆ ThetaAngle()
Constructor using radian units.
Theta in [0, pi].
- Parameters
-
angle | theta angle to use |
error | error on the angle |
Definition at line 71 of file Angle.h.
71 : BaseAngle(angle, error)
72 {
73 m_angle = std::fabs(std::fmod(m_angle, TMath::Pi()));
74 }
◆ contains()
Check if two angles are compatible.
- Parameters
-
angle | second angle to compare to |
- Returns
- true if within one standard deviation
Definition at line 80 of file Angle.h.
81 {
82 return containsIn(angle, 1);
83 }
◆ containsIn()
bool containsIn |
( |
const ThetaAngle & | 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 90 of file Angle.h.
91 {
92 double angularDistance, sigmaError;
93
94 angularDistance = std::abs(m_angle - angle.getAngle());
95 sigmaError = sigma * (m_error + angle.getError());
96 return angularDistance < sigmaError;
97 }
◆ 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