BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkSimpleRep Class Referenceabstract

#include <TrkSimpleRep.h>

+ Inheritance diagram for TrkSimpleRep:

Public Member Functions

 TrkSimpleRep (const TrkHotList *, TrkRecoTrk *, PdtPid::PidType)
 
 TrkSimpleRep (TrkRecoTrk *, PdtPid::PidType, int nActive, int nSvt, int nDch, double chi2, double startFoundRange, double endFoundRange)
 
 TrkSimpleRep (const TrkSimpleRep &right, TrkRecoTrk *trk, PdtPid::PidType)
 
virtual ~TrkSimpleRep ()
 
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 ()
 
- Public Member Functions inherited from TrkRep
 TrkRep (const TrkHotList &inHots, TrkRecoTrk *trk, PdtPid::PidType hypo)
 
 TrkRep (TrkHotList &inHots, TrkRecoTrk *trk, PdtPid::PidType hypo, bool stealHots=false)
 
 TrkRep (const TrkHotList *inHots, TrkRecoTrk *trk, PdtPid::PidType hypo)
 
 TrkRep (TrkHotList *inHots, TrkRecoTrk *trk, PdtPid::PidType hypo, bool takeownership=false)
 
 TrkRep (TrkRecoTrk *trk, PdtPid::PidType hypo, int nAct, int nSvt, int nMdc, double startFoundRange, double endFoundRange)
 
 TrkRep (TrkRecoTrk *trk, PdtPid::PidType hypo, bool createHotList=false)
 
 TrkRep (const TrkRep &oldRep, TrkRecoTrk *trk, PdtPid::PidType hypo)
 
virtual ~TrkRep ()
 
virtual TrkRepclone (TrkRecoTrk *newTrack) const =0
 
virtual TrkRepcloneNewHypo (PdtPid::PidType hypo)=0
 
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 double arrivalTime (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
 
virtual TrkErrCode fit ()=0
 
- Public Member Functions inherited from TrkFitStatus
bool is2d () const
 
bool fitCurrent () const
 
bool fitValid () const
 
bool multScat () const
 
std::ostream & printStatus (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::ostream & printHistory (std::ostream &os=std::cout) const
 
- Public Member Functions inherited from TrkFit
virtual ChisqConsistency chisqConsistency () const =0
 
virtual bool validFlightLength (double fltL, double tolerance=0.0) const
 
void printType (std::ostream &ostr) const
 
virtual int nActive () const =0
 
virtual int nSvt () const =0
 
virtual int nMdc () const =0
 
virtual PdtPid::PidType particleType () const =0
 
virtual TrkExchangePar helix (double fltL) const =0
 
virtual double arrivalTime (double fltL) const =0
 
virtual double startFoundRange () const =0
 
virtual double endFoundRange () const =0
 
- Public Member Functions inherited from TrkAbsFit
virtual int charge () const =0
 
virtual double chisq () const =0
 
virtual int nDof () const =0
 
virtual const TrkDifTrajtraj () const =0
 
virtual HepPoint3D position (double fltL) const =0
 
virtual Hep3Vector direction (double fltL) const =0
 
virtual Hep3Vector momentum (double fltL=0.) const =0
 
virtual double pt (double fltL=0.) const =0
 
virtual BesPointErr positionErr (double fltL) const =0
 
virtual BesVectorErr directionErr (double fltL) const =0
 
virtual BesVectorErr momentumErr (double fltL) const =0
 
virtual HepMatrix posmomCov (double fltL) const =0
 
virtual void getAllCovs (double fltL, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov) const =0
 
virtual void getAllWeights (double fltL, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const =0
 
virtual double startValidRange () const =0
 
virtual double endValidRange () const =0
 
virtual void printAll (std::ostream &ostr) const =0
 
virtual void print (std::ostream &ostr) const =0
 
- Public Member Functions inherited from TrkHitOnTrkUpdater
virtual ~TrkHitOnTrkUpdater ()=0
 

Protected Member Functions

TrkSimpleRepoperator= (const TrkSimpleRep &right)
 
virtual TrkSimpTrajsimpTraj ()=0
 
virtual const TrkSimpTrajsimpTraj () const =0
 
- Protected Member Functions inherited from TrkRep
TrkRepoperator= (const TrkRep &)
 
const TrkContexttrkContext () const
 
- Protected Member Functions inherited from TrkFitStatus
virtual ~TrkFitStatus ()
 
 TrkFitStatus ()
 
TrkFitStatusoperator= (const TrkFitStatus &)
 
 TrkFitStatus (const TrkFitStatus &)
 
- Protected Member Functions inherited from TrkFit
 TrkFit ()
 
virtual ~TrkFit ()
 
- Protected Member Functions inherited from TrkAbsFit
 TrkAbsFit ()
 
virtual ~TrkAbsFit ()
 
- Protected Member Functions inherited from TrkHitOnTrkUpdater
TrkErrCode updateMeasurement (TrkHitOnTrk &hot, const TrkDifTraj *traj=0, bool maintainAmbiguity=false) const
 
void setActivity (TrkHitOnTrk &hot, bool active) const
 
void setParent (TrkHitOnTrk &hot, TrkRep *parent) const
 
TrkBase::Functors::updateMeasurement updateMeasurement (const TrkDifTraj *traj=0, bool maintainAmbiguity=false) const
 
TrkBase::Functors::setParent setParent (TrkRep *parent) const
 
TrkBase::Functors::setActive setActive (bool active) const
 

Additional Inherited Members

- Public Types inherited from TrkFitStatus
typedef std::unary_function< TrkFitStatus, boolpredicate_type
 
- Protected Attributes inherited from TrkRep
std::auto_ptr< TrkHotList_hotList
 

Detailed Description

Definition at line 32 of file TrkSimpleRep.h.

Constructor & Destructor Documentation

◆ TrkSimpleRep() [1/3]

TrkSimpleRep::TrkSimpleRep ( const TrkHotList inHots,
TrkRecoTrk trk,
PdtPid::PidType  hypo 
)

Definition at line 24 of file TrkSimpleRep.cxx.

25 :
26 TrkRep(inHots, trk, hypo)
27{
28 setChisq(-1.);
29}
Definition: TrkRep.h:43
void setChisq(double c)

◆ TrkSimpleRep() [2/3]

TrkSimpleRep::TrkSimpleRep ( TrkRecoTrk trk,
PdtPid::PidType  hypo,
int  nActive,
int  nSvt,
int  nDch,
double  chi2,
double  startFoundRange,
double  endFoundRange 
)

Definition at line 31 of file TrkSimpleRep.cxx.

33 :
34 TrkRep(trk, hypo, nact, nsv, ndc, stFndRng, endFndRng)
35{
36 setChisq(chi2);
37}

◆ TrkSimpleRep() [3/3]

TrkSimpleRep::TrkSimpleRep ( const TrkSimpleRep right,
TrkRecoTrk trk,
PdtPid::PidType  hypo 
)

Definition at line 40 of file TrkSimpleRep.cxx.

41 :
42 TrkRep(right, trk, hypo), _fitter(right._fitter), _chisq(right._chisq)
43{
44 _hotList.reset( right.hotList()->clone(this) );
45}
virtual TrkHotList * clone(TrkBase::Functors::cloneHot) const =0
std::auto_ptr< TrkHotList > _hotList
Definition: TrkRep.h:131
virtual TrkHotList * hotList()
Definition: TrkRep.h:109

◆ ~TrkSimpleRep()

TrkSimpleRep::~TrkSimpleRep ( )
virtual

Definition at line 47 of file TrkSimpleRep.cxx.

48{
49}

Member Function Documentation

◆ charge()

int TrkSimpleRep::charge ( ) const
virtual

Implements TrkAbsFit.

Definition at line 117 of file TrkSimpleRep.cxx.

118{
119 const BField& theField = parentTrack()->bField();
120 return TrkMomCalculator::charge(simpTraj(), theField, 0.);
121}
static int charge(const TrkSimpTraj &, const BField &, double fltlen)
const BField & bField() const
Definition: TrkRecoTrk.h:82
TrkRecoTrk * parentTrack()
Definition: TrkRep.h:82
virtual TrkSimpTraj & simpTraj()=0

Referenced by TrkCircleRep::print(), and TrkHelixRep::print().

◆ chisq()

double TrkSimpleRep::chisq ( ) const
virtual

Implements TrkAbsFit.

Definition at line 86 of file TrkSimpleRep.cxx.

87{
88 // Note possible inefficiency in calling virtual simpTraj(); implementation
89 // could be moved to derived classes instead.
90 return _chisq;
91 // return simpTraj().parameters()->chisquared();
92}

◆ fit()

TrkErrCode TrkSimpleRep::fit ( )
virtual

Implements TrkRep.

Definition at line 60 of file TrkSimpleRep.cxx.

61{
62 if (!hitCapable()) {
63 setValid(false);
65 "Tried to fit without a list of hits.");
66 }
67 TrkErrCode error = _fitter.fit(*hotList(), simpTraj());
68 if (error.failure()) {
69 setValid(false);
70 }
71 else {
72 setValid(true);
73 setCurrent(true);
74 }
75 setChisq(_fitter.lastChisq());
76 return error;
77}
void setValid(bool v)
void setCurrent(bool c)
Definition: TrkFitStatus.h:39
double lastChisq() const
TrkErrCode fit(TrkHotList &hitList, TrkSimpTraj &)
bool hitCapable() const
Definition: TrkRep.h:118
@ error
Definition: Core.h:24

◆ fitter()

TrkHelixFitter & TrkSimpleRep::fitter ( )
inline

Definition at line 96 of file TrkSimpleRep.h.

96{return _fitter;}

Referenced by TrkHelixMaker::addZValues().

◆ getAllCovs()

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

Implements TrkAbsFit.

Definition at line 144 of file TrkSimpleRep.cxx.

148{
149 const BField& theField = parentTrack()->bField();
150 TrkMomCalculator::getAllCovs(simpTraj(), theField, fltL,
151 xxCov,ppCov,xpCov);
152}
static void getAllCovs(const TrkSimpTraj &, const BField &, double fltlen, HepSymMatrix &xxCov, HepSymMatrix &ppCov, HepMatrix &xpCov)

◆ getAllWeights() [1/2]

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

Definition at line 166 of file TrkSimpleRep.cxx.

172{
173 double fltL=0;
174 TrkPoca poca(traj(),fltL, pt);
175 fltL = poca.flt1();
176 getAllWeights(fltL,pos,mom,xxWeight,ppWeight,xpWeight);
177}
virtual const TrkDifTraj & traj() const =0
virtual void getAllWeights(double fltL, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight) const
virtual double pt(double fltL=0.) const

◆ getAllWeights() [2/2]

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

Implements TrkAbsFit.

Definition at line 154 of file TrkSimpleRep.cxx.

160{
161 const BField& theField = parentTrack()->bField();
163 pos,mom,xxWeight,ppWeight,xpWeight);
164}
static void getAllWeights(const TrkSimpTraj &, const BField &, double fltlen, HepVector &pos, HepVector &mom, HepSymMatrix &xxWeight, HepSymMatrix &ppWeight, HepMatrix &xpWeight)

Referenced by getAllWeights().

◆ momentum()

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

Implements TrkAbsFit.

Definition at line 103 of file TrkSimpleRep.cxx.

104{
105 const BField& theField = parentTrack()->bField();
106 return TrkMomCalculator::vecMom(simpTraj(), theField, fltL);
107}
static Hep3Vector vecMom(const TrkSimpTraj &, const BField &, double fltlen)

◆ momentumErr()

BesVectorErr TrkSimpleRep::momentumErr ( double  fltL) const
virtual

Implements TrkAbsFit.

Definition at line 124 of file TrkSimpleRep.cxx.

125{
126 const BField& theField = parentTrack()->bField();
127 return TrkMomCalculator::errMom(simpTraj(), theField, fltL);
128}
static BesVectorErr errMom(const TrkSimpTraj &, const BField &, double fltlen)

◆ nDof()

int TrkSimpleRep::nDof ( ) const
virtual

Implements TrkAbsFit.

Definition at line 80 of file TrkSimpleRep.cxx.

81{
82 return nActive() - simpTraj().parameters()->nPar();
83}
int nPar() const
Definition: DifIndepPar.h:55
virtual int nActive() const
Definition: TrkRep.cxx:330
TrkParams * parameters()
Definition: TrkSimpTraj.h:80

◆ operator=()

TrkSimpleRep & TrkSimpleRep::operator= ( const TrkSimpleRep right)
protected

Definition at line 52 of file TrkSimpleRep.cxx.

53{
54 _chisq = right._chisq;
55 TrkRep::operator=(right);
56 return *this;
57}
TrkRep & operator=(const TrkRep &)
Definition: TrkRep.cxx:111

◆ posmomCov()

HepMatrix TrkSimpleRep::posmomCov ( double  fltL) const
virtual

Implements TrkAbsFit.

Definition at line 137 of file TrkSimpleRep.cxx.

138{
139 const BField& theField = parentTrack()->bField();
140 return TrkMomCalculator::posmomCov(simpTraj(), theField, fltL);
141}
static HepMatrix posmomCov(const TrkSimpTraj &, const BField &, double fltlen)

◆ pt()

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

Implements TrkAbsFit.

Definition at line 110 of file TrkSimpleRep.cxx.

111{
112 const BField& theField = parentTrack()->bField();
113 return TrkMomCalculator::ptMom(simpTraj(), theField, fltL);
114}
static double ptMom(const TrkSimpTraj &, const BField &, double fltlen)

Referenced by getAllWeights(), TrkCircleRep::print(), and TrkHelixRep::print().

◆ setChisq()

void TrkSimpleRep::setChisq ( double  c)

Definition at line 95 of file TrkSimpleRep.cxx.

96{
97 // See inefficiency comment above.
98 // simpTraj().parameters()->setChisquared(c);
99 _chisq = c;
100}

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

◆ simpTraj() [1/2]

virtual const TrkSimpTraj & TrkSimpleRep::simpTraj ( ) const
protectedpure virtual

Implemented in TrkCircleRep, TrkHelixRep, and TrkLineRep.

◆ simpTraj() [2/2]

virtual TrkSimpTraj & TrkSimpleRep::simpTraj ( )
protectedpure virtual

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