CMS 3D CMS Logo

SmsModeFinder3d.cc
Go to the documentation of this file.
2 
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: weight.py:1
constexpr int pow(int x)
Definition: conifer.h:24
Definition: SMS.h:16
SmsModeFinder3d * clone() const override
GlobalPoint location(const std::vector< GlobalPoint > &) const
Definition: SMS.cc:57
GlobalPoint operator()(const std::vector< PointAndDistance > &values) const override
SmsModeFinder3d(const SMS &algo=SMS())