BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkCompTrk.h
Go to the documentation of this file.
1#ifndef TRKCOMPTRK_HH
2#define TRKCOMPTRK_HH
3
4#include "GaudiKernel/DataObject.h"
5#include "TrkBase/TrkAbsFit.h"
6#include <memory>
7
8#include "CLHEP/Matrix/Matrix.h"
9#include "CLHEP/Matrix/SymMatrix.h"
10#include "CLHEP/Matrix/Vector.h"
11#include <iosfwd>
12
13using CLHEP::Hep3Vector;
14using CLHEP::HepMatrix;
15using CLHEP::HepSymMatrix;
16class IfdKey;
17class TrkExchangePar;
18class TrkVolume;
19class TrkDifTraj;
20class TrkSimpTraj;
21namespace MdcPatRec {
22 class BField;
23}
24
25class TrkCompTrk : public TrkAbsFit, public DataObject {
26public:
27 // friend class TrkCompMaker;
28
29 //****************
30 // Global track quantities:
31 //****************
32 int charge() const;
33 double chisq() const;
34 int nDof() const;
35 const TrkDifTraj& traj() const;
36 const MdcPatRec::BField& bField() const { return *_bf; }
37
38 //****************
39 // Information about track at a given position (flight length)
40 //****************
41
42 HepPoint3D position( double fltL ) const;
43 Hep3Vector direction( double fltL ) const;
44 Hep3Vector momentum( double fltL = 0. ) const;
45 double pt( double fltL = 0. ) const;
46 BesPointErr positionErr( double fltL ) const;
47 BesVectorErr directionErr( double fltL ) const;
48 BesVectorErr momentumErr( double fltL ) const;
49
50 // maybe this isn't needed?
51 // TrkExchangePar helix(double fltL) const;
52
53 //****************
54 // Valid flight range
55 //****************
56 // validRange = trajectory's valid range = flight length range
57 // over which the track can be used.
58 double startValidRange() const;
59 double endValidRange() const;
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, HepSymMatrix& xxCov, HepSymMatrix& ppCov,
65 HepMatrix& xpCov ) const;
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;
81
82 virtual void getAllWeights( const HepPoint3D& pt, HepVector& pos, HepVector& mom,
83 HepSymMatrix& xxWeight, HepSymMatrix& ppWeight,
84 HepMatrix& xpWeight ) const;
85
86 //****************
87 // Printing
88 //****************
89 virtual void print( std::ostream& ) const;
90 virtual void printAll( std::ostream& ) const;
91
92 //****************
93 // Constructors and such
94 //****************
95 // Constructor from parameters
96 TrkCompTrk( const BesPointErr& pos, const BesVectorErr& mom, const HepMatrix& xpCov,
97 int charge, double chisq, int nDoF, const MdcPatRec::BField* bf );
98 // Copy constructor (leaves original unchanged):
99 TrkCompTrk( const TrkCompTrk& right );
100 // Destructor
101 virtual ~TrkCompTrk();
102 const TrkCompTrk& operator=( const TrkCompTrk& right );
103
104private:
105 std::auto_ptr<TrkSimpTraj> _traj;
106 const MdcPatRec::BField* _bf;
107 double _chisq;
108 int _charge;
109 int _nDof;
110};
111
112#endif
HepGeom::Point3D< double > HepPoint3D
double chisq() const
double endValidRange() const
const TrkCompTrk & operator=(const TrkCompTrk &right)
virtual void getAllWeights(const HepPoint3D &pt, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
virtual HepMatrix posmomCov(double fltL) const
double startValidRange() const
BesVectorErr momentumErr(double fltL) const
BesVectorErr directionErr(double fltL) const
virtual void printAll(std::ostream &) const
double pt(double fltL=0.) const
Hep3Vector direction(double fltL) const
virtual void getAllWeights(double fltL, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
Hep3Vector momentum(double fltL=0.) const
BesPointErr positionErr(double fltL) const
TrkCompTrk(const TrkCompTrk &right)
const TrkDifTraj & traj() const
virtual void getAllCovs(double fltL, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov) const
TrkCompTrk(const BesPointErr &pos, const BesVectorErr &mom, const HepMatrix &xpCov, int charge, double chisq, int nDoF, const MdcPatRec::BField *bf)
virtual void print(std::ostream &) const
virtual ~TrkCompTrk()
int charge() const
HepPoint3D position(double fltL) const
int nDof() const