CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 
19 public:
23  float kweight_ = 0., int squareMode_ = 5, int mineta_ = 1, int maxeta_ = 85, int minphi_ = 1, int maxphi_ = 20);
24 
27 
31  std::vector<float> iterate(const std::vector<std::vector<float> >& eventMatrix,
32  const std::vector<int>& VmaxCeta,
33  const std::vector<int>& VmaxCphi,
34  const std::vector<float>& energyVector,
35  const int& nIter,
36  const bool& normalizeFlag = false);
37 
39  void addEvent(const std::vector<float>& eventSquare, const int& maxCeta, const int& maxCphi, const float& energy);
40 
42  std::vector<float> recalibrateEvent(const std::vector<float>& eventSquare,
43  const int& maxCeta,
44  const int& maxCphi,
45  const std::vector<float>& recalibrateVector);
46 
48  std::vector<float> getSolution(bool resetsolution = true);
49 
51  void resetSolution();
52 
54  int indexSqr2Reg(const int& sqrIndex, const int& maxCeta, const int& maxCphi);
55 
56 private:
57  float kweight;
62  std::vector<float> wsum;
63  std::vector<float> Ewsum;
64 };
65 
66 #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)