BesVectorErr Class Reference

#include <BesVectorErr.h>

List of all members.

Public Types

 Rho = 0
 Theta = 1
 Phi = 2
 NUM_PCOORDINATES = 3
 C_Rho = 0
 C_Zeta = 1
 C_Phi = 2
 NUM_CCOORDINATES = 3
enum  PolarCoordinateIndex { Rho = 0, Theta = 1, Phi = 2, NUM_PCOORDINATES = 3 }
enum  CylindricalCoordinateIndex { C_Rho = 0, C_Zeta = 1, C_Phi = 2, NUM_CCOORDINATES = 3 }

Public Member Functions

 BesVectorErr ()
 BesVectorErr (const Hep3Vector &p)
 BesVectorErr (const Hep3Vector &p, const BesError &covMat)
 BesVectorErr (const BesVectorErr &v)
BesVectorErroperator= (const BesVectorErr &v)
BesVectorErr operator- ()
BesVectorErroperator+= (const BesVectorErr &v)
BesVectorErroperator-= (const BesVectorErr &v)
double determineChisq (const Hep3Vector &refVector) const
const BesErrorcovMatrix () const
BesError covRTPMatrix () const
BesError covRZPMatrix () const
void setCovMatrix (const BesError &v)

Private Attributes

BesError _covMatrix


Detailed Description

Definition at line 39 of file BesVectorErr.h.


Member Enumeration Documentation

enum BesVectorErr::CylindricalCoordinateIndex

Enumerator:
C_Rho 
C_Zeta 
C_Phi 
NUM_CCOORDINATES 

Definition at line 50 of file BesVectorErr.h.

00050                                   {   
00051     C_Rho = 0, 
00052     C_Zeta = 1, 
00053     C_Phi = 2,
00054     NUM_CCOORDINATES = 3
00055   };

enum BesVectorErr::PolarCoordinateIndex

Enumerator:
Rho 
Theta 
Phi 
NUM_PCOORDINATES 

Definition at line 43 of file BesVectorErr.h.

00043                             {   
00044     Rho = 0, 
00045     Theta = 1, 
00046     Phi = 2,
00047     NUM_PCOORDINATES = 3
00048   };


Constructor & Destructor Documentation

BesVectorErr::BesVectorErr (  )  [inline]

Definition at line 57 of file BesVectorErr.h.

Referenced by operator-().

00057 : Hep3Vector(), _covMatrix(NUM_COORDINATES) {}

BesVectorErr::BesVectorErr ( const Hep3Vector &  p  )  [inline]

Definition at line 60 of file BesVectorErr.h.

00060 : Hep3Vector(p), _covMatrix(NUM_COORDINATES)    {}

BesVectorErr::BesVectorErr ( const Hep3Vector &  p,
const BesError covMat 
) [inline]

Definition at line 61 of file BesVectorErr.h.

References _covMatrix.

00061                                                             : Hep3Vector(p),
00062   _covMatrix(NUM_COORDINATES)                           { _covMatrix=covMat; }

BesVectorErr::BesVectorErr ( const BesVectorErr v  )  [inline]

Definition at line 65 of file BesVectorErr.h.

00065                                       : Hep3Vector(v),
00066     _covMatrix(v.covMatrix())   {}


Member Function Documentation

const BesError& BesVectorErr::covMatrix (  )  const [inline]

Definition at line 121 of file BesVectorErr.h.

References _covMatrix.

Referenced by covRTPMatrix(), covRZPMatrix(), TrkHelixUtils::helixFromMomErr(), TrkHelixUtils::lineFromMomErr(), operator *(), and operator<<().

00121 { return _covMatrix; }

BesError BesVectorErr::covRTPMatrix (  )  const

Definition at line 56 of file BesVectorErr.cxx.

References covMatrix(), DifArray::jacobian(), NUM_PCOORDINATES, Phi, Rho, BesError::similarity(), Theta, and x.

00056                                          {
00057   // protect against 0's
00058   double xv = x()==0 ?  FLT_MIN : x();
00059   double yv = y()==0 ?  FLT_MIN : y();
00060   double zv = z()==0 ?  FLT_MIN : z();
00061   DifNumber xDF(xv,X+1,3), yDF(yv,Y+1,3), zDF(zv,Z+1,3);
00062   DifArray pars(3,NUM_PCOORDINATES);
00063   pars[Rho]   =  sqrt(xDF*xDF + yDF*yDF + zDF*zDF);
00064   pars[Phi]   = atan2(yDF,xDF);
00065   pars[Theta] = acos(zDF/pars[Rho]);
00066   return covMatrix().similarity(pars.jacobian());
00067 }

BesError BesVectorErr::covRZPMatrix (  )  const

Definition at line 69 of file BesVectorErr.cxx.

References C_Phi, C_Rho, C_Zeta, covMatrix(), DifArray::jacobian(), NUM_CCOORDINATES, BesError::similarity(), and x.

00069                                          {
00070   // protect against 0's
00071   double xv = x()==0 ?  FLT_MIN : x();
00072   double yv = y()==0 ?  FLT_MIN : y();
00073   double zv = z()==0 ?  FLT_MIN : z();
00074   DifNumber xDF(xv,X+1,3), yDF(yv,Y+1,3), zDF(zv,Z+1,3);
00075   DifArray pars(3,NUM_CCOORDINATES);
00076   pars[C_Rho]   =  sqrt(xDF*xDF + yDF*yDF);
00077   pars[C_Phi]   = atan2(yDF,xDF);
00078   pars[C_Zeta] = zDF;
00079   return covMatrix().similarity(pars.jacobian());
00080 }

double BesVectorErr::determineChisq ( const Hep3Vector &  refVector  )  const

Definition at line 82 of file BesVectorErr.cxx.

References _covMatrix, BesError::determineChisq(), subSeperate::temp, and x.

00083 {
00084    HepVector temp(NUM_COORDINATES, 0);
00085    temp[0] = refVector.x()-this->x();
00086    temp[1] = refVector.y()-this->y();
00087    temp[2] = refVector.z()-this->z();
00088    return _covMatrix.determineChisq(temp);
00089 }

BesVectorErr& BesVectorErr::operator+= ( const BesVectorErr v  )  [inline]

Definition at line 86 of file BesVectorErr.h.

References _covMatrix, operator+=(), and v.

00086                                                    {
00087       Hep3Vector::operator+=(v);
00088       _covMatrix += v.covMatrix();
00089       return *this;
00090   }

BesVectorErr BesVectorErr::operator- (  )  [inline]

Definition at line 81 of file BesVectorErr.h.

References _covMatrix, BesVectorErr(), and t().

00081                              {
00082       Hep3Vector t = *this;
00083       return BesVectorErr( -t, _covMatrix);  // _covMatrix remains unaltered
00084   }

BesVectorErr& BesVectorErr::operator-= ( const BesVectorErr v  )  [inline]

Definition at line 92 of file BesVectorErr.h.

References _covMatrix, and v.

00092                                                    {
00093       Hep3Vector::operator-=(v);
00094       _covMatrix += v.covMatrix();
00095       return *this;
00096   }

BesVectorErr& BesVectorErr::operator= ( const BesVectorErr v  )  [inline]

Definition at line 72 of file BesVectorErr.h.

References _covMatrix, and v.

00073     {
00074       if (this != &v) {
00075         Hep3Vector::operator=(v);
00076         _covMatrix = v.covMatrix();
00077       }
00078       return *this;
00079     }

void BesVectorErr::setCovMatrix ( const BesError v  )  [inline]

Definition at line 131 of file BesVectorErr.h.

References _covMatrix, and v.

Referenced by operator>>().

00131 { _covMatrix = v; }


Member Data Documentation

BesError BesVectorErr::_covMatrix [private]

Definition at line 137 of file BesVectorErr.h.

Referenced by BesVectorErr(), covMatrix(), determineChisq(), operator+=(), operator-(), operator-=(), operator=(), and setCovMatrix().


Generated on Tue Nov 29 23:17:37 2016 for BOSS_7.0.2 by  doxygen 1.4.7