BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/TrkBase/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
105 TrkCompTrk(const BesPointErr& pos,
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
**********INTEGER nmxhep !maximum number of particles DOUBLE PRECISION vhep INTEGER jdahep COMMON hepevt $ !serial number $ !number of particles $ !status code $ !particle ident KF $ !parent particles $ !childreen particles $ !four momentum
double chisq() const
Definition: TrkCompTrk.cxx:80
double endValidRange() const
Definition: TrkCompTrk.cxx:174
const TrkCompTrk & operator=(const TrkCompTrk &right)
Definition: TrkCompTrk.cxx:60
double startValidRange() const
Definition: TrkCompTrk.cxx:168
virtual ~TrkCompTrk()
Definition: TrkCompTrk.cxx:54
virtual HepMatrix posmomCov(double fltL) const
Definition: TrkCompTrk.cxx:209
BesVectorErr momentumErr(double fltL) const
Definition: TrkCompTrk.cxx:152
BesVectorErr directionErr(double fltL) const
Definition: TrkCompTrk.cxx:138
virtual void printAll(std::ostream &) const
virtual void getAllCovs(double fltL, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov) const
Definition: TrkCompTrk.cxx:215
double pt(double fltL=0.) const
Definition: TrkCompTrk.cxx:158
Hep3Vector direction(double fltL) const
Definition: TrkCompTrk.cxx:111
virtual void getAllWeights(double fltL, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
Definition: TrkCompTrk.cxx:225
BesPointErr positionErr(double fltL) const
Definition: TrkCompTrk.cxx:124
const TrkDifTraj & traj() const
Definition: TrkCompTrk.cxx:97
virtual void print(std::ostream &) const
int charge() const
Definition: TrkCompTrk.cxx:89
HepPoint3D position(double fltL) const
Definition: TrkCompTrk.cxx:104
int nDof() const
Definition: TrkCompTrk.cxx:73