#include <MomentumScaleCorrector.h>
Public Member Functions | |
template<class U > | |
double | correct (const U &lorentzVector) |
Alternative method that can be used with lorentzVectors. More... | |
scaleFunctionBase< double * > * | function (const int i) |
Returns a pointer to the selected function. More... | |
MomentumScaleCorrector (TString identifier) | |
MomentumScaleCorrector (const MuScleFitDBobject *dbObject) | |
template<class U > | |
double | operator() (const U &track) |
Method to do the corrections. It is templated to work with all the track types. More... | |
~MomentumScaleCorrector () | |
Public Member Functions inherited from BaseFunction | |
BaseFunction () | |
BaseFunction (const MuScleFitDBobject *dbObject) | |
Constructor when receiving database parameters. More... | |
std::vector< double > | fitQuality () const |
Return the vector of fit quality values. More... | |
std::vector< int > | identifiers () const |
Return the vector of function identifiers. More... | |
std::vector< double > | parameters () const |
Return the vector of parameters. More... | |
Protected Member Functions | |
void | readParameters (TString fileName) |
Parser of the parameters file. More... | |
Protected Member Functions inherited from BaseFunction | |
template<class T > | |
void | convertToArrays (T **&function_, const std::vector< T * > &functionVec_) |
Convert vectors to arrays for faster random access. The first pointer is replaced, thus it is taken by reference. More... | |
Protected Attributes | |
scaleFunctionBase< double * > ** | scaleFunction_ |
std::vector< scaleFunctionBase < double * > * > | scaleFunctionVec_ |
Protected Attributes inherited from BaseFunction | |
std::vector< double > | fitQuality_ |
double ** | fitQualityArray_ |
std::vector< int > | functionId_ |
int | iterationNum_ |
double ** | parArray_ |
std::vector< double > | parVecVec_ |
MomentumScaleCorrector class Author M. De Mattia - 18/11/2008 This is used to have a common set of functions for the specialized templates to use. The constructor receives the name identifying the parameters for the correction function. It reads the parameters from a txt file in data/.
It handles multiple iterations. It is also possible to use different functions in different iterations.
ATTENTION: it is important that iterations numbers in the txt file start from 0.
Definition at line 25 of file MomentumScaleCorrector.h.
|
inline |
The constructor takes a string identifying the parameters to read. It parses the txt file containing the parameters, extracts the index of the correction function and saves the corresponding pointer. It then fills the vector of parameters.
Definition at line 34 of file MomentumScaleCorrector.h.
References readParameters().
|
inline |
This constructor is used when reading parameters from the db. It receives a pointer to an object of type MuScleFitDBobject containing the parameters and the functions identifiers.
Definition at line 46 of file MomentumScaleCorrector.h.
References BaseFunction::convertToArrays(), BaseFunction::functionId_, errorMatrix2Lands_multiChannel::id, scaleFunction_, scaleFunctionService(), and scaleFunctionVec_.
|
inline |
Definition at line 56 of file MomentumScaleCorrector.h.
References BaseFunction::functionId_, i, BaseFunction::parArray_, and scaleFunction_.
|
inline |
Alternative method that can be used with lorentzVectors.
Definition at line 86 of file MomentumScaleCorrector.h.
References i, BaseFunction::iterationNum_, BaseFunction::parArray_, scaleFunctionBase< T >::scale(), and scaleFunction_.
|
inline |
Returns a pointer to the selected function.
Definition at line 68 of file MomentumScaleCorrector.h.
References i, and scaleFunction_.
|
inline |
Method to do the corrections. It is templated to work with all the track types.
Definition at line 73 of file MomentumScaleCorrector.h.
References i, BaseFunction::iterationNum_, BaseFunction::parArray_, scaleFunctionBase< T >::scale(), and scaleFunction_.
|
protected |
Parser of the parameters file.
Definition at line 3 of file MomentumScaleCorrector.cc.
References BaseFunction::convertToArrays(), gather_cfg::cout, BaseFunction::functionId_, recoMuon::in, align_cfg::iteration, BaseFunction::iterationNum_, geometryCSVtoXML::line, BaseFunction::parArray_, BaseFunction::parVecVec_, scaleFunction_, scaleFunctionService(), and scaleFunctionVec_.
Referenced by MomentumScaleCorrector().
|
protected |
Definition at line 100 of file MomentumScaleCorrector.h.
Referenced by correct(), function(), MomentumScaleCorrector(), operator()(), readParameters(), and ~MomentumScaleCorrector().
|
protected |
Definition at line 101 of file MomentumScaleCorrector.h.
Referenced by MomentumScaleCorrector(), and readParameters().