ATLAS Offline Software
Loading...
Searching...
No Matches
BaseFunctionFitter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6
7#ifndef BaseFunctionFitterHXX
8#define BaseFunctionFitterHXX
9
11// HEADER FILES //
13
14// CLHEP //
15//#include "CLHEP/config/CLHEP.h"
16#include "CLHEP/Units/SystemOfUnits.h"
17#include "CLHEP/Units/PhysicalConstants.h"
18
20
21// standard C++ libraries //
22#include <iostream>
23#include <iomanip>
24#include <fstream>
25
26// STL //
27#include <vector>
28
29// MDT calibration utilities //
32
33namespace MuonCalib {
34
40
41 private:
42 // auxiliary minimization objects //
43 unsigned int m_nb_coefficients{0};
47
48 // private methods //
49 void init();
52 void init(const unsigned nb_coefficients);
53
54 public:
55 // Constructors
59 BaseFunctionFitter(const unsigned nb_coefficients);
62 int number_of_coefficients() const;
64 const Amg::VectorX& coefficients() const;
67 void set_number_of_coefficients(const unsigned nb_coefficients);
73 void fit_parameters(const std::vector<SamplePoint> & sample_point,
74 const unsigned int first_point,
75 const unsigned int last_point,
76 const BaseFunction& base_function);
77 };
78}
79#endif
void init()
default initialization method
const Amg::VectorX & coefficients() const
get the coefficients determined by the fit to the sample points
BaseFunctionFitter()
default constructor, the number of fit parameters will be set to 5
int number_of_coefficients() const
get the number of fit parameters (coefficients) of the base functions to be fitted
void fit_parameters(const std::vector< SamplePoint > &sample_point, const unsigned int first_point, const unsigned int last_point, const BaseFunction &base_function)
perform a fit of the base functions (base_function) to the sample points as given in "sample_point" s...
Amg::VectorX m_b
m_A*m_alpha = m_b;
Amg::VectorX m_alpha
coefficients of the base functions after the fit
void set_number_of_coefficients(const unsigned nb_coefficients)
set the number of fit parameters (coefficients) of the base functions to nb_coefficients
Amg::MatrixX m_A
coefficient matrix for the fit
unsigned int m_nb_coefficients
number of coefficients
This is an abstract base class for a set of base functions for fits to sample points.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.