BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkCompTrk.h
Go to the documentation of this file.
1#ifndef TRKCOMPTRK_HH
2#define TRKCOMPTRK_HH
3
4#include "TrkBase/TrkAbsFit.h"
5#include "GaudiKernel/DataObject.h"
6#include <memory>
7
8#include <iosfwd>
9#include "CLHEP/Matrix/Vector.h"
10#include "CLHEP/Matrix/Matrix.h"
11#include "CLHEP/Matrix/SymMatrix.h"
12
13using CLHEP::Hep3Vector;
14using CLHEP::HepMatrix;
15using CLHEP::HepSymMatrix;
16class IfdKey;
17class TrkExchangePar;
18class TrkVolume;
19class TrkDifTraj;
20class TrkSimpTraj;
21class BField;
22
23
24class TrkCompTrk : public TrkAbsFit,public DataObject {
25public:
26
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 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,
65 HepSymMatrix& xxCov,
66 HepSymMatrix& ppCov,
67 HepMatrix& xpCov) const;
68
69 // accessors to 2nd derivative of chi2 wrt x and p.
70 // x0 and p0 are filled with the pos and 3mom around which expansion
71 // takes place, whilst Weights are filled with the 2nd deriv of chi2.
72 // so that:
73 // dx=x-x0 dp=p-p0
74 //
75 // chi2(x,p)=0.5 dx^t*Wxx*dx + dx^t*Wxp*dp + 0.5 dp^t*Wpp*dp
76 // where:
77 // pos and mom are 3-dim Vectors,
78 // xxWeight ppWeight and xpWeight are 3 by 3 matrices
79 //
80 virtual void getAllWeights(double fltL,
81 HepVector& pos,
82 HepVector& mom,
83 HepSymMatrix& xxWeight,
84 HepSymMatrix& ppWeight,
85 HepMatrix& xpWeight)
86 const;
87
88 virtual void getAllWeights(const HepPoint3D& pt,
89 HepVector& pos,
90 HepVector& mom,
91 HepSymMatrix& xxWeight,
92 HepSymMatrix& ppWeight,
93 HepMatrix& xpWeight) const;
94
95//****************
96 // Printing
97 //****************
98 virtual void print(std::ostream& ) const;
99 virtual void printAll(std::ostream& ) const;
100
101 //****************
102 // Constructors and such
103 //****************
104 // Constructor from parameters
106 const BesVectorErr& mom,
107 const HepMatrix& xpCov,
108 int charge, double chisq, int nDoF, const BField*bf);
109 // Copy constructor (leaves original unchanged):
110 TrkCompTrk(const TrkCompTrk& right);
111 // Destructor
112 virtual ~TrkCompTrk();
113 const TrkCompTrk& operator=(const TrkCompTrk& right);
114
115private:
116 std::auto_ptr<TrkSimpTraj> _traj;
117 const BField* _bf;
118 double _chisq;
119 int _charge;
120 int _nDof;
121};
122
123#endif
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 BesPointErr &pos, const BesVectorErr &mom, const HepMatrix &xpCov, int charge, double chisq, int nDoF, const BField *bf)
TrkCompTrk(const TrkCompTrk &right)
const TrkDifTraj & traj() const
virtual void getAllCovs(double fltL, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov) const
virtual void print(std::ostream &) const
virtual ~TrkCompTrk()
int charge() const
HepPoint3D position(double fltL) const
int nDof() const