BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/TrkFitter/TrkFitter/TrkCircleTraj.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkCircleTraj.h,v 1.2 2006/03/28 01:03:35 zhangy Exp $
4//
5// Description:
6// Trajectory subclass that implements a circle in the x-y plane, suitable
7// for use in 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 TRKCIRCLETRAJ_H
15#define TRKCIRCLETRAJ_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#include "CLHEP/Matrix/SymMatrix.h"
23
24class TrkVisitor;
25class TrkExchangePar;
26
28{
29
30public:
31 TrkCircleTraj(const HepVector&,const HepSymMatrix&, double lowlim=-99999.,
32 double hilim=99999., const HepPoint3D& refpoint = _theOrigin);
33 TrkCircleTraj(const TrkExchangePar&, double lowlim=-99999.,
34 double hilim=99999., const HepPoint3D& refpoint = _theOrigin);
35 TrkCircleTraj( const TrkCircleTraj& ); // copy ctor
36 TrkCircleTraj* clone() const;
39
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&, Hep3Vector& dir,
47 Hep3Vector& delDir) const;
48 virtual void getDFInfo(double fltLen, DifPoint&, DifVector& dir,
49 DifVector& delDir) const;
50 virtual void getDFInfo2(double fltLen, DifPoint& pos, DifVector&
51 dir) const;
52 virtual double curvature( double fltLen) const;
53
54 // How far can you go using given approximation before error > tolerance,
55 // in direction pathDir?
56 virtual double distTo1stError(double flt, double tol, int pathDir) const;
57 virtual double distTo2ndError(double flt, double tol, int pathDir) const;
58
59// Real versions of the base class derivative functions
60 HepMatrix derivDeflect(double fltlen,deflectDirection) const;
61 HepMatrix derivDisplace(double fltlen,deflectDirection) const;
62 HepMatrix derivPFract(double fltlen) const;
63// PointTraj functions
64 TranslateParams paramFunction() const { return TrkCircleTraj::paramFunc; }
65 // Invert the parameter. Returns true in flags if the inversion
66 // requires a change of sign in the covariance matrix.
67 void invertParams(TrkParams* params, std::vector<bool>& flags) const;
68 //yzhang
69 int nPar() const {return NCIRPAR;}
70 //zhangy
71 //--------------------------------------------------
72 // Visitor access
73 //--------------------------------------------------
74
75 virtual void visitAccept(TrkVisitor* vis) const;
76
77// Define the parameters
78private:
79 enum {d0Ind=0, phi0Ind, omegaInd};
80 enum {NCIRPAR = 3};
81public:
82 static int d0Index() {return d0Ind;}
83 static int phi0Index() {return phi0Ind;}
84 static int omegaIndex() {return omegaInd;}
85 static int nCirPrm() {return NCIRPAR;}
86
87 // circle-specific accessors
88 double d0() const {return parameters()->parameter()[d0Index()];}
89 double phi0() const;
90 double omega() const {return parameters()->parameter()[omegaIndex()]; }
91
92
93private:
94// Private functions (data members are part of the base class)
95
96 double x( const double& ) const;
97 double y( const double& ) const;
98 inline double arc( const double& f) const {return f*omega();}
99 double angle(const double& f) const;
100// the real point translation function
101 static void paramFunc(const HepPoint3D& oldpoint,const HepPoint3D& newpoint,
102 const HepVector& oldpar,const HepSymMatrix& oldcov,
103 HepVector& newpar,HepSymMatrix& newcov,
104 double fltlen);
105};
106#endif
107
108
109
110
void(* TranslateParams)(const HepPoint3D &oldpoint, const HepPoint3D &newpoint, const HepVector &oldpar, const HepSymMatrix &oldcov, HepVector &newpar, HepSymMatrix &newcov, double fltlen)
HepGeom::Point3D< double > HepPoint3D
virtual Hep3Vector direction(double fltLen) const
HepMatrix derivDeflect(double fltlen, deflectDirection) const
virtual void getDFInfo2(double fltLen, DifPoint &pos, DifVector &dir) const
virtual double distTo2ndError(double flt, double tol, int pathDir) const
virtual double distTo1stError(double flt, double tol, int pathDir) const
TrkCircleTraj * clone() const
virtual double curvature(double fltLen) const
HepMatrix derivDisplace(double fltlen, deflectDirection) const
virtual void visitAccept(TrkVisitor *vis) const
double phi0() const
void invertParams(TrkParams *params, std::vector< bool > &flags) const
virtual HepPoint3D position(double fltLen) const
virtual void getDFInfo(double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
virtual Hep3Vector delDirect(double) const
HepMatrix derivPFract(double fltlen) const
virtual void getInfo(double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
TrkCircleTraj & operator=(const TrkCircleTraj &)
double y[1000]
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")