#include <TrkExpectedHotSet.h>
Public Member Functions | |
bool | addInfo (TrkExpectedHot *aHot, const TrkFitTypeKey &key) |
bool | addInfo (TrkExpectedHot *aHot, const TrkFitTypeKey &key) |
const TrkDetElemId & | elemId () const |
const TrkDetElemId & | elemId () const |
const TrkExpectedHot * | exHot () const |
const TrkExpectedHot * | exHot (const TrkFitTypeKey &key) const |
const TrkExpectedHot * | exHot () const |
const TrkExpectedHot * | exHot (const TrkFitTypeKey &key) const |
const TrkExpectedTrk * | exTrk () const |
const TrkExpectedTrk * | exTrk () const |
const std::vector< int > & | fitTypeMap () const |
const std::vector< int > & | fitTypeMap () const |
void | getHots (std::vector< TrkHitOnTrk * > &hots) const |
void | getHots (std::vector< TrkHitOnTrk * > &hots) const |
bool | hasFitType (const TrkFitTypeKey &key) const |
bool | hasFitType (const TrkFitTypeKey &key) const |
bool | isMdc () const |
bool | isMdc () const |
bool | isSvt () const |
bool | isSvt () const |
bool | operator== (const TrkExpectedHotSet &rhs) |
bool | operator== (const TrkExpectedHotSet &rhs) |
void | printFit (const TrkFitTypeKey &key, std::ostream &os=std::cout) const |
void | printFit (const TrkFitTypeKey &key, std::ostream &os=std::cout) const |
std::vector< TrkExpectedHot * > | theHots () const |
std::vector< TrkExpectedHot * > | theHots () const |
TrkExpectedHotSet (const TrkDetElemId &elemId, const int &maxFits) | |
TrkExpectedHotSet (const TrkDetElemId &elemId, const int &maxFits) | |
virtual | ~TrkExpectedHotSet () |
virtual | ~TrkExpectedHotSet () |
Protected Member Functions | |
void | setExTrk (const TrkExpectedTrk *anExTrk) |
void | setExTrk (const TrkExpectedTrk *anExTrk) |
Private Attributes | |
const TrkDetElemId | _elemId |
const TrkExpectedTrk * | _exTrk |
const TrkExpectedTrk * | _exTrk |
std::vector< int > | _fitTypeMap |
std::vector< int > | _fitTypeMap |
int | _nFit |
std::vector< TrkExpectedHot * > | _theHots |
std::vector< TrkExpectedHot * > | _theHots |
Friends | |
class | TrkExpectedHotFactory |
class | TrkExpectedTrk |
|
00066 :_elemId(elemId), 00067 _nFit(-1), 00068 _fitTypeMap(maxFits,-1), 00069 _exTrk(0) 00070 { 00071 }
|
|
00077 { 00078 // owns the exHost 00079 const int iEx = _theHots.size(); 00080 for ( int iKill(0); iKill < iEx; ++iKill ) { 00081 TrkExpectedHot* exHot = _theHots[iKill]; 00082 delete exHot; 00083 } 00084 }
|
|
|
|
|
|
|
|
00141 { 00142 if ( key.value() < 0 ) return false; 00143 if ( key.value() >= _fitTypeMap.size() ) return false; 00144 if ( aHot == 0 ) return false; 00145 const int test = _fitTypeMap[key.value()]; 00146 if ( test != -1 ) { 00147 TrkExpectedHot* myHot = _theHots[test]; 00148 if ( aHot->hasHot() ) { myHot->setHots(aHot); } 00149 delete aHot; 00150 return true; 00151 } 00152 ++_nFit; 00153 _fitTypeMap[key.value()] = _nFit; 00154 aHot->setExTrk(_exTrk); 00155 _theHots.push_back(aHot); 00156 return true; 00157 }
|
|
00056 {
00057 return _elemId;
00058 };
|
|
00056 {
00057 return _elemId;
00058 };
|
|
|
|
|
|
|
|
00095 { 00096 if ( key.value() < 0 || key.value() >= _fitTypeMap.size() ) return 0; 00097 const int index = _fitTypeMap[key.value()]; 00098 return index < 0 ? 0 : _theHots[index]; 00099 }
|
|
00085 { return _exTrk; }
|
|
00085 { return _exTrk; }
|
|
00072 { return _fitTypeMap; }
|
|
00072 { return _fitTypeMap; }
|
|
|
|
00107 { 00108 const TrkExpectedHot* anExHot(0); 00109 for ( int i(0); i < _theHots.size(); ++i ) { 00110 anExHot = _theHots[i]; 00111 if ( anExHot->getHots(hots) ) break; 00112 } 00113 }
|
|
|
|
00116 { 00117 return ( exHot(key) != 0 ); 00118 }
|
|
|
|
|
|
|
|
|
|
00051 { 00052 return this == &rhs; 00053 }
|
|
00051 { 00052 return this == &rhs; 00053 }
|
|
|
|
00123 { 00124 os << " Intersects element "; 00125 _elemId.printAll(os); 00126 const TrkExpectedHot* theExHot = exHot(key); 00127 if ( theExHot == 0 ) { 00128 os << " _" << endl; 00129 return; 00130 } 00131 theExHot->printAll(os); 00132 os << endl; 00133 }
|
|
|
|
00160 { 00161 _exTrk = anExTrk; 00162 const int nHot = _theHots.size(); 00163 for ( int iHot(0); iHot < nHot; ++iHot ) { 00164 TrkExpectedHot* aHot = _theHots[iHot]; 00165 aHot->setExTrk(_exTrk); 00166 } 00167 }
|
|
00073 { return _theHots; }
|
|
00073 { return _theHots; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|