BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkFitter/TrkFitter-00-01-11/TrkFitter/TrkDifLineTraj.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkDifLineTraj.h,v 1.3 2010/03/25 09:56:53 zhangy Exp $
4//
5// Description:
6// Trajectory subclass that implements a 3-d line, suitable for use in
7// a track.
8//
9// Environment:
10// Software developed for the BaBar Detector at the SLAC B-Factory.
11//
12// Author(s): Steve Schaffner
13//------------------------------------------------------------------------
14#ifndef TRKDIFLINETRAJ_H
15#define TRKDIFLINETRAJ_H
16#include "TrkBase/TrkSimpTraj.h"
17#include "CLHEP/Geometry/Point3D.h"
18#ifndef ENABLE_BACKWARDS_COMPATIBILITY
20#endif
21#include "CLHEP/Vector/ThreeVector.h"
22
23class TrkVisitor;
24class TrkExchangePar;
25class TrkDifLineTraj : public TrkSimpTraj
26{
27 public:
28 // Define the parameters
29 enum {d0Ind=0, phi0Ind, z0Ind, tanDipInd};
30 enum {NLINPRM = 4};
31
32 TrkDifLineTraj(const HepVector&,const HepSymMatrix&, double lowlim=-99999.,
33 double hilim=99999., const HepPoint3D& refpoint = _theOrigin);
34 TrkDifLineTraj(const TrkExchangePar&, double lowlim=-99999.,
35 double hilim=99999., const HepPoint3D& refpoint = _theOrigin);
36 TrkDifLineTraj( const TrkDifLineTraj& ); // copy ctor
40
41 virtual HepPoint3D position(double fltLen) const;
42 virtual Hep3Vector direction(double fltLen) const;
43 virtual Hep3Vector delDirect(double) const;
44 virtual void getInfo(double fltLen, HepPoint3D& pos,
45 Hep3Vector& dir) const;
46 virtual void getInfo(double fltLen, HepPoint3D&,
47 Hep3Vector& dir,
48 Hep3Vector& delDir) const;
49 virtual void getDFInfo(double fltLen, DifPoint&,
50 DifVector& dir,
51 DifVector& delDir) const;
52 virtual double curvature( double fltLen) const;
53
54 double cosDip() const {return 1./sqrt(1.+tanDip()*tanDip());}
55 double d0() const {return parameters()->parameter()[d0Index()];}
56 double z0() const {return parameters()->parameter()[z0Index()];}
57 double tanDip() const {return parameters()->parameter()[tanDipIndex()];}
58 double phi0() const;
59 //yzhang
60 int nPar() const {return NLINPRM;}
61 //zhangy
62 // How far can you go using given approximation before error > tolerance,
63 // in direction pathDir?
64 virtual double distTo1stError(double flt, double tol, int pathDir) const;
65 virtual double distTo2ndError(double flt, double tol, int pathDir) const;
66
67 // Real versions of the base class derivative functions
68 HepMatrix derivDeflect(double fltlen,deflectDirection) const;
69 HepMatrix derivDisplace(double fltlen,deflectDirection) const;
70 HepMatrix derivPFract(double fltlen) const;
71 // PointTraj functions
72 TranslateParams paramFunction() const { return TrkDifLineTraj::paramFunc; }
73 // Invert the parameter. Returns true in flags if the inversion
74 //requires a change of sign in the covariance matrix.
75 void invertParams(TrkParams* params, std::vector<bool>& flags) const;
76
77 //--------------------------------------------------
78 // Visitor access
79 //--------------------------------------------------
80
81 virtual void visitAccept(TrkVisitor* vis) const;
82
83 private:
84
85 // Private functions (data members are part of the base class)
86 double x( const double& ) const;
87 double y( const double& ) const;
88 double z( const double& ) const;
89 int d0Index() const {return d0Ind;}
90 int phi0Index() const {return phi0Ind;}
91 int z0Index() const {return z0Ind;}
92 int tanDipIndex() const {return tanDipInd;}
93 int nLinPrm() const {return NLINPRM;}
94
95 // the real point translation function
96 static void paramFunc(const HepPoint3D& oldpoint,const HepPoint3D& newpoint,
97 const HepVector& oldpar,const HepSymMatrix& oldcov,
98 HepVector& newpar,HepSymMatrix& newcov,
99 double fltlen);
100};
101
102// Inline functions:
103
104#endif
void(* TranslateParams)(const HepPoint3D &oldpoint, const HepPoint3D &newpoint, const HepVector &oldpar, const HepSymMatrix &oldcov, HepVector &newpar, HepSymMatrix &newcov, double fltlen)
virtual double distTo2ndError(double flt, double tol, int pathDir) const
virtual HepPoint3D position(double fltLen) const
TrkDifLineTraj(const TrkExchangePar &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
virtual void getInfo(double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
virtual void getDFInfo(double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
virtual Hep3Vector delDirect(double) const
TrkDifLineTraj(const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
virtual void getInfo(double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
TrkDifLineTraj * clone() const
double phi0() const
virtual Hep3Vector direction(double fltLen) const
virtual void visitAccept(TrkVisitor *vis) const
void invertParams(TrkParams *params, std::vector< bool > &flags) const
virtual double distTo1stError(double flt, double tol, int pathDir) const
virtual double curvature(double fltLen) const
HepMatrix derivDeflect(double fltlen, deflectDirection) const
TrkDifLineTraj & operator=(const TrkDifLineTraj &)
HepMatrix derivDisplace(double fltlen, deflectDirection) const
HepMatrix derivPFract(double fltlen) const
TrkDifLineTraj(const TrkDifLineTraj &)