#include <MinL3AlgoUniv.h>
Public Types | |
typedef IDmap::const_iterator | citer_IDmap |
typedef std::map< IDdet, float > | IDmap |
typedef IDmap::value_type | IDmapvalue |
typedef IDmap::iterator | iter_IDmap |
Public Member Functions | |
void | addEvent (const std::vector< float > &myCluster, const std::vector< IDdet > &idCluster, const float &energy) |
add event to the calculation of the calibration vector More... | |
IDmap | getSolution (const bool resetsolution=true) |
IDmap | iterate (const std::vector< std::vector< float > > &eventMatrix, const std::vector< std::vector< IDdet > > &idMatrix, const std::vector< float > &energyVector, const int &nIter, const bool &normalizeFlag=false) |
MinL3AlgoUniv (float kweight_=0.) | |
std::vector< float > | recalibrateEvent (const std::vector< float > &myCluster, const std::vector< IDdet > &idCluster, const IDmap &newCalibration) |
recalibrate before next iteration: give previous solution vector as argument More... | |
void | resetSolution () |
reset for new iteration More... | |
~MinL3AlgoUniv () | |
Destructor. More... | |
Private Attributes | |
int | countEvents |
IDmap | Ewsum |
float | kweight |
IDmap | 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 should be universal, i.e. working with DetIds or whatever else will be invented to identify Subdetector parts The bookkeeping of the cluster size and its elements has to be done by the user.
Definition at line 20 of file MinL3AlgoUniv.h.
typedef IDmap::const_iterator MinL3AlgoUniv< IDdet >::citer_IDmap |
Definition at line 26 of file MinL3AlgoUniv.h.
typedef std::map<IDdet,float> MinL3AlgoUniv< IDdet >::IDmap |
Definition at line 23 of file MinL3AlgoUniv.h.
typedef IDmap::value_type MinL3AlgoUniv< IDdet >::IDmapvalue |
Definition at line 24 of file MinL3AlgoUniv.h.
typedef IDmap::iterator MinL3AlgoUniv< IDdet >::iter_IDmap |
Definition at line 25 of file MinL3AlgoUniv.h.
MinL3AlgoUniv< IDdet >::MinL3AlgoUniv | ( | float | kweight_ = 0. | ) |
Default constructor kweight_ = event weight
Definition at line 67 of file MinL3AlgoUniv.h.
References MinL3AlgoUniv< IDdet >::resetSolution().
MinL3AlgoUniv< IDdet >::~MinL3AlgoUniv | ( | ) |
void MinL3AlgoUniv< IDdet >::addEvent | ( | const std::vector< float > & | myCluster, |
const std::vector< IDdet > & | idCluster, | ||
const float & | energy | ||
) |
add event to the calculation of the calibration vector
Definition at line 150 of file MinL3AlgoUniv.h.
References i, funct::pow(), and w.
Referenced by L3CalibBlock::Fill().
MinL3AlgoUniv< IDdet >::IDmap MinL3AlgoUniv< IDdet >::getSolution | ( | const bool | resetsolution = true | ) |
get the solution at the end of the calibration as a map between DetIds and calibration constant
Definition at line 188 of file MinL3AlgoUniv.h.
References i.
Referenced by L3CalibBlock::solve().
MinL3AlgoUniv< IDdet >::IDmap MinL3AlgoUniv< IDdet >::iterate | ( | const std::vector< std::vector< float > > & | eventMatrix, |
const std::vector< std::vector< IDdet > > & | idMatrix, | ||
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
also to be used also as recipe on how to use the calibration methods << one-by-one with a re-selection of the events in between the iterations<<
Definition at line 81 of file MinL3AlgoUniv.h.
References i, j, and pileupReCalc_HLTpaths::scale.
Referenced by ElectronCalibrationUniv::endJob(), and hcalCalib::Terminate().
std::vector< float > MinL3AlgoUniv< IDdet >::recalibrateEvent | ( | const std::vector< float > & | myCluster, |
const std::vector< IDdet > & | idCluster, | ||
const IDmap & | newCalibration | ||
) |
recalibrate before next iteration: give previous solution vector as argument
Definition at line 216 of file MinL3AlgoUniv.h.
References gather_cfg::cout, and i.
void MinL3AlgoUniv< IDdet >::resetSolution | ( | ) |
reset for new iteration
Definition at line 208 of file MinL3AlgoUniv.h.
Referenced by MinL3AlgoUniv< IDdet >::MinL3AlgoUniv(), and L3CalibBlock::reset().
|
private |
Definition at line 58 of file MinL3AlgoUniv.h.
|
private |
Definition at line 60 of file MinL3AlgoUniv.h.
|
private |
Definition at line 57 of file MinL3AlgoUniv.h.
|
private |
Definition at line 59 of file MinL3AlgoUniv.h.