TrkCompTrk Class Reference

#include <TrkCompTrk.h>

Inheritance diagram for TrkCompTrk:

TrkAbsFit List of all members.

Public Member Functions

int charge () const
double chisq () const
int nDof () const
const TrkDifTrajtraj () const
const 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 BField *bf)
 TrkCompTrk (const TrkCompTrk &right)
virtual ~TrkCompTrk ()
const TrkCompTrkoperator= (const TrkCompTrk &right)

Private Attributes

std::auto_ptr< TrkSimpTraj_traj
const BField_bf
double _chisq
int _charge
int _nDof

Detailed Description

Definition at line 24 of file TrkCompTrk.h.


Constructor & Destructor Documentation

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

Definition at line 28 of file TrkCompTrk.cxx.

References _bf, _charge, _traj, bField(), TrkExchangePar::covariance(), TrkHelixUtils::helixFromMomErr(), TrkHelixUtils::lineFromMomErr(), TrkExchangePar::params(), and boss::pos.

00031                                                                              :
00032   _chisq(chisq),_nDof(nDof) {
00033 //---------------------------------------------------------------------------
00034   _bf = bf;
00035   _charge=charge;
00036   if(_charge!=0) {
00037     TrkExchangePar par1 = TrkHelixUtils::helixFromMomErr(pos,mom,xpCov,charge,bField());
00038     _traj.reset( new HelixTraj(par1.params(), par1.covariance()) );
00039   }
00040   else {
00041     _traj.reset( new NeutTraj(TrkHelixUtils::lineFromMomErr(pos,mom,xpCov,1,bField())) );
00042   }
00043 }

TrkCompTrk::TrkCompTrk ( const TrkCompTrk right  ) 

Definition at line 47 of file TrkCompTrk.cxx.

References _charge, _traj, charge(), Trajectory::clone(), and traj().

00047                                             : _bf(rhs._bf),_chisq(rhs._chisq),_nDof(rhs._nDof) {
00048 //---------------------------------------------
00049   _traj.reset((TrkSimpTraj*)rhs.traj().clone());
00050   _charge=rhs.charge();
00051 }

TrkCompTrk::~TrkCompTrk (  )  [virtual]

Definition at line 54 of file TrkCompTrk.cxx.

00054                         {
00055 //----------------------------------------------------------------------
00056 }


Member Function Documentation

const BField& TrkCompTrk::bField (  )  const [inline]

Definition at line 36 of file TrkCompTrk.h.

References _bf.

Referenced by getAllCovs(), getAllWeights(), momentum(), momentumErr(), posmomCov(), pt(), and TrkCompTrk().

00036 {return *_bf;}

int TrkCompTrk::charge (  )  const [virtual]

Implements TrkAbsFit.

Definition at line 89 of file TrkCompTrk.cxx.

References _charge.

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

00089                          {
00090 //------------------------------------------------------------------------
00091   return _charge;
00092 }

double TrkCompTrk::chisq (  )  const [virtual]

Implements TrkAbsFit.

Definition at line 80 of file TrkCompTrk.cxx.

References _chisq.

Referenced by operator=().

00080                         {
00081 //------------------------------------------------------------------------
00082   return _chisq;
00083 }

Hep3Vector TrkCompTrk::direction ( double  fltL  )  const [virtual]

Implements TrkAbsFit.

Definition at line 111 of file TrkCompTrk.cxx.

References Trajectory::direction(), and traj().

00111                                        {
00112 //------------------------------------------------------------------------
00113   return traj().direction(fltL);
00114 }

BesVectorErr TrkCompTrk::directionErr ( double  fltL  )  const [virtual]

Implements TrkAbsFit.

Definition at line 138 of file TrkCompTrk.cxx.

References DifIndepPar::covariance(), showlog::err, DifVector::errorMatrix(), TrkDifTraj::getDFInfo2(), DifNumber::indepPar(), DifNumber::number(), traj(), DifVector::x, DifVector::y, and DifVector::z.

00139 {
00140   // If getDFInfo is split up, use faster version - done JEA 020300
00141   DifPoint posD;
00142   DifVector dirD;
00143   traj().getDFInfo2(fltL, posD, dirD);
00144   HepMatrix err = dirD.errorMatrix( dirD.x.indepPar()->covariance() );
00145   BesError symErr(3);
00146   symErr.assign(err);
00147   Hep3Vector dir(dirD.x.number(), dirD.y.number(), dirD.z.number());
00148   return BesVectorErr(dir, symErr);
00149 }

double TrkCompTrk::endValidRange (  )  const [virtual]

Implements TrkAbsFit.

Definition at line 174 of file TrkCompTrk.cxx.

References Trajectory::hiRange(), and traj().

00175 {
00176  return traj().hiRange();
00177 }

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

Implements TrkAbsFit.

Definition at line 215 of file TrkCompTrk.cxx.

References _traj, bField(), and TrkMomCalculator::getAllCovs().

00219 {
00220   const BField& theField = bField();
00221   TrkMomCalculator::getAllCovs(*_traj, theField, fltL,
00222                                xxCov,ppCov,xpCov);
00223 }

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

Definition at line 239 of file TrkCompTrk.cxx.

References TrkPocaBase::flt1(), getAllWeights(), and traj().

00245 {
00246   double fltL=0;
00247   TrkPoca poca(traj(),fltL, pt);
00248   fltL = poca.flt1();
00249   getAllWeights(fltL,pos,mom,xxWeight,ppWeight,xpWeight);
00250 }

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

Implements TrkAbsFit.

Definition at line 225 of file TrkCompTrk.cxx.

References _traj, bField(), and TrkMomCalculator::getAllWeights().

Referenced by getAllWeights().

00231 {
00232   const BField& theField = bField();
00233   TrkMomCalculator::getAllWeights(*_traj, theField, fltL,
00234                                   pos,mom,xxWeight,ppWeight,xpWeight);
00235 
00236 }

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

Implements TrkAbsFit.

Definition at line 117 of file TrkCompTrk.cxx.

References _traj, bField(), and TrkMomCalculator::vecMom().

00118 {
00119   return TrkMomCalculator::vecMom(*_traj, bField(), fltL);
00120 
00121 }

BesVectorErr TrkCompTrk::momentumErr ( double  fltL  )  const [virtual]

Implements TrkAbsFit.

Definition at line 152 of file TrkCompTrk.cxx.

References _traj, bField(), and TrkMomCalculator::errMom().

00153 {
00154   return TrkMomCalculator::errMom(*_traj, bField(), fltL);
00155 }

int TrkCompTrk::nDof (  )  const [virtual]

Implements TrkAbsFit.

Definition at line 73 of file TrkCompTrk.cxx.

References _nDof.

Referenced by operator=().

00073                        {
00074 //------------------------------------------------------------------------
00075   return _nDof;
00076 }

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

Definition at line 60 of file TrkCompTrk.cxx.

References _bf, _charge, _chisq, _nDof, _traj, charge(), chisq(), Trajectory::clone(), nDof(), and traj().

00060                                              {
00061 //----------------------------------------------------------------------
00062   if (&right == this) return *this;
00063   _bf = right._bf;
00064   _traj.reset((TrkSimpTraj*)right.traj().clone());
00065   _chisq=right.chisq();
00066   _nDof=right.nDof();
00067   _charge=right.charge();
00068   return *this;
00069 }

HepPoint3D TrkCompTrk::position ( double  fltL  )  const [virtual]

Implements TrkAbsFit.

Definition at line 104 of file TrkCompTrk.cxx.

References Trajectory::position(), and traj().

00104                                        {
00105 //------------------------------------------------------------------------
00106   return traj().position(fltL);
00107 }

BesPointErr TrkCompTrk::positionErr ( double  fltL  )  const [virtual]

Implements TrkAbsFit.

Definition at line 124 of file TrkCompTrk.cxx.

References DifIndepPar::covariance(), showlog::err, DifVector::errorMatrix(), TrkDifTraj::getDFInfo2(), DifNumber::indepPar(), DifNumber::number(), traj(), DifVector::x, DifVector::y, and DifVector::z.

00125 {
00126   // If getDFInfo is split up, use faster version - done JEA 020300
00127   DifPoint posD;
00128   DifVector dirD;
00129   traj().getDFInfo2(fltL, posD, dirD);
00130   HepMatrix err = posD.errorMatrix( posD.x.indepPar()->covariance() );
00131   BesError symErr(3);
00132   symErr.assign(err);
00133   HepPoint3D point(posD.x.number(), posD.y.number(), posD.z.number());
00134   return BesPointErr(point, symErr);
00135 }

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

Implements TrkAbsFit.

Definition at line 209 of file TrkCompTrk.cxx.

References _traj, bField(), and TrkMomCalculator::posmomCov().

00210 {
00211   const BField& theField = bField();
00212   return TrkMomCalculator::posmomCov(*_traj, theField, fltL);
00213 }

virtual void TrkCompTrk::print ( std::ostream  )  const [virtual]

Implements TrkAbsFit.

virtual void TrkCompTrk::printAll ( std::ostream  )  const [virtual]

Implements TrkAbsFit.

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

Implements TrkAbsFit.

Definition at line 158 of file TrkCompTrk.cxx.

References _traj, bField(), and TrkMomCalculator::ptMom().

00159 {
00160   return TrkMomCalculator::ptMom(*_traj, bField(), fltL);
00161   // This could probably be made more efficient.
00162 //  Hep3Vector pVec = momentum(fltL);
00163 //  return sqrt( pVec.x() * pVec.x() + pVec.y() * pVec.y() );
00164 }

double TrkCompTrk::startValidRange (  )  const [virtual]

Implements TrkAbsFit.

Definition at line 168 of file TrkCompTrk.cxx.

References Trajectory::lowRange(), and traj().

00169 {
00170   return traj().lowRange();
00171 }

const TrkDifTraj & TrkCompTrk::traj (  )  const [virtual]

Implements TrkAbsFit.

Definition at line 97 of file TrkCompTrk.cxx.

References _traj.

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

00097                        {
00098 //------------------------------------------------------------------------
00099   return *_traj;
00100 }


Member Data Documentation

const BField* TrkCompTrk::_bf [private]

Definition at line 117 of file TrkCompTrk.h.

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

int TrkCompTrk::_charge [private]

Definition at line 119 of file TrkCompTrk.h.

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

double TrkCompTrk::_chisq [private]

Definition at line 118 of file TrkCompTrk.h.

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

int TrkCompTrk::_nDof [private]

Definition at line 120 of file TrkCompTrk.h.

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

std::auto_ptr<TrkSimpTraj> TrkCompTrk::_traj [private]

Definition at line 116 of file TrkCompTrk.h.

Referenced by getAllCovs(), getAllWeights(), momentum(), momentumErr(), operator=(), posmomCov(), pt(), traj(), and TrkCompTrk().


Generated on Tue Nov 29 23:36:13 2016 for BOSS_7.0.2 by  doxygen 1.4.7