/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/TrkFitter/TrkFitter-00-01-11/TrkFitter/TrkDifLineTraj.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: TrkDifLineTraj.h,v 1.3 2010/03/25 09:56:53 zhangy Exp $
00004 //
00005 // Description:
00006 //    Trajectory subclass that implements a 3-d line, suitable for use in 
00007 //      a track.
00008 //
00009 // Environment:
00010 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00011 //
00012 // Author(s): Steve Schaffner
00013 //------------------------------------------------------------------------
00014 #ifndef TRKDIFLINETRAJ_H
00015 #define TRKDIFLINETRAJ_H
00016 #include "TrkBase/TrkSimpTraj.h"
00017 #include "CLHEP/Geometry/Point3D.h"
00018 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00019 typedef HepGeom::Point3D<double> HepPoint3D;
00020 #endif
00021 #include "CLHEP/Vector/ThreeVector.h"
00022 
00023 class TrkVisitor;
00024 class TrkExchangePar;
00025 class TrkDifLineTraj : public TrkSimpTraj
00026 {
00027   public:
00028     //  Define the parameters 
00029     enum {d0Ind=0, phi0Ind, z0Ind, tanDipInd};
00030     enum {NLINPRM = 4};
00031 
00032     TrkDifLineTraj(const HepVector&,const HepSymMatrix&, double lowlim=-99999.,
00033         double hilim=99999., const HepPoint3D& refpoint = _theOrigin);
00034     TrkDifLineTraj(const TrkExchangePar&, double lowlim=-99999.,
00035         double hilim=99999., const HepPoint3D& refpoint = _theOrigin);
00036     TrkDifLineTraj( const TrkDifLineTraj&  );   // copy ctor
00037     TrkDifLineTraj* clone() const;
00038     ~TrkDifLineTraj();
00039     TrkDifLineTraj& operator=(const TrkDifLineTraj&);
00040 
00041     virtual HepPoint3D   position(double fltLen) const;
00042     virtual Hep3Vector direction(double fltLen) const;
00043     virtual Hep3Vector delDirect(double) const;
00044     virtual void       getInfo(double fltLen, HepPoint3D& pos,
00045         Hep3Vector& dir) const;
00046     virtual void       getInfo(double fltLen, HepPoint3D&,
00047         Hep3Vector& dir,
00048         Hep3Vector& delDir) const;
00049     virtual void       getDFInfo(double fltLen, DifPoint&,
00050         DifVector& dir,
00051         DifVector& delDir) const;
00052     virtual double     curvature( double fltLen) const;
00053 
00054     double cosDip()   const               {return 1./sqrt(1.+tanDip()*tanDip());}
00055     double d0()       const        {return parameters()->parameter()[d0Index()];}
00056     double z0()       const        {return parameters()->parameter()[z0Index()];}
00057     double tanDip()   const    {return parameters()->parameter()[tanDipIndex()];}
00058     double phi0()     const;
00059     //yzhang
00060     int nPar() const {return NLINPRM;}
00061     //zhangy
00062     // How far can you go using given approximation before error > tolerance, 
00063     //   in direction pathDir?
00064     virtual double distTo1stError(double flt, double tol, int pathDir) const;
00065     virtual double distTo2ndError(double flt, double tol, int pathDir) const;
00066 
00067     //  Real versions of the base class derivative functions
00068     HepMatrix derivDeflect(double fltlen,deflectDirection) const;
00069     HepMatrix derivDisplace(double fltlen,deflectDirection) const;
00070     HepMatrix derivPFract(double fltlen) const;
00071     //  PointTraj functions
00072     TranslateParams paramFunction() const { return TrkDifLineTraj::paramFunc; }
00073     // Invert the parameter.  Returns true in flags if the inversion
00074     //requires a change of sign in the covariance matrix.
00075     void invertParams(TrkParams* params, std::vector<bool>& flags) const;
00076 
00077     //--------------------------------------------------
00078     // Visitor access
00079     //--------------------------------------------------
00080 
00081     virtual void visitAccept(TrkVisitor* vis) const;
00082 
00083   private:
00084 
00085     //  Private functions (data members are part of the base class)
00086     double x( const double& ) const;
00087     double y( const double& ) const;
00088     double z( const double& ) const;
00089     int d0Index()     const                                       {return d0Ind;}
00090     int phi0Index()   const                                     {return phi0Ind;}
00091     int z0Index()     const                                       {return z0Ind;}
00092     int tanDipIndex() const                                   {return tanDipInd;}
00093     int nLinPrm() const                                         {return NLINPRM;}
00094 
00095     // the real point translation function
00096     static void paramFunc(const HepPoint3D& oldpoint,const HepPoint3D& newpoint,
00097         const HepVector& oldpar,const HepSymMatrix& oldcov,
00098         HepVector& newpar,HepSymMatrix& newcov,
00099         double fltlen);
00100 };
00101 
00102 // Inline functions:
00103 
00104 #endif

Generated on Tue Nov 29 23:13:44 2016 for BOSS_7.0.2 by  doxygen 1.4.7