Tests the classes in SimpleFits.h. More...
#include <cmath>
#include <tuple>
#include <array>
#include <stdexcept>
#include <iterator>
#include <iostream>
#include "boost/test/unit_test.hpp"
#include "lardata/Utilities/SimpleFits.h"
Go to the source code of this file.
Macros | |
#define | SIMPLEFITS_TEST_DEBUG |
#define | BOOST_TEST_MODULE ( SimpleFits_test ) |
Functions | |
template<typename Array > | |
void | PrintMatrix (std::ostream &out, Array const &m, std::string name="Matrix") |
template<typename Array > | |
void | PrintVector (std::ostream &out, Array const &v, std::string name="Vector") |
template<typename Fitter > | |
void | PrintFitterInfo (Fitter const &fitter) |
template<typename T > | |
void | CheckLinearFit (lar::util::LinearFit< T > const &fitter, int n, T intercept, T slope, T intercept_error, T slope_error, T intercept_slope_covariance, T chisq, int NDF) |
template<typename T > | |
void | CheckQuadraticFit (lar::util::QuadraticFit< T > const &fitter, int n, std::array< T, 3 > const &solution, std::array< T, 3 > const &error2, T chisq, int NDF) |
template<typename T > | |
void | CheckGaussianFit (lar::util::GaussianFit< T > const &fitter, int n, std::array< T, 3 > const &solution, std::array< T, 3 > const &error2, T chisq, int NDF) |
template<typename T > | |
void | LinearFitTest () |
Tests LinearFit object with a known input. More... | |
template<typename T > | |
void | QuadraticFitTest () |
Tests QuadraticFit object with a known input. More... | |
template<typename T > | |
T | gaus (T x, T amplitude, T mean, T sigma) |
Tests GausssianFit object with a known input. More... | |
template<typename T > | |
void | GaussianFitTest () |
BOOST_AUTO_TEST_CASE (LinearFitRealTest) | |
BOOST_AUTO_TEST_CASE (QuadraticFitRealTest) | |
BOOST_AUTO_TEST_CASE (GaussianFitRealTest) | |
Tests the classes in SimpleFits.h.
See http://www.boost.org/libs/test for the Boost test library home page.
Timing: not given yet
Definition in file SimpleFits_test.cc.
#define BOOST_TEST_MODULE ( SimpleFits_test ) |
Definition at line 36 of file SimpleFits_test.cc.
#define SIMPLEFITS_TEST_DEBUG |
Definition at line 16 of file SimpleFits_test.cc.
BOOST_AUTO_TEST_CASE | ( | LinearFitRealTest | ) |
Definition at line 679 of file SimpleFits_test.cc.
BOOST_AUTO_TEST_CASE | ( | QuadraticFitRealTest | ) |
Definition at line 686 of file SimpleFits_test.cc.
BOOST_AUTO_TEST_CASE | ( | GaussianFitRealTest | ) |
Definition at line 693 of file SimpleFits_test.cc.
void CheckGaussianFit | ( | lar::util::GaussianFit< T > const & | fitter, |
int | n, | ||
std::array< T, 3 > const & | solution, | ||
std::array< T, 3 > const & | error2, | ||
T | chisq, | ||
int | NDF | ||
) |
Definition at line 198 of file SimpleFits_test.cc.
void CheckLinearFit | ( | lar::util::LinearFit< T > const & | fitter, |
int | n, | ||
T | intercept, | ||
T | slope, | ||
T | intercept_error, | ||
T | slope_error, | ||
T | intercept_slope_covariance, | ||
T | chisq, | ||
int | NDF | ||
) |
Definition at line 105 of file SimpleFits_test.cc.
void CheckQuadraticFit | ( | lar::util::QuadraticFit< T > const & | fitter, |
int | n, | ||
std::array< T, 3 > const & | solution, | ||
std::array< T, 3 > const & | error2, | ||
T | chisq, | ||
int | NDF | ||
) |
Definition at line 151 of file SimpleFits_test.cc.
T gaus | ( | T | x, |
T | amplitude, | ||
T | mean, | ||
T | sigma | ||
) |
Tests GausssianFit object with a known input.
Definition at line 530 of file SimpleFits_test.cc.
void GaussianFitTest | ( | ) |
Definition at line 537 of file SimpleFits_test.cc.
void LinearFitTest | ( | ) |
Tests LinearFit object with a known input.
Definition at line 250 of file SimpleFits_test.cc.
void PrintFitterInfo | ( | Fitter const & | fitter | ) |
Definition at line 85 of file SimpleFits_test.cc.
void PrintMatrix | ( | std::ostream & | out, |
Array const & | m, | ||
std::string | name = "Matrix" |
||
) |
Definition at line 56 of file SimpleFits_test.cc.
void PrintVector | ( | std::ostream & | out, |
Array const & | v, | ||
std::string | name = "Vector" |
||
) |
Definition at line 73 of file SimpleFits_test.cc.
void QuadraticFitTest | ( | ) |
Tests QuadraticFit object with a known input.
Definition at line 398 of file SimpleFits_test.cc.