CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/Calibration/Tools/interface/MinL3Algorithm.h

Go to the documentation of this file.
00001 #ifndef MinL3Algorithm_H
00002 #define MinL3Algorithm_H
00003 
00017 #include <vector>
00018 #include <iostream>
00019 
00020 
00021 class MinL3Algorithm
00022 {
00023 public:
00026   MinL3Algorithm(float kweight_ = 0., int squareMode_ = 5, int mineta_ = 1, int maxeta_ = 85, int minphi_ = 1, int maxphi_ = 20);
00027 
00029   ~MinL3Algorithm();
00030 
00034   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);
00035 
00036 
00038   void addEvent(const std::vector<float>& eventSquare, const int& maxCeta, const int& maxCphi, const float& energy);
00039 
00041   std::vector<float> recalibrateEvent(const std::vector<float>& eventSquare, const int& maxCeta, const int& maxCphi, const std::vector<float>& recalibrateVector); 
00042 
00044   std::vector<float> getSolution(bool resetsolution=true);
00045 
00047   void resetSolution(); 
00048 
00050   int indexSqr2Reg(const int& sqrIndex, const int& maxCeta, const int& maxCphi);
00051 
00052 
00053 private:
00054 
00055   float kweight;
00056   int squareMode;
00057   int mineta, maxeta, minphi, maxphi;
00058   int countEvents;
00059   int Nchannels, Nxtals;
00060   std::vector<float> wsum;
00061   std::vector<float> Ewsum;
00062 
00063 };
00064 
00065 #endif // MinL3Algorithm_H