BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkLineRep Class Reference

#include <TrkLineRep.h>

+ Inheritance diagram for TrkLineRep:

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
 
- Public Member Functions inherited from TrkSimpleRep
 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
 
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

 TrkLineRep (const TrkLineRep &right, TrkRecoTrk *trk, PdtPid::PidType)
 
virtual TrkSimpTrajsimpTraj ()
 
virtual const TrkSimpTrajsimpTraj () const
 
- Protected Member Functions inherited from TrkSimpleRep
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 22 of file TrkLineRep.h.

Constructor & Destructor Documentation

◆ TrkLineRep() [1/3]

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

Definition at line 21 of file TrkLineRep.cxx.

24 :
25 TrkSimpleRep(inHots, trk, hypo),
26 _traj(inPar)
27
28{
29}

◆ TrkLineRep() [2/3]

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.

34 :
35 TrkSimpleRep(trk, hypo, nact, nsv, ndc, chi2, stFndRng, endFndRng),
36 _traj(inPar)
37{
38}

◆ ~TrkLineRep()

TrkLineRep::~TrkLineRep ( )
virtual

Definition at line 47 of file TrkLineRep.cxx.

48{
49}

◆ TrkLineRep() [3/3]

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

Definition at line 41 of file TrkLineRep.cxx.

42 :
43 TrkSimpleRep(right, trk, hypo), _traj(right._traj)
44{
45}

Member Function Documentation

◆ arrivalTime()

double TrkLineRep::arrivalTime ( double  fltLen) const
virtual

Reimplemented from TrkRep.

Definition at line 143 of file TrkLineRep.cxx.

144{
145 static double cinv = 1./Constants::c;
146 double m_betainv=-9999.;
147 // Initialize cache
148 if (m_betainv < 0.0) {
149 double mass2 = Pdt::lookup(PdtPid::muon)->mass();
150 mass2 = mass2 * mass2;
151 double ptot2 = 100.; //10GeV;
152 //double ptot2 = momentum(0.).mag2();
153 assert(ptot2 != 0.0);
154 m_betainv = sqrt( (ptot2 + mass2)/ ptot2);
155 }
156 double tof = fltL * m_betainv * cinv;
157 return trackT0() + tof;
158}
static const double c
Definition: Constants.h:43
float mass() const
Definition: PdtEntry.h:55
@ muon
Definition: PdtPid.h:14
static PdtEntry * lookup(const std::string &name)
Definition: Pdt.cxx:207
double trackT0() const
Definition: TrkRep.cxx:208

◆ clone()

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

Implements TrkRep.

Definition at line 52 of file TrkLineRep.cxx.

53{
54 TrkLineRep* newRep = new TrkLineRep(*this, theTrack, this->particleType());
55 newRep->setValid(fitValid());
56 newRep->setCurrent(fitCurrent());
57 return newRep;
58}
void setValid(bool v)
bool fitValid() const
Definition: TrkFitStatus.h:34
bool fitCurrent() const
Definition: TrkFitStatus.h:33
void setCurrent(bool c)
Definition: TrkFitStatus.h:39
virtual PdtPid::PidType particleType() const
Definition: TrkRep.cxx:308

◆ cloneNewHypo()

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

Implements TrkRep.

Definition at line 61 of file TrkLineRep.cxx.

62{
63 TrkLineRep* newRep = new TrkLineRep(*this, parentTrack(), hypo);
64 newRep->setValid(fitValid());
65 newRep->setCurrent(fitCurrent()); // true for lines, anyway
66 return newRep;
67}
TrkRecoTrk * parentTrack()
Definition: TrkRep.h:82

◆ helix()

TrkExchangePar TrkLineRep::helix ( double  fltLen) const
virtual

Implements TrkFit.

Definition at line 70 of file TrkLineRep.cxx.

71{
72 TrkExchangePar localPar(_traj.d0(), BesAngle(_traj.phi0()).rad(),
73 0.0, _traj.z0(), _traj.tanDip());
74 const HepSymMatrix& lineCov = _traj.parameters()->covariance();
75 HepSymMatrix& theCov = localPar.covariance();
76 int ex_d0 = TrkExchangePar::ex_d0 + 1;
77 int ex_phi0 = TrkExchangePar::ex_phi0 + 1;
78 int ex_z0 = TrkExchangePar::ex_z0 + 1;
79 int ex_tD = TrkExchangePar::ex_tanDip + 1;
80
81 int ln_d0 = TrkDifLineTraj::d0Ind + 1;
82 int ln_phi0 = TrkDifLineTraj::phi0Ind + 1;
83 int ln_z0 = TrkDifLineTraj::z0Ind + 1;
84 int ln_tD = TrkDifLineTraj::tanDipInd +1;
85
86 theCov(ex_d0, ex_d0) = lineCov(ln_d0, ln_d0);
87 theCov(ex_phi0, ex_d0) = lineCov(ln_phi0, ln_d0);
88 theCov(ex_phi0, ex_phi0) = lineCov(ln_phi0, ln_phi0);
89 theCov(ex_z0, ex_d0) = lineCov(ln_z0, ln_d0);
90 theCov(ex_z0, ex_phi0) = lineCov(ln_z0, ln_phi0);
91 theCov(ex_z0, ex_z0) = lineCov(ln_z0, ln_z0);
92 theCov(ex_tD, ex_d0) = lineCov(ln_tD, ln_d0);
93 theCov(ex_tD, ex_phi0) = lineCov(ln_tD, ln_phi0);
94 theCov(ex_tD, ex_z0) = lineCov(ln_tD, ln_z0);
95 theCov(ex_tD, ex_tD) = lineCov(ln_tD, ln_tD);
96
97 return localPar;
98}
double rad() const
Definition: BesAngle.h:118
double d0() const
double phi0() const
double tanDip() const
double z0() const
HepSymMatrix & covariance()
Definition: TrkParams.h:54
TrkParams * parameters()
Definition: TrkSimpTraj.h:80

◆ print()

void TrkLineRep::print ( std::ostream &  ostr) const
virtual

Implements TrkAbsFit.

Definition at line 101 of file TrkLineRep.cxx.

102{
103 ostr <<"TrkLineRep "
104 << "phi0: " << BesAngle(_traj.phi0()).rad()
105 << " om: " << 0.0
106 << " d0: " << _traj.d0()
107 << " z0: " << _traj.z0()
108 << " tnDip: " << _traj.tanDip()
109 << endl;
110}

Referenced by printAll().

◆ printAll()

void TrkLineRep::printAll ( std::ostream &  ostr) const
virtual

Implements TrkAbsFit.

Definition at line 113 of file TrkLineRep.cxx.

114{
115 print(ostr);
116}
virtual void print(std::ostream &ostr) const
Definition: TrkLineRep.cxx:101

◆ simpTraj() [1/2]

TrkSimpTraj & TrkLineRep::simpTraj ( )
protectedvirtual

Implements TrkSimpleRep.

Definition at line 119 of file TrkLineRep.cxx.

120{
121 return _traj;
122}

◆ simpTraj() [2/2]

const TrkSimpTraj & TrkLineRep::simpTraj ( ) const
protectedvirtual

Implements TrkSimpleRep.

Definition at line 125 of file TrkLineRep.cxx.

126{
127 return _traj;
128}

◆ traj() [1/2]

TrkDifTraj & TrkLineRep::traj ( )
virtual

Definition at line 131 of file TrkLineRep.cxx.

132{
133 return _traj;
134}

◆ traj() [2/2]

const TrkDifTraj & TrkLineRep::traj ( ) const
virtual

Implements TrkAbsFit.

Definition at line 137 of file TrkLineRep.cxx.

138{
139 return _traj;
140}

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