92 double angularDistance, sigmaError;
94 angularDistance = std::abs(
m_angle - angle.getAngle());
95 sigmaError = sigma * (
m_error + angle.getError());
96 return angularDistance < sigmaError;
138 double angularDistance, shortestAngularDistance, sigmaError;
140 angularDistance = std::abs(
m_angle - angle.getAngle());
142 if (angularDistance > TMath::Pi())
143 shortestAngularDistance = TMath::TwoPi() - angularDistance;
145 shortestAngularDistance = angularDistance;
146 sigmaError = sigma * (
m_error + angle.getError());
147 return shortestAngularDistance < sigmaError;
Class to compare if two angles are compatible withing a given error range.
double getErrorInDeg() const
Getter for the error of the angle in degrees.
BaseAngle(double angle, double error)
Constructor.
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 m_error
Error in rad.
double m_angle
Angle in rad.
virtual ~BaseAngle()
Destructor.
bool containsIn(const PhiAngle &angle, double sigma) const
Check if two angles are compatible.
PhiAngle(double angle, double error)
Constructor using radian units.
bool contains(const PhiAngle &angle) const
Check if two angles are compatible.
ThetaAngle(double angle, double error)
Constructor using radian units.
bool containsIn(const ThetaAngle &angle, double sigma) const
Check if two angles are compatible.
bool contains(const ThetaAngle &angle) const
Check if two angles are compatible.
Abstract base class for different kinds of events.