34 double&
time,
double& timeerr,
41 double hottime,hottimeerr;
42 if(!
useHot(*i) || !i->timeResid(hottime,hottimeerr))
continue;
43 hottime*=1e9; hottimeerr*=1e9;
44 ws
x(hottime,
double(1)/(hottimeerr*hottimeerr));
48 if (_maxpull>0 && sum.n()>2 && sum.isPhysical()) {
49 std::vector<ws>::iterator worst=l.end();
51 worst=l.end();
double worstPull = _maxpull;
52 for(std::vector<ws>::iterator i=l.begin();i!=l.end();++i) {
54 if (!u.isPhysical()) {
55#ifdef MDCPATREC_WARNING
56 std::cout<<
"ErrMsg(warning) rounding problem?" << std::endl;
60 double p = fabs(u.pull( *i ));
61 if (p>worstPull) { worstPull = p; worst = i; }
64 sum-=*worst; l.erase(worst);
66 }
while (sum.isPhysical() && sum.n()>2 && worst!=l.end());
68 if (sum.isPhysical()) {
70 timeerr = sum.sigma()*1e-9;
hot_iterator begin() const
TrkOutAvgTimeCalculator(const TrkHotSelector &selector, double maxpull)
virtual bool trackTime(const TrkRecoTrk &trk, double &time, double &timeerr, int &nHotsUsed) const
virtual ~TrkOutAvgTimeCalculator()
bool useHot(const TrkHitOnTrk &x) const