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 
48 
49  private:
50  // auxiliary minimization objects //
55 
56  // private methods //
57  inline void init(void);
58 
60  inline void init(const int & nb_coefficients);
61 
62  public:
63  // Constructors
66  init();
67  }
69  BaseFunctionFitter(const int & nb_coefficients) {
70  init(nb_coefficients);
71  }
72 
73  // Methods
74  // get-methods //
77  inline int number_of_coefficients(void) const;
79  inline Amg::VectorX coefficients(void) const;
80 
81  // set-methods //
84  inline void set_number_of_coefficients(const int & nb_coefficients);
90  bool fit_parameters(const std::vector<SamplePoint> & sample_point,
91  const unsigned int & first_point,
92  const unsigned int & last_point,
93  BaseFunction * base_function);
94  };
95 
96 }
97 
99 // INCLUDE THE IMPLEMENATION OF INLINE METHODS //
101 
102 #include "BaseFunctionFitter.ixx"
103 
104 #endif
MuonCalib::BaseFunctionFitter::coefficients
Amg::VectorX coefficients(void) const
get the coefficients determined by the fit to the sample points
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:32
MuonCalib::BaseFunctionFitter::BaseFunctionFitter
BaseFunctionFitter(void)
default constructor, the number of fit parameters will be set to 5
Definition: BaseFunctionFitter.h:65
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
MuonCalib::BaseFunctionFitter::m_nb_coefficients
int m_nb_coefficients
number of coefficients
Definition: BaseFunctionFitter.h:51
MuonCalib::BaseFunctionFitter::set_number_of_coefficients
void set_number_of_coefficients(const int &nb_coefficients)
set the number of fit parameters (coefficients) of the base functions to nb_coefficients
MuonCalib::BaseFunction
Definition: BaseFunction.h:23
MuonCalib::BaseFunctionFitter
Definition: BaseFunctionFitter.h:47
MuonCalib::BaseFunctionFitter::number_of_coefficients
int number_of_coefficients(void) const
get the number of fit parameters (coefficients) of the base functions to be fitted
MuonCalib::BaseFunctionFitter::BaseFunctionFitter
BaseFunctionFitter(const int &nb_coefficients)
constructor, the number of fit parameters is set to nb_coefficients
Definition: BaseFunctionFitter.h:69
MuonCalib::BaseFunctionFitter::m_A
Amg::MatrixX m_A
coefficient matrix for the fit
Definition: BaseFunctionFitter.h:52
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::BaseFunctionFitter::init
void init(const int &nb_coefficients)
initialization method: the number of fit parameters (coefficients) is set to nb_coefficients
EventPrimitives.h
BaseFunction.h
MuonCalib::BaseFunctionFitter::m_alpha
Amg::VectorX m_alpha
coefficients of the base functions after the fit
Definition: BaseFunctionFitter.h:53
MuonCalib::BaseFunctionFitter::fit_parameters
bool fit_parameters(const std::vector< SamplePoint > &sample_point, const unsigned int &first_point, const unsigned int &last_point, 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:18
MuonCalib::BaseFunctionFitter::m_b
Amg::VectorX m_b
m_A*m_alpha = m_b;
Definition: BaseFunctionFitter.h:54
SamplePoint.h
MuonCalib::BaseFunctionFitter::init
void init(void)
default initialization method