Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TrkDifLineTraj Class Reference

#include <TrkDifLineTraj.h>

Inheritance diagram for TrkDifLineTraj:

TrkSimpTraj TrkSimpTraj TrkKalDeriv TrkDifTraj TrkKalDeriv TrkDifTraj TrkKalDeriv TrkDifTraj TrkKalDeriv TrkDifTraj List of all members.

Public Types

enum  { d0Ind = 0, phi0Ind, z0Ind, tanDipInd }
enum  { NLINPRM = 4 }
enum  { d0Ind = 0, phi0Ind, z0Ind, tanDipInd }
enum  { NLINPRM = 4 }

Public Member Functions

void changePoint (const HepPoint3D &newpoint, double &fltlen)
void changePoint (const HepPoint3D &newpoint, double &fltlen)
TrkDifLineTrajclone () const
TrkDifLineTrajclone () const
double cosDip () const
double cosDip () const
virtual double curvature (double fltLen) const
virtual double curvature (double fltLen) const
double d0 () const
double d0 () const
virtual Hep3Vector delDirect (double) const
virtual Hep3Vector delDirect (double) const
HepMatrix derivDeflect (double fltlen, deflectDirection) const
HepMatrix derivDeflect (double fltlen, deflectDirection) const
HepMatrix derivDisplace (double fltlen, deflectDirection) const
HepMatrix derivDisplace (double fltlen, deflectDirection) const
HepMatrix derivPFract (double fltlen) const
HepMatrix derivPFract (double fltlen) const
virtual Hep3Vector direction (double fltLen) const
virtual Hep3Vector direction (double fltLen) const
double distTo0thError (double s, double tol, int pathDir) const
double distTo0thError (double s, double tol, int pathDir) const
virtual double distTo1stError (double flt, double tol, int pathDir) const
virtual double distTo1stError (double flt, double tol, int pathDir) const
virtual double distTo2ndError (double flt, double tol, int pathDir) const
virtual double distTo2ndError (double flt, double tol, int pathDir) const
virtual void getDFInfo (double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
virtual void getDFInfo (double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &direction) const
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &direction) const
virtual void getInfo (double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
virtual void getInfo (double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
double hiRange () const
double hiRange () const
TrkSimpTrajinvert ()
TrkSimpTrajinvert ()
void invertParams (TrkParams *params, std::vector< bool > &flags) const
void invertParams (TrkParams *params, std::vector< bool > &flags) const
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const
double lowRange () const
double lowRange () const
int nPar () const
int nPar () const
TrkDifLineTrajoperator= (const TrkDifLineTraj &)
TrkDifLineTrajoperator= (const TrkDifLineTraj &)
bool operator== (const TrkSimpTraj &) const
bool operator== (const TrkSimpTraj &) const
const TrkParamsparameters () const
TrkParamsparameters ()
const TrkParamsparameters () const
TrkParamsparameters ()
TranslateParams paramFunction () const
TranslateParams paramFunction () const
double phi0 () const
double phi0 () const
virtual HepPoint3D position (double fltLen) const
virtual HepPoint3D position (double fltLen) const
virtual void print (std::ostream &os) const
virtual void print (std::ostream &os) const
virtual void printAll (std::ostream &os) const
virtual void printAll (std::ostream &os) const
double range () const
double range () const
const HepPoint3DreferencePoint () const
const HepPoint3DreferencePoint () const
virtual void setFlightRange (double newrange[2])
virtual void setFlightRange (double newrange[2])
void setPoint (const HepPoint3D &newpoint)
void setPoint (const HepPoint3D &newpoint)
double tanDip () const
double tanDip () const
 TrkDifLineTraj (const TrkDifLineTraj &)
 TrkDifLineTraj (const TrkExchangePar &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkDifLineTraj (const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkDifLineTraj (const TrkDifLineTraj &)
 TrkDifLineTraj (const TrkExchangePar &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkDifLineTraj (const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
bool validFlightDistance (double f, double tolerance=0.0) const
bool validFlightDistance (double f, double tolerance=0.0) const
virtual void visitAccept (TrkVisitor *vis) const
virtual void visitAccept (TrkVisitor *vis) const
double z0 () const
double z0 () const
 ~TrkDifLineTraj ()
 ~TrkDifLineTraj ()

Static Public Attributes

HepPoint3D _theOrigin

Protected Attributes

TrkParams _dtparams
HepPoint3D _refpoint
double flightrange [2]

Private Member Functions

int d0Index () const
int d0Index () const
int nLinPrm () const
int nLinPrm () const
int phi0Index () const
int phi0Index () const
int tanDipIndex () const
int tanDipIndex () const
double x (const double &) const
double x (const double &) const
double y (const double &) const
double y (const double &) const
double z (const double &) const
double z (const double &) const
int z0Index () const
int z0Index () const

Static Private Member Functions

void paramFunc (const HepPoint3D &oldpoint, const HepPoint3D &newpoint, const HepVector &oldpar, const HepSymMatrix &oldcov, HepVector &newpar, HepSymMatrix &newcov, double fltlen)
void paramFunc (const HepPoint3D &oldpoint, const HepPoint3D &newpoint, const HepVector &oldpar, const HepSymMatrix &oldcov, HepVector &newpar, HepSymMatrix &newcov, double fltlen)

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
d0Ind 
phi0Ind 
z0Ind 
tanDipInd 
00029 {d0Ind=0, phi0Ind, z0Ind, tanDipInd};

anonymous enum
 

Enumeration values:
NLINPRM 
00030 {NLINPRM = 4};

anonymous enum
 

Enumeration values:
d0Ind 
phi0Ind 
z0Ind 
tanDipInd 
00029 {d0Ind=0, phi0Ind, z0Ind, tanDipInd};

anonymous enum
 

Enumeration values:
NLINPRM 
00030 {NLINPRM = 4};


Constructor & Destructor Documentation

TrkDifLineTraj::TrkDifLineTraj const HepVector &  ,
const HepSymMatrix &  ,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin
 

00026                                                                                         :
00027   TrkSimpTraj(pvec, pcov, lowlim,hilim,refpoint)
00028 {
00029 }

TrkDifLineTraj::TrkDifLineTraj const TrkExchangePar ,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin
 

00032                                                                                         :
00033   TrkSimpTraj(HepVector(NLINPRM,1),HepSymMatrix(NLINPRM,1), lowlim,hilim,refpoint)
00034 {
00035 // the above constructor actually screws up z0 and tandip.  I can't fix it in
00036 // the initializer, so I'll just overwrite the track here.  Ugly and inefficient
00037   HepVector subvect(NLINPRM,1);
00038   HepSymMatrix submat(NLINPRM,1);
00039   const HepSymMatrix covar = inpar.covariance();
00040   subvect[d0Ind] = inpar.d0();
00041   subvect[phi0Ind] = inpar.phi0();
00042   subvect[z0Ind] = inpar.z0();
00043   subvect[tanDipInd] = inpar.tanDip();
00044 
00045   submat.fast(d0Ind+1,d0Ind+1) = covar.fast(TrkExchangePar::ex_d0+1,TrkExchangePar::ex_d0+1);
00046   submat.fast(d0Ind+1,phi0Ind+1) = covar.fast(TrkExchangePar::ex_d0+1,TrkExchangePar::ex_phi0+1);
00047   submat.fast(d0Ind+1,z0Ind+1) = covar.fast(TrkExchangePar::ex_d0+1,TrkExchangePar::ex_z0+1);
00048   submat.fast(d0Ind+1,tanDipInd+1) = covar.fast(TrkExchangePar::ex_d0+1,TrkExchangePar::ex_tanDip+1);
00049   submat.fast(phi0Ind+1,phi0Ind+1) = covar.fast(TrkExchangePar::ex_phi0+1,TrkExchangePar::ex_phi0+1);
00050   submat.fast(phi0Ind+1,z0Ind+1) = covar.fast(TrkExchangePar::ex_phi0+1,TrkExchangePar::ex_z0+1);
00051   submat.fast(phi0Ind+1,tanDipInd+1) = covar.fast(TrkExchangePar::ex_phi0+1,TrkExchangePar::ex_tanDip+1);
00052   submat.fast(z0Ind+1,z0Ind+1) = covar.fast(TrkExchangePar::ex_z0+1,TrkExchangePar::ex_z0+1);
00053   submat.fast(z0Ind+1,tanDipInd+1) = covar.fast(TrkExchangePar::ex_z0+1,TrkExchangePar::ex_tanDip+1);
00054   submat.fast(tanDipInd+1,tanDipInd+1) = covar.fast(TrkExchangePar::ex_tanDip+1,TrkExchangePar::ex_tanDip+1);
00055 // reset the track
00056   (*parameters()) = TrkParams(subvect,submat);
00057 }

TrkDifLineTraj::TrkDifLineTraj const TrkDifLineTraj  ) 
 

00060   : TrkSimpTraj(h.parameters()->parameter(), h.parameters()->covariance(),
00061                 h.lowRange(),h.hiRange(),h.referencePoint())
00062 {
00063 }

TrkDifLineTraj::~TrkDifLineTraj  ) 
 

00083 {
00084 }

TrkDifLineTraj::TrkDifLineTraj const HepVector &  ,
const HepSymMatrix &  ,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin
 

TrkDifLineTraj::TrkDifLineTraj const TrkExchangePar ,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin
 

TrkDifLineTraj::TrkDifLineTraj const TrkDifLineTraj  ) 
 

TrkDifLineTraj::~TrkDifLineTraj  ) 
 


Member Function Documentation

void TrkSimpTraj::changePoint const HepPoint3D newpoint,
double &  fltlen
[inherited]
 

void TrkSimpTraj::changePoint const HepPoint3D newpoint,
double &  fltlen
[inherited]
 

00070                                                                   {
00071 //----------------------------------------------------------------------------
00072   if(newpoint != _refpoint){
00073 //  find POCA to the new point
00074     TrkPocaXY endpoca(*this,fltlen,newpoint);
00075     if(endpoca.status().failure()){
00076       std::cout<<"ErrMsg(error)" << "poca failure changing reference point" << std::endl;
00077       return;
00078     } else {
00079 // update flight length
00080       fltlen = endpoca.flt1();
00081 // make a symmatrix from the covariance: temporary kludge
00082       int nrow = parameters()->covariance().num_row();
00083       HepSymMatrix cov(nrow);
00084       for(int irow=0;irow<nrow;irow++)
00085         for(int icol=0;icol<=irow;icol++)
00086           cov.fast(irow+1,icol+1) = parameters()->covariance().fast(irow+1,icol+1);
00087 //  Get the translation function
00088       TranslateParams pfunc = paramFunction();
00089 //  Use it on the SimpTraj parameters
00090       pfunc(_refpoint,newpoint,
00091             parameters()->parameter(),cov,
00092             _dtparams.parameter(),cov,
00093             fltlen);
00094 // put back the covariance
00095       _dtparams.covariance() = cov;
00096       _refpoint = newpoint;
00097 // update the flight range to correspond to the same range in space as before
00098       double newrange[2];
00099       newrange[0] = lowRange() - fltlen;
00100       newrange[1] = hiRange() - fltlen;
00101       setFlightRange(newrange);
00102     }
00103   }
00104   return;
00105 }

TrkDifLineTraj* TrkDifLineTraj::clone  )  const [virtual]
 

Implements TrkSimpTraj.

TrkDifLineTraj * TrkDifLineTraj::clone  )  const [virtual]
 

Implements TrkSimpTraj.

00067 {
00068   return new TrkDifLineTraj(*this);
00069 }

double TrkDifLineTraj::cosDip  )  const [inline]
 

00054 {return 1./sqrt(1.+tanDip()*tanDip());}

double TrkDifLineTraj::cosDip  )  const [inline]
 

00054 {return 1./sqrt(1.+tanDip()*tanDip());}

virtual double TrkDifLineTraj::curvature double  fltLen  )  const [virtual]
 

Implements Trajectory.

double TrkDifLineTraj::curvature double  fltLen  )  const [virtual]
 

Implements Trajectory.

00203 {
00204   return 0.;
00205 }

double TrkDifLineTraj::d0  )  const [inline]
 

00055 {return parameters()->parameter()[d0Index()];}

double TrkDifLineTraj::d0  )  const [inline]
 

00055 {return parameters()->parameter()[d0Index()];}

int TrkDifLineTraj::d0Index  )  const [inline, private]
 

00089 {return d0Ind;}

int TrkDifLineTraj::d0Index  )  const [inline, private]
 

00089 {return d0Ind;}

virtual Hep3Vector TrkDifLineTraj::delDirect double   )  const [virtual]
 

Implements Trajectory.

Hep3Vector TrkDifLineTraj::delDirect double   )  const [virtual]
 

Implements Trajectory.

00128 {
00129   return Hep3Vector(0.0, 0.0, 0.0);
00130 }

HepMatrix TrkDifLineTraj::derivDeflect double  fltlen,
deflectDirection 
const [virtual]
 

Implements TrkKalDeriv.

HepMatrix TrkDifLineTraj::derivDeflect double  fltlen,
deflectDirection 
const [virtual]
 

Implements TrkKalDeriv.

00215 {
00216 //  This function computes the column matrix of derivatives for the change
00217 //  in parameters for a change in the direction of a track at a point along
00218 //  its flight, holding the momentum and position constant.  The effects for
00219 //  changes in 2 perpendicular directions (theta1 = dip and
00220 //  theta2 = phi*cos(dip)) are uncorrelated.
00221 
00222   HepMatrix ddflct(nLinPrm(),1);
00223 //  Compute some common things
00224   double cosd = cosDip();
00225 //  Go through the parameters
00226   switch (idirect) {
00227   case theta1:
00228     ddflct[tanDipIndex()][0] = 1.0/(cosd*cosd);
00229     ddflct[d0Index()][0] = 0.0;
00230     ddflct[phi0Index()][0] =  0.0;
00231     ddflct[z0Index()][0] = -fltlen/cosd;;
00232     break;
00233   case theta2:
00234     ddflct[tanDipIndex()][0] = 0;
00235     ddflct[d0Index()][0] = -fltlen;
00236     ddflct[phi0Index()][0] = 1.0/cosd;
00237     ddflct[z0Index()][0] =  -(tanDip()/cosd)*d0();
00238     break;
00239   }
00240   return ddflct;
00241 }

HepMatrix TrkDifLineTraj::derivDisplace double  fltlen,
deflectDirection 
const [virtual]
 

Implements TrkKalDeriv.

HepMatrix TrkDifLineTraj::derivDisplace double  fltlen,
deflectDirection 
const [virtual]
 

Implements TrkKalDeriv.

00245 {
00246 //  This function computes the column matrix of derivatives for the change
00247 //  in parameters for a change in the position of a track at a point along
00248 //  its flight, holding the momentum and direction constant.  The effects for
00249 //  changes in 2 perpendicular directions (theta1 = dip and
00250 //  theta2 = phi*cos(dip)) are uncorrelated.
00251 
00252   HepMatrix ddflct(nLinPrm(),1);
00253 //  Compute some common things
00254   double cosd = cosDip();
00255 //  Go through the parameters
00256   switch (idirect) {
00257   case theta1:
00258     ddflct[tanDipIndex()][0] = 0.0;
00259     ddflct[d0Index()][0] = 0.0;
00260     ddflct[phi0Index()][0] =  0.0;
00261     ddflct[z0Index()][0] = 1.0/cosd;
00262     break;
00263   case theta2:
00264     ddflct[tanDipIndex()][0] = 0;
00265     ddflct[d0Index()][0] = 1.0;
00266     ddflct[phi0Index()][0] = 0.0;
00267     ddflct[z0Index()][0] =  0.0;
00268     break;
00269   }
00270   return ddflct;
00271 }

HepMatrix TrkDifLineTraj::derivPFract double  fltlen  )  const [virtual]
 

Implements TrkKalDeriv.

HepMatrix TrkDifLineTraj::derivPFract double  fltlen  )  const [virtual]
 

Implements TrkKalDeriv.

00275 {
00276 //  This function computes the column matrix of derrivatives for the change
00277 //  in parameters from a (fractional) change in the track momentum,
00278 //  holding the direction and position constant.  The momentum change can
00279 //  come from energy loss or bfield inhomogeneities.  Line Trajs have no
00280 //  geometric change from energy loss.
00281 
00282   return HepMatrix(nLinPrm(),1, 0);
00283 }

virtual Hep3Vector TrkDifLineTraj::direction double  fltLen  )  const [virtual]
 

Implements Trajectory.

Hep3Vector TrkDifLineTraj::direction double  fltLen  )  const [virtual]
 

Implements Trajectory.

00119 {
00120   double cdip = cosDip();
00121   return Hep3Vector ( cos(phi0()) * cdip,
00122                       sin(phi0()) * cdip,
00123                          tanDip() * cdip);
00124 }

double Trajectory::distTo0thError double  s,
double  tol,
int  pathDir
const [inherited]
 

double Trajectory::distTo0thError double  s,
double  tol,
int  pathDir
const [inherited]
 

00052 {
00053   return fabs(tolerance);
00054 }

virtual double TrkDifLineTraj::distTo1stError double  flt,
double  tol,
int  pathDir
const [virtual]
 

Implements Trajectory.

double TrkDifLineTraj::distTo1stError double  flt,
double  tol,
int  pathDir
const [virtual]
 

Implements Trajectory.

00134 {
00135   return 999.e4;
00136 }

virtual double TrkDifLineTraj::distTo2ndError double  flt,
double  tol,
int  pathDir
const [virtual]
 

Implements Trajectory.

double TrkDifLineTraj::distTo2ndError double  flt,
double  tol,
int  pathDir
const [virtual]
 

Implements Trajectory.

00140 {
00141   return 999.e4;
00142 }

virtual void TrkDifLineTraj::getDFInfo double  fltLen,
DifPoint ,
DifVector dir,
DifVector delDir
const [virtual]
 

Implements TrkDifTraj.

void TrkDifLineTraj::getDFInfo double  fltLen,
DifPoint ,
DifVector dir,
DifVector delDir
const [virtual]
 

Implements TrkDifTraj.

00165 {
00166   //Provides difNum version of information for calculation of derivatives.
00167 
00168   // Create difNumber versions of parameters
00169   //enum index (phi0Index(), etc) is from TrkLineParams.hh
00170   DifNumber phi0Df(phi0(), phi0Index()+1, nLinPrm());
00171   DifNumber d0Df(d0(), d0Index()+1, nLinPrm());
00172   DifNumber z0Df(z0(), z0Index()+1, nLinPrm());
00173   DifNumber tanDipDf(tanDip(), tanDipIndex()+1, nLinPrm());
00174   DifNumber zero(0.0, nLinPrm());
00175   phi0Df.setIndepPar( parameters() );
00176   d0Df.setIndepPar( parameters() );
00177   z0Df.setIndepPar( parameters() );
00178   tanDipDf.setIndepPar( parameters() );
00179   zero.setIndepPar( parameters() );
00180 
00181   DifNumber sphi0, cphi0;
00182   phi0Df.cosAndSin(cphi0, sphi0);
00183 
00184   DifNumber px(referencePoint().x());
00185   DifNumber py(referencePoint().y());
00186   DifNumber pz(referencePoint().z());
00187 
00188   DifNumber cdip =  1. / sqrt(1. + tanDipDf*tanDipDf);
00189   DifNumber xx = -d0Df * sphi0  +  flt * cphi0 * cdip + px;
00190   DifNumber yy =  d0Df * cphi0  +  flt * sphi0 * cdip + py;
00191   DifNumber zz =  z0Df  +  flt * tanDipDf * cdip + pz;
00192 
00193   pos = DifPoint(xx, yy, zz);
00194   dir = DifVector( cphi0 * cdip,
00195                    sphi0 * cdip,
00196                    tanDipDf * cdip);
00197 
00198   delDir = DifVector(zero, zero, zero);
00199 }

virtual void TrkDifTraj::getDFInfo2 double  fltLen,
DifPoint pos,
DifVector direction
const [virtual, inherited]
 

Reimplemented in HelixTraj, TrkDifPieceTraj, TrkCircleTraj, HelixTraj, TrkDifPieceTraj, and TrkCircleTraj.

void TrkDifTraj::getDFInfo2 double  fltLen,
DifPoint pos,
DifVector direction
const [virtual, inherited]
 

Reimplemented in HelixTraj, TrkDifPieceTraj, TrkCircleTraj, HelixTraj, TrkDifPieceTraj, and TrkCircleTraj.

00025                                                                                {
00026   // Slow default implementation.  Override in subclasses where speed matters
00027   DifVector dummy;
00028   getDFInfo(fltLen, pos, direction, dummy);
00029 }

virtual void TrkDifLineTraj::getInfo double  fltLen,
HepPoint3D ,
Hep3Vector &  dir,
Hep3Vector &  delDir
const [virtual]
 

Implements Trajectory.

virtual void TrkDifLineTraj::getInfo double  fltLen,
HepPoint3D pos,
Hep3Vector &  dir
const [virtual]
 

Implements Trajectory.

void TrkDifLineTraj::getInfo double  fltLen,
HepPoint3D ,
Hep3Vector &  dir,
Hep3Vector &  delDir
const [virtual]
 

Implements Trajectory.

00147 {
00148   // This could be made much more efficient!!!!!!
00149   pos = position(fltLen);
00150   dir = direction(fltLen);
00151   delDir = delDirect(fltLen);
00152 }

void TrkDifLineTraj::getInfo double  fltLen,
HepPoint3D pos,
Hep3Vector &  dir
const [virtual]
 

Implements Trajectory.

00156 {
00157   //  This could be made much more efficient!!!!!
00158   pos = position(fltLen);
00159   dir = direction(fltLen);
00160 }

double Trajectory::hiRange  )  const [inherited]
 

double Trajectory::hiRange  )  const [inline, inherited]
 

00092 {return flightrange[1];}

TrkSimpTraj& TrkSimpTraj::invert  )  [inherited]
 

Reimplemented in NeutTraj, and NeutTraj.

TrkSimpTraj & TrkSimpTraj::invert  )  [inherited]
 

Reimplemented in NeutTraj, and NeutTraj.

00129 {
00130   // Invert parameters
00131   std::vector<bool> flags(parameters()->nPar(),false);
00132   invertParams(parameters(), flags);
00133   // loop over parameters and invert covariance matrix
00134   for(int iparam=0;iparam<parameters()->nPar();iparam++){
00135     bool iinvert = flags[iparam];
00136 // do covariance cross-terms too
00137     for(int jparam=iparam+1;jparam<parameters()->nPar();jparam++){
00138       bool jinvert = flags[jparam];
00139       if( (iinvert && !jinvert) || (!iinvert && jinvert) ) {
00140 // cross-terms change sign
00141         parameters()->covariance()[iparam][jparam] *= -1.0;
00142       }
00143     }
00144   }
00145 // invert the flightlength
00146   double range[2];
00147   range[0] = -hiRange();
00148   range[1] = -lowRange();
00149   setFlightRange(range);
00150 // done
00151   return *this;
00152 }

void TrkDifLineTraj::invertParams TrkParams params,
std::vector< bool > &  flags
const [virtual]
 

Implements TrkSimpTraj.

void TrkDifLineTraj::invertParams TrkParams params,
std::vector< bool > &  flags
const [virtual]
 

Implements TrkSimpTraj.

00297 {
00298   // Inverts parameters and returns true if the parameter inversion
00299   // requires a change in sign of elements in the covariance matrix
00300   for (unsigned iparam = 0; iparam < NLINPRM; iparam++) {
00301     switch ( iparam ) {
00302     case d0Ind:  // changes sign
00303     case tanDipInd:  // changes sign
00304       params->parameter()[iparam] *= -1.0;
00305       flags[iparam] = true;
00306       break;
00307     case phi0Ind:  // changes by pi, but covariance matrix shouldn't change
00308       params->parameter()[iparam] =
00309         BesAngle(params->parameter()[iparam] + Constants::pi);
00310       flags[iparam] = false;
00311       break;
00312     case z0Ind:  // no change
00313       flags[iparam] = false;
00314     }
00315   }
00316   return;
00317 }

virtual const TrkSimpTraj* TrkSimpTraj::localTrajectory double  fltLen,
double &  localFlt
const [virtual, inherited]
 

Implements TrkDifTraj.

const TrkSimpTraj * TrkSimpTraj::localTrajectory double  fltLen,
double &  localFlt
const [virtual, inherited]
 

Implements TrkDifTraj.

00059                                                                   {
00060 //----------------------------------------------------------------------------
00061   localFlt = fltLen;
00062   return this;
00063 }

double Trajectory::lowRange  )  const [inherited]
 

double Trajectory::lowRange  )  const [inline, inherited]
 

00091 {return flightrange[0];}

int TrkDifLineTraj::nLinPrm  )  const [inline, private]
 

00093 {return NLINPRM;}

int TrkDifLineTraj::nLinPrm  )  const [inline, private]
 

00093 {return NLINPRM;}

int TrkDifLineTraj::nPar  )  const [inline, virtual]
 

Reimplemented from TrkSimpTraj.

00060 {return NLINPRM;}

int TrkDifLineTraj::nPar  )  const [inline, virtual]
 

Reimplemented from TrkSimpTraj.

00060 {return NLINPRM;}

TrkDifLineTraj& TrkDifLineTraj::operator= const TrkDifLineTraj  ) 
 

TrkDifLineTraj & TrkDifLineTraj::operator= const TrkDifLineTraj  ) 
 

00073 {
00074   if( &h != this ){
00075     Trajectory::operator=(h);
00076     _dtparams = *h.parameters();
00077     _refpoint = h._refpoint;
00078   }
00079   return *this;
00080 }

bool TrkSimpTraj::operator== const TrkSimpTraj  )  const [inherited]
 

bool TrkSimpTraj::operator== const TrkSimpTraj  )  const [inherited]
 

00157 {
00158      if (lowRange()!=x.lowRange() || hiRange()!=x.hiRange()) return false;
00159      const HepVector &m=_dtparams.parameter(); 
00160      unsigned int mp=m.num_row();
00161      const HepVector &n=x._dtparams.parameter(); 
00162      unsigned int np=n.num_row();
00163      if (np!=mp) return false;
00164      for(unsigned i=0;i<np;++i){
00165         if(m[i] != n[i]) return false;
00166      }
00167      return _refpoint==x._refpoint;
00168 }

const TrkParams* TrkSimpTraj::parameters  )  const [inline, inherited]
 

00081 {return &_dtparams;}

TrkParams* TrkSimpTraj::parameters  )  [inline, inherited]
 

00080 {return &_dtparams;}

const TrkParams* TrkSimpTraj::parameters  )  const [inline, inherited]
 

00081 {return &_dtparams;}

TrkParams* TrkSimpTraj::parameters  )  [inline, inherited]
 

00080 {return &_dtparams;}

void TrkDifLineTraj::paramFunc const HepPoint3D oldpoint,
const HepPoint3D newpoint,
const HepVector &  oldpar,
const HepSymMatrix &  oldcov,
HepVector &  newpar,
HepSymMatrix &  newcov,
double  fltlen
[static, private]
 

void TrkDifLineTraj::paramFunc const HepPoint3D oldpoint,
const HepPoint3D newpoint,
const HepVector &  oldpar,
const HepSymMatrix &  oldcov,
HepVector &  newpar,
HepSymMatrix &  newcov,
double  fltlen
[static, private]
 

00290 {
00291 // not yet implemented
00292   std::cout<<"ErrMsg(fatal)" << "TrkDifLineTraj::paramFunc() is not implemented!" << std::endl;
00293 }

TranslateParams TrkDifLineTraj::paramFunction  )  const [inline, virtual]
 

Implements TrkSimpTraj.

00072 { return TrkDifLineTraj::paramFunc; }

TranslateParams TrkDifLineTraj::paramFunction  )  const [inline, virtual]
 

Implements TrkSimpTraj.

00072 { return TrkDifLineTraj::paramFunc; }

double TrkDifLineTraj::phi0  )  const
 

double TrkDifLineTraj::phi0  )  const
 

00209 {
00210  return BesAngle(parameters()->parameter()[phi0Index()]).rad();
00211 }

int TrkDifLineTraj::phi0Index  )  const [inline, private]
 

00090 {return phi0Ind;}

int TrkDifLineTraj::phi0Index  )  const [inline, private]
 

00090 {return phi0Ind;}

virtual HepPoint3D TrkDifLineTraj::position double  fltLen  )  const [virtual]
 

Implements Trajectory.

HepPoint3D TrkDifLineTraj::position double  fltLen  )  const [virtual]
 

Implements Trajectory.

00108 {
00109   double cosd = cosDip();
00110   double cp = cos(phi0());
00111   double sp = sin(phi0());
00112   return HepPoint3D(-d0()*sp + f*cp*cosd + referencePoint().x(),
00113                   d0()*cp  + f*sp*cosd + referencePoint().y(),
00114                   z0() + f*tanDip()*cosd + referencePoint().z());
00115 }

virtual void TrkSimpTraj::print std::ostream os  )  const [virtual, inherited]
 

Reimplemented from Trajectory.

Reimplemented in HelixTraj, and HelixTraj.

void TrkSimpTraj::print std::ostream os  )  const [virtual, inherited]
 

Reimplemented from Trajectory.

Reimplemented in HelixTraj, and HelixTraj.

00119                                     {
00120 //----------------------------------------------------------------------------
00121   os << "Simple ";
00122   Trajectory::print(os);
00123 }

virtual void TrkSimpTraj::printAll std::ostream os  )  const [virtual, inherited]
 

Reimplemented from Trajectory.

Reimplemented in HelixTraj, and HelixTraj.

void TrkSimpTraj::printAll std::ostream os  )  const [virtual, inherited]
 

Reimplemented from Trajectory.

Reimplemented in HelixTraj, and HelixTraj.

00108                                        {
00109 //----------------------------------------------------------------------------
00110     os << "Simple ";
00111     Trajectory::printAll(os);
00112     os << "SimpTraj parameter vector = "
00113        << _dtparams.parameter();
00114     os << "  and covariance matrix =  " 
00115        << _dtparams.covariance();
00116   }

double Trajectory::range  )  const [inherited]
 

double Trajectory::range  )  const [inline, inherited]
 

00093 { return hiRange()-lowRange(); }

const HepPoint3D& TrkSimpTraj::referencePoint  )  const [inline, inherited]
 

00084 {return _refpoint;}

const HepPoint3D& TrkSimpTraj::referencePoint  )  const [inline, inherited]
 

00084 {return _refpoint;}

virtual void Trajectory::setFlightRange double  newrange[2]  )  [virtual, inherited]
 

Reimplemented in TrkDifPieceTraj, and TrkDifPieceTraj.

void Trajectory::setFlightRange double  newrange[2]  )  [virtual, inherited]
 

Reimplemented in TrkDifPieceTraj, and TrkDifPieceTraj.

00058 {
00059   if (newrange[1] >= newrange[0]) {
00060     flightrange[0] = newrange[0];
00061     flightrange[1] = newrange[1];
00062   } else {
00063     std::cout<<"ErrMsg(error) "<< "Invalid Trajectory range requested." << std::endl;
00064     flightrange[0] = newrange[1];
00065     flightrange[1] = newrange[0];
00066   }
00067 }

void TrkSimpTraj::setPoint const HepPoint3D newpoint  )  [inline, inherited]
 

00096 {_refpoint = newpoint;}

void TrkSimpTraj::setPoint const HepPoint3D newpoint  )  [inline, inherited]
 

00096 {_refpoint = newpoint;}

double TrkDifLineTraj::tanDip  )  const [inline]
 

00057 {return parameters()->parameter()[tanDipIndex()];}

double TrkDifLineTraj::tanDip  )  const [inline]
 

00057 {return parameters()->parameter()[tanDipIndex()];}

int TrkDifLineTraj::tanDipIndex  )  const [inline, private]
 

00092 {return tanDipInd;}

int TrkDifLineTraj::tanDipIndex  )  const [inline, private]
 

00092 {return tanDipInd;}

bool Trajectory::validFlightDistance double  f,
double  tolerance = 0.0
const [inherited]
 

bool Trajectory::validFlightDistance double  f,
double  tolerance = 0.0
const [inline, inherited]
 

00088                                                                      {
00089   return f >= flightrange[0]-tol && f <= flightrange[1]+tol; 
00090 }

virtual void TrkDifLineTraj::visitAccept TrkVisitor vis  )  const [virtual]
 

Implements TrkSimpTraj.

void TrkDifLineTraj::visitAccept TrkVisitor vis  )  const [virtual]
 

Implements TrkSimpTraj.

00321 {
00322 // Visitor access--just use the TrkVisitor class member function
00323   vis->trkVisitLineTraj(this);
00324 }

double TrkDifLineTraj::x const double &   )  const [private]
 

double TrkDifLineTraj::x const double &   )  const [private]
 

00088 {
00089   return -d0() * sin(phi0())  +  f * cos(phi0()) * cosDip()  +
00090     referencePoint().x();
00091 }

double TrkDifLineTraj::y const double &   )  const [private]
 

double TrkDifLineTraj::y const double &   )  const [private]
 

00095 {
00096   return  d0() * cos(phi0())  +  f * sin(phi0()) * cosDip() +
00097     referencePoint().y();
00098 }

double TrkDifLineTraj::z const double &   )  const [private]
 

double TrkDifLineTraj::z const double &   )  const [private]
 

00102 {
00103   return  z0()  +  f * tanDip() * cosDip() +  referencePoint().z();
00104 }

double TrkDifLineTraj::z0  )  const [inline]
 

00056 {return parameters()->parameter()[z0Index()];}

double TrkDifLineTraj::z0  )  const [inline]
 

00056 {return parameters()->parameter()[z0Index()];}

int TrkDifLineTraj::z0Index  )  const [inline, private]
 

00091 {return z0Ind;}

int TrkDifLineTraj::z0Index  )  const [inline, private]
 

00091 {return z0Ind;}


Member Data Documentation

TrkParams TrkSimpTraj::_dtparams [protected, inherited]
 

HepPoint3D TrkSimpTraj::_refpoint [protected, inherited]
 

HepPoint3D TrkSimpTraj::_theOrigin [static, inherited]
 

double Trajectory::flightrange [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 19:06:34 2011 for BOSS6.5.5 by  doxygen 1.3.9.1