7 #ifndef JetCorrectorParameters_h
8 #define JetCorrectorParameters_h
28 Definitions(
const std::vector<std::string>& fBinVar,
const std::vector<std::string>& fParVar,
const std::string& fFormula,
bool fIsResponse);
55 Record(
unsigned fNvar,
const std::vector<float>& fXMin,
const std::vector<float>& fXMax,
const std::vector<float>& fParameters) :
mNvar(fNvar),
mMin(fXMin),
mMax(fXMax),
mParameters(fParameters) {}
56 Record(
const std::string& fLine,
unsigned fNvar);
58 float xMin(
unsigned fVar)
const {
return mMin[fVar]; }
59 float xMax(
unsigned fVar)
const {
return mMax[fVar]; }
77 const std::vector<JetCorrectorParameters::Record>& fRecords)
83 unsigned size(
unsigned fVar)
const;
84 int binIndex(
const std::vector<float>& fX)
const;
85 int neighbourBin(
unsigned fIndex,
unsigned fVar,
bool fNext)
const;
86 std::vector<float>
binCenters(
unsigned fVar)
const;
88 void printFile(
const std::string& fFileName)
const;
94 std::vector<JetCorrectorParameters::Record>
mRecords;
171 std::vector<std::string> & outputs );
float xMin(unsigned fVar) const
static std::string findLabel(key_type k)
std::vector< float > mMax
static std::vector< std::string > labels_
JetCorrectorParameters const & operator[](std::string const &label) const
void push_back(key_type i, value_type const &j, label_type const &flav="")
std::pair< key_type, value_type > pair_type
std::vector< float > mMin
std::string parVar(unsigned fIndex) const
static std::string findL7Parton(key_type k)
std::vector< float > parameters() const
std::string binVar(unsigned fIndex) const
const Definitions & definitions() const
std::vector< pair_type > collection_type
static key_type getL5Bin(std::string const &flav)
static const char * l5FlavorArray_[N_L5_SPECIES]
static const char * labelsArray_[N_LEVELS]
std::vector< JetCorrectorParameters::Record > mRecords
const Record & record(unsigned fBin) const
std::vector< float > mParameters
std::vector< std::string > parVar() const
std::string formula() const
float parameter(unsigned fIndex) const
static std::string findL5Flavor(key_type k)
void printFile(const std::string &fFileName) const
int binIndex(const std::vector< float > &fX) const
std::vector< float > binCenters(unsigned fVar) const
Record(unsigned fNvar, const std::vector< float > &fXMin, const std::vector< float > &fXMax, const std::vector< float > &fParameters)
float xMiddle(unsigned fVar) const
static const char * l7PartonArray_[N_L7_SPECIES]
static std::vector< std::string > l7Partons_
key_type findKey(std::string const &label) const
static bool isL7(key_type k)
float xMax(unsigned fVar) const
std::string level() const
int operator<(const Record &other) const
static bool isL5(key_type k)
std::vector< std::string > mParVar
collection_type correctionsL7_
std::vector< std::string > mBinVar
JetCorrectorParametersCollection()
collection_type correctionsL5_
collection_type corrections_
static key_type getL7Bin(std::string const &flav)
static std::vector< std::string > l5Flavors_
unsigned nParameters() const
static void getSections(std::string inputFile, std::vector< std::string > &outputs)
void validKeys(std::vector< key_type > &keys) const
std::vector< std::string > binVar() const
JetCorrectorParameters::Definitions mDefinitions
int neighbourBin(unsigned fIndex, unsigned fVar, bool fNext) const
JetCorrectorParameters value_type
JetCorrectorParameters const & operator[](key_type k) const
JetCorrectorParameters(const JetCorrectorParameters::Definitions &fDefinitions, const std::vector< JetCorrectorParameters::Record > &fRecords)