BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkAbsFit.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3//
4// Description:
5// Defines output interface for any "fitted" track (recon'ed charged,
6// hypothesized charged, or hypothesized uncharged).
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author(s): Steve Schaffner, Justin Albert
12//------------------------------------------------------------------------
13
14#ifndef TRKABSFIT_HH
15#define TRKABSFIT_HH
16
17#include "CLHEP/Geometry/Point3D.h"
18#include "CLHEP/Matrix/Matrix.h"
19#include "CLHEP/Matrix/SymMatrix.h"
20#include "CLHEP/Matrix/Vector.h"
21#include "CLHEP/Vector/ThreeVector.h"
22#include "MdcRecoUtil/PdtPid.h"
23#ifndef ENABLE_BACKWARDS_COMPATIBILITY
24typedef HepGeom::Point3D<double> HepPoint3D;
25#endif
26using CLHEP::Hep3Vector;
27using CLHEP::HepMatrix;
28using CLHEP::HepSymMatrix;
29using CLHEP::HepVector;
30
31class BesPointErr;
32class BesVectorErr;
33class TrkDifTraj;
34class TrkSimpTraj;
35#include <iosfwd>
36class TrkExchangePar;
38
39// Class interface //
40class TrkAbsFit {
41
42public:
43 //********************************
44 // Global track quantities:
45 //********************************
46 virtual int charge() const = 0;
47 virtual double chisq() const = 0;
48 virtual int nDof() const = 0;
49 virtual const TrkDifTraj& traj() const = 0;
50
51 //********************************
52 // Information about track at a given position (flight length)
53 //********************************
54 virtual HepPoint3D position( double fltL ) const = 0;
55 virtual Hep3Vector direction( double fltL ) const = 0;
56 virtual Hep3Vector momentum( double fltL = 0. ) const = 0;
57 virtual double pt( double fltL = 0. ) const = 0;
58 virtual BesPointErr positionErr( double fltL ) const = 0;
59 virtual BesVectorErr directionErr( double fltL ) const = 0;
60 virtual BesVectorErr momentumErr( double fltL ) const = 0;
61 // Interface to vertexing algorithms (M.Bondioli 7/17/98)
62 // covariance matrices of the track at fixed flight length
63 virtual HepMatrix posmomCov( double fltL ) const = 0;
64 virtual void getAllCovs( double fltL, HepSymMatrix& xxCov, HepSymMatrix& ppCov,
65 HepMatrix& xpCov ) const = 0;
66
67 // accessors to 2nd derivative of chi2 wrt x and p.
68 // x0 and p0 are filled with the pos and 3mom around which expansion
69 // takes place, whilst Weights are filled with the 2nd deriv of chi2.
70 // so that:
71 // dx=x-x0 dp=p-p0
72 //
73 // chi2(x,p)=0.5 dx^t*Wxx*dx + dx^t*Wxp*dp + 0.5 dp^t*Wpp*dp
74 // where:
75 // pos and mom are 3-dim Vectors,
76 // xxWeight ppWeight and xpWeight are 3 by 3 matrices
77 //
78 virtual void getAllWeights( double fltL, HepVector& pos, HepVector& mom,
79 HepSymMatrix& xxWeight, HepSymMatrix& ppWeight,
80 HepMatrix& xpWeight ) const = 0;
81
82 //********************************
83 // Valid flight range
84 //********************************
85 // validRange = trajectory's valid range = flight length range
86 // over which the track can be used.
87 // foundRange = range over which the track is known to
88 // exist (i.e. from first hit to last hit). See derived class
89 // TrkFit, which is the base for all recon'ed track fits.
90
91 virtual double startValidRange() const = 0;
92 virtual double endValidRange() const = 0;
93
94 //******************************************
95 // Printing
96 //******************************************
97 virtual void printAll( std::ostream& ostr ) const = 0;
98 virtual void print( std::ostream& ostr ) const = 0;
99
100protected:
102 virtual ~TrkAbsFit();
103
104private:
105 // Preempt
106 TrkAbsFit& operator=( const TrkAbsFit& );
107 TrkAbsFit( const TrkAbsFit& );
108};
109
110#endif
HepGeom::Point3D< double > HepPoint3D
virtual void print(std::ostream &ostr) const =0
virtual double startValidRange() const =0
virtual Hep3Vector momentum(double fltL=0.) const =0
virtual BesPointErr positionErr(double fltL) const =0
virtual double pt(double fltL=0.) const =0
virtual void printAll(std::ostream &ostr) const =0
virtual ~TrkAbsFit()
virtual void getAllWeights(double fltL, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const =0
virtual double chisq() const =0
virtual int charge() const =0
virtual HepMatrix posmomCov(double fltL) const =0
virtual double endValidRange() const =0
virtual int nDof() const =0
virtual const TrkDifTraj & traj() const =0
virtual BesVectorErr directionErr(double fltL) const =0
virtual HepPoint3D position(double fltL) const =0
virtual void getAllCovs(double fltL, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov) const =0
virtual BesVectorErr momentumErr(double fltL) const =0
virtual Hep3Vector direction(double fltL) const =0