Belle II Software  release-08-01-10
BaseAngle Class Reference

Class to compare if two angles are compatible withing a given error range. More...

#include <Angle.h>

Inheritance diagram for BaseAngle:

Public Member Functions

 BaseAngle (double angle, double error)
 Constructor. More...
 
virtual ~BaseAngle ()
 Destructor.
 
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.
 
double getLowerIntervalBoundary (double sigma=1) const
 Getter for the lower interval bound: angle-sigma*error. More...
 
double getUpperIntervalBoundary (double sigma=1) const
 Getter for the upper interval bound: angle+sigma*error. More...
 

Protected Types

typedef std::pair< double, double > Interval
 Shortcut for std::pair used as interval.
 

Protected Member Functions

bool intervalsCompatible (const Interval &x_interval, const Interval &y_interval) const
 Checks if the intervals overlap at some point. More...
 

Protected Attributes

double m_angle
 Angle in rad.
 
double m_error
 Error in rad.
 

Detailed Description

Class to compare if two angles are compatible withing a given error range.

Definition at line 24 of file Angle.h.

Constructor & Destructor Documentation

◆ BaseAngle()

BaseAngle ( double  angle,
double  error 
)
inline

Constructor.

Parameters
angleangle to compare
errorerror on the angle

Definition at line 30 of file Angle.h.

30 : m_angle(angle), m_error(error) {};
double m_error
Error in rad.
Definition: Angle.h:67
double m_angle
Angle in rad.
Definition: Angle.h:66

Member Function Documentation

◆ getLowerIntervalBoundary()

double getLowerIntervalBoundary ( double  sigma = 1) const
inline

Getter for the lower interval bound: angle-sigma*error.

Parameters
sigmawidth of the error interval in standard deviations
Returns
angle - sigma * error

Definition at line 55 of file Angle.h.

◆ getUpperIntervalBoundary()

double getUpperIntervalBoundary ( double  sigma = 1) const
inline

Getter for the upper interval bound: angle+sigma*error.

Parameters
sigmawidth of the error interval in standard deviations
Returns
angle + sigma * error

Definition at line 61 of file Angle.h.

◆ intervalsCompatible()

bool intervalsCompatible ( const Interval x_interval,
const Interval y_interval 
) const
inlineprotected

Checks if the intervals overlap at some point.

If comparing phi angles, be sure to have the interval in a way this function can handle it, meaning always between [0, 2pi).

Parameters
x_intervalfirst interval to check
y_intervalsecond interval
Returns
true if x and y overlap

Definition at line 76 of file Angle.h.


The documentation for this class was generated from the following file: