13 for (
unsigned int varIndex = 0; varIndex <
vars.size(); ++varIndex) {
16 if (!quarkEntry || !gluonEntry)
19 int binQ = quarkEntry->histogram.findBin(
vars[varIndex]);
20 float Qi = quarkEntry->histogram.binContent(binQ);
22 int binG = gluonEntry->histogram.findBin(
vars[varIndex]);
23 float Gi = gluonEntry->histogram.binContent(binG);
48 auto myDataObject =
data.begin();
51 if (myDataObject ==
data.end()) {
53 <<
"Jet passed qgValidRange criteria, but no category found with rho=" << rho <<
", pt=" <<
pt 54 <<
", eta=" <<
eta <<
"\nPlease contact cms-qg-workinggroup@cern.ch" << std::endl;
58 return &*myDataObject;
70 if (rho < qgValidRange.
RhoMin)
72 if (rho > qgValidRange.
RhoMax)
89 float x1 = tanh(
a * atanh(2. *
x - 1.) +
b) / 2. + .5;
105 if (qgValue < 0 || qgValue > 1)
115 auto myDataObject = QGLSystematicsColl.
data.begin();
118 if (myDataObject == QGLSystematicsColl.
data.end())
121 return smearingFunction(qgValue, myDataObject->a, myDataObject->b, myDataObject->lmin, myDataObject->lmax);
float systematicSmearing(const QGLikelihoodSystematicsObject &QGLParamsColl, float pt, float eta, float rho, float qgValue, int qgIndex) const
bool isValidRange(float pt, float rho, float eta, const QGLikelihoodCategory &qgValidRange) const
Check the valid range of this qg tagger.
QGLikelihoodCategory qgValidRange
std::vector< Entry > data
const QGLikelihoodObject::Entry * findEntry(std::vector< QGLikelihoodObject::Entry > const &data, float eta, float pt, float rho, int qgIndex, int varIndex) const
Find matching entry in vector for a given eta, pt, rho, qgIndex and varIndex.
QGLikelihoodObject containing valid range and entries with category and histogram (mean is not used a...
Category structure: ranges associated with QGLikelihood histograms.
float computeQGLikelihood(const QGLikelihoodObject &QGLParamsColl, float pt, float eta, float rho, std::vector< float > vars) const
Compute likelihood for a jet using the QGLikelihoodObject information and a set of variables...
float smearingFunction(float x0, float a, float b, float min, float max) const
Return the smeared qgLikelihood value, given input x0 and parameters a, b, min and max...
char data[epos_bytes_allocation]
std::vector< Entry > data
QGLikelihoodSystematicsObject containing the parameters for the systematic smearing.
Log< level::Warning, false > LogWarning