14#include "TrkBase/TrkHitList.h"
15#include "MdcRecoUtil/PdtPid.h"
16#include "TrkBase/TrkErrCode.h"
17#include "TrkBase/TrkFundHit.h"
18#include "TrkBase/TrkHitOnTrk.h"
19#include "TrkBase/TrkHitOnTrkIter.h"
20#include "TrkBase/TrkHitUse.h"
21#include "TrkBase/TrkHotList.h"
22#include "TrkBase/TrkRecoTrk.h"
23#include "TrkBase/TrkRep.h"
24#include "TrkBase/TrkRepIter.h"
29 : _theTrack( trk ), _myHypo( hypo ) {}
33TrkRep* TrkHitList::theRep() {
return _theTrack->
getRep( _myHypo ); }
35const TrkRep* TrkHitList::theRep()
const {
return _theTrack->getRep( _myHypo ); }
44 _theTrack->_fitNumber[_myHypo]++;
47 theRep()->hotList()->sort();
54 if ( theHit == 0 )
return false;
57#ifdef MDCPATREC_WARNING
58 cout <<
"ErrMsg(warning) "
59 <<
"TrkHitList: you just deleted a hit that was not on the track." << endl;
63 std::pair<TrkRepIter, TrkRepIter> reps = _theTrack->uniqueReps();
64 for (
TrkRepIter i = reps.first; i != reps.second; ++i )
68 if ( h != 0 ) i->removeHot( h );
74 if ( theHot == 0 )
return 0;
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;
86 std::pair<TrkRepIter, TrkRepIter> reps = _theTrack->uniqueReps();
87 for (
TrkRepIter i = reps.first; i != reps.second; ++i )
91 if ( i->particleType() == _theTrack->defaultType() ) defaultHot = h;
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;
109 std::pair<TrkRepIter, TrkRepIter> reps = _theTrack->uniqueReps();
110 for (
TrkRepIter i = reps.first; i != reps.second; ++i )
115 if ( i->particleType() == _theTrack->defaultType() ) defaultHot = h;
bool usedOnTrack(const TrkRecoTrk *t) const
hot_iterator begin() const
TrkHitOnTrk * appendHot(const TrkHitOnTrk *theHot)
const TrkHotList & hotList() const
bool removeHit(const TrkFundHit *theHit)
bool append(const TrkHitList &list)
TrkHitOnTrk * appendHit(const TrkHitUse &theHit)
TrkHotList::hot_iterator hot_iterator
virtual TrkHitOnTrk * clone(TrkRep *parentRep, const TrkDifTraj *trkTraj=0) const =0
const TrkFundHit * hit() const
const TrkFundHit & hit() const
virtual TrkHitOnTrk * createHitOnTrk(const TrkRep &) const =0
TrkRep * getRep(PdtPid::PidType hypo)