test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MinL3Algorithm.h
Go to the documentation of this file.
1 #ifndef MinL3Algorithm_H
2 #define MinL3Algorithm_H
3 
15 #include <vector>
16 #include <iostream>
17 
18 
20 {
21 public:
24  MinL3Algorithm(float kweight_ = 0., int squareMode_ = 5, int mineta_ = 1, int maxeta_ = 85, int minphi_ = 1, int maxphi_ = 20);
25 
28 
32  std::vector<float> iterate(const std::vector<std::vector<float> >& eventMatrix, const std::vector<int>& VmaxCeta, const std::vector<int>& VmaxCphi, const std::vector<float>& energyVector, const int& nIter, const bool& normalizeFlag = false);
33 
34 
36  void addEvent(const std::vector<float>& eventSquare, const int& maxCeta, const int& maxCphi, const float& energy);
37 
39  std::vector<float> recalibrateEvent(const std::vector<float>& eventSquare, const int& maxCeta, const int& maxCphi, const std::vector<float>& recalibrateVector);
40 
42  std::vector<float> getSolution(bool resetsolution=true);
43 
45  void resetSolution();
46 
48  int indexSqr2Reg(const int& sqrIndex, const int& maxCeta, const int& maxCphi);
49 
50 
51 private:
52 
53  float kweight;
58  std::vector<float> wsum;
59  std::vector<float> Ewsum;
60 
61 };
62 
63 #endif // MinL3Algorithm_H
MinL3Algorithm(float kweight_=0., int squareMode_=5, int mineta_=1, int maxeta_=85, int minphi_=1, int maxphi_=20)
std::vector< float > getSolution(bool resetsolution=true)
get the solution at the end of the calibration
int indexSqr2Reg(const int &sqrIndex, const int &maxCeta, const int &maxCphi)
method to translate from square indices to region indices
std::vector< float > wsum
~MinL3Algorithm()
Destructor.
void resetSolution()
reset for new iteration
void addEvent(const std::vector< float > &eventSquare, const int &maxCeta, const int &maxCphi, const float &energy)
add event to the calculation of the calibration vector
std::vector< float > Ewsum
std::vector< float > recalibrateEvent(const std::vector< float > &eventSquare, const int &maxCeta, const int &maxCphi, const std::vector< float > &recalibrateVector)
recalibrate before next iteration: give previous solution vector as argument
std::vector< float > iterate(const std::vector< std::vector< float > > &eventMatrix, const std::vector< int > &VmaxCeta, const std::vector< int > &VmaxCphi, const std::vector< float > &energyVector, const int &nIter, const bool &normalizeFlag=false)