# Project CMSSW displayed by LXR

File indexing completed on 2024-04-06 11:59:28

```0001 #ifndef GenericMinL3Algorithm_H
0002 #define GenericMinL3Algorithm_H
0003
0004 /** \class GenericMinL3Algorithm
0005  *  Implementation of the L3 Collaboration algorithm to solve a system Ax = B
0006  *  by minimization of |Ax-B| using an iterative linear approach
0007  *
0008  * \author R.Ofierzynski, CERN
0009  */
0010
0011 #include <vector>
0012 #include <iostream>
0013
0014 class GenericMinL3Algorithm {
0015 public:
0016   /// Default constructor
0017   /// CAVEAT: use normalise = true only if you know what you're doing!
0018   GenericMinL3Algorithm(bool normalise = false);
0019
0020   /// Destructor
0021   ~GenericMinL3Algorithm();
0022
0023   /// run the Minimization L3 Algorithm "nIter" number of times, recalibrating the event matrix after each iteration with the new solution
0024   /// returns the vector of calibration coefficients built from all iteration solutions
0025   std::vector<float> iterate(const std::vector<std::vector<float> >& eventMatrix,
0026                              const std::vector<float>& energyVector,
0027                              int nIter);
0028
0029   /// perform one iteration using the Minimization L3 Algorithm
0030   /// returns the vector of calibration coefficients
0031   std::vector<float> iterate(const std::vector<std::vector<float> >& eventMatrix,
0032                              const std::vector<float>& energyVector);
0033
0034 protected:
0035 private:
0036   bool normaliseFlag;
0037 };
0038
0039 #endif  // GenericMinL3Algorithm_H```