8#include "GeoModelKernel/throwExcept.h"
14 for (
unsigned int k=0; k<
x.size()-1; k++) {
16 THROW_EXCEPTION(
"PolygonBase::init - Abscissae not in increasing order!");
25 if (k<0 || k>
static_cast<int>(
m_x.size()-1)) {
26 THROW_EXCEPTION(
"PolygonBase::value - Illegal function index "<<k<<
"! Should be >0 and "<<
m_x.size());
34 if (k==0 &&
x<
m_x[0]) {
37 if (k==0 &&
x<=
m_x[1]) {
40 if (k==0 &&
x>
m_x[1]) {
43 if (
static_cast<unsigned int>(k)==
m_x.size()-1 &&
47 if (
static_cast<unsigned int>(k)==
m_x.size()-1 &&
51 if (
static_cast<unsigned int>(k)==
m_x.size()-1 &&
double value(const int k, const double x) const
get the value of the k-th base function at x
std::vector< double > m_x
PolygonBase(const std::vector< double > &x)
Constructor: the vector x contains the abscissae of the base points of the polygon.
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
#define THROW_EXCEPTION(MESSAGE)