Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:03:30

0001 #include "RecoVertex/VertexTools/interface/SmsModeFinder3d.h"
0002 
0003 SmsModeFinder3d::SmsModeFinder3d(const SMS& algo) : theAlgo(algo) {}
0004 
0005 GlobalPoint SmsModeFinder3d::operator()(const std::vector<PointAndDistance>& values) const {
0006   std::vector<std::pair<GlobalPoint, float> > weighted;
0007   for (std::vector<PointAndDistance>::const_iterator i = values.begin(); i != values.end(); ++i) {
0008     float weight = pow(10 + 10000 * i->second, -2);
0009     weighted.push_back(std::pair<GlobalPoint, float>(i->first, weight));
0010   };
0011   return theAlgo.location(weighted);
0012 }
0013 
0014 SmsModeFinder3d* SmsModeFinder3d::clone() const { return new SmsModeFinder3d(*this); }