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

#include <Angle.h>

Inheritance diagram for PhiAngle:
Collaboration diagram for PhiAngle:

Public Member Functions

 PhiAngle (double angle, double error)
 Constructor using radian units. More...
 
bool contains (const PhiAngle &angle) const
 Check if two angles are compatible. More...
 
bool containsIn (const PhiAngle &angle, double sigma) const
 Check if two angles are compatible. More...
 
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

See also
BaseAngle Phi specific.

Definition at line 148 of file Angle.h.

Constructor & Destructor Documentation

◆ PhiAngle()

PhiAngle ( double  angle,
double  error 
)
inline

Constructor using radian units.

Phi in [0, 2pi]

Parameters
anglephi angle
errorerror on the phi angle

Definition at line 156 of file Angle.h.

Member Function Documentation

◆ contains()

bool contains ( const PhiAngle angle) const
inline

Check if two angles are compatible.

Parameters
anglesecond angle to compare
Returns
true if within one standard deviation

Definition at line 165 of file Angle.h.

◆ containsIn()

bool containsIn ( const PhiAngle angle,
double  sigma 
) const
inline

Check if two angles are compatible.

Parameters
anglesecond angle to compare to
sigmawidth of the error band in standard deviations
Returns
true if within sigma standard deviations

Definition at line 175 of file Angle.h.

◆ getLowerIntervalBoundary()

double getLowerIntervalBoundary ( double  sigma = 1) const
inlineinherited

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
inlineinherited

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
inlineprotectedinherited

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: