#include <cmath>
#include <vector>
Go to the source code of this file.
Namespaces | |
util | |
Filter events based on their run/event numbers. | |
Functions | |
Simple mathematical functions | |
template<class T > | |
T | util::sqr (T x) |
More efficient square function than pow(x,2) More... | |
template<class T > | |
T | util::cube (T x) |
More efficient cube function than pow(x,3) More... | |
double | util::pythag (double x, double y) |
2D Euclidean distance More... | |
double | util::pythag (double x, double y, double z) |
3D Euclidean distance More... | |
void | util::LinFitUnweighted (const std::vector< double > &x, const std::vector< double > &y, double &m, double &c) |
Simplified version of LinFit. More... | |
double | util::LinFit (const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &w, double &m, double &c) |
Find the best-fit line to a collection of points in 2-D by minimizing the squared vertical distance from the points to the line. More... | |