CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SmsModeFinder3d.cc
Go to the documentation of this file.
2 
3 SmsModeFinder3d::SmsModeFinder3d(const SMS& algo) : theAlgo(algo) {}
4 
5 GlobalPoint SmsModeFinder3d::operator()(const std::vector<PointAndDistance>& values) const {
6  std::vector<std::pair<GlobalPoint, float> > weighted;
7  for (std::vector<PointAndDistance>::const_iterator i = values.begin(); i != values.end(); ++i) {
8  float weight = pow(10 + 10000 * i->second, -2);
9  weighted.push_back(std::pair<GlobalPoint, float>(i->first, weight));
10  };
11  return theAlgo.location(weighted);
12 }
13 
Definition: SMS.h:16
SmsModeFinder3d * clone() const override
GlobalPoint operator()(const std::vector< PointAndDistance > &values) const override
int weight
Definition: histoStyle.py:51
SmsModeFinder3d(const SMS &algo=SMS())
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
GlobalPoint location(const std::vector< GlobalPoint > &) const
Definition: SMS.cc:57