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

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: TrkCircleTraj.h,v 1.2 2006/03/28 01:03:35 zhangy Exp $
00004 //
00005 // Description:
00006 //    Trajectory subclass that implements a circle in the x-y plane, suitable
00007 //    for use in 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 TRKCIRCLETRAJ_H
00015 #define TRKCIRCLETRAJ_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 #include "CLHEP/Matrix/SymMatrix.h"
00023 
00024 class TrkVisitor;
00025 class TrkExchangePar;
00026 
00027 class TrkCircleTraj : public TrkSimpTraj
00028 {
00029 
00030 public:
00031   TrkCircleTraj(const HepVector&,const HepSymMatrix&, double lowlim=-99999.,
00032             double hilim=99999., const HepPoint3D& refpoint = _theOrigin);
00033   TrkCircleTraj(const TrkExchangePar&, double lowlim=-99999.,
00034             double hilim=99999., const HepPoint3D& refpoint = _theOrigin);
00035   TrkCircleTraj( const TrkCircleTraj&  );   // copy ctor
00036   TrkCircleTraj* clone() const;
00037   ~TrkCircleTraj();
00038   TrkCircleTraj& operator=(const TrkCircleTraj&);
00039 
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&, Hep3Vector& dir, 
00047                         Hep3Vector& delDir) const;
00048   virtual void       getDFInfo(double fltLen, DifPoint&, DifVector& dir, 
00049                         DifVector& delDir) const;
00050   virtual void       getDFInfo2(double fltLen, DifPoint& pos, DifVector& 
00051                                dir) const;
00052   virtual double     curvature( double fltLen) const;
00053 
00054   // How far can you go using given approximation before error > tolerance, 
00055   //   in direction pathDir?
00056   virtual double distTo1stError(double flt, double tol, int pathDir) const;
00057   virtual double distTo2ndError(double flt, double tol, int pathDir) const;
00058 
00059 //  Real versions of the base class derivative functions
00060   HepMatrix derivDeflect(double fltlen,deflectDirection) const;
00061   HepMatrix derivDisplace(double fltlen,deflectDirection) const;
00062   HepMatrix derivPFract(double fltlen) const;
00063 //  PointTraj functions
00064   TranslateParams paramFunction() const { return TrkCircleTraj::paramFunc; }
00065   // Invert the parameter.  Returns true in flags if the inversion
00066   // requires a change of sign in the covariance matrix.
00067   void invertParams(TrkParams* params, std::vector<bool>& flags) const;
00068   //yzhang
00069   int nPar() const {return NCIRPAR;}
00070   //zhangy
00071   //--------------------------------------------------
00072   // Visitor access
00073   //--------------------------------------------------
00074 
00075   virtual void visitAccept(TrkVisitor* vis) const;
00076 
00077 //  Define the parameters 
00078 private:
00079   enum {d0Ind=0, phi0Ind, omegaInd}; 
00080   enum {NCIRPAR = 3};
00081 public:
00082   static int d0Index()               {return d0Ind;}
00083   static int phi0Index()             {return phi0Ind;}
00084   static int omegaIndex()            {return omegaInd;}
00085   static int nCirPrm()               {return NCIRPAR;}
00086 
00087   // circle-specific accessors
00088   double d0() const {return parameters()->parameter()[d0Index()];}
00089   double phi0() const;
00090   double omega() const {return parameters()->parameter()[omegaIndex()]; }
00091 
00092 
00093 private:
00094 //  Private functions (data members are part of the base class)
00095 
00096   double x( const double& ) const;
00097   double y( const double& ) const;
00098   inline double arc( const double& f) const {return f*omega();}
00099          double angle(const double& f) const; 
00100 // the real point translation function
00101   static void paramFunc(const HepPoint3D& oldpoint,const HepPoint3D& newpoint,
00102                         const HepVector& oldpar,const HepSymMatrix& oldcov,
00103                         HepVector& newpar,HepSymMatrix& newcov,
00104                         double fltlen);
00105 };
00106 #endif
00107 
00108 
00109 
00110 

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