TrkLineRep Class Reference

#include <TrkLineRep.h>

Inheritance diagram for TrkLineRep:

TrkSimpleRep TrkRep TrkFitStatus TrkFit TrkHitOnTrkUpdater TrkAbsFit List of all members.

Public Types

typedef std::unary_function<
TrkFitStatus, bool
predicate_type

Public Member Functions

 TrkLineRep (const TrkExchangePar &inPar, TrkRecoTrk *myTrack, PdtPid::PidType hypo, const TrkHotList *=0)
 TrkLineRep (const TrkExchangePar &inPar, TrkRecoTrk *myTrack, PdtPid::PidType hypo, int nAct, int nSvt, int nDch, double chi2, double startFoundRange, double endFoundRange)
virtual ~TrkLineRep ()
virtual TrkLineRepclone (TrkRecoTrk *newTrack) const
virtual TrkLineRepcloneNewHypo (PdtPid::PidType hypo)
virtual TrkDifTrajtraj ()
virtual const TrkDifTrajtraj () const
virtual TrkExchangePar helix (double fltLen) const
double arrivalTime (double fltLen) const
virtual void printAll (std::ostream &ostr) const
virtual void print (std::ostream &ostr) const
int nDof () const
double chisq () const
void setChisq (double c)
virtual int charge () const
virtual Hep3Vector momentum (double fltL=0.) const
virtual double pt (double fltL=0.) const
virtual BesVectorErr momentumErr (double fltL) 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 TrkErrCode fit ()
TrkHelixFitterfitter ()
bool operator== (const TrkRep &)
virtual ChisqConsistency chisqConsistency () const
virtual int nActive () const
virtual int nSvt () const
virtual int nMdc () const
virtual PdtPid::PidType particleType () const
TrkRecoTrkparentTrack ()
const TrkRecoTrkparentTrack () const
double startValidRange () const
double endValidRange () const
virtual double startFoundRange () const
virtual double endFoundRange () const
virtual const IfdKeymyKey () const
double trackT0 () const
virtual HepPoint3D position (double fltL) const
virtual Hep3Vector direction (double fltL) const
virtual BesPointErr positionErr (double fltL) const
virtual BesVectorErr directionErr (double fltL) const
virtual void addHot (TrkHitOnTrk *theHot)
virtual void removeHot (TrkHitOnTrk *theHot)
virtual void activateHot (TrkHitOnTrk *theHot)
virtual void deactivateHot (TrkHitOnTrk *theHot)
virtual TrkHotListhotList ()
virtual const TrkHotListhotList () const
virtual void updateHots ()
virtual bool resid (const TrkHitOnTrk *theHot, double &residual, double &residErr, bool exclude=false) const
bool hitCapable () const
bool is2d () const
bool fitCurrent () const
bool fitValid () const
bool multScat () const
std::ostreamprintStatus (std::ostream &os=std::cout) const
void setValid (bool v)
void setCurrent (bool c)
void set2d (bool d)
void setMultScat (bool m)
const TrkErrCodefitStatus () const
history_iterator beginHistory () const
history_iterator endHistory () const
history_riterator reverseBeginHistory () const
history_riterator reverseEndHistory () const
std::pair< history_iterator,
history_iterator
history () const
const std::vector< TrkHistory > & historyVector () const
virtual void addHistory (const TrkErrCode &status, const char *modulename)
template<class T>
void addHistory (T begin, T end)
template<class T>
void addHistory (std::pair< T, T > p)
std::ostreamprintHistory (std::ostream &os=std::cout) const
virtual bool validFlightLength (double fltL, double tolerance=0.0) const
void printType (std::ostream &ostr) const

Protected Member Functions

 TrkLineRep (const TrkLineRep &right, TrkRecoTrk *trk, PdtPid::PidType)
virtual TrkSimpTrajsimpTraj ()
virtual const TrkSimpTrajsimpTraj () const
const TrkContexttrkContext () const
TrkErrCode updateMeasurement (TrkHitOnTrk &hot, const TrkDifTraj *traj=0, bool maintainAmbiguity=false) const
TrkBase::Functors::updateMeasurement updateMeasurement (const TrkDifTraj *traj=0, bool maintainAmbiguity=false) const
void setActivity (TrkHitOnTrk &hot, bool active) const
void setParent (TrkHitOnTrk &hot, TrkRep *parent) const
TrkBase::Functors::setParent setParent (TrkRep *parent) const
TrkBase::Functors::setActive setActive (bool active) const

Protected Attributes

std::auto_ptr< TrkHotList_hotList

Private Member Functions

TrkLineRepoperator= (const TrkLineRep &right)

Private Attributes

TrkDifLineTraj _traj

Detailed Description

Definition at line 22 of file TrkLineRep.h.


Member Typedef Documentation

typedef std::unary_function<TrkFitStatus,bool> TrkFitStatus::predicate_type [inherited]

Definition at line 31 of file TrkFitStatus.h.


Constructor & Destructor Documentation

TrkLineRep::TrkLineRep ( const TrkExchangePar inPar,
TrkRecoTrk myTrack,
PdtPid::PidType  hypo,
const TrkHotList = 0 
)

Definition at line 21 of file TrkLineRep.cxx.

Referenced by clone(), and cloneNewHypo().

00024                                                  :
00025   TrkSimpleRep(inHots, trk, hypo),
00026   _traj(inPar)
00027   
00028 {
00029 }

TrkLineRep::TrkLineRep ( const TrkExchangePar inPar,
TrkRecoTrk myTrack,
PdtPid::PidType  hypo,
int  nAct,
int  nSvt,
int  nDch,
double  chi2,
double  startFoundRange,
double  endFoundRange 
)

Definition at line 32 of file TrkLineRep.cxx.

00034                                                              :
00035   TrkSimpleRep(trk, hypo, nact, nsv, ndc, chi2, stFndRng, endFndRng),
00036   _traj(inPar)
00037 {
00038 }

TrkLineRep::~TrkLineRep (  )  [virtual]

Definition at line 47 of file TrkLineRep.cxx.

00048 {
00049 }

TrkLineRep::TrkLineRep ( const TrkLineRep right,
TrkRecoTrk trk,
PdtPid::PidType   
) [protected]

Definition at line 41 of file TrkLineRep.cxx.

00042                                                :
00043   TrkSimpleRep(right, trk, hypo), _traj(right._traj)
00044 {
00045 }


Member Function Documentation

void TrkRep::activateHot ( TrkHitOnTrk theHot  )  [virtual, inherited]

Definition at line 154 of file TrkRep.cxx.

References TrkHitOnTrk::getParentRep(), TrkHitOnTrk::isActive(), TrkHitOnTrk::setActive(), and TrkFitStatus::setCurrent().

Referenced by TrkHitOnTrk::setActivity(), and TrkHitOnTrk::setUsability().

00155 {
00156   if(!hot->isActive()){
00157 // make sure this is my hot we're talking about
00158     if(this == hot->getParentRep()){
00159       setCurrent(false);
00160 // actually activate the hot; this is now the rep's job
00161       hot->setActive(true);
00162     }
00163   }
00164 }

template<class T>
void TrkFitStatus::addHistory ( std::pair< T, T >  p  )  [inline, inherited]

Definition at line 59 of file TrkFitStatus.h.

References TrkFitStatus::addHistory().

00059 { addHistory(p.first,p.second); }

template<class T>
void TrkFitStatus::addHistory ( begin,
end 
) [inline, inherited]

Definition at line 57 of file TrkFitStatus.h.

References TrkFitStatus::_history.

00057 { _history.insert(_history.end(),begin,end); }

void TrkFitStatus::addHistory ( const TrkErrCode status,
const char *  modulename 
) [virtual, inherited]

Definition at line 76 of file TrkFitStatus.cxx.

References TrkFitStatus::_history.

Referenced by TrkFitStatus::addHistory(), and MdcTrackList::finishCircle().

00078 {
00079 // append the module name to the error code message
00080   _history.push_back(TrkHistory(status,modulename));
00081 }

void TrkRep::addHot ( TrkHitOnTrk theHot  )  [virtual, inherited]

Definition at line 140 of file TrkRep.cxx.

References TrkHotList::append(), TrkRep::hotList(), TrkHitOnTrk::isActive(), and TrkFitStatus::setCurrent().

00141 {
00142   if (newHot->isActive()) setCurrent(false);
00143   hotList()->append(newHot);
00144 }

double TrkLineRep::arrivalTime ( double  fltLen  )  const [virtual]

Reimplemented from TrkRep.

Definition at line 143 of file TrkLineRep.cxx.

References Constants::c, Pdt::lookup(), PdtEntry::mass(), PdtPid::muon, and TrkRep::trackT0().

00144 {
00145   static double cinv = 1./Constants::c;
00146   double m_betainv=-9999.;
00147   // Initialize cache
00148   if (m_betainv < 0.0) {
00149     double mass2 = Pdt::lookup(PdtPid::muon)->mass();
00150     mass2 = mass2 * mass2;
00151     double ptot2 = 100.; //10GeV;
00152     //double ptot2 = momentum(0.).mag2();
00153     assert(ptot2 != 0.0);
00154     m_betainv = sqrt( (ptot2 +  mass2)/ ptot2);
00155   }
00156   double tof = fltL * m_betainv * cinv;
00157   return trackT0() + tof;
00158 }

history_iterator TrkFitStatus::beginHistory (  )  const [inline, inherited]

Definition at line 46 of file TrkFitStatus.h.

References TrkFitStatus::_history.

Referenced by TrkFitStatus::history().

00046 { return _history.begin(); }

int TrkSimpleRep::charge (  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 117 of file TrkSimpleRep.cxx.

References TrkRecoTrk::bField(), TrkMomCalculator::charge(), TrkRep::parentTrack(), and TrkSimpleRep::simpTraj().

00118 {
00119   const BField& theField = parentTrack()->bField();
00120   return TrkMomCalculator::charge(simpTraj(), theField, 0.);
00121 }

double TrkSimpleRep::chisq (  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 86 of file TrkSimpleRep.cxx.

References TrkSimpleRep::_chisq.

00087 {
00088   // Note possible inefficiency in calling virtual simpTraj(); implementation 
00089   //    could be moved to derived classes instead.  
00090   return _chisq;
00091   //  return simpTraj().parameters()->chisquared();
00092 }

ChisqConsistency TrkRep::chisqConsistency (  )  const [virtual, inherited]

Implements TrkFit.

Definition at line 363 of file TrkRep.cxx.

References TrkAbsFit::chisq(), TrkFitStatus::fitValid(), and TrkAbsFit::nDof().

00363                                {
00364   if(fitValid())
00365     return ChisqConsistency(chisq(),nDof());
00366   else
00367     return ChisqConsistency();
00368 }

TrkLineRep * TrkLineRep::clone ( TrkRecoTrk newTrack  )  const [virtual]

Implements TrkRep.

Definition at line 52 of file TrkLineRep.cxx.

References TrkFitStatus::fitCurrent(), TrkFitStatus::fitValid(), TrkFitStatus::setCurrent(), TrkFitStatus::setValid(), and TrkLineRep().

00053 {
00054   TrkLineRep* newRep = new TrkLineRep(*this, theTrack, this->particleType());
00055   newRep->setValid(fitValid());
00056   newRep->setCurrent(fitCurrent());
00057   return newRep;
00058 }

TrkLineRep * TrkLineRep::cloneNewHypo ( PdtPid::PidType  hypo  )  [virtual]

Implements TrkRep.

Definition at line 61 of file TrkLineRep.cxx.

References TrkFitStatus::fitCurrent(), TrkFitStatus::fitValid(), TrkRep::parentTrack(), TrkFitStatus::setCurrent(), TrkFitStatus::setValid(), and TrkLineRep().

00062 {
00063   TrkLineRep* newRep = new TrkLineRep(*this, parentTrack(), hypo);
00064   newRep->setValid(fitValid());
00065   newRep->setCurrent(fitCurrent());  // true for lines, anyway
00066   return newRep;
00067 }

void TrkRep::deactivateHot ( TrkHitOnTrk theHot  )  [virtual, inherited]

Definition at line 167 of file TrkRep.cxx.

References TrkHitOnTrk::getParentRep(), TrkHitOnTrk::isActive(), TrkHitOnTrk::setActive(), and TrkFitStatus::setCurrent().

Referenced by TrkHitOnTrk::setActivity(), and TrkHitOnTrk::setUsability().

00168 {
00169   if(hot->isActive()){
00170 // make sure this is my hot we're talking about
00171     if(this == hot->getParentRep()){
00172       setCurrent(false);
00173 // actually deactivate the hot; this is now the rep's job
00174       hot->setActive(false);
00175     }
00176   }
00177 }

Hep3Vector TrkRep::direction ( double  fltL  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 186 of file TrkRep.cxx.

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

00187 {
00188   return traj().direction(fltL);
00189 }

BesVectorErr TrkRep::directionErr ( double  fltL  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 272 of file TrkRep.cxx.

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

00273 {
00274   static DifPoint posD;
00275   static DifVector dirD;
00276   traj().getDFInfo2(fltL, posD, dirD);
00277   BesError symErr(3);
00278   symErr.assign( dirD.errorMatrix( dirD.x.indepPar()->covariance() ));
00279   Hep3Vector dir(dirD.x.number(), dirD.y.number(), dirD.z.number());
00280   return BesVectorErr(dir, symErr);
00281 }

double TrkRep::endFoundRange (  )  const [virtual, inherited]

Implements TrkFit.

Definition at line 302 of file TrkRep.cxx.

References TrkHotList::endFoundRange(), and TrkRep::hotList().

00303 {
00304   return hotList()->endFoundRange();
00305 }

history_iterator TrkFitStatus::endHistory (  )  const [inline, inherited]

Definition at line 47 of file TrkFitStatus.h.

References TrkFitStatus::_history.

Referenced by TrkFitStatus::history().

00047 { return _history.end(); }

double TrkRep::endValidRange (  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 290 of file TrkRep.cxx.

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

00291 {
00292   return traj().hiRange();
00293 }

TrkErrCode TrkSimpleRep::fit (  )  [virtual, inherited]

Implements TrkRep.

Definition at line 60 of file TrkSimpleRep.cxx.

References TrkSimpleRep::_fitter, ers::error, TrkErrCode::fail, TrkHelixFitter::fit(), TrkRep::hitCapable(), TrkRep::hotList(), TrkHelixFitter::lastChisq(), TrkSimpleRep::setChisq(), TrkFitStatus::setCurrent(), TrkFitStatus::setValid(), and TrkSimpleRep::simpTraj().

00061 {
00062   if (!hitCapable()) {
00063     setValid(false);
00064     return TrkErrCode(TrkErrCode::fail,100,
00065                       "Tried to fit without a list of hits.");
00066   }
00067   TrkErrCode error = _fitter.fit(*hotList(), simpTraj());
00068   if (error.failure()) {
00069     setValid(false);
00070   }
00071   else {
00072     setValid(true);
00073     setCurrent(true);
00074   }
00075   setChisq(_fitter.lastChisq());
00076   return error;
00077 }

bool TrkFitStatus::fitCurrent (  )  const [inline, inherited]

Definition at line 33 of file TrkFitStatus.h.

References TrkFitStatus::_fitCurrent.

Referenced by clone(), TrkHelixRep::clone(), TrkCircleRep::clone(), cloneNewHypo(), TrkHelixRep::cloneNewHypo(), and TrkCircleRep::cloneNewHypo().

00033 {return _fitCurrent;}

const TrkErrCode& TrkFitStatus::fitStatus (  )  const [inline, inherited]

Definition at line 43 of file TrkFitStatus.h.

References TrkFitStatus::_history.

00043 { return _history.back().status(); }

TrkHelixFitter& TrkSimpleRep::fitter (  )  [inline, inherited]

Definition at line 96 of file TrkSimpleRep.h.

References TrkSimpleRep::_fitter.

Referenced by TrkHelixMaker::addZValues().

00096 {return _fitter;}

bool TrkFitStatus::fitValid (  )  const [inline, inherited]

Definition at line 34 of file TrkFitStatus.h.

References TrkFitStatus::_fitValid.

Referenced by TrkRep::chisqConsistency(), clone(), TrkCircleRep::clone(), cloneNewHypo(), TrkHelixRep::cloneNewHypo(), TrkCircleRep::cloneNewHypo(), and TrkRecoTrk::fitResult().

00034 {return _fitValid;}

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

Implements TrkAbsFit.

Definition at line 144 of file TrkSimpleRep.cxx.

References TrkRecoTrk::bField(), TrkMomCalculator::getAllCovs(), TrkRep::parentTrack(), and TrkSimpleRep::simpTraj().

00148 {
00149   const BField& theField = parentTrack()->bField();
00150   TrkMomCalculator::getAllCovs(simpTraj(), theField, fltL,
00151                                xxCov,ppCov,xpCov);
00152 }

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

Definition at line 166 of file TrkSimpleRep.cxx.

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

00172 {
00173   double fltL=0;
00174   TrkPoca poca(traj(),fltL, pt);
00175   fltL = poca.flt1();
00176   getAllWeights(fltL,pos,mom,xxWeight,ppWeight,xpWeight);
00177 }

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

Implements TrkAbsFit.

Definition at line 154 of file TrkSimpleRep.cxx.

References TrkRecoTrk::bField(), TrkMomCalculator::getAllWeights(), TrkRep::parentTrack(), and TrkSimpleRep::simpTraj().

Referenced by TrkSimpleRep::getAllWeights().

00160 {
00161   const BField& theField = parentTrack()->bField();
00162   TrkMomCalculator::getAllWeights(simpTraj(), theField, fltL,
00163                                    pos,mom,xxWeight,ppWeight,xpWeight);
00164 }

TrkExchangePar TrkLineRep::helix ( double  fltLen  )  const [virtual]

Implements TrkFit.

Definition at line 70 of file TrkLineRep.cxx.

References _traj, TrkParams::covariance(), TrkDifLineTraj::d0(), TrkDifLineTraj::d0Ind, TrkExchangePar::ex_d0, TrkExchangePar::ex_phi0, TrkExchangePar::ex_tanDip, TrkExchangePar::ex_z0, TrkSimpTraj::parameters(), TrkDifLineTraj::phi0(), TrkDifLineTraj::phi0Ind, rad, TrkDifLineTraj::tanDip(), TrkDifLineTraj::tanDipInd, TrkDifLineTraj::z0(), and TrkDifLineTraj::z0Ind.

00071 {
00072   TrkExchangePar localPar(_traj.d0(), BesAngle(_traj.phi0()).rad(), 
00073                           0.0, _traj.z0(), _traj.tanDip());
00074   const HepSymMatrix& lineCov = _traj.parameters()->covariance();
00075   HepSymMatrix& theCov = localPar.covariance();
00076   int ex_d0        = TrkExchangePar::ex_d0 + 1;
00077   int ex_phi0      = TrkExchangePar::ex_phi0 + 1;
00078   int ex_z0        = TrkExchangePar::ex_z0 + 1;
00079   int ex_tD        = TrkExchangePar::ex_tanDip + 1;
00080 
00081   int ln_d0        = TrkDifLineTraj::d0Ind + 1;
00082   int ln_phi0      = TrkDifLineTraj::phi0Ind + 1;
00083   int ln_z0        = TrkDifLineTraj::z0Ind + 1;
00084   int ln_tD        = TrkDifLineTraj::tanDipInd +1;
00085 
00086   theCov(ex_d0, ex_d0) =     lineCov(ln_d0, ln_d0);
00087   theCov(ex_phi0, ex_d0) =   lineCov(ln_phi0, ln_d0);
00088   theCov(ex_phi0, ex_phi0) = lineCov(ln_phi0, ln_phi0);
00089   theCov(ex_z0, ex_d0) =     lineCov(ln_z0, ln_d0);
00090   theCov(ex_z0, ex_phi0) =   lineCov(ln_z0, ln_phi0);
00091   theCov(ex_z0, ex_z0) =     lineCov(ln_z0, ln_z0);
00092   theCov(ex_tD, ex_d0) =     lineCov(ln_tD, ln_d0);
00093   theCov(ex_tD, ex_phi0) =   lineCov(ln_tD, ln_phi0);
00094   theCov(ex_tD, ex_z0) =     lineCov(ln_tD, ln_z0);
00095   theCov(ex_tD, ex_tD) =     lineCov(ln_tD, ln_tD);
00096 
00097   return localPar;
00098 }

std::pair<history_iterator,history_iterator> TrkFitStatus::history (  )  const [inline, inherited]

Definition at line 50 of file TrkFitStatus.h.

References TrkFitStatus::beginHistory(), and TrkFitStatus::endHistory().

00050                                                              {
00051           return std::pair<history_iterator,history_iterator>(beginHistory(),endHistory());
00052   }

const std::vector<TrkHistory>& TrkFitStatus::historyVector (  )  const [inline, inherited]

Definition at line 53 of file TrkFitStatus.h.

References TrkFitStatus::_history.

00053 { return _history; }

bool TrkRep::hitCapable (  )  const [inline, inherited]

Definition at line 118 of file TrkRep.h.

References TrkHotList::hitCapable(), and TrkRep::hotList().

Referenced by TrkSimpleRep::fit().

00118 {return hotList()->hitCapable();}

virtual const TrkHotList* TrkRep::hotList (  )  const [inline, virtual, inherited]

Definition at line 110 of file TrkRep.h.

References TrkRep::_hotList.

00110 {return _hotList.get();}

virtual TrkHotList* TrkRep::hotList (  )  [inline, virtual, inherited]

Definition at line 109 of file TrkRep.h.

References TrkRep::_hotList.

Referenced by TrkRep::addHot(), TrkHelixMaker::addZValues(), TrkRecoTrk::changeDefault(), TrkRep::endFoundRange(), TrkSimpleRep::fit(), TrkHitList::fit(), TrkRep::hitCapable(), TrkHitList::hotList(), TrkRecoTrk::hots(), TrkRep::nActive(), TrkRep::nMdc(), TrkRep::nSvt(), TrkRep::removeHot(), TrkRep::startFoundRange(), TrkSimpleRep::TrkSimpleRep(), and TrkRep::updateHots().

00109 {return _hotList.get();}

bool TrkFitStatus::is2d (  )  const [inline, inherited]

Definition at line 32 of file TrkFitStatus.h.

References TrkFitStatus::_is2d.

Referenced by MdcTrackList::pickHits().

00032 {return _is2d;}

Hep3Vector TrkSimpleRep::momentum ( double  fltL = 0.  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 103 of file TrkSimpleRep.cxx.

References TrkRecoTrk::bField(), TrkRep::parentTrack(), TrkSimpleRep::simpTraj(), and TrkMomCalculator::vecMom().

00104 {
00105   const BField& theField = parentTrack()->bField();
00106   return TrkMomCalculator::vecMom(simpTraj(), theField, fltL);
00107 }

BesVectorErr TrkSimpleRep::momentumErr ( double  fltL  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 124 of file TrkSimpleRep.cxx.

References TrkRecoTrk::bField(), TrkMomCalculator::errMom(), TrkRep::parentTrack(), and TrkSimpleRep::simpTraj().

00125 {
00126   const BField& theField = parentTrack()->bField();
00127   return TrkMomCalculator::errMom(simpTraj(), theField, fltL);
00128 }

bool TrkFitStatus::multScat (  )  const [inline, inherited]

Definition at line 35 of file TrkFitStatus.h.

References TrkFitStatus::_multScat.

00035 {return _multScat;}      

const IfdKey & TrkRep::myKey (  )  const [virtual, inherited]

Reimplemented in TrkHelixRep.

Definition at line 314 of file TrkRep.cxx.

Referenced by TrkExtInterface::attach().

00315 {
00316   // This provides a default key (used to provide Rep-specific interfaces
00317   //   to TrkRecoTrk consumers).
00318   static IfdIntKey _theKey(0);
00319   return _theKey;
00320 }

int TrkRep::nActive (  )  const [virtual, inherited]

Implements TrkFit.

Definition at line 330 of file TrkRep.cxx.

References TrkRep::hotList(), and TrkHotList::nActive().

Referenced by TrkSimpleRep::nDof().

00331 {
00332   return hotList()->nActive();
00333 }

int TrkSimpleRep::nDof (  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 80 of file TrkSimpleRep.cxx.

References TrkRep::nActive(), DifIndepPar::nPar(), TrkSimpTraj::parameters(), and TrkSimpleRep::simpTraj().

00081 {
00082   return nActive() - simpTraj().parameters()->nPar();
00083 }

int TrkRep::nMdc (  )  const [virtual, inherited]

Implements TrkFit.

Definition at line 342 of file TrkRep.cxx.

References TrkRep::hotList(), and TrkHotList::nMdc().

00343 {
00344   return hotList()->nMdc();
00345 }

int TrkRep::nSvt (  )  const [virtual, inherited]

Implements TrkFit.

Definition at line 336 of file TrkRep.cxx.

References TrkRep::hotList(), and TrkHotList::nSvt().

00337 {
00338   return hotList()->nSvt();
00339 }

TrkLineRep& TrkLineRep::operator= ( const TrkLineRep right  )  [private]

bool TrkRep::operator== ( const TrkRep  )  [inherited]

Definition at line 134 of file TrkRep.cxx.

00135 {
00136   return (&rhs == this);
00137 }

const TrkRecoTrk* TrkRep::parentTrack (  )  const [inline, inherited]

Definition at line 83 of file TrkRep.h.

References TrkRep::_parentTrack.

00083 {return _parentTrack;}

TrkRecoTrk* TrkRep::parentTrack (  )  [inline, inherited]

Definition at line 82 of file TrkRep.h.

References TrkRep::_parentTrack.

Referenced by TrkSimpleRep::charge(), cloneNewHypo(), TrkHelixRep::cloneNewHypo(), TrkCircleRep::cloneNewHypo(), TrkSimpleRep::getAllCovs(), TrkSimpleRep::getAllWeights(), TrkHitOnTrk::getParentTrack(), TrkSimpleRep::momentum(), TrkSimpleRep::momentumErr(), TrkHitOnTrk::parentTrack(), TrkSimpleRep::posmomCov(), TrkSimpleRep::pt(), MdcHitOnTrack::timeAbsolute(), and TrkRep::trackT0().

00082 {return _parentTrack;}

PdtPid::PidType TrkRep::particleType (  )  const [virtual, inherited]

Implements TrkFit.

Definition at line 308 of file TrkRep.cxx.

References TrkRep::_partHypo.

Referenced by TrkRep::arrivalTime(), and TrkHitOnTrk::particleType().

00309 {
00310   return _partHypo;
00311 }

HepPoint3D TrkRep::position ( double  fltL  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 180 of file TrkRep.cxx.

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

Referenced by MdcHitOnTrack::wireAmbig().

00181 {
00182   return traj().position(fltL);
00183 }

BesPointErr TrkRep::positionErr ( double  fltL  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 214 of file TrkRep.cxx.

References TrkAbsFit::chisq(), cos(), DifIndepPar::covariance(), DifNumber::derivatives(), check_raw_filter::dist, showlog::err, DifVector::errorMatrix(), TrkDifTraj::getDFInfo2(), TrkFit::helix(), DifNumber::indepPar(), DifNumber::number(), TrkExchangePar::phi0(), phi0, sin(), TrkAbsFit::traj(), weight, DifVector::x, DifVector::y, and DifVector::z.

00215 {
00216   static DifPoint posD;
00217   static DifVector dirD;
00218   traj().getDFInfo2(fltL, posD, dirD);
00219   HepMatrix err = posD.errorMatrix( posD.x.indepPar()->covariance() );
00220   HepPoint3D point(posD.x.number(), posD.y.number(), posD.z.number());
00221   BesError symErr(3);
00222   symErr.assign(err);
00223 
00224   if (false) {
00225 #ifdef MDCPATREC_ROUTINE 
00226     cout<< "ErrMsg(routine) " << "Pos " 
00227             << err.num_row() << " " << err.num_col() << endl
00228             << "output:" << endl
00229       //    << err(1,1) << endl
00230       //    << err(2,1) << "  " << err(2,2) << endl
00231       //    << err(3,1) << "  " << err(3,2) << "  " << err(3,3) << endl
00232                     << "x deriv: " << endl
00233                     << posD.x.derivatives() << endl
00234                     << "y deriv: " << endl
00235                     << posD.y.derivatives() << endl
00236                     << endl;
00237 #endif
00238     //  }
00239 
00240     Hep3Vector pointDir(point.x(), point.y());
00241     double dirMag = pointDir.mag();
00242     double dist = 5.e-3;
00243     double delx = dist * point.x() / dirMag;
00244     double dely = dist * point.y() / dirMag;
00245     int ierr = 0;
00246     HepMatrix weight = err.inverse(ierr);
00247     double chisq =     weight(1,1) * delx * delx +
00248       2 * weight(2,1) * delx * dely +
00249       weight(2,2) * dely * dely;
00250 #ifdef MDCPATREC_DEBUG
00251     cout << point << endl;
00252     cout << symErr << endl;
00253     cout << "delta: " << delx << "  " << dely << endl;
00254     cout << "chisq: " << chisq << endl;
00255 #endif
00256     double phi0 = helix(fltL).phi0();
00257     delx = dist * cos(phi0);
00258     dely = dist * sin(phi0);
00259     chisq =            weight(1,1) * delx * delx +
00260                    2 * weight(2,1) * delx * dely +
00261                        weight(2,2) * dely * dely;
00262 #ifdef MDCPATREC_DEBUG
00263     cout << "delta: " << delx << "  " << dely << endl;
00264     cout << "chisq: " << chisq << endl;
00265     cout << endl << endl;
00266 #endif
00267   }
00268   return BesPointErr(point, symErr);
00269 }

HepMatrix TrkSimpleRep::posmomCov ( double  fltL  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 137 of file TrkSimpleRep.cxx.

References TrkRecoTrk::bField(), TrkRep::parentTrack(), TrkMomCalculator::posmomCov(), and TrkSimpleRep::simpTraj().

00138 {
00139   const BField& theField = parentTrack()->bField();
00140   return TrkMomCalculator::posmomCov(simpTraj(), theField, fltL);
00141 }

virtual void TrkLineRep::print ( std::ostream ostr  )  const [virtual]

Implements TrkAbsFit.

virtual void TrkLineRep::printAll ( std::ostream ostr  )  const [virtual]

Implements TrkAbsFit.

std::ostream& TrkFitStatus::printHistory ( std::ostream os = std::cout  )  const [inherited]

std::ostream& TrkFitStatus::printStatus ( std::ostream os = std::cout  )  const [inherited]

void TrkFit::printType ( std::ostream ostr  )  const [inherited]

double TrkSimpleRep::pt ( double  fltL = 0.  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 110 of file TrkSimpleRep.cxx.

References TrkRecoTrk::bField(), TrkRep::parentTrack(), TrkMomCalculator::ptMom(), and TrkSimpleRep::simpTraj().

00111 {
00112   const BField& theField = parentTrack()->bField();
00113   return TrkMomCalculator::ptMom(simpTraj(), theField, fltL);
00114 }

void TrkRep::removeHot ( TrkHitOnTrk theHot  )  [virtual, inherited]

Definition at line 147 of file TrkRep.cxx.

References TrkRep::hotList(), TrkHitOnTrk::isActive(), TrkHotList::remove(), and TrkFitStatus::setCurrent().

00148 {
00149   if(theHot->isActive()) setCurrent(false);     // fit no longer current
00150   hotList()->remove(theHot);
00151 }

bool TrkRep::resid ( const TrkHitOnTrk theHot,
double &  residual,
double &  residErr,
bool  exclude = false 
) const [virtual, inherited]

Reimplemented in TrkHelixRep.

Definition at line 348 of file TrkRep.cxx.

References TrkHitOnTrk::hasResidual(), TrkHitOnTrk::hitRms(), TrkHitOnTrk::parentRep(), and TrkHitOnTrk::residual().

Referenced by TrkHitOnTrk::resid().

00351 {
00352   assert (h != 0);
00353   if (h->parentRep() != this) return false;     // HOT must belong to Rep
00354   if (!h->hasResidual()) return false;          // Residual must be available
00355   if (exclude) return false;                    // FIXME: Can't do unbiased residuals (yet!)
00356 
00357   residual=h->residual();
00358   residErr=h->hitRms();
00359   return true;
00360 }

history_riterator TrkFitStatus::reverseBeginHistory (  )  const [inline, inherited]

Definition at line 48 of file TrkFitStatus.h.

References TrkFitStatus::_history.

00048 { return _history.rbegin(); }

history_riterator TrkFitStatus::reverseEndHistory (  )  const [inline, inherited]

Definition at line 49 of file TrkFitStatus.h.

References TrkFitStatus::_history.

00049 { return _history.rend(); }

void TrkFitStatus::set2d ( bool  d  )  [inline, inherited]

Definition at line 40 of file TrkFitStatus.h.

References TrkFitStatus::_is2d.

Referenced by TrkCircleRep::TrkCircleRep().

00040 { _is2d = d; };

TrkBase::Functors::setActive TrkHitOnTrkUpdater::setActive ( bool  active  )  const [inline, protected, inherited]

Definition at line 55 of file TrkHitOnTrkUpdater.h.

00056   { return TrkBase::Functors::setActive(active); }

void TrkHitOnTrkUpdater::setActivity ( TrkHitOnTrk hot,
bool  active 
) const [inline, protected, inherited]

Definition at line 44 of file TrkHitOnTrkUpdater.h.

References TrkHitOnTrk::setActive().

00044                                                        {
00045     hot.setActive(active); }

void TrkSimpleRep::setChisq ( double  c  )  [inherited]

Definition at line 95 of file TrkSimpleRep.cxx.

References TrkSimpleRep::_chisq.

Referenced by TrkHelixMaker::addZValues(), TrkSimpleRep::fit(), and TrkSimpleRep::TrkSimpleRep().

00096 {
00097   // See inefficiency comment above.
00098   //  simpTraj().parameters()->setChisquared(c);
00099   _chisq = c;
00100 }

void TrkFitStatus::setCurrent ( bool  c  )  [inline, inherited]

Definition at line 39 of file TrkFitStatus.h.

References TrkFitStatus::_fitCurrent.

Referenced by TrkRep::activateHot(), TrkRep::addHot(), TrkHelixMaker::addZValues(), clone(), TrkHelixRep::clone(), TrkCircleRep::clone(), cloneNewHypo(), TrkHelixRep::cloneNewHypo(), TrkCircleRep::cloneNewHypo(), TrkRep::deactivateHot(), TrkSimpleRep::fit(), TrkRep::removeHot(), TrkFitStatus::setValid(), and TrkRep::updateHots().

00039 { _fitCurrent = c; }

void TrkFitStatus::setMultScat ( bool  m  )  [inline, inherited]

Definition at line 41 of file TrkFitStatus.h.

References TrkFitStatus::_multScat.

00041 { _multScat = m; };

TrkBase::Functors::setParent TrkHitOnTrkUpdater::setParent ( TrkRep parent  )  const [inline, protected, inherited]

Definition at line 53 of file TrkHitOnTrkUpdater.h.

00054   { return TrkBase::Functors::setParent(parent); }

void TrkHitOnTrkUpdater::setParent ( TrkHitOnTrk hot,
TrkRep parent 
) const [inline, protected, inherited]

Definition at line 47 of file TrkHitOnTrkUpdater.h.

References TrkHitOnTrk::_parentRep.

Referenced by TrkRep::TrkRep().

00047                                                         {
00048     hot._parentRep = parent;
00049   }

void TrkFitStatus::setValid ( bool  v  )  [inherited]

Definition at line 57 of file TrkFitStatus.cxx.

References TrkFitStatus::_fitValid, and TrkFitStatus::setCurrent().

Referenced by TrkHelixMaker::addZValues(), clone(), TrkCircleRep::clone(), cloneNewHypo(), TrkHelixRep::cloneNewHypo(), TrkCircleRep::cloneNewHypo(), and TrkSimpleRep::fit().

00058 {
00059   _fitValid = v;
00060   if (!v) setCurrent(false);
00061 }

const TrkSimpTraj & TrkLineRep::simpTraj (  )  const [protected, virtual]

Implements TrkSimpleRep.

Definition at line 125 of file TrkLineRep.cxx.

References _traj.

00126 {
00127   return _traj;
00128 }

TrkSimpTraj & TrkLineRep::simpTraj (  )  [protected, virtual]

Implements TrkSimpleRep.

Definition at line 119 of file TrkLineRep.cxx.

References _traj.

00120 {
00121   return _traj;
00122 }

double TrkRep::startFoundRange (  )  const [virtual, inherited]

Implements TrkFit.

Definition at line 296 of file TrkRep.cxx.

References TrkRep::hotList(), and TrkHotList::startFoundRange().

00297 {
00298   return hotList()->startFoundRange();
00299 }

double TrkRep::startValidRange (  )  const [virtual, inherited]

Implements TrkAbsFit.

Definition at line 284 of file TrkRep.cxx.

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

00285 {
00286   return traj().lowRange();
00287 }

double TrkRep::trackT0 (  )  const [inherited]

Definition at line 208 of file TrkRep.cxx.

References TrkRep::parentTrack(), and TrkRecoTrk::trackT0().

Referenced by arrivalTime(), and TrkRep::arrivalTime().

00209 {
00210   return parentTrack()->trackT0();
00211 }

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

Implements TrkAbsFit.

Definition at line 137 of file TrkLineRep.cxx.

References _traj.

00138 {
00139   return _traj;
00140 }

TrkDifTraj & TrkLineRep::traj (  )  [virtual]

Definition at line 131 of file TrkLineRep.cxx.

References _traj.

00132 {
00133   return _traj;
00134 }

const TrkContext& TrkRep::trkContext (  )  const [protected, inherited]

void TrkRep::updateHots (  )  [virtual, inherited]

Definition at line 323 of file TrkRep.cxx.

References TrkRep::hotList(), TrkFitStatus::setCurrent(), and TrkHotList::updateHots().

Referenced by TrkRecoTrk::updateReps().

00324 {
00325   setCurrent(false);
00326   hotList()->updateHots();
00327 }

TrkBase::Functors::updateMeasurement TrkHitOnTrkUpdater::updateMeasurement ( const TrkDifTraj traj = 0,
bool  maintainAmbiguity = false 
) const [inline, protected, inherited]

Definition at line 51 of file TrkHitOnTrkUpdater.h.

00052   { return TrkBase::Functors::updateMeasurement(traj,maintainAmbiguity); }

TrkErrCode TrkHitOnTrkUpdater::updateMeasurement ( TrkHitOnTrk hot,
const TrkDifTraj traj = 0,
bool  maintainAmbiguity = false 
) const [inline, protected, inherited]

Definition at line 41 of file TrkHitOnTrkUpdater.h.

References TrkHitOnTrk::updateMeasurement().

Referenced by TrkHelixFitter::fit(), and TrkHotListFull::updateHots().

00042     { return hot.updateMeasurement(traj,maintainAmbiguity);}

bool TrkFit::validFlightLength ( double  fltL,
double  tolerance = 0.0 
) const [virtual, inherited]

Definition at line 38 of file TrkFit.cxx.

References TrkAbsFit::endValidRange(), and TrkAbsFit::startValidRange().

00038                                                             {
00039   return fltl+tolerance >= startValidRange() &&
00040     fltl-tolerance <= endValidRange();
00041 }


Member Data Documentation

std::auto_ptr<TrkHotList> TrkRep::_hotList [protected, inherited]

Definition at line 131 of file TrkRep.h.

Referenced by TrkRep::hotList(), TrkRep::operator=(), TrkRep::TrkRep(), and TrkSimpleRep::TrkSimpleRep().

TrkDifLineTraj TrkLineRep::_traj [private]

Definition at line 64 of file TrkLineRep.h.

Referenced by helix(), simpTraj(), and traj().


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