BOSS 8.0.0
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
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
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/3]

◆ hot_iterator [2/3]

◆ hot_iterator [3/3]

Constructor & Destructor Documentation

◆ ~TrkHitList() [1/3]

TrkHitList::~TrkHitList ( )
virtual

Definition at line 31 of file TrkHitList.cxx.

31{}

◆ ~TrkHitList() [2/3]

virtual TrkHitList::~TrkHitList ( )
virtual

◆ ~TrkHitList() [3/3]

virtual TrkHitList::~TrkHitList ( )
virtual

Member Function Documentation

◆ append() [1/3]

bool TrkHitList::append ( const TrkHitList & list)

Definition at line 120 of file TrkHitList.cxx.

120 {
121 bool x( true );
122 for ( TrkHitList::hot_iterator i = list.begin(); i != list.end(); ++i )
123 {
124 TrkHitOnTrk* h = appendHot( i.get() );
125 x = ( x && h != 0 );
126 }
127 return x;
128}
Double_t x[10]
TrkHitOnTrk * appendHot(const TrkHitOnTrk *theHot)

◆ append() [2/3]

bool TrkHitList::append ( const TrkHitList & list)

◆ append() [3/3]

bool TrkHitList::append ( const TrkHitList & list)

◆ appendHit() [1/3]

TrkHitOnTrk * TrkHitList::appendHit ( const TrkHitUse & theHit)

Definition at line 96 of file TrkHitList.cxx.

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

Referenced by MdcSegGrouper::transferHits().

◆ appendHit() [2/3]

TrkHitOnTrk * TrkHitList::appendHit ( const TrkHitUse & theHit)

◆ appendHit() [3/3]

TrkHitOnTrk * TrkHitList::appendHit ( const TrkHitUse & theHit)

◆ appendHot() [1/3]

TrkHitOnTrk * TrkHitList::appendHot ( const TrkHitOnTrk * theHot)

Definition at line 73 of file TrkHitList.cxx.

73 {
74 if ( theHot == 0 ) return 0;
75 // Test whether hit already on this track
76 if ( theHot->hit() != 0 && theHot->hit()->usedOnTrack( _theTrack ) )
77 {
78#ifdef MDCPATREC_WARNING
79 cout << "ErrMsg(warning)"
80 << "You just tried to add a hit to a track twice. "
81 << " Don't do that. " << endl;
82#endif
83 return 0;
84 }
85 TrkHitOnTrk* defaultHot = 0;
86 std::pair<TrkRepIter, TrkRepIter> reps = _theTrack->uniqueReps();
87 for ( TrkRepIter i = reps.first; i != reps.second; ++i )
88 {
89 TrkHitOnTrk* h = theHot->clone( i.get() );
90 i->addHot( h );
91 if ( i->particleType() == _theTrack->defaultType() ) defaultHot = h;
92 }
93 return defaultHot;
94}
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/3]

TrkHitOnTrk * TrkHitList::appendHot ( const TrkHitOnTrk * theHot)

◆ appendHot() [3/3]

TrkHitOnTrk * TrkHitList::appendHot ( const TrkHitOnTrk * theHot)

◆ begin() [1/3]

◆ begin() [2/3]

hot_iterator TrkHitList::begin ( ) const
inline

Definition at line 45 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkHitList.h.

45{ return hotList().begin(); }

◆ begin() [3/3]

hot_iterator TrkHitList::begin ( ) const
inline

Definition at line 45 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkHitList.h.

45{ return hotList().begin(); }

◆ end() [1/3]

◆ end() [2/3]

hot_iterator TrkHitList::end ( ) const
inline

Definition at line 46 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkHitList.h.

46{ return hotList().end(); }

◆ end() [3/3]

hot_iterator TrkHitList::end ( ) const
inline

Definition at line 46 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkHitList.h.

46{ return hotList().end(); }

◆ fit() [1/3]

TrkErrCode TrkHitList::fit ( )

Definition at line 43 of file TrkHitList.cxx.

43 {
44 _theTrack->_fitNumber[_myHypo]++;
45
46 TrkErrCode err = theRep()->fit();
47 theRep()->hotList()->sort();
48 return err;
49}

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

◆ fit() [2/3]

TrkErrCode TrkHitList::fit ( )

◆ fit() [3/3]

TrkErrCode TrkHitList::fit ( )

◆ hotList() [1/3]

const TrkHotList & TrkHitList::hotList ( ) const

◆ hotList() [2/3]

const TrkHotList & TrkHitList::hotList ( ) const

◆ hotList() [3/3]

const TrkHotList & TrkHitList::hotList ( ) const

◆ nHit() [1/3]

◆ nHit() [2/3]

unsigned TrkHitList::nHit ( ) const
inline

Definition at line 44 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkHitList.h.

44{ return end() - begin(); };

◆ nHit() [3/3]

unsigned TrkHitList::nHit ( ) const
inline

Definition at line 44 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkHitList.h.

44{ return end() - begin(); };

◆ operator==() [1/3]

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

Definition at line 66 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkBase/TrkHitList.h.

66{ return this == &right; }

◆ operator==() [2/3]

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

Definition at line 66 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkHitList.h.

66{ return this == &right; }

◆ operator==() [3/3]

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

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

66{ return this == &right; }

◆ removeHit() [1/3]

bool TrkHitList::removeHit ( const TrkFundHit * theHit)

Definition at line 51 of file TrkHitList.cxx.

51 {
52 // This would be more efficient if the Rep did the finding of the Hot
53 // (save one search through each hotlist).
54 if ( theHit == 0 ) return false;
55 if ( !theHit->usedOnTrack( _theTrack ) )
56 {
57#ifdef MDCPATREC_WARNING
58 cout << "ErrMsg(warning) "
59 << "TrkHitList: you just deleted a hit that was not on the track." << endl;
60#endif
61 return false;
62 }
63 std::pair<TrkRepIter, TrkRepIter> reps = _theTrack->uniqueReps();
64 for ( TrkRepIter i = reps.first; i != reps.second; ++i )
65 {
66 // Find the Hot and ask the Rep to remove it
67 TrkHitOnTrk* h = i->hotList()->findHot( theHit );
68 if ( h != 0 ) i->removeHot( h );
69 }
70 return true;
71}

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

◆ removeHit() [2/3]

bool TrkHitList::removeHit ( const TrkFundHit * theHit)

◆ removeHit() [3/3]

bool TrkHitList::removeHit ( const TrkFundHit * theHit)

◆ setActivity() [1/3]

void TrkHitList::setActivity ( const TrkHitOnTrk & )

◆ setActivity() [2/3]

void TrkHitList::setActivity ( const TrkHitOnTrk & )

◆ setActivity() [3/3]

void TrkHitList::setActivity ( const TrkHitOnTrk & )

◆ TrkRecoTrk


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