#include <MinL3Algorithm.h>
Public Member Functions | |
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 More... | |
std::vector< float > | getSolution (bool resetsolution=true) |
get the solution at the end of the calibration More... | |
int | indexSqr2Reg (const int &sqrIndex, const int &maxCeta, const int &maxCphi) |
method to translate from square indices to region indices More... | |
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) |
MinL3Algorithm (float kweight_=0., int squareMode_=5, int mineta_=1, int maxeta_=85, int minphi_=1, int maxphi_=20) | |
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 More... | |
void | resetSolution () |
reset for new iteration More... | |
~MinL3Algorithm () | |
Destructor. More... | |
Private Attributes | |
int | countEvents |
std::vector< float > | Ewsum |
float | kweight |
int | maxeta |
int | maxphi |
int | mineta |
int | minphi |
int | Nchannels |
int | Nxtals |
int | squareMode |
std::vector< float > | wsum |
Implementation of the L3 Collaboration algorithm to solve a system Ax = B by minimization of |Ax-B| using an iterative linear approach This class is specific for the ECAL calibration
13.03.2007: R.Ofierzynski
Definition at line 19 of file MinL3Algorithm.h.
MinL3Algorithm::MinL3Algorithm | ( | float | kweight_ = 0. , |
int | squareMode_ = 5 , |
||
int | mineta_ = 1 , |
||
int | maxeta_ = 85 , |
||
int | minphi_ = 1 , |
||
int | maxphi_ = 20 |
||
) |
Default constructor kweight_ = event weight, squareMode_ = side length of the cluster square
Definition at line 10 of file MinL3Algorithm.cc.
References Ewsum, maxeta, maxphi, mineta, minphi, Nchannels, Nxtals, squareMode, and wsum.
MinL3Algorithm::~MinL3Algorithm | ( | ) |
void MinL3Algorithm::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 at line 91 of file MinL3Algorithm.cc.
References countEvents, Ewsum, i, indexSqr2Reg(), kweight, Nxtals, funct::pow(), w, and wsum.
Referenced by iterate().
std::vector< float > MinL3Algorithm::getSolution | ( | bool | resetsolution = true | ) |
get the solution at the end of the calibration
Definition at line 130 of file MinL3Algorithm.cc.
References Ewsum, i, Nchannels, resetSolution(), and wsum.
Referenced by iterate().
int MinL3Algorithm::indexSqr2Reg | ( | const int & | sqrIndex, |
const int & | maxCeta, | ||
const int & | maxCphi | ||
) |
method to translate from square indices to region indices
Definition at line 170 of file MinL3Algorithm.cc.
References maxeta, maxphi, mineta, minphi, and squareMode.
Referenced by addEvent(), and recalibrateEvent().
std::vector< float > MinL3Algorithm::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 |
||
) |
method doing the full calibration running nIter number of times, recalibrating the event matrix after each iteration with the new solution returns the vector of calibration coefficients built from all iteration solutions
to be used also as recipe on how to use the calibration methods one-by-one <<
Definition at line 32 of file MinL3Algorithm.cc.
References addEvent(), getSolution(), i, j, Nchannels, Nxtals, recalibrateEvent(), and pileupReCalc_HLTpaths::scale.
Referenced by ElectronCalibration::endJob(), and ElectronCalibrationUniv::endJob().
std::vector< float > MinL3Algorithm::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 at line 155 of file MinL3Algorithm.cc.
References i, indexSqr2Reg(), and Nxtals.
Referenced by iterate().
void MinL3Algorithm::resetSolution | ( | ) |
reset for new iteration
Definition at line 148 of file MinL3Algorithm.cc.
References Ewsum, Nchannels, and wsum.
Referenced by getSolution().
|
private |
Definition at line 56 of file MinL3Algorithm.h.
Referenced by addEvent().
|
private |
Definition at line 59 of file MinL3Algorithm.h.
Referenced by addEvent(), getSolution(), MinL3Algorithm(), and resetSolution().
|
private |
Definition at line 53 of file MinL3Algorithm.h.
Referenced by addEvent().
|
private |
Definition at line 55 of file MinL3Algorithm.h.
Referenced by indexSqr2Reg(), and MinL3Algorithm().
|
private |
Definition at line 55 of file MinL3Algorithm.h.
Referenced by indexSqr2Reg(), and MinL3Algorithm().
|
private |
Definition at line 55 of file MinL3Algorithm.h.
Referenced by indexSqr2Reg(), and MinL3Algorithm().
|
private |
Definition at line 55 of file MinL3Algorithm.h.
Referenced by indexSqr2Reg(), and MinL3Algorithm().
|
private |
Definition at line 57 of file MinL3Algorithm.h.
Referenced by getSolution(), iterate(), MinL3Algorithm(), and resetSolution().
|
private |
Definition at line 57 of file MinL3Algorithm.h.
Referenced by addEvent(), iterate(), MinL3Algorithm(), and recalibrateEvent().
|
private |
Definition at line 54 of file MinL3Algorithm.h.
Referenced by indexSqr2Reg(), and MinL3Algorithm().
|
private |
Definition at line 58 of file MinL3Algorithm.h.
Referenced by addEvent(), getSolution(), MinL3Algorithm(), and resetSolution().