ATLAS Offline Software
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 
33 namespace MuonCalib {
34 
40 
41  private:
42  // auxiliary minimization objects //
43  unsigned int m_nb_coefficients{0};
47 
48  // private methods //
49  void init();
50 
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
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
MuonCalib::BaseFunctionFitter::coefficients
const Amg::VectorX & coefficients() const
get the coefficients determined by the fit to the sample points
Definition: BaseFunctionFitter.cxx:30
MuonCalib::BaseFunction
Definition: BaseFunction.h:16
MuonCalib::BaseFunctionFitter
Definition: BaseFunctionFitter.h:39
MuonCalib::BaseFunctionFitter::init
void init()
default initialization method
Definition: BaseFunctionFitter.cxx:16
MuonCalib::BaseFunctionFitter::m_A
Amg::MatrixX m_A
coefficient matrix for the fit
Definition: BaseFunctionFitter.h:44
MuonCalib::BaseFunctionFitter::set_number_of_coefficients
void set_number_of_coefficients(const unsigned nb_coefficients)
set the number of fit parameters (coefficients) of the base functions to nb_coefficients
Definition: BaseFunctionFitter.cxx:33
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::BaseFunctionFitter::fit_parameters
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...
Definition: BaseFunctionFitter.cxx:36
EventPrimitives.h
BaseFunction.h
MuonCalib::BaseFunctionFitter::m_alpha
Amg::VectorX m_alpha
coefficients of the base functions after the fit
Definition: BaseFunctionFitter.h:45
MuonCalib::BaseFunctionFitter::BaseFunctionFitter
BaseFunctionFitter()
default constructor, the number of fit parameters will be set to 5
Definition: BaseFunctionFitter.cxx:10
MuonCalib::BaseFunctionFitter::m_nb_coefficients
unsigned int m_nb_coefficients
number of coefficients
Definition: BaseFunctionFitter.h:43
MuonCalib::BaseFunctionFitter::m_b
Amg::VectorX m_b
m_A*m_alpha = m_b;
Definition: BaseFunctionFitter.h:46
SamplePoint.h
MuonCalib::BaseFunctionFitter::number_of_coefficients
int number_of_coefficients() const
get the number of fit parameters (coefficients) of the base functions to be fitted
Definition: BaseFunctionFitter.cxx:27