/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
RecoVertex/VertexTools/interface/SMS.h
35 строк
921 B
Cms Build
Clang-Format
31 май 2019, 13:16
31 май 2019, 13:16
38393ac
Код
Авторство
О чём код?
#ifndef SMS_H #define SMS_H #include <cmath> #include <cstdlib> #include <vector> #include <algorithm> #include <iostream> #include "DataFormats/GeometryVector/interface/GlobalPoint.h" /** * Class to compute the SMS location estimator The SMS estimator is the mean * value of a set of observations with Small Median of Squared distances. */ class SMS { public: enum SMSType { None = 0, Interpolate = 1, Iterate = 2, Weighted = 4 }; /** * Constructor. * \param tp What specific kind of SMS algorithm do you want? * \param q What fraction of data points are considered for the * "next step"? */ SMS(SMSType tp = (SMSType)(Interpolate | Iterate | Weighted), float q = 0.5); GlobalPoint location(const std::vector<GlobalPoint>&) const; GlobalPoint location(const std::vector<std::pair<GlobalPoint, float> >&) const; private: SMSType theType; float theRatio; }; #endif /* def SMS */