CMS 3D CMS Logo

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::Ewsum
std::vector< float > Ewsum
Definition: MinL3Algorithm.h:63
MinL3Algorithm::Nchannels
int Nchannels
Definition: MinL3Algorithm.h:61
MinL3Algorithm::kweight
float kweight
Definition: MinL3Algorithm.h:57
MinL3Algorithm::wsum
std::vector< float > wsum
Definition: MinL3Algorithm.h:62
MinL3Algorithm::countEvents
int countEvents
Definition: MinL3Algorithm.h:60
MinL3Algorithm::addEvent
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
Definition: MinL3Algorithm.cc:95
MinL3Algorithm
Definition: MinL3Algorithm.h:18
MinL3Algorithm::squareMode
int squareMode
Definition: MinL3Algorithm.h:58
MinL3Algorithm::~MinL3Algorithm
~MinL3Algorithm()
Destructor.
Definition: MinL3Algorithm.cc:33
MinL3Algorithm::MinL3Algorithm
MinL3Algorithm(float kweight_=0., int squareMode_=5, int mineta_=1, int maxeta_=85, int minphi_=1, int maxphi_=20)
Definition: MinL3Algorithm.cc:10
MinL3Algorithm::mineta
int mineta
Definition: MinL3Algorithm.h:59
MinL3Algorithm::maxeta
int maxeta
Definition: MinL3Algorithm.h:59
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
MinL3Algorithm::recalibrateEvent
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
Definition: MinL3Algorithm.cc:156
MinL3Algorithm::indexSqr2Reg
int indexSqr2Reg(const int &sqrIndex, const int &maxCeta, const int &maxCphi)
method to translate from square indices to region indices
Definition: MinL3Algorithm.cc:171
MinL3Algorithm::iterate
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)
Definition: MinL3Algorithm.cc:35
MinL3Algorithm::resetSolution
void resetSolution()
reset for new iteration
Definition: MinL3Algorithm.cc:151
MinL3Algorithm::getSolution
std::vector< float > getSolution(bool resetsolution=true)
get the solution at the end of the calibration
Definition: MinL3Algorithm.cc:134
MinL3Algorithm::Nxtals
int Nxtals
Definition: MinL3Algorithm.h:61
MinL3Algorithm::maxphi
int maxphi
Definition: MinL3Algorithm.h:59
MinL3Algorithm::minphi
int minphi
Definition: MinL3Algorithm.h:59