CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SmsModeFinder3d.cc
Go to the documentation of this file.
2 
4  theAlgo(algo)
5 {}
6 
7 GlobalPoint SmsModeFinder3d::operator() ( const std::vector<PointAndDistance> & values ) const
8 {
9  std::vector < std::pair < GlobalPoint, float > > weighted;
10  for ( std::vector< PointAndDistance >::const_iterator i=values.begin();
11  i!=values.end() ; ++i )
12  {
13  float weight = pow ( 10 + 10000 * i->second, -2 );
14  weighted.push_back ( std::pair < GlobalPoint, float > ( i->first, weight ) );
15  };
16  return theAlgo.location( weighted );
17 }
18 
20 {
21  return new SmsModeFinder3d ( * this );
22 }
int i
Definition: DBlmapReader.cc:9
Definition: SMS.h:16
virtual GlobalPoint operator()(const std::vector< PointAndDistance > &values) const
virtual SmsModeFinder3d * clone() const
LimitAlgo * algo
Definition: Combine.cc:60
SmsModeFinder3d(const SMS &algo=SMS())
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
GlobalPoint location(const std::vector< GlobalPoint > &) const
Definition: SMS.cc:76