#include <SimpleJetCorrector.h>
Definition at line 15 of file SimpleJetCorrector.h.
◆ SimpleJetCorrector() [1/3]
SimpleJetCorrector::SimpleJetCorrector |
( |
const std::string & |
fDataFile, |
|
|
const std::string & |
fOption = "" |
|
) |
| |
◆ SimpleJetCorrector() [2/3]
◆ SimpleJetCorrector() [3/3]
◆ correction()
float SimpleJetCorrector::correction |
( |
const std::vector< float > & |
fX, |
|
|
const std::vector< float > & |
fY |
|
) |
| const |
Definition at line 32 of file SimpleJetCorrector.cc.
48 if (prevBin >= 0 && nextBin >= 0) {
55 cor = quadraticInterpolation(fX[
i], xMiddle, xValue);
66 <<
"Null or negative jet energy correction factor evaluated: " <<
result <<
". Truncating to 10e-10.";
References newFWLiteAna::bin, JetCorrectorParameters::binIndex(), JetCorrectorParameters::binIndexN(), correctionBin(), JetCorrectorParameters::definitions(), MillePedeFileConverter_cfg::e, mps_fire::i, mDoInterpolation, mParameters, JetCorrectorParameters::Definitions::nBinVar(), JetCorrectorParameters::neighbourBin(), JetCorrectorParameters::record(), mps_fire::result, createJobs::tmp, and JetCorrectorParameters::Record::xMiddle().
◆ correctionBin()
float SimpleJetCorrector::correctionBin |
( |
unsigned |
fBin, |
|
|
const std::vector< float > & |
fY |
|
) |
| const |
|
private |
Definition at line 74 of file SimpleJetCorrector.cc.
76 std::stringstream sserr;
77 sserr <<
"wrong bin: " << fBin <<
": only " <<
mParameters.
size() <<
" available!";
78 handleError(
"SimpleJetCorrector", sserr.str());
80 unsigned N = fY.size();
82 std::stringstream sserr;
83 sserr <<
"two many variables: " <<
N <<
" maximum is 4";
84 handleError(
"SimpleJetCorrector", sserr.str());
88 double params[par.size() - 2 *
N];
89 for (
unsigned int i = 2 *
N;
i < par.size();
i++) {
93 for (
unsigned i = 0;
i <
N;
i++) {
94 x[
i] = (fY[
i] < par[2 *
i]) ? par[2 *
i] : (fY[
i] > par[2 *
i + 1]) ? par[2 *
i + 1] : fY[
i];
References JetCorrectorParameters::definitions(), reco::FormulaEvaluator::evaluate(), mps_fire::i, invert(), JetCorrectorParameters::Definitions::isResponse(), mFunc, mParameters, N, JetCorrectorParameters::Record::parameters(), CalibrationSummaryClient_cfi::params, JetCorrectorParameters::record(), JetCorrectorParameters::size(), and x.
Referenced by correction().
◆ findInvertVar()
unsigned SimpleJetCorrector::findInvertVar |
( |
| ) |
|
|
private |
◆ invert()
float SimpleJetCorrector::invert |
( |
const double * |
args, |
|
|
const double * |
params |
|
) |
| const |
|
private |
Definition at line 119 of file SimpleJetCorrector.cc.
128 memcpy(&
x,
args,
sizeof(
double) * 4);
References writedatasetfile::args, MillePedeFileConverter_cfg::e, reco::FormulaEvaluator::evaluate(), mFunc, mInvertVar, metDiagnosticParameterSet_cfi::nMax, reco::FormulaEvaluator::numberOfParameters(), CalibrationSummaryClient_cfi::params, boostedTaus_cff::precision, createJobs::tmp, and x.
Referenced by correctionBin().
◆ operator=()
◆ parameters()
◆ setFuncParameters()
void SimpleJetCorrector::setFuncParameters |
( |
| ) |
|
|
private |
◆ setInterpolation()
void SimpleJetCorrector::setInterpolation |
( |
bool |
fInterpolation | ) |
|
|
inline |
◆ mDoInterpolation
bool SimpleJetCorrector::mDoInterpolation |
|
private |
◆ mFunc
◆ mInvertVar
unsigned SimpleJetCorrector::mInvertVar |
|
private |
◆ mParameters