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

NeutTraj Class Reference

#include <NeutTraj.h>

Inheritance diagram for NeutTraj:

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

Public Member Functions

void changePoint (const HepPoint3D &newpoint, double &fltlen)
void changePoint (const HepPoint3D &newpoint, double &fltlen)
NeutTrajclone () const
NeutTrajclone () const
double curvature (double fltLen) const
double curvature (double fltLen) 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 idir) const
HepMatrix derivDisplace (double fltlen, deflectDirection idir) 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 s, double tol, int pathDir) const
virtual double distTo1stError (double s, double tol, int pathDir) const
virtual double distTo2ndError (double s, double tol, int pathDir) const
virtual double distTo2ndError (double s, double tol, int pathDir) const
void getDFInfo (double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
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
void getInfo (double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
void getInfo (double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
double hiRange () const
double hiRange () const
TrkSimpTrajinvert ()
TrkSimpTrajinvert ()
void invertParams (TrkParams *newparams, std::vector< bool > &flags) const
void invertParams (TrkParams *newparams, 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
 NeutTraj (const NeutTraj &)
 NeutTraj (const NeutParams &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 NeutTraj (const NeutTraj &)
 NeutTraj (const NeutParams &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
int nPar () const
int nPar () const
NeutTrajoperator= (const NeutTraj &)
NeutTrajoperator= (const NeutTraj &)
bool operator== (const TrkSimpTraj &) const
bool operator== (const TrkSimpTraj &) const
const TrkParamsparameters () const
TrkParamsparameters ()
const TrkParamsparameters () const
TrkParamsparameters ()
TranslateParams paramFunction () const
TranslateParams paramFunction () const
const NeutParamsparams () const
NeutParamsparams ()
const NeutParamsparams () const
NeutParamsparams ()
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)
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
virtual ~NeutTraj ()
virtual ~NeutTraj ()

Static Public Attributes

HepPoint3D _theOrigin

Protected Attributes

TrkParams _dtparams
HepPoint3D _refpoint
double flightrange [2]

Private Member Functions

NeutParams_np () const
NeutParams_np () const
double cosDip () const
double cosDip () const
double d0 () const
double d0 () const
double dip () const
double dip () const
double p () const
double p () const
double phi0 () const
double phi0 () const
double s0 () const
double s0 () const
double sinDip () const
double sinDip () const
double tanDip () const
double tanDip () const
double translen (const double &f) const
double translen (const double &f) 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
double z0 () const
double z0 () 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)

Constructor & Destructor Documentation

NeutTraj::NeutTraj const NeutParams ,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin
 

00017                                                : 
00018   TrkSimpTraj(np.parameter(), np.covariance(), lowlim,hilim)
00019 {
00020 }

NeutTraj::NeutTraj const NeutTraj  ) 
 

00023   : TrkSimpTraj(n.parameters()->parameter(), n.parameters()->covariance(),
00024                 n.lowRange(),n.hiRange())
00025 {
00026 }

NeutTraj::~NeutTraj  )  [virtual]
 

00047                     {
00048 }

NeutTraj::NeutTraj const NeutParams ,
double  lowlim = -99999.,
double  hilim = 99999.,
const HepPoint3D refpoint = _theOrigin
 

NeutTraj::NeutTraj const NeutTraj  ) 
 

virtual NeutTraj::~NeutTraj  )  [virtual]
 


Member Function Documentation

NeutParams* NeutTraj::_np  )  const [inline, private]
 

00090 {return (NeutParams*) &_dtparams; }

NeutParams* NeutTraj::_np  )  const [inline, private]
 

00090 {return (NeutParams*) &_dtparams; }

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 }

NeutTraj* NeutTraj::clone  )  const [virtual]
 

Implements TrkSimpTraj.

NeutTraj * NeutTraj::clone  )  const [virtual]
 

Implements TrkSimpTraj.

00031 {
00032   return new NeutTraj(*this);
00033 }

double NeutTraj::cosDip  )  const [inline, private]
 

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

double NeutTraj::cosDip  )  const [inline, private]
 

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

double NeutTraj::curvature double  fltLen  )  const [inline, virtual]
 

Implements Trajectory.

00062 {return 0.;}

double NeutTraj::curvature double  fltLen  )  const [inline, virtual]
 

Implements Trajectory.

00062 {return 0.;}

double NeutTraj::d0  )  const [inline, private]
 

00091 {return _np()->d0(); }

double NeutTraj::d0  )  const [inline, private]
 

00091 {return _np()->d0(); }

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

Implements Trajectory.

Hep3Vector NeutTraj::delDirect double   )  const [virtual]
 

Implements Trajectory.

00093                                         {
00094 //-----------------------------------------------------------------
00095   return Hep3Vector(0.0, 0.0, 0.0);
00096 }

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

Implements TrkKalDeriv.

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

Implements TrkKalDeriv.

00173 {
00174 //
00175 //  This function computes the column matrix of derivatives for the change
00176 //  in parameters for a change in the direction of a track at a point along
00177 //  its flight, holding the momentum and position constant.  The effects for
00178 //  changes in 2 perpendicular directions (theta1 = dip and 
00179 //  theta2 = phi*cos(dip)) can sometimes be added, as scattering in these
00180 //  are uncorrelated.
00181 //
00182   HepMatrix ddflct(NeutParams::_nneutprm,1); 
00183 //
00184 //  Compute some common things
00185 //
00186   double tand = tanDip();
00187   double cosd = cosDip();
00188 //
00189 //  Go through the parameters
00190 //
00191   switch (idirect) {
00192   case theta1:
00193     ddflct[NeutParams::_p][0] = 0.;
00194     ddflct[NeutParams::_tanDip][0] = 1.0/(cosd*cosd);
00195     ddflct[NeutParams::_d0][0] = 0.;
00196     ddflct[NeutParams::_phi0][0] =  0.;
00197     ddflct[NeutParams::_s0][0] =  0.;
00198     ddflct[NeutParams::_z0][0] = translen(fltlen) * (-1. - (tand*tand));
00199     break;
00200   case theta2:
00201     ddflct[NeutParams::_p][0] = 0;
00202     ddflct[NeutParams::_tanDip][0] = 0;
00203     ddflct[NeutParams::_d0][0] = -translen(fltlen)/cosd;
00204     ddflct[NeutParams::_phi0][0] = 1./cosd;
00205     ddflct[NeutParams::_z0][0] = 0.;
00206     ddflct[NeutParams::_s0][0] =  0.;
00207     break;
00208   }
00209   return ddflct;
00210 }

HepMatrix NeutTraj::derivDisplace double  fltlen,
deflectDirection  idir
const [virtual]
 

Implements TrkKalDeriv.

HepMatrix NeutTraj::derivDisplace double  fltlen,
deflectDirection  idir
const [virtual]
 

Implements TrkKalDeriv.

00214 {
00215 //
00216 //  This function computes the column matrix of derivatives for the change
00217 //  in parameters for a change in the transvers position of a track at a point along
00218 //  its flight, holding the momentum and direction constant.  The effects for
00219 //  changes in 2 perpendicular directions (theta1 = dip and 
00220 //  theta2 = phi*cos(dip)) are uncorrelated.  The sign convention has been
00221 //  chosen so that correlated scattering and displacement effects may be added
00222 //
00223   HepMatrix ddflct(NeutParams::_nneutprm,1); 
00224 //
00225 //  Compute some common things
00226 //
00227   double cosd = cosDip();
00228 //
00229 //  Go through the parameters
00230 //
00231   switch (idirect) {
00232   case theta1:
00233     ddflct[NeutParams::_p][0] = 0.;
00234     ddflct[NeutParams::_tanDip][0] = 0.0;
00235     ddflct[NeutParams::_d0][0] = 0.;
00236     ddflct[NeutParams::_phi0][0] =  0.;
00237     ddflct[NeutParams::_s0][0] =  0.;
00238     ddflct[NeutParams::_z0][0] = 1.0/cosd;
00239     break;
00240   case theta2:
00241     ddflct[NeutParams::_p][0] = 0;
00242     ddflct[NeutParams::_tanDip][0] = 0;
00243     ddflct[NeutParams::_d0][0] = 1.0;
00244     ddflct[NeutParams::_phi0][0] = 0.0;
00245     ddflct[NeutParams::_z0][0] = 0.;
00246     ddflct[NeutParams::_s0][0] =  0.;
00247     break;
00248   }
00249   return ddflct;
00250 }

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

Implements TrkKalDeriv.

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

Implements TrkKalDeriv.

00254 {
00255 //  This function computes the column matrix of derivatives for the change
00256 //  in parameters from a (fractional) change in the track momentum,
00257 //  holding the direction and position constant.  The momentum change can
00258 //  come from energy loss or bfield inhomogeneities.
00259 //
00260 //  For a helix, dp/P = -domega/omega,
00261 //  dParam/d(domega/omega) = -omega*dParam/ddomega
00262 //
00263   HepMatrix dmomfrac(NeutParams::_nneutprm,1);
00264 
00265 //  Go through the parameters
00266   dmomfrac[NeutParams::_p][0] = p(); // momentum
00267   dmomfrac[NeutParams::_tanDip][0] = 0.0; // tanDip
00268   dmomfrac[NeutParams::_d0][0] = 0.0; // d0
00269   dmomfrac[NeutParams::_phi0][0] = 0.0; // phi0
00270   dmomfrac[NeutParams::_z0][0] = 0.0; // z0
00271   dmomfrac[NeutParams::_s0][0] = 0.0; // s0
00272   return dmomfrac;
00273 }

double NeutTraj::dip  )  const [inline, private]
 

00097 {return atan(tanDip());}

double NeutTraj::dip  )  const [inline, private]
 

00097 {return atan(tanDip());}

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

Implements Trajectory.

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

Implements Trajectory.

00086                                    {
00087 //-----------------------------------------------------------------
00088   return Hep3Vector ( cos(phi0())*cosDip(), sin(phi0())*cosDip(),
00089                                sinDip() );
00090 }

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 NeutTraj::distTo1stError double  s,
double  tol,
int  pathDir
const [virtual]
 

Implements Trajectory.

double NeutTraj::distTo1stError double  s,
double  tol,
int  pathDir
const [virtual]
 

Implements Trajectory.

00100                                                        {
00101 //-----------------------------------------------------------------
00102   return 9999.;
00103 }

virtual double NeutTraj::distTo2ndError double  s,
double  tol,
int  pathDir
const [virtual]
 

Implements Trajectory.

double NeutTraj::distTo2ndError double  s,
double  tol,
int  pathDir
const [virtual]
 

Implements Trajectory.

00107                                                        {
00108 //-----------------------------------------------------------------
00109   return 9999.;
00110 }

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

Implements TrkDifTraj.

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

Implements TrkDifTraj.

00134 {
00135   //Provides difNum version of information for calculation of derivatives.
00136   //  Some of this duplicate code could be reduced if we had member 
00137   //  function templates.  Maybe.
00138 
00139   // Create difNumber versions of parameters
00140   //enum index (phi0(), etc) is from HelixParams.hh
00141   DifNumber phi0Df(phi0(), NeutParams::_phi0+1, NeutParams::_nneutprm);
00142   DifNumber d0Df(d0(), NeutParams::_d0+1, NeutParams::_nneutprm);
00143   DifNumber z0Df(z0(), NeutParams::_z0+1, NeutParams::_nneutprm);
00144   DifNumber tanDipDf(tanDip(), NeutParams::_tanDip+1, NeutParams::_nneutprm);
00145   DifNumber pDf(p(), NeutParams::_p+1, NeutParams::_nneutprm);
00146   // RF 03/25/99
00147   // the flight lenght has an error, which is the error along the trajectory 
00148   // in the creation point
00149   DifNumber s0Df(flt, NeutParams::_s0+1, NeutParams::_nneutprm);
00150   phi0Df.setIndepPar( parameters() );
00151   d0Df.setIndepPar( parameters() );
00152   z0Df.setIndepPar( parameters() );
00153   tanDipDf.setIndepPar( parameters() );
00154   pDf.setIndepPar( parameters() );
00155   s0Df.setIndepPar( parameters() );
00156   DifNumber dipDf = atan(tanDipDf);
00157 
00158   DifNumber sDip, cDip;
00159   dipDf.cosAndSin(cDip, sDip);
00160   DifNumber sinPhi0, cosPhi0;
00161   phi0Df.cosAndSin(cosPhi0, sinPhi0);
00162 
00163   DifNumber x =  cDip*s0Df*cosPhi0 - d0Df*sinPhi0;
00164   DifNumber y =  cDip*s0Df*sinPhi0 + d0Df*cosPhi0;
00165   DifNumber z =  z0Df + s0Df*sDip ;
00166   pos =  DifPoint(x, y, z);
00167   dir = DifVector( cosPhi0*cDip, sinPhi0*cDip, sDip );
00168   delDir = DifVector(0., 0., 0.);
00169 }

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 }

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

Implements Trajectory.

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

Implements Trajectory.

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

Implements Trajectory.

00115 {
00116   // This could be made much more efficient!!!!!!
00117   pos = position(fltLen);
00118   dir = direction(fltLen);
00119   delDir = delDirect(fltLen);
00120 }

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

Implements Trajectory.

00124 {
00125   //  This could be made much more efficient!!!!!
00126   pos = position(fltLen);
00127   dir = direction(fltLen);
00128   return;
00129 }

double Trajectory::hiRange  )  const [inherited]
 

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

00092 {return flightrange[1];}

TrkSimpTraj& NeutTraj::invert  ) 
 

Reimplemented from TrkSimpTraj.

TrkSimpTraj& NeutTraj::invert  ) 
 

Reimplemented from TrkSimpTraj.

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

Implements TrkSimpTraj.

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

Implements TrkSimpTraj.

00339 {
00340   assert(1==0);
00341 
00342 //  // Inverts parameters and returns true if the parameter inversion
00343 //  // requires a change in sign of elements in the covariance matrix
00344 //
00345 //  for (unsigned iparam = 0; iparam < NeutParams::_nneutprm; iparam++) {
00346 //    switch ( iparam ) {
00347 //    case NeutParams::_d0:  // changes sign
00348 //    case NeutParams::_tanDip:  // changes sign
00349 //      newparams->parameter()[iparam] *= -1.0;
00350 //      flags[iparam] = true;
00351 //      break;
00352 //    case NeutParams::_phi0:  // changes by pi, but covariance
00353 //                             // matrix shouldn't changed
00354 //      newparams->parameter()[iparam] =
00355 //      BesAngle(newparams->parameter()[iparam] + Constants::pi);
00356 //      flags[iparam] = false;
00357 //      break;
00358 //    case NeutParams::_p:  // no change sign
00359 //    case NeutParams::_z0:  // no change
00360 //      flags[iparam] = false;
00361 //    }
00362 //  }
00363 //  return;
00364 }

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 NeutTraj::nPar  )  const [inline, virtual]
 

Reimplemented from TrkSimpTraj.

00057 {return params().nPar();}

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

Reimplemented from TrkSimpTraj.

00057 {return params().nPar();}

NeutTraj& NeutTraj::operator= const NeutTraj  ) 
 

NeutTraj & NeutTraj::operator= const NeutTraj  ) 
 

00037 {
00038   if( &n != this ){
00039     for(int iend=0;iend<2;iend++)
00040       flightrange[iend] = n.flightrange[iend];
00041     _dtparams = *n._np();
00042   }
00043   return *this;
00044 }

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 }

double NeutTraj::p void   )  const [inline, private]
 

00093 {return _np()->p(); }

double NeutTraj::p  )  const [inline, private]
 

00093 {return _np()->p(); }

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 NeutTraj::paramFunc const HepPoint3D oldpoint,
const HepPoint3D newpoint,
const HepVector &  oldpar,
const HepSymMatrix &  oldcov,
HepVector &  newpar,
HepSymMatrix &  newcov,
double  fltlen
[static, private]
 

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

00287 {
00288 
00289 // copy the input parameter vector, in case the input and output are the same
00290   HepVector parvec(oldvec);
00291 // start with the input: momentum and tandip don't change
00292   newvec = parvec;
00293 //
00294   double delx = newpoint.x()-oldpoint.x();
00295   double dely = newpoint.y()-oldpoint.y();
00296   double delz = newpoint.z()-oldpoint.z();
00297 //  
00298   double cos0 = cos(parvec[NeutParams::_phi0]);
00299   double sin0 = sin(parvec[NeutParams::_phi0]);
00300   double perp = delx*sin0-dely*cos0;
00301   double para = delx*cos0+dely*sin0;
00302   double tand = parvec[NeutParams::_tanDip];
00303 // delta
00304 // assume delta, newdelta have the same sign
00305 // d0
00306   newvec[NeutParams::_d0] = parvec[NeutParams::_d0] + perp;
00307 // phi0; check that we don't get the wrong wrapping
00308   newvec[NeutParams::_phi0] = parvec[NeutParams::_phi0];
00309 //z0   
00310   newvec[NeutParams::_z0] += 
00311     parvec[NeutParams::_tanDip]*(delx/cos0)*(1.+(sin0/cos0)) - delz;
00312 // now covariance: first, compute the rotation matrix
00313   HepMatrix covrot(NeutParams::_nneutprm,NeutParams::_nneutprm,0); // start with 0: lots of terms are zero
00314 //
00315 // momentum is diagonal
00316   covrot[NeutParams::_p][NeutParams::_p] = 1.0;
00317 // tandip is diagonal
00318   covrot[NeutParams::_tanDip][NeutParams::_tanDip] = 1.0;
00319 // d0
00320   covrot[ NeutParams::_d0][ NeutParams::_d0] = 1.;
00321   covrot[ NeutParams::_d0][ NeutParams::_phi0] = para;
00322 // phi0
00323   covrot[ NeutParams::_phi0][ NeutParams::_p] = para;
00324   covrot[ NeutParams::_phi0][ NeutParams::_phi0] = 1.;
00325 // z0
00326   covrot[ NeutParams::_z0][ NeutParams::_phi0] = tand*-2.*perp;
00327   covrot[ NeutParams::_z0][ NeutParams::_tanDip] = 
00328                                       (delx/cos0)*(1.+(sin0/cos0));
00329   covrot[ NeutParams::_z0][ NeutParams::_z0] = 1.0;  
00330   covrot[ NeutParams::_s0][ NeutParams::_s0] = 1.0;  
00331 //  
00332 //  Apply the rotation
00333   newcov = oldcov.similarity(covrot);
00334 // done
00335 }

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

Implements TrkSimpTraj.

00067 { return NeutTraj::paramFunc; }

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

Implements TrkSimpTraj.

00067 { return NeutTraj::paramFunc; }

const NeutParams& NeutTraj::params  )  const [inline]
 

00055 {return *_np();}

NeutParams& NeutTraj::params  )  [inline]
 

00054 {return *_np();}

const NeutParams& NeutTraj::params  )  const [inline]
 

00055 {return *_np();}

NeutParams& NeutTraj::params  )  [inline]
 

00054 {return *_np();}

double NeutTraj::phi0  )  const [private]
 

double NeutTraj::phi0  )  const [private]
 

00278 {
00279   return BesAngle(_np()->phi0()).rad();
00280 }

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

Implements Trajectory.

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

Implements Trajectory.

00073                                   {
00074 //-----------------------------------------------------------------
00075   double cdip = cosDip();
00076   double sphi0 = sin(phi0());
00077   double cphi0 = cos(phi0());
00078 
00079   return HepPoint3D(cdip * f * cphi0 - d0()*sphi0, 
00080                   cdip * f * sphi0 + d0()*cphi0, 
00081                   z0() + f * tanDip() * cdip);
00082 }

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;}

double NeutTraj::s0  )  const [inline, private]
 

00095 {return _np()->s0(); }

double NeutTraj::s0  )  const [inline, private]
 

00095 {return _np()->s0(); }

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 NeutTraj::sinDip  )  const [inline, private]
 

00099 {return tanDip()*cosDip(); }

double NeutTraj::sinDip  )  const [inline, private]
 

00099 {return tanDip()*cosDip(); }

double NeutTraj::tanDip  )  const [inline, private]
 

00096 {  return _np()->tanDip(); }

double NeutTraj::tanDip  )  const [inline, private]
 

00096 {  return _np()->tanDip(); }

double NeutTraj::translen const double &  f  )  const [inline, private]
 

00100 {return cosDip()*f;}

double NeutTraj::translen const double &  f  )  const [inline, private]
 

00100 {return cosDip()*f;}

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 NeutTraj::visitAccept TrkVisitor vis  )  const [virtual]
 

Implements TrkSimpTraj.

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

Implements TrkSimpTraj.

00368 {
00369 // Visitor access--just use the Visitor class member function
00370   vis->trkVisitNeutTraj(this);
00371 }

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

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

00052                                    {
00053 //-----------------------------------------------------------------
00054   return cosDip()*f*cos(phi0()) - d0()*sin(phi0());
00055 }

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

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

00059                                    {
00060 //-----------------------------------------------------------------
00061   return cosDip()*f*sin(phi0()) + d0()*cos(phi0());
00062 }

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

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

00066                                  {
00067 //-----------------------------------------------------------------
00068   return (z0() + f*sinDip());
00069 }

double NeutTraj::z0  )  const [inline, private]
 

00094 {return _np()->z0(); }

double NeutTraj::z0  )  const [inline, private]
 

00094 {return _np()->z0(); }


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 16:38:04 2011 for BOSS6.5.5 by  doxygen 1.3.9.1