#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 33 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 44 of file MomentumScaleCorrector.h.
References BaseFunction::convertToArrays(), BaseFunction::functionId_, l1ctLayer2EG_cff::id, scaleFunction_, scaleFunctionService(), and scaleFunctionVec_.
|
inline |
Definition at line 53 of file MomentumScaleCorrector.h.
References BaseFunction::functionId_, mps_fire::i, BaseFunction::parArray_, and scaleFunction_.
|
inline |
Alternative method that can be used with lorentzVectors.
Definition at line 81 of file MomentumScaleCorrector.h.
References mps_fire::i, BaseFunction::iterationNum_, BaseFunction::parArray_, DiDispStaMuonMonitor_cfi::pt, scaleFunctionBase< T >::scale(), and scaleFunction_.
Referenced by KalmanMuonCorrector.KalmanMuonCorrector::correct_all(), and JetReCalibrator.JetReCalibrator::correctAll().
|
inline |
Returns a pointer to the selected function.
Definition at line 65 of file MomentumScaleCorrector.h.
References mps_fire::i, and scaleFunction_.
|
inline |
Method to do the corrections. It is templated to work with all the track types.
Definition at line 69 of file MomentumScaleCorrector.h.
References mps_fire::i, BaseFunction::iterationNum_, BaseFunction::parArray_, DiDispStaMuonMonitor_cfi::pt, scaleFunctionBase< T >::scale(), scaleFunction_, and HLT_2024v14_cff::track.
|
protected |
Parser of the parameters file.
Definition at line 3 of file MomentumScaleCorrector.cc.
References BaseFunction::convertToArrays(), gather_cfg::cout, MillePedeFileConverter_cfg::fileName, BaseFunction::functionId_, recoMuon::in, align_cfg::iteration, BaseFunction::iterationNum_, mps_splice::line, EgammaValidation_cff::num, BaseFunction::parArray_, BaseFunction::parVecVec_, scaleFunction_, scaleFunctionService(), scaleFunctionVec_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by MomentumScaleCorrector().
|
protected |
Definition at line 94 of file MomentumScaleCorrector.h.
Referenced by correct(), function(), MomentumScaleCorrector(), operator()(), readParameters(), and ~MomentumScaleCorrector().
|
protected |
Definition at line 95 of file MomentumScaleCorrector.h.
Referenced by MomentumScaleCorrector(), and readParameters().