7 #ifndef JetCorrectorParameters_h 8 #define JetCorrectorParameters_h 37 Definitions(
const std::vector<std::string>& fBinVar,
const std::vector<std::string>& fParVar,
const std::string& fFormula,
bool fIsResponse);
65 Record() : mNvar(0),mMin(0),mMax(0) {}
66 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) {}
69 unsigned nVar()
const {
return mNvar; }
70 float xMin(
unsigned fVar)
const {
return mMin[fVar]; }
71 float xMax(
unsigned fVar)
const {
return mMax[fVar]; }
73 float parameter(
unsigned fIndex)
const {
return mParameters[fIndex]; }
74 std::vector<float>
parameters()
const {
return mParameters; }
78 if (
xMin(0) < other.
xMin(0))
return true;
79 if (
xMin(0) > other.
xMin(0))
return false;
80 if (
xMin(1) < other.
xMin(1))
return true;
81 if (
xMin(1) > other.
xMin(1))
return false;
98 const std::vector<JetCorrectorParameters::Record>& fRecords)
104 unsigned size(
unsigned fVar)
const;
105 int binIndex(
const std::vector<float>& fX)
const;
106 int binIndexN(
const std::vector<float>& fX)
const;
107 int neighbourBin(
unsigned fIndex,
unsigned fVar,
bool fNext)
const;
108 std::vector<float>
binCenters(
unsigned fVar)
const;
119 std::vector<JetCorrectorParameters::Record>
mRecords;
147 UncertaintyAbsolute=11,
148 UncertaintyHighPtExtra=12,
149 UncertaintySinglePionECAL=13,
150 UncertaintySinglePionHCAL=27,
151 UncertaintyFlavor=14,
153 UncertaintyRelativeJEREC1=16,
154 UncertaintyRelativeJEREC2=17,
155 UncertaintyRelativeJERHF=18,
156 UncertaintyRelativePtEC1=28,
157 UncertaintyRelativePtEC2=29,
158 UncertaintyRelativePtHF=30,
159 UncertaintyRelativeStatEC2=19,
160 UncertaintyRelativeStatHF=20,
161 UncertaintyRelativeFSR=21,
162 UncertaintyRelativeSample=31,
163 UncertaintyPileUpDataMC=22,
164 UncertaintyPileUpOOT=23,
165 UncertaintyPileUpPtBB=24,
166 UncertaintyPileUpPtEC=32,
167 UncertaintyPileUpPtHF=33,
168 UncertaintyPileUpBias=25,
169 UncertaintyPileUpJetRate=26,
178 enum L5_Species_t {L5_bJ=0,L5_cJ,L5_qJ,L5_gJ,L5_bT,L5_cT,L5_qT,L5_gT,N_L5_SPECIES};
179 enum L7_Species_t {L7_gJ=0,L7_qJ,L7_cJ,L7_bJ,L7_jJ,L7_qT,L7_cT,L7_bT,L7_jT,N_L7_SPECIES};
191 void push_back( key_type
i, value_type
const & j, label_type
const & flav =
"" );
206 void validKeys(std::vector<key_type> &
keys )
const;
213 std::vector<std::string> &
outputs );
216 static key_type getL5Bin(
std::string const & flav );
218 static key_type getL7Bin(
std::string const & flav );
220 static bool isL5( key_type k );
222 static bool isL7( key_type k );
float xMin(unsigned fVar) const
std::vector< float > mMax
collection_type & getCorrections()
JetCorrectorParameters const & operator[](std::string const &label) const
std::pair< key_type, value_type > pair_type
std::vector< float > mMin
std::string parVar(unsigned fIndex) const
std::vector< float > parameters() const
std::string binVar(unsigned fIndex) const
const Definitions & definitions() const
std::vector< pair_type > collection_type
std::vector< JetCorrectorParameters::Record > mRecords
const Record & record(unsigned fBin) const
collection_type & getCorrectionsL7()
std::vector< float > mParameters
std::vector< std::string > parVar() const
std::string formula() const
float parameter(unsigned fIndex) const
void operator()(JetCorrectorParametersCollection &jcpc)
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)
T operator[](int i) const
static const int MAX_SIZE_DIMENSIONALITY
float xMiddle(unsigned fVar) const
float xMax(unsigned fVar) const
std::string level() const
std::vector< std::string > mParVar
collection_type correctionsL7_
std::vector< std::string > mBinVar
JetCorrectorParametersCollection()
collection_type correctionsL5_
collection_type corrections_
#define COND_SERIALIZABLE
bool operator<(DTCELinkId const &lhs, DTCELinkId const &rhs)
int binIndexN(const std::vector< float > &fX) const
std::ostream & operator<<(std::ostream &out, const JetCorrectorParameters::Record &fBin)
unsigned nParameters() const
collection_type & getCorrectionsL5()
std::vector< std::string > binVar() const
JetCorrectorParameters::Definitions mDefinitions
int neighbourBin(unsigned fIndex, unsigned fVar, bool fNext) const
JetCorrectorParameters value_type
JetCorrectorParameters(const JetCorrectorParameters::Definitions &fDefinitions, const std::vector< JetCorrectorParameters::Record > &fRecords)