CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
MinL3AlgoUniv< IDdet > Class Template Reference

#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
 

Detailed Description

template<class IDdet>
class MinL3AlgoUniv< IDdet >

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.

Author
R.Ofierzynski, CERN

Definition at line 20 of file MinL3AlgoUniv.h.

Member Typedef Documentation

template<class IDdet>
typedef IDmap::const_iterator MinL3AlgoUniv< IDdet >::citer_IDmap

Definition at line 26 of file MinL3AlgoUniv.h.

template<class IDdet>
typedef std::map<IDdet,float> MinL3AlgoUniv< IDdet >::IDmap

Definition at line 23 of file MinL3AlgoUniv.h.

template<class IDdet>
typedef IDmap::value_type MinL3AlgoUniv< IDdet >::IDmapvalue

Definition at line 24 of file MinL3AlgoUniv.h.

template<class IDdet>
typedef IDmap::iterator MinL3AlgoUniv< IDdet >::iter_IDmap

Definition at line 25 of file MinL3AlgoUniv.h.

Constructor & Destructor Documentation

template<class IDdet >
MinL3AlgoUniv< IDdet >::MinL3AlgoUniv ( float  kweight_ = 0.)

Default constructor kweight_ = event weight

Definition at line 67 of file MinL3AlgoUniv.h.

template<class IDdet >
MinL3AlgoUniv< IDdet >::~MinL3AlgoUniv ( )

Destructor.

Definition at line 75 of file MinL3AlgoUniv.h.

Member Function Documentation

template<class IDdet>
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.

Referenced by L3CalibBlock::Fill().

template<class IDdet >
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.

Referenced by L3CalibBlock::solve().

template<class IDdet>
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.

template<class IDdet>
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.

template<class IDdet >
void MinL3AlgoUniv< IDdet >::resetSolution ( )

reset for new iteration

Definition at line 208 of file MinL3AlgoUniv.h.

Referenced by L3CalibBlock::reset().

Member Data Documentation

template<class IDdet>
int MinL3AlgoUniv< IDdet >::countEvents
private

Definition at line 58 of file MinL3AlgoUniv.h.

template<class IDdet>
IDmap MinL3AlgoUniv< IDdet >::Ewsum
private

Definition at line 60 of file MinL3AlgoUniv.h.

template<class IDdet>
float MinL3AlgoUniv< IDdet >::kweight
private

Definition at line 57 of file MinL3AlgoUniv.h.

template<class IDdet>
IDmap MinL3AlgoUniv< IDdet >::wsum
private

Definition at line 59 of file MinL3AlgoUniv.h.