BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkFitter/include/TrkFitter/TrkSimpleRep.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkSimpleRep.h,v 1.2 2006/03/28 01:03:35 zhangy Exp $
4//
5// Description:
6// Base class for simple TrkReps: helix, line, circle.
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author List:
12// Steve Schaffner
13//
14//------------------------------------------------------------------------
15
16#ifndef TRKSIMPLEREP_HH
17#define TRKSIMPLEREP_HH
18
19#include "CLHEP/Matrix/Matrix.h"
20#include "CLHEP/Matrix/SymMatrix.h"
21#include "CLHEP/Matrix/Vector.h"
22#include "CLHEP/Vector/ThreeVector.h"
23#include "TrkBase/TrkRep.h"
24#include "TrkFitter/TrkHelixFitter.h"
25
26class TrkSimpTraj;
27using CLHEP::Hep3Vector;
28using CLHEP::HepMatrix;
29using CLHEP::HepSymMatrix;
30using CLHEP::HepVector;
31
32class TrkSimpleRep : public TrkRep {
33public:
34 //******************************************
35 // Constructors and such
36 //******************************************
37 // 2 ctors, one for reps with hits, one for reps without hits
39 TrkSimpleRep( TrkRecoTrk*, PdtPid::PidType, int nActive, int nSvt, int nDch, double chi2,
40 double startFoundRange, double endFoundRange );
41 // Copy ctor:
43 virtual ~TrkSimpleRep();
44
45 //******************************************
46 // Global quantities:
47 //******************************************
48 int nDof() const;
49 double chisq() const;
50 void setChisq( double c );
51 virtual int charge() const;
52
53 //********************************************
54 // Information about track at a given position
55 //********************************************
56 virtual Hep3Vector momentum( double fltL = 0. ) const;
57 virtual double pt( double fltL = 0. ) const;
58 virtual BesVectorErr momentumErr( double fltL ) const;
59
60 // Interface to vertexing algorithms (M.Bondioli 7/17/98)
61 // covariance matrices of the track at fixed flight length
62 virtual HepMatrix posmomCov( double fltL ) const;
63 virtual void getAllCovs( double fltL, HepSymMatrix& xxCov, HepSymMatrix& ppCov,
64 HepMatrix& xpCov ) const;
65 // accessors to 2nd derivative of chi2 wrt x and p.
66 // x0 and p0 are filled with the pos and 3mom around which expansion
67 // takes place, whilst Weights are filled with the 2nd deriv of chi2.
68 // so that:
69 // dx=x-x0 dp=p-p0
70 //
71 // chi2(x,p)=0.5 dx^t*Wxx*dx + dx^t*Wxp*dp + 0.5 dp^t*Wpp*dp
72 // where:
73 // pos and mom are 3-dim Vectors,
74 // xxWeight ppWeight and xpWeight are 3 by 3 matrices
75 //
76 virtual void getAllWeights( double fltL, HepVector& pos, HepVector& mom,
77 HepSymMatrix& xxWeight, HepSymMatrix& ppWeight,
78 HepMatrix& xpWeight ) const;
79 virtual void getAllWeights( const HepPoint3D& pt, HepVector& pos, HepVector& mom,
80 HepSymMatrix& xxWeight, HepSymMatrix& ppWeight,
81 HepMatrix& xpWeight ) const;
82
83 //******************************************
84 // Fitting
85 //******************************************
86 virtual TrkErrCode fit();
87 TrkHelixFitter& fitter() { return _fitter; }
88
89protected:
91 virtual TrkSimpTraj& simpTraj() = 0;
92 virtual const TrkSimpTraj& simpTraj() const = 0;
93
94private:
95 TrkHelixFitter _fitter;
96 double _chisq;
97};
98#endif
HepGeom::Point3D< double > HepPoint3D
virtual int nSvt() const
Definition TrkRep.cxx:265
virtual int nActive() const
Definition TrkRep.cxx:263
virtual double endFoundRange() const
Definition TrkRep.cxx:247
virtual double startFoundRange() const
Definition TrkRep.cxx:245
virtual TrkErrCode fit()
virtual Hep3Vector momentum(double fltL=0.) const
virtual void getAllCovs(double fltL, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov) const
virtual double pt(double fltL=0.) const
virtual HepMatrix posmomCov(double fltL) const
virtual TrkSimpTraj & simpTraj()=0
virtual ~TrkSimpleRep()
virtual const TrkSimpTraj & simpTraj() const =0
TrkSimpleRep & operator=(const TrkSimpleRep &right)
int nDof() const
virtual void getAllWeights(double fltL, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
TrkSimpleRep(const TrkSimpleRep &right, TrkRecoTrk *trk, PdtPid::PidType)
virtual double pt(double fltL=0.) const
double chisq() const
TrkSimpleRep(TrkRecoTrk *, PdtPid::PidType, int nActive, int nSvt, int nDch, double chi2, double startFoundRange, double endFoundRange)
virtual void getAllWeights(const HepPoint3D &pt, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
TrkSimpleRep(const TrkHotList *, TrkRecoTrk *, PdtPid::PidType)
void setChisq(double c)
virtual int charge() const
virtual BesVectorErr momentumErr(double fltL) const