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.
Definition at line 16 of file SMS.h.
Definition at line 57 of file SMS.cc.
References PDRates::average, reco::ceil(), gather_cfg::cout, data, mps_fire::i, createfilelist::int, Interpolate, Iterate, dqmiolumiharvest::j, mag2(), jetsAK4_CHS_cff::sort, theRatio, theType, createJobs::tmp, and Weighted.
Referenced by SmsModeFinder3d::operator()().
59 std::cout <<
"[SMS] warning: Weighted SMS was asked for, but data are " 60 <<
"weightless!" << std::endl;
62 int nobs =
data.size();
67 std::vector<MyPair> pairs;
69 for (std::vector<GlobalPoint>::const_iterator
i =
data.begin();
i !=
data.end(); ++
i) {
72 for (std::vector<GlobalPoint>::const_iterator
j =
data.begin();
j !=
data.end(); ++
j) {
77 MyPair
tmp(
D[nq - 1], &(*
i));
82 sort(pairs.begin(), pairs.end(), Sorter());
86 return *(pairs.begin()->second);
98 std::vector<GlobalPoint> data1;
99 std::vector<MyPair>::iterator
j;
101 for (
j = pairs.begin();
j - pairs.begin() < nq; ++
j)
102 data1.push_back(*(
j->second));
constexpr int32_t ceil(float num)
GlobalPoint location(const std::vector< GlobalPoint > &) const
DecomposeProduct< arg, typename Div::arg > D
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
char data[epos_bytes_allocation]