/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/NeutTraj.h

Go to the documentation of this file.
00001 //
00002 // Trajectory subclass that implements a neutral simple
00003 // Author : Justin Albert and Valery Miftahov, from HelixTraj
00004 //
00005 #ifndef NEUTTRAJ_H
00006 #define NEUTTRAJ_H
00007 #include "TrkBase/TrkSimpTraj.h"
00008 #include "TrkBase/NeutParams.h"
00009 #include "CLHEP/Geometry/Point3D.h"
00010 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00011 typedef HepGeom::Point3D<double> HepPoint3D;
00012 #endif
00013 
00014 #include "CLHEP/Matrix/Vector.h"
00015 #include "CLHEP/Matrix/Matrix.h"
00016 #include "CLHEP/Matrix/SymMatrix.h"
00017 
00018 using CLHEP::Hep3Vector;
00019 using CLHEP::HepMatrix;
00020 using CLHEP::HepSymMatrix;
00021 
00022 class TrkVisitor;
00023 class NeutParams;
00024 
00025 class NeutTraj : public TrkSimpTraj
00026 {
00027 public:
00028   NeutTraj( const NeutParams&, double lowlim=-99999.,double hilim=99999.,
00029             const HepPoint3D& refpoint = _theOrigin);
00030   NeutTraj( const NeutTraj&  );   // copy ctor
00031   NeutTraj* clone() const;
00032 
00033 // destructor
00034   virtual ~NeutTraj();
00035 
00036 // operators
00037   NeutTraj& operator=(const NeutTraj&);
00038 // needed implementations for intersection with a Surface
00039   virtual HepPoint3D   position( double fltLen) const;
00040   virtual Hep3Vector direction( double fltLen) const;
00041   virtual Hep3Vector delDirect( double ) const;
00042   void  getInfo( double fltLen, HepPoint3D& pos, Hep3Vector& dir ) const;
00043   void  getInfo( double fltLen, HepPoint3D& , Hep3Vector& dir,
00044                         Hep3Vector& delDir ) const;
00045   void  getDFInfo( double fltLen, DifPoint& , DifVector& dir,
00046                         DifVector& delDir ) const;
00047 
00048   // How far can you go using given approximation before error > tolerance,
00049   //   in direction pathDir?
00050   virtual double distTo1stError(double s, double tol, int pathDir) const;
00051   virtual double distTo2ndError(double s, double tol, int pathDir) const;
00052 
00053   // Expose the parameters for user manipulation
00054   NeutParams& params()                                    {return *_np();}
00055   const NeutParams& params() const                        {return *_np();}
00056   //yzhang
00057   int nPar () const {return params().nPar();}
00058   //zhangy
00059 //
00060 //  Real versions of the base class derivative functions
00061 //
00062   double curvature( double fltLen) const                  {return 0.;}
00063   HepMatrix derivDeflect(double fltlen,deflectDirection) const;
00064   HepMatrix derivDisplace(double fltlen,deflectDirection idir) const;
00065   HepMatrix derivPFract(double fltlen) const;
00066 //  PointTraj functions
00067   TranslateParams paramFunction() const { return NeutTraj::paramFunc; }
00068   // Invert the parameter.  Returns true in flags if the inversion
00069   //requires a change of sign in the covariance matrix.
00070   void invertParams(TrkParams* newparams, std::vector<bool>& flags) const;
00071 
00072   TrkSimpTraj& invert();
00073 
00074   //--------------------------------------------------
00075   // Visitor access
00076   //--------------------------------------------------
00077 
00078   virtual void visitAccept(TrkVisitor* vis) const;
00079 
00080 
00081 private:
00082 
00083 
00084 //
00085 //  Private functions (data members are part of the base class)
00086 //
00087   double x( const double& ) const;
00088   double y( const double& ) const;
00089   double z( const double& ) const;
00090   inline NeutParams* _np() const {return (NeutParams*) &_dtparams; }
00091   inline double d0() const {return _np()->d0(); }
00092          double phi0() const;
00093   inline double p() const {return _np()->p(); }
00094   inline double z0() const {return _np()->z0(); }
00095   inline double s0() const {return _np()->s0(); }
00096   inline double tanDip() const {  return _np()->tanDip(); }
00097   inline double dip() const {return atan(tanDip());}
00098   inline double cosDip() const {return 1./sqrt(1.+tanDip()*tanDip()); }
00099   inline double sinDip() const {return tanDip()*cosDip(); }
00100   inline double translen(const double& f) const {return cosDip()*f;}
00101 // the real point translation function
00102   static void paramFunc(const HepPoint3D& oldpoint,const HepPoint3D& newpoint,
00103                         const HepVector& oldpar,const HepSymMatrix& oldcov,
00104                         HepVector& newpar,HepSymMatrix& newcov,
00105                         double fltlen);
00106 };
00107 #endif

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