#include <SmsModeFinder3d.h>
Public Member Functions | |
virtual SmsModeFinder3d * | clone () const |
virtual GlobalPoint | operator() (const std::vector< PointAndDistance > &values) const |
SmsModeFinder3d (const SMS &algo=SMS()) | |
Private Attributes | |
SMS | theAlgo |
Least Median sum of squares mode finder. Works coordinate wise.
Definition at line 9 of file SmsModeFinder3d.h.
SmsModeFinder3d * SmsModeFinder3d::clone | ( | void | ) | const [virtual] |
Implements ModeFinder3d.
Definition at line 19 of file SmsModeFinder3d.cc.
References SmsModeFinder3d().
{ return new SmsModeFinder3d ( * this ); }
GlobalPoint SmsModeFinder3d::operator() | ( | const std::vector< PointAndDistance > & | values | ) | const [virtual] |
Implements ModeFinder3d.
Definition at line 7 of file SmsModeFinder3d.cc.
References i, SMS::location(), funct::pow(), theAlgo, CommonMethods::weight(), and plotBeamSpotDB::weighted.
{ std::vector < std::pair < GlobalPoint, float > > weighted; for ( std::vector< PointAndDistance >::const_iterator i=values.begin(); i!=values.end() ; ++i ) { float weight = pow ( 10 + 10000 * i->second, -2 ); weighted.push_back ( std::pair < GlobalPoint, float > ( i->first, weight ) ); }; return theAlgo.location( weighted ); }
SMS SmsModeFinder3d::theAlgo [private] |
Definition at line 15 of file SmsModeFinder3d.h.
Referenced by operator()().