Phi Class Reference

#include <Phi.h>

List of all members.

Public Member Functions

 Phi ()
 Phi (double init)
 Phi (const Phi &src)
Phioperator= (const Phi &rhs)
Phioperator+= (Phi &rhs)
Phioperator-= (Phi &in)
Phi operator+ (Phi &in) const
Phi operator- (Phi &in) const
bool operator< (Phi &in) const
bool operator> (Phi &in) const
 operator double () const
double lowerLimit () const
double upperLimit () const
double range () const
double val () const

Private Member Functions

void reduce ()

Private Attributes

double m_val

Static Private Attributes

static const double s_upperLimit
static const double s_lowerLimit
static const double s_range


Detailed Description

Utility class to implement the cyclic nature of the phi variable in the range -Pi <-> Pi

Definition at line 41 of file Phi.h.


Constructor & Destructor Documentation

Phi::Phi (  )  [inline]

Definition at line 60 of file Phi.h.

00060 { this->m_val = 0. ;  }

Phi::Phi ( double  init  )  [inline]

Definition at line 61 of file Phi.h.

00061 { this->m_val = init ; this->reduce() ; }

Phi::Phi ( const Phi src  )  [inline]

Definition at line 62 of file Phi.h.

00062 { this->m_val = src.m_val ; } 


Member Function Documentation

void Phi::reduce (  )  [inline, private]

Definition at line 47 of file Phi.h.

00047                 {
00048     while( m_val >  s_upperLimit )  { m_val -= s_range ; }
00049     while( m_val <= s_lowerLimit  ) { m_val += s_range ; }
00050   }

Phi& Phi::operator= ( const Phi rhs  )  [inline]

Definition at line 66 of file Phi.h.

00066                                     { 
00067     this->m_val = rhs.m_val; 
00068     return *this; 
00069   }

Phi& Phi::operator+= ( Phi rhs  )  [inline]

Definition at line 71 of file Phi.h.

00071                                 { 
00072     this->m_val += rhs.m_val ; 
00073     reduce() ;
00074     return *this; 
00075   }

Phi& Phi::operator-= ( Phi in  )  [inline]

Definition at line 77 of file Phi.h.

00077                                { 
00078     this->m_val -= in.m_val;
00079     reduce() ;
00080     return *this; 
00081   }

Phi Phi::operator+ ( Phi in  )  const [inline]

Definition at line 83 of file Phi.h.

00083                                    { 
00084     Phi result( this->m_val + in.m_val ) ;
00085     return result ;
00086   }

Phi Phi::operator- ( Phi in  )  const [inline]

Definition at line 88 of file Phi.h.

00088                                    { 
00089     Phi result(this->m_val - in.m_val ) ;
00090     return result ;
00091   }

bool Phi::operator< ( Phi in  )  const [inline]

Definition at line 94 of file Phi.h.

00094 { return this->m_val < in.m_val ; }

bool Phi::operator> ( Phi in  )  const [inline]

Definition at line 95 of file Phi.h.

00095 { return this->m_val > in.m_val ; }

Phi::operator double (  )  const [inline]

Definition at line 98 of file Phi.h.

00098 { return this->m_val ; }

double Phi::lowerLimit (  )  const [inline]

Definition at line 100 of file Phi.h.

00100 {return s_lowerLimit;}

double Phi::upperLimit (  )  const [inline]

Definition at line 101 of file Phi.h.

00101 {return s_upperLimit;}

double Phi::range (  )  const [inline]

Definition at line 102 of file Phi.h.

00102 {return s_range;}

double Phi::val (  )  const [inline]

Definition at line 103 of file Phi.h.

00103 {return m_val;}


Member Data Documentation

double Phi::m_val [private]

Definition at line 45 of file Phi.h.

const double Phi::s_upperLimit [static, private]

Definition at line 51 of file Phi.h.

const double Phi::s_lowerLimit [static, private]

Definition at line 52 of file Phi.h.

const double Phi::s_range [static, private]

Definition at line 53 of file Phi.h.


The documentation for this class was generated from the following files:
Generated on Fri Sep 21 13:00:18 2007 for AtlfastEvent by  doxygen 1.5.1