#include <TrkHotListFull.h>
Inheritance diagram for TrkHotListFull:
|
|
|
|
|
|
|
|
|
|
|
|
|
00030 { 00031 }
|
|
00035 { 00036 //TrkHotListFull::clone come here 00037 _hotlist.reserve(dfltCapac()); 00038 //Clones Hots, and makes each point at the new track. 00039 for (TrkHotList::hot_iterator i = inHots.begin();i!=inHots.end();++i) { 00040 // i->printAll(std::cout);//yzhang debug 00041 _hotlist.push_back(f(*i)); 00042 } 00043 }
|
|
00047 { 00048 _hotlist.reserve(dfltCapac()); 00049 // shallow copy the hots and remove from input hotList 00050 for (TrkHotList::nc_hot_iterator i = inHots.begin();i!=inHots.end();++i) { 00051 _hotlist.push_back(f(*i)); 00052 } 00053 inHots.hotlist().clear(); 00054 }
|
|
00064 { 00065 // std::cout << " ~TrkHotListFull" << std::endl;//yzhang debug 00066 // turn the parents off before deleting hots. This avoids a cyclic delete error 00067 // when deleting a track 00068 // std::for_each(begin(),end(),setParent(0)); 00069 std::for_each(_hotlist.begin(),_hotlist.end(),bes::Collection::DeleteObject()); 00070 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00088 { 00089 _hotlist.push_back(newHot); 00090 }
|
|
00048 { return nc_hot_iterator(hotlist().begin()); }
|
|
00044 { return hot_iterator(hotlist().begin()); }
|
|
00048 { return nc_hot_iterator(hotlist().begin()); }
|
|
00044 { return hot_iterator(hotlist().begin()); }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00059 { 00060 return new TrkHotListFull(*this, f); 00061 }
|
|
|
|
00074 { 00075 static size_t _dfltCapac = 75; 00076 return _dfltCapac; 00077 }
|
|
00049 { return nc_hot_iterator(hotlist().end()); }
|
|
00045 { return hot_iterator(hotlist().end()); }
|
|
00049 { return nc_hot_iterator(hotlist().end()); }
|
|
00045 { return hot_iterator(hotlist().end()); }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00183 { 00184 double maxFlt = -9999; 00185 TrkBase::Predicates::isHotActive predicate; 00186 TrkHotList::hot_iterator i = end(); 00187 TrkHotList::hot_iterator b = begin(); 00188 while (i-- != b) { 00189 if (predicate(*i)) { 00190 maxFlt = i->fltLen(); 00191 break; 00192 } 00193 } 00194 return maxFlt; 00195 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00106 { 00107 TrkBase::Predicates::hotMatchesFundHit match(theHit); 00108 TrkHotList::hot_iterator i = std::find_if(begin(),end(),match); 00109 return i==end()?0:const_cast<TrkHitOnTrk*>( i.get() ); // FIXME: return (non)const TrkHitOnTrk from (non)const 00110 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00213 { 00214 unsigned firstlay(50); 00215 bool activeOnly(true); 00216 TrkBase::Predicates::isMdcHitOnTrack mdc(activeOnly); 00217 for (TrkHotList::hot_iterator i = begin();i!=end();++i) { 00218 if (mdc(*i)) firstlay = std::min(firstlay,i->layerNumber()); 00219 } 00220 return firstlay<50?firstlay:0; 00221 }
|
|
|
|
00057 { 00058 TrkView need(view); 00059 TrkView have = svtView(layer); 00060 return have.contains(need); 00061 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00139 { 00140 return true; 00141 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. |
|
Implements TrkHotList. 00243 {
00244 return _hotlist;
00245 }
|
|
Implements TrkHotList. 00237 {
00238 return _hotlist;
00239 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00248 { 00249 if(ihot<_hotlist.size()) 00250 return _hotlist[ihot]->isActive(); 00251 else 00252 return false; 00253 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00225 { 00226 unsigned lastlay(0); 00227 bool activeOnly(true); 00228 TrkBase::Predicates::isMdcHitOnTrack mdc(activeOnly); 00229 for (TrkHotList::hot_iterator i = begin();i!=end();++i) { 00230 if (mdc(*i)) lastlay = std::max(lastlay,i->layerNumber()); 00231 } 00232 return lastlay; 00233 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00114 { 00115 int nAct = 0; 00116 for (TrkHotList::hot_iterator i = begin();i!=end();++i) { 00117 if (i->isActive()) 00118 if(view == TrkEnums::bothView || i->whatView() == view)++nAct; 00119 } 00120 return nAct; 00121 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00125 { 00126 if(view == TrkEnums::bothView) 00127 return end()-begin(); 00128 else { 00129 int nAct = 0; 00130 for (TrkHotList::hot_iterator i = begin();i!=end();++i) { 00131 if(i->whatView() == view)++nAct; 00132 } 00133 return nAct; 00134 } 00135 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00145 { 00146 bool activeOnly(true); 00147 TrkBase::Predicates::isMdcHitOnTrack mdc(activeOnly); 00148 TrkBase::Predicates::hasView v(view); 00149 // FIXME: W6U1 doesn't have std::count (at least, not in the config used by BaBar!) 00150 // FIXME: std::compose2 is an SGI extension... 00151 // return std::count(begin(),end(),std::compose2(std::logical_and<bool>(),mdc,v); 00152 int n = 0; 00153 for (TrkHotList::hot_iterator i = begin();i!=end();++i) 00154 if(mdc(*i)&&v(*i)) ++n; 00155 return n; 00156 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00160 { 00161 bool activeOnly(true); 00162 TrkBase::Predicates::isSvtHitOnTrack svt(activeOnly); 00163 TrkBase::Predicates::hasView v(view); 00164 // FIXME: W6U1 doesn't have std::count (at least, not in the config used by BaBar!) 00165 // FIXME: std::compose2 is an SGI extension... 00166 // return std::count(begin(),end(),std::compose2(std::logical_and<bool>(),svt,v); 00167 int n = 0; 00168 for (TrkHotList::hot_iterator i = begin();i!=end();++i) 00169 if (svt(*i)&&v(*i)) ++n; 00170 return n; 00171 }
|
|
|
|
|
|
|
|
00032 { 00033 o << " hitCapable: " << (hitCapable()?"yes":"no") 00034 << " nActive: " << nActive() 00035 << " nHit: " << nHit() 00036 << " startFoundRange: " <<startFoundRange() 00037 << " endFoundRange: " << endFoundRange(); 00038 }
|
|
|
|
00042 { 00043 print(o); o << "\n"; 00044 TrkHotList::hot_iterator i= begin(); 00045 int kk=0; 00046 while (i!=end()) { 00047 kk++; 00048 std::cout<< kk << ":" ; 00049 i->print(o); o << endl; 00050 i->hit()->printAll(o);//yzhang debug 00051 i++; 00052 } 00053 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00094 { 00095 typedef std::vector<TrkHitOnTrk*>::iterator iter_t; 00096 iter_t i = std::find(_hotlist.begin(),_hotlist.end(),deadHot); 00097 if (i!=_hotlist.end()) { 00098 delete *i; 00099 _hotlist.erase(i); 00100 } else 00101 std::cout<<"ErrMsg(error) "<< " you asked to remove a hit which I don't have! " << std::endl; 00102 }
|
|
|
|
|
|
00056 { return TrkBase::Functors::setActive(active); }
|
|
00056 { return TrkBase::Functors::setActive(active); }
|
|
00044 { 00045 hot.setActive(active); }
|
|
00044 { 00045 hot.setActive(active); }
|
|
00054 { return TrkBase::Functors::setParent(parent); }
|
|
00047 { 00048 hot._parentRep = parent; 00049 }
|
|
00054 { return TrkBase::Functors::setParent(parent); }
|
|
00047 { 00048 hot._parentRep = parent; 00049 }
|
|
|
|
00072 { 00073 std::sort(hotlist().begin(), 00074 hotlist().end(), 00075 bes::Collection::PtrLess()); 00076 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00175 { 00176 TrkBase::Predicates::isHotActive active; 00177 TrkHotList::hot_iterator i = std::find_if(begin(),end(),active); 00178 return i == end() ? 9999 : i->fltLen(); 00179 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00200 { 00201 TrkView retval; 00202 bool activeOnly(true); 00203 TrkBase::Predicates::isSvtHitOnTrack svt(activeOnly); 00204 TrkBase::Predicates::isLayer l(layer); 00205 // FIXME: std::compose2 is an SGI extension... 00206 for(TrkHotList::hot_iterator i=begin();i!=end();++i) 00207 if (svt(*i)&&l(*i)) retval.addView(i->whatView()); 00208 return retval; 00209 }
|
|
Implements TrkHotList. |
|
Implements TrkHotList. 00081 { 00082 std::for_each(begin(),end(),updateMeasurement(0,false)); 00083 sort(); 00084 }
|
|
00052 { return TrkBase::Functors::updateMeasurement(traj,maintainAmbiguity); }
|
|
00042 { return hot.updateMeasurement(traj,maintainAmbiguity);}
|
|
00052 { return TrkBase::Functors::updateMeasurement(traj,maintainAmbiguity); }
|
|
00042 { return hot.updateMeasurement(traj,maintainAmbiguity);}
|
|
|
|
|
|
|
|
|