Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:37:32

0001 #ifndef JetAlgorithms_QGLikelihoodCalculator_h
0002 #define JetAlgorithms_QGLikelihoodCalculator_h
0003 
0004 #include "CondFormats/JetMETObjects/interface/QGLikelihoodObject.h"
0005 
0006 /**
0007  * The QGLikelihoodCalculater calculates the likelihood for a jet
0008  * It takes information on the valid range of the tool, the binning of the categories, and their PDFs from the QGLikelihoodObject
0009  * The variables in the vars vector should match with the variables in the QGLikelihoodObject, in which they are identified by the varIndex
0010  * Authors: andrea.carlo.marini@cern.ch, tom.cornelis@cern.ch, cms-qg-workinggroup@cern.ch
0011  */
0012 class QGLikelihoodCalculator {
0013 public:
0014   QGLikelihoodCalculator() {}
0015   ~QGLikelihoodCalculator() {}
0016 
0017   float computeQGLikelihood(
0018       const QGLikelihoodObject &QGLParamsColl, float pt, float eta, float rho, std::vector<float> vars) const;
0019   float systematicSmearing(const QGLikelihoodSystematicsObject &QGLParamsColl,
0020                            float pt,
0021                            float eta,
0022                            float rho,
0023                            float qgValue,
0024                            int qgIndex) const;
0025 
0026 private:
0027   const QGLikelihoodObject::Entry *findEntry(std::vector<QGLikelihoodObject::Entry> const &data,
0028                                              float eta,
0029                                              float pt,
0030                                              float rho,
0031                                              int qgIndex,
0032                                              int varIndex) const;
0033   bool isValidRange(float pt, float rho, float eta, const QGLikelihoodCategory &qgValidRange) const;
0034   float smearingFunction(float x0, float a, float b, float min, float max) const;
0035 };
0036 
0037 #endif