BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkCompTrk Class Reference

#include <TrkCompTrk.h>

Inheritance diagram for TrkCompTrk:

Public Member Functions

int charge () const
double chisq () const
int nDof () const
const TrkDifTrajtraj () const
const MdcPatRec::BFieldbField () const
HepPoint3D position (double fltL) const
Hep3Vector direction (double fltL) const
Hep3Vector momentum (double fltL=0.) const
double pt (double fltL=0.) const
BesPointErr positionErr (double fltL) const
BesVectorErr directionErr (double fltL) const
BesVectorErr momentumErr (double fltL) const
double startValidRange () const
double endValidRange () const
virtual HepMatrix posmomCov (double fltL) const
virtual void getAllCovs (double fltL, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov) const
virtual void getAllWeights (double fltL, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
virtual void getAllWeights (const HepPoint3D &pt, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
virtual void print (std::ostream &) const
virtual void printAll (std::ostream &) const
 TrkCompTrk (const BesPointErr &pos, const BesVectorErr &mom, const HepMatrix &xpCov, int charge, double chisq, int nDoF, const MdcPatRec::BField *bf)
 TrkCompTrk (const TrkCompTrk &right)
virtual ~TrkCompTrk ()
const TrkCompTrkoperator= (const TrkCompTrk &right)
int charge () const
double chisq () const
int nDof () const
const TrkDifTrajtraj () const
const MdcPatRec::BFieldbField () const
HepPoint3D position (double fltL) const
Hep3Vector direction (double fltL) const
Hep3Vector momentum (double fltL=0.) const
double pt (double fltL=0.) const
BesPointErr positionErr (double fltL) const
BesVectorErr directionErr (double fltL) const
BesVectorErr momentumErr (double fltL) const
double startValidRange () const
double endValidRange () const
virtual HepMatrix posmomCov (double fltL) const
virtual void getAllCovs (double fltL, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov) const
virtual void getAllWeights (double fltL, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
virtual void getAllWeights (const HepPoint3D &pt, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
virtual void print (std::ostream &) const
virtual void printAll (std::ostream &) const
 TrkCompTrk (const BesPointErr &pos, const BesVectorErr &mom, const HepMatrix &xpCov, int charge, double chisq, int nDoF, const MdcPatRec::BField *bf)
 TrkCompTrk (const TrkCompTrk &right)
virtual ~TrkCompTrk ()
const TrkCompTrkoperator= (const TrkCompTrk &right)
int charge () const
double chisq () const
int nDof () const
const TrkDifTrajtraj () const
const MdcPatRec::BFieldbField () const
HepPoint3D position (double fltL) const
Hep3Vector direction (double fltL) const
Hep3Vector momentum (double fltL=0.) const
double pt (double fltL=0.) const
BesPointErr positionErr (double fltL) const
BesVectorErr directionErr (double fltL) const
BesVectorErr momentumErr (double fltL) const
double startValidRange () const
double endValidRange () const
virtual HepMatrix posmomCov (double fltL) const
virtual void getAllCovs (double fltL, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov) const
virtual void getAllWeights (double fltL, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
virtual void getAllWeights (const HepPoint3D &pt, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
virtual void print (std::ostream &) const
virtual void printAll (std::ostream &) const
 TrkCompTrk (const BesPointErr &pos, const BesVectorErr &mom, const HepMatrix &xpCov, int charge, double chisq, int nDoF, const MdcPatRec::BField *bf)
 TrkCompTrk (const TrkCompTrk &right)
virtual ~TrkCompTrk ()
const TrkCompTrkoperator= (const TrkCompTrk &right)

Additional Inherited Members

Protected Member Functions inherited from TrkAbsFit
 TrkAbsFit ()
virtual ~TrkAbsFit ()
 TrkAbsFit ()
virtual ~TrkAbsFit ()
 TrkAbsFit ()
virtual ~TrkAbsFit ()

Detailed Description

Constructor & Destructor Documentation

◆ TrkCompTrk() [1/6]

TrkCompTrk::TrkCompTrk ( const BesPointErr & pos,
const BesVectorErr & mom,
const HepMatrix & xpCov,
int charge,
double chisq,
int nDoF,
const MdcPatRec::BField * bf )

Definition at line 30 of file TrkCompTrk.cxx.

33 : _chisq( chisq ), _nDof( nDof ) {
34 //---------------------------------------------------------------------------
35 _bf = bf;
36 _charge = charge;
37 if ( _charge != 0 )
38 {
39 TrkExchangePar par1 = TrkHelixUtils::helixFromMomErr( pos, mom, xpCov, charge, bField() );
40 _traj.reset( new HelixTraj( par1.params(), par1.covariance() ) );
41 }
42 else
43 {
44 _traj.reset(
45 new NeutTraj( TrkHelixUtils::lineFromMomErr( pos, mom, xpCov, 1, bField() ) ) );
46 }
47}
double chisq() const
int charge() const
int nDof() const
static NeutParams lineFromMomErr(const BesPointErr &vertex, const BesVectorErr &p, const HepMatrix &cxp, double sign, const BField &)
static TrkExchangePar helixFromMomErr(const BesPointErr &vertex, const BesVectorErr &p, const HepMatrix &cxp, double sign, const BField &)

Referenced by operator=(), printAll(), and TrkCompTrk().

◆ TrkCompTrk() [2/6]

TrkCompTrk::TrkCompTrk ( const TrkCompTrk & right)

Definition at line 51 of file TrkCompTrk.cxx.

52 : _bf( rhs._bf ), _chisq( rhs._chisq ), _nDof( rhs._nDof ) {
53 //---------------------------------------------
54 _traj.reset( (TrkSimpTraj*)rhs.traj().clone() );
55 _charge = rhs.charge();
56}

◆ ~TrkCompTrk() [1/3]

TrkCompTrk::~TrkCompTrk ( )
virtual

Definition at line 59 of file TrkCompTrk.cxx.

59 {
60 //----------------------------------------------------------------------
61}

◆ TrkCompTrk() [3/6]

TrkCompTrk::TrkCompTrk ( const BesPointErr & pos,
const BesVectorErr & mom,
const HepMatrix & xpCov,
int charge,
double chisq,
int nDoF,
const MdcPatRec::BField * bf )

◆ TrkCompTrk() [4/6]

TrkCompTrk::TrkCompTrk ( const TrkCompTrk & right)

◆ ~TrkCompTrk() [2/3]

virtual TrkCompTrk::~TrkCompTrk ( )
virtual

◆ TrkCompTrk() [5/6]

TrkCompTrk::TrkCompTrk ( const BesPointErr & pos,
const BesVectorErr & mom,
const HepMatrix & xpCov,
int charge,
double chisq,
int nDoF,
const MdcPatRec::BField * bf )

◆ TrkCompTrk() [6/6]

TrkCompTrk::TrkCompTrk ( const TrkCompTrk & right)

◆ ~TrkCompTrk() [3/3]

virtual TrkCompTrk::~TrkCompTrk ( )
virtual

Member Function Documentation

◆ bField() [1/3]

const MdcPatRec::BField & TrkCompTrk::bField ( ) const
inline

◆ bField() [2/3]

const MdcPatRec::BField & TrkCompTrk::bField ( ) const
inline

Definition at line 36 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkCompTrk.h.

36{ return *_bf; }

◆ bField() [3/3]

const MdcPatRec::BField & TrkCompTrk::bField ( ) const
inline

Definition at line 36 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkCompTrk.h.

36{ return *_bf; }

◆ charge() [1/3]

int TrkCompTrk::charge ( ) const
virtual

Implements TrkAbsFit.

Definition at line 88 of file TrkCompTrk.cxx.

88 {
89 //------------------------------------------------------------------------
90 return _charge;
91}

Referenced by operator=(), printAll(), TrkCompTrk(), and TrkCompTrk().

◆ charge() [2/3]

int TrkCompTrk::charge ( ) const
virtual

Implements TrkAbsFit.

◆ charge() [3/3]

int TrkCompTrk::charge ( ) const
virtual

Implements TrkAbsFit.

◆ chisq() [1/3]

double TrkCompTrk::chisq ( ) const
virtual

Implements TrkAbsFit.

Definition at line 82 of file TrkCompTrk.cxx.

82 {
83 //------------------------------------------------------------------------
84 return _chisq;
85}

Referenced by operator=(), printAll(), and TrkCompTrk().

◆ chisq() [2/3]

double TrkCompTrk::chisq ( ) const
virtual

Implements TrkAbsFit.

◆ chisq() [3/3]

double TrkCompTrk::chisq ( ) const
virtual

Implements TrkAbsFit.

◆ direction() [1/3]

Hep3Vector TrkCompTrk::direction ( double fltL) const
virtual

Implements TrkAbsFit.

Definition at line 106 of file TrkCompTrk.cxx.

106 {
107 //------------------------------------------------------------------------
108 return traj().direction( fltL );
109}
virtual Hep3Vector direction(double) const =0
const TrkDifTraj & traj() const

◆ direction() [2/3]

Hep3Vector TrkCompTrk::direction ( double fltL) const
virtual

Implements TrkAbsFit.

◆ direction() [3/3]

Hep3Vector TrkCompTrk::direction ( double fltL) const
virtual

Implements TrkAbsFit.

◆ directionErr() [1/3]

BesVectorErr TrkCompTrk::directionErr ( double fltL) const
virtual

Implements TrkAbsFit.

Definition at line 127 of file TrkCompTrk.cxx.

127 {
128 // If getDFInfo is split up, use faster version - done JEA 020300
129 DifPoint posD;
130 DifVector dirD;
131 traj().getDFInfo2( fltL, posD, dirD );
132 HepMatrix err = dirD.errorMatrix( dirD.x.indepPar()->covariance() );
133 BesError symErr( 3 );
134 symErr.assign( err );
135 Hep3Vector dir( dirD.x.number(), dirD.y.number(), dirD.z.number() );
136 return BesVectorErr( dir, symErr );
137}
HepSymMatrix errorMatrix(const HepSymMatrix &e) const
Definition DifVector.cxx:43
virtual void getDFInfo2(double fltLen, DifPoint &pos, DifVector &direction) const

◆ directionErr() [2/3]

BesVectorErr TrkCompTrk::directionErr ( double fltL) const
virtual

Implements TrkAbsFit.

◆ directionErr() [3/3]

BesVectorErr TrkCompTrk::directionErr ( double fltL) const
virtual

Implements TrkAbsFit.

◆ endValidRange() [1/3]

double TrkCompTrk::endValidRange ( ) const
virtual

Implements TrkAbsFit.

Definition at line 152 of file TrkCompTrk.cxx.

◆ endValidRange() [2/3]

double TrkCompTrk::endValidRange ( ) const
virtual

Implements TrkAbsFit.

◆ endValidRange() [3/3]

double TrkCompTrk::endValidRange ( ) const
virtual

Implements TrkAbsFit.

◆ getAllCovs() [1/3]

void TrkCompTrk::getAllCovs ( double fltL,
HepSymMatrix & xxCov,
HepSymMatrix & ppCov,
HepMatrix & xpCov ) const
virtual

Implements TrkAbsFit.

Definition at line 185 of file TrkCompTrk.cxx.

186 {
187 const BField& theField = bField();
188 TrkMomCalculator::getAllCovs( *_traj, theField, fltL, xxCov, ppCov, xpCov );
189}
static void getAllCovs(const TrkSimpTraj &, const MdcPatRec::BField &, double fltlen, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov)

◆ getAllCovs() [2/3]

virtual void TrkCompTrk::getAllCovs ( double fltL,
HepSymMatrix & xxCov,
HepSymMatrix & ppCov,
HepMatrix & xpCov ) const
virtual

Implements TrkAbsFit.

◆ getAllCovs() [3/3]

virtual void TrkCompTrk::getAllCovs ( double fltL,
HepSymMatrix & xxCov,
HepSymMatrix & ppCov,
HepMatrix & xpCov ) const
virtual

Implements TrkAbsFit.

◆ getAllWeights() [1/6]

void TrkCompTrk::getAllWeights ( const HepPoint3D & pt,
HepVector & pos,
HepVector & mom,
HepSymMatrix & xxWeight,
HepSymMatrix & ppWeight,
HepMatrix & xpWeight ) const
virtual

Definition at line 199 of file TrkCompTrk.cxx.

201 {
202 double fltL = 0;
203 TrkPoca poca( traj(), fltL, pt );
204 fltL = poca.flt1();
205 getAllWeights( fltL, pos, mom, xxWeight, ppWeight, xpWeight );
206}
double pt(double fltL=0.) const
virtual void getAllWeights(double fltL, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const

◆ getAllWeights() [2/6]

virtual void TrkCompTrk::getAllWeights ( const HepPoint3D & pt,
HepVector & pos,
HepVector & mom,
HepSymMatrix & xxWeight,
HepSymMatrix & ppWeight,
HepMatrix & xpWeight ) const
virtual

◆ getAllWeights() [3/6]

virtual void TrkCompTrk::getAllWeights ( const HepPoint3D & pt,
HepVector & pos,
HepVector & mom,
HepSymMatrix & xxWeight,
HepSymMatrix & ppWeight,
HepMatrix & xpWeight ) const
virtual

◆ getAllWeights() [4/6]

void TrkCompTrk::getAllWeights ( double fltL,
HepVector & pos,
HepVector & mom,
HepSymMatrix & xxWeight,
HepSymMatrix & ppWeight,
HepMatrix & xpWeight ) const
virtual

Implements TrkAbsFit.

Definition at line 191 of file TrkCompTrk.cxx.

193 {
194 const BField& theField = bField();
195 TrkMomCalculator::getAllWeights( *_traj, theField, fltL, pos, mom, xxWeight, ppWeight,
196 xpWeight );
197}
static void getAllWeights(const TrkSimpTraj &, const MdcPatRec::BField &, double fltlen, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight)

Referenced by getAllWeights().

◆ getAllWeights() [5/6]

virtual void TrkCompTrk::getAllWeights ( double fltL,
HepVector & pos,
HepVector & mom,
HepSymMatrix & xxWeight,
HepSymMatrix & ppWeight,
HepMatrix & xpWeight ) const
virtual

Implements TrkAbsFit.

◆ getAllWeights() [6/6]

virtual void TrkCompTrk::getAllWeights ( double fltL,
HepVector & pos,
HepVector & mom,
HepSymMatrix & xxWeight,
HepSymMatrix & ppWeight,
HepMatrix & xpWeight ) const
virtual

Implements TrkAbsFit.

◆ momentum() [1/3]

Hep3Vector TrkCompTrk::momentum ( double fltL = 0.) const
virtual

Implements TrkAbsFit.

Definition at line 111 of file TrkCompTrk.cxx.

111 {
112 return TrkMomCalculator::vecMom( *_traj, bField(), fltL );
113}
static Hep3Vector vecMom(const TrkSimpTraj &, const MdcPatRec::BField &, double fltlen)

◆ momentum() [2/3]

Hep3Vector TrkCompTrk::momentum ( double fltL = 0.) const
virtual

Implements TrkAbsFit.

◆ momentum() [3/3]

Hep3Vector TrkCompTrk::momentum ( double fltL = 0.) const
virtual

Implements TrkAbsFit.

◆ momentumErr() [1/3]

BesVectorErr TrkCompTrk::momentumErr ( double fltL) const
virtual

Implements TrkAbsFit.

Definition at line 139 of file TrkCompTrk.cxx.

139 {
140 return TrkMomCalculator::errMom( *_traj, bField(), fltL );
141}
static BesVectorErr errMom(const TrkSimpTraj &, const MdcPatRec::BField &, double fltlen)

◆ momentumErr() [2/3]

BesVectorErr TrkCompTrk::momentumErr ( double fltL) const
virtual

Implements TrkAbsFit.

◆ momentumErr() [3/3]

BesVectorErr TrkCompTrk::momentumErr ( double fltL) const
virtual

Implements TrkAbsFit.

◆ nDof() [1/3]

int TrkCompTrk::nDof ( ) const
virtual

Implements TrkAbsFit.

Definition at line 76 of file TrkCompTrk.cxx.

76 {
77 //------------------------------------------------------------------------
78 return _nDof;
79}

Referenced by operator=(), and TrkCompTrk().

◆ nDof() [2/3]

int TrkCompTrk::nDof ( ) const
virtual

Implements TrkAbsFit.

◆ nDof() [3/3]

int TrkCompTrk::nDof ( ) const
virtual

Implements TrkAbsFit.

◆ operator=() [1/3]

const TrkCompTrk & TrkCompTrk::operator= ( const TrkCompTrk & right)

Definition at line 64 of file TrkCompTrk.cxx.

64 {
65 //----------------------------------------------------------------------
66 if ( &right == this ) return *this;
67 _bf = right._bf;
68 _traj.reset( (TrkSimpTraj*)right.traj().clone() );
69 _chisq = right.chisq();
70 _nDof = right.nDof();
71 _charge = right.charge();
72 return *this;
73}
virtual Trajectory * clone() const =0

◆ operator=() [2/3]

const TrkCompTrk & TrkCompTrk::operator= ( const TrkCompTrk & right)

◆ operator=() [3/3]

const TrkCompTrk & TrkCompTrk::operator= ( const TrkCompTrk & right)

◆ position() [1/3]

HepPoint3D TrkCompTrk::position ( double fltL) const
virtual

Implements TrkAbsFit.

Definition at line 100 of file TrkCompTrk.cxx.

100 {
101 //------------------------------------------------------------------------
102 return traj().position( fltL );
103}
virtual HepPoint3D position(double) const =0

◆ position() [2/3]

HepPoint3D TrkCompTrk::position ( double fltL) const
virtual

Implements TrkAbsFit.

◆ position() [3/3]

HepPoint3D TrkCompTrk::position ( double fltL) const
virtual

Implements TrkAbsFit.

◆ positionErr() [1/3]

BesPointErr TrkCompTrk::positionErr ( double fltL) const
virtual

Implements TrkAbsFit.

Definition at line 115 of file TrkCompTrk.cxx.

115 {
116 // If getDFInfo is split up, use faster version - done JEA 020300
117 DifPoint posD;
118 DifVector dirD;
119 traj().getDFInfo2( fltL, posD, dirD );
120 HepMatrix err = posD.errorMatrix( posD.x.indepPar()->covariance() );
121 BesError symErr( 3 );
122 symErr.assign( err );
123 HepPoint3D point( posD.x.number(), posD.y.number(), posD.z.number() );
124 return BesPointErr( point, symErr );
125}
HepGeom::Point3D< double > HepPoint3D

◆ positionErr() [2/3]

BesPointErr TrkCompTrk::positionErr ( double fltL) const
virtual

Implements TrkAbsFit.

◆ positionErr() [3/3]

BesPointErr TrkCompTrk::positionErr ( double fltL) const
virtual

Implements TrkAbsFit.

◆ posmomCov() [1/3]

HepMatrix TrkCompTrk::posmomCov ( double fltL) const
virtual

Implements TrkAbsFit.

Definition at line 180 of file TrkCompTrk.cxx.

180 {
181 const BField& theField = bField();
182 return TrkMomCalculator::posmomCov( *_traj, theField, fltL );
183}
static HepMatrix posmomCov(const TrkSimpTraj &, const MdcPatRec::BField &, double fltlen)

◆ posmomCov() [2/3]

virtual HepMatrix TrkCompTrk::posmomCov ( double fltL) const
virtual

Implements TrkAbsFit.

◆ posmomCov() [3/3]

virtual HepMatrix TrkCompTrk::posmomCov ( double fltL) const
virtual

Implements TrkAbsFit.

◆ print() [1/3]

virtual void TrkCompTrk::print ( std::ostream & ) const
virtual

Implements TrkAbsFit.

◆ print() [2/3]

virtual void TrkCompTrk::print ( std::ostream & ) const
virtual

Implements TrkAbsFit.

◆ print() [3/3]

virtual void TrkCompTrk::print ( std::ostream & ) const
virtual

Implements TrkAbsFit.

◆ printAll() [1/3]

virtual void TrkCompTrk::printAll ( std::ostream & ) const
virtual

Implements TrkAbsFit.

◆ printAll() [2/3]

virtual void TrkCompTrk::printAll ( std::ostream & ) const
virtual

Implements TrkAbsFit.

◆ printAll() [3/3]

virtual void TrkCompTrk::printAll ( std::ostream & ) const
virtual

Implements TrkAbsFit.

◆ pt() [1/3]

double TrkCompTrk::pt ( double fltL = 0.) const
virtual

Implements TrkAbsFit.

Definition at line 143 of file TrkCompTrk.cxx.

143 {
144 return TrkMomCalculator::ptMom( *_traj, bField(), fltL );
145 // This could probably be made more efficient.
146 // Hep3Vector pVec = momentum(fltL);
147 // return sqrt( pVec.x() * pVec.x() + pVec.y() * pVec.y() );
148}
static double ptMom(const TrkSimpTraj &, const MdcPatRec::BField &, double fltlen)

Referenced by getAllWeights().

◆ pt() [2/3]

double TrkCompTrk::pt ( double fltL = 0.) const
virtual

Implements TrkAbsFit.

◆ pt() [3/3]

double TrkCompTrk::pt ( double fltL = 0.) const
virtual

Implements TrkAbsFit.

◆ startValidRange() [1/3]

double TrkCompTrk::startValidRange ( ) const
virtual

Implements TrkAbsFit.

Definition at line 150 of file TrkCompTrk.cxx.

◆ startValidRange() [2/3]

double TrkCompTrk::startValidRange ( ) const
virtual

Implements TrkAbsFit.

◆ startValidRange() [3/3]

double TrkCompTrk::startValidRange ( ) const
virtual

Implements TrkAbsFit.

◆ traj() [1/3]

const TrkDifTraj & TrkCompTrk::traj ( ) const
virtual

Implements TrkAbsFit.

Definition at line 94 of file TrkCompTrk.cxx.

94 {
95 //------------------------------------------------------------------------
96 return *_traj;
97}

Referenced by direction(), directionErr(), endValidRange(), getAllWeights(), operator=(), position(), positionErr(), startValidRange(), and TrkCompTrk().

◆ traj() [2/3]

const TrkDifTraj & TrkCompTrk::traj ( ) const
virtual

Implements TrkAbsFit.

◆ traj() [3/3]

const TrkDifTraj & TrkCompTrk::traj ( ) const
virtual

Implements TrkAbsFit.


The documentation for this class was generated from the following files: