File indexing completed on 2023-03-17 10:43:54
0001 #ifndef MinL3Algorithm_H
0002 #define MinL3Algorithm_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <vector>
0016 #include <iostream>
0017
0018 class MinL3Algorithm {
0019 public:
0020
0021
0022 MinL3Algorithm(
0023 float kweight_ = 0., int squareMode_ = 5, int mineta_ = 1, int maxeta_ = 85, int minphi_ = 1, int maxphi_ = 20);
0024
0025
0026 ~MinL3Algorithm();
0027
0028
0029
0030
0031 std::vector<float> iterate(const std::vector<std::vector<float> >& eventMatrix,
0032 const std::vector<int>& VmaxCeta,
0033 const std::vector<int>& VmaxCphi,
0034 const std::vector<float>& energyVector,
0035 const int& nIter,
0036 const bool& normalizeFlag = false);
0037
0038
0039 void addEvent(const std::vector<float>& eventSquare, const int& maxCeta, const int& maxCphi, const float& energy);
0040
0041
0042 std::vector<float> recalibrateEvent(const std::vector<float>& eventSquare,
0043 const int& maxCeta,
0044 const int& maxCphi,
0045 const std::vector<float>& recalibrateVector);
0046
0047
0048 std::vector<float> getSolution(bool resetsolution = true);
0049
0050
0051 void resetSolution();
0052
0053
0054 int indexSqr2Reg(const int& sqrIndex, const int& maxCeta, const int& maxCphi);
0055
0056 private:
0057 float kweight;
0058 int squareMode;
0059 int mineta, maxeta, minphi, maxphi;
0060 int countEvents;
0061 int Nchannels, Nxtals;
0062 std::vector<float> wsum;
0063 std::vector<float> Ewsum;
0064 };
0065
0066 #endif