CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkFitter/TrkFitter-00-01-13/TrkFitter/TrkSimpleRep.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkSimpleRep.h,v 1.1.1.1 2017/12/15 12:01:44 huangzhen 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 "TrkBase/TrkRep.h"
20#include "TrkFitter/TrkHelixFitter.h"
21#include "CLHEP/Vector/ThreeVector.h"
22#include "CLHEP/Matrix/Vector.h"
23#include "CLHEP/Matrix/Matrix.h"
24#include "CLHEP/Matrix/SymMatrix.h"
25
26class TrkSimpTraj;
27using CLHEP::HepVector;
28using CLHEP::Hep3Vector;
29using CLHEP::HepMatrix;
30using CLHEP::HepSymMatrix;
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
40 double chi2, 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
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;
64 virtual void getAllCovs(double fltL,
65 HepSymMatrix& xxCov,
66 HepSymMatrix& ppCov,
67 HepMatrix& xpCov) const;
68 // accessors to 2nd derivative of chi2 wrt x and p.
69 // x0 and p0 are filled with the pos and 3mom around which expansion
70 // takes place, whilst Weights are filled with the 2nd deriv of chi2.
71 // so that:
72 // dx=x-x0 dp=p-p0
73 //
74 // chi2(x,p)=0.5 dx^t*Wxx*dx + dx^t*Wxp*dp + 0.5 dp^t*Wpp*dp
75 // where:
76 // pos and mom are 3-dim Vectors,
77 // xxWeight ppWeight and xpWeight are 3 by 3 matrices
78 //
79 virtual void getAllWeights(double fltL,
80 HepVector& pos,
81 HepVector& mom,
82 HepSymMatrix& xxWeight,
83 HepSymMatrix& ppWeight,
84 HepMatrix& xpWeight)const;
85 virtual void getAllWeights(const HepPoint3D& pt,
86 HepVector& pos,
87 HepVector& mom,
88 HepSymMatrix& xxWeight,
89 HepSymMatrix& ppWeight,
90 HepMatrix& xpWeight) const;
91
92 //******************************************
93 // Fitting
94 //******************************************
95 virtual TrkErrCode fit();
96 TrkHelixFitter& fitter() {return _fitter;}
97
98protected:
100 virtual TrkSimpTraj& simpTraj() = 0;
101 virtual const TrkSimpTraj& simpTraj() const = 0;
102
103private:
104 TrkHelixFitter _fitter;
105 double _chisq;
106
107};
108#endif
109
110
111
virtual int nSvt() const
Definition: TrkRep.cxx:336
virtual int nActive() const
Definition: TrkRep.cxx:330
virtual double endFoundRange() const
Definition: TrkRep.cxx:302
virtual double startFoundRange() const
Definition: TrkRep.cxx:296
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