BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EntranceAngle Class Reference

#include <EntranceAngle.h>

Public Member Functions

 EntranceAngle ()
 
 EntranceAngle (const double)
 
 ~EntranceAngle ()
 
 operator double () const
 
double rad () const
 
double deg () const
 

Static Protected Member Functions

static double normalize (double)
 

Protected Attributes

double _phi
 

Detailed Description

Definition at line 16 of file EntranceAngle.h.

Constructor & Destructor Documentation

◆ EntranceAngle() [1/2]

EntranceAngle::EntranceAngle ( )
inline

Definition at line 50 of file EntranceAngle.h.

50 : _phi(0)
51{ }

◆ EntranceAngle() [2/2]

EntranceAngle::EntranceAngle ( const double phi)
inline

Definition at line 53 of file EntranceAngle.h.

53 : _phi(normalize(phi))
54{}
static double normalize(double)

◆ ~EntranceAngle()

EntranceAngle::~EntranceAngle ( )
inline

Definition at line 56 of file EntranceAngle.h.

56{}

Member Function Documentation

◆ deg()

double EntranceAngle::deg ( ) const
inline

Definition at line 61 of file EntranceAngle.h.

62{ return _phi * Constants::radToDegrees; }
static const double radToDegrees
Definition Constants.h:41

◆ normalize()

double EntranceAngle::normalize ( double angle)
inlinestaticprotected

Definition at line 40 of file EntranceAngle.h.

40 {
41 while (angle < - Constants::halfPi) {
42 angle += Constants::pi;
43 }
44 while (angle > Constants::halfPi) {
45 angle -= Constants::pi;
46 }
47 return angle;
48}
static const double pi
Definition Constants.h:38
static const double halfPi
Definition Constants.h:40

◆ operator double()

EntranceAngle::operator double ( ) const
inline

Definition at line 23 of file EntranceAngle.h.

23{ return _phi;}; // automatic conversion to double

◆ rad()

double EntranceAngle::rad ( ) const
inline

Definition at line 58 of file EntranceAngle.h.

59{ return _phi; }

Member Data Documentation

◆ _phi

double EntranceAngle::_phi
protected

Definition at line 30 of file EntranceAngle.h.

Referenced by deg(), operator double(), and rad().


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