BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkHitList Class Reference

#include <TrkHitList.h>

Public Types

typedef TrkHotList::hot_iterator hot_iterator
 
typedef TrkHotList::hot_iterator hot_iterator
 

Public Member Functions

virtual ~TrkHitList ()
 
unsigned nHit () const
 
hot_iterator begin () const
 
hot_iterator end () const
 
const TrkHotListhotList () const
 
bool removeHit (const TrkFundHit *theHit)
 
TrkHitOnTrkappendHot (const TrkHitOnTrk *theHot)
 
TrkHitOnTrkappendHit (const TrkHitUse &theHit)
 
bool append (const TrkHitList &list)
 
void setActivity (const TrkHitOnTrk &)
 
TrkErrCode fit ()
 
bool operator== (const TrkHitList &right) const
 
virtual ~TrkHitList ()
 
unsigned nHit () const
 
hot_iterator begin () const
 
hot_iterator end () const
 
const TrkHotListhotList () const
 
bool removeHit (const TrkFundHit *theHit)
 
TrkHitOnTrkappendHot (const TrkHitOnTrk *theHot)
 
TrkHitOnTrkappendHit (const TrkHitUse &theHit)
 
bool append (const TrkHitList &list)
 
void setActivity (const TrkHitOnTrk &)
 
TrkErrCode fit ()
 
bool operator== (const TrkHitList &right) const
 

Friends

class TrkRecoTrk
 

Detailed Description

Member Typedef Documentation

◆ hot_iterator [1/2]

◆ hot_iterator [2/2]

Constructor & Destructor Documentation

◆ ~TrkHitList() [1/2]

TrkHitList::~TrkHitList ( )
virtual

Definition at line 34 of file TrkHitList.cxx.

35{
36}

◆ ~TrkHitList() [2/2]

virtual TrkHitList::~TrkHitList ( )
virtual

Member Function Documentation

◆ append() [1/2]

bool TrkHitList::append ( const TrkHitList list)

Definition at line 138 of file TrkHitList.cxx.

139{
140 bool x(true);
141 for(TrkHitList::hot_iterator i = list.begin(); i!=list.end();++i) {
142 TrkHitOnTrk* h = appendHot(i.get());
143 x = ( x && h!=0);
144 }
145 return x;
146}
Double_t x[10]
TrkHitOnTrk * appendHot(const TrkHitOnTrk *theHot)
Definition: TrkHitList.cxx:91

◆ append() [2/2]

bool TrkHitList::append ( const TrkHitList list)

◆ appendHit() [1/2]

TrkHitOnTrk * TrkHitList::appendHit ( const TrkHitUse theHit)

Definition at line 114 of file TrkHitList.cxx.

115{
116 // Test whether hit already on this track
117 if (theHit.hit().usedOnTrack(_theTrack)) {
118#ifdef MDCPATREC_WARNING
119 cout <<"ErrMsg(warning)"
120 <<"You just tried to add a hit to a track twice."
121 <<" Don't do that. " << endl;
122#endif
123 return 0;
124 }
125 TrkHitOnTrk* defaultHot = 0;
126
127 std::pair<TrkRepIter,TrkRepIter> reps = _theTrack->uniqueReps();
128 for (TrkRepIter i= reps.first; i != reps.second; ++i) {
129 TrkHitOnTrk* h = theHit.createHitOnTrk(*i);
130
131 i->addHot(h);
132 if (i->particleType() == _theTrack->defaultType()) defaultHot = h;
133 }
134 return defaultHot;
135}
bool usedOnTrack(const TrkRecoTrk *t) const
virtual TrkHitOnTrk * createHitOnTrk(const TrkRep &) const =0
std::pair< TrkRepIter, TrkRepIter > uniqueReps() const
Definition: TrkRecoTrk.cxx:529

Referenced by MdcSegGrouper::transferHits().

◆ appendHit() [2/2]

TrkHitOnTrk * TrkHitList::appendHit ( const TrkHitUse theHit)

◆ appendHot() [1/2]

TrkHitOnTrk * TrkHitList::appendHot ( const TrkHitOnTrk theHot)

Definition at line 91 of file TrkHitList.cxx.

92{
93 if (theHot == 0) return 0;
94 // Test whether hit already on this track
95 if (theHot->hit() != 0 && theHot->hit()->usedOnTrack(_theTrack)) {
96#ifdef MDCPATREC_WARNING
97 cout <<"ErrMsg(warning)"
98 << "You just tried to add a hit to a track twice. "
99 <<" Don't do that. "<< endl;
100#endif
101 return 0;
102 }
103 TrkHitOnTrk* defaultHot = 0;
104 std::pair<TrkRepIter,TrkRepIter> reps = _theTrack->uniqueReps();
105 for (TrkRepIter i=reps.first; i != reps.second; ++i) {
106 TrkHitOnTrk* h = theHot->clone(i.get());
107 i->addHot(h);
108 if (i->particleType() == _theTrack->defaultType()) defaultHot = h;
109 }
110 return defaultHot;
111}
virtual TrkHitOnTrk * clone(TrkRep *parentRep, const TrkDifTraj *trkTraj=0) const =0

Referenced by append(), Hough2D::fit(), Hough3D::fit(), MdcxCosmicSewer::MdcxHitsToHots(), and MdcTrackList::pickHits().

◆ appendHot() [2/2]

TrkHitOnTrk * TrkHitList::appendHot ( const TrkHitOnTrk theHot)

◆ begin() [1/2]

◆ begin() [2/2]

hot_iterator TrkHitList::begin ( ) const
inline

◆ end() [1/2]

◆ end() [2/2]

hot_iterator TrkHitList::end ( ) const
inline

◆ fit() [1/2]

TrkErrCode TrkHitList::fit ( )

Definition at line 59 of file TrkHitList.cxx.

60{
61 _theTrack->_fitNumber[_myHypo]++;
62
63 TrkErrCode err = theRep()->fit();
64 theRep()->hotList()->sort();
65 return err;
66}
virtual void sort()
Definition: TrkHotList.cxx:71
virtual TrkErrCode fit()=0
virtual TrkHotList * hotList()

Referenced by MdcTrackListBase::arbitrateHits(), MdcxCosmicSewer::execute(), MdcTrackListCsmc::finish3d(), MdcTrackList::finishCircle(), MdcTrackList::finishHelix(), Hough2D::fit(), and Hough3D::fit().

◆ fit() [2/2]

TrkErrCode TrkHitList::fit ( )

◆ hotList() [1/2]

◆ hotList() [2/2]

const TrkHotList & TrkHitList::hotList ( ) const

◆ nHit() [1/2]

◆ nHit() [2/2]

unsigned TrkHitList::nHit ( ) const
inline

◆ operator==() [1/2]

bool TrkHitList::operator== ( const TrkHitList right) const
inline

Definition at line 66 of file InstallArea/include/TrkBase/TrkBase/TrkHitList.h.

66{return this == &right;}

◆ operator==() [2/2]

bool TrkHitList::operator== ( const TrkHitList right) const
inline

Definition at line 66 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkHitList.h.

66{return this == &right;}

◆ removeHit() [1/2]

bool TrkHitList::removeHit ( const TrkFundHit theHit)

Definition at line 69 of file TrkHitList.cxx.

70{
71 // This would be more efficient if the Rep did the finding of the Hot
72 // (save one search through each hotlist).
73 if (theHit == 0) return false;
74 if (!theHit->usedOnTrack(_theTrack)) {
75#ifdef MDCPATREC_WARNING
76 cout <<"ErrMsg(warning) "<<
77 "TrkHitList: you just deleted a hit that was not on the track." << endl;
78#endif
79 return false;
80 }
81 std::pair<TrkRepIter,TrkRepIter> reps = _theTrack->uniqueReps();
82 for (TrkRepIter i= reps.first; i != reps.second; ++i) {
83 // Find the Hot and ask the Rep to remove it
84 TrkHitOnTrk* h = i->hotList()->findHot(theHit);
85 if (h != 0) i->removeHot(h);
86 }
87 return true;
88}

Referenced by MdcTrackListBase::arbitrateHits(), and MdcTrackList::pickHits().

◆ removeHit() [2/2]

bool TrkHitList::removeHit ( const TrkFundHit theHit)

◆ setActivity() [1/2]

void TrkHitList::setActivity ( const TrkHitOnTrk )

◆ setActivity() [2/2]

void TrkHitList::setActivity ( const TrkHitOnTrk )

Friends And Related Function Documentation

◆ TrkRecoTrk


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