Applies photon identification efficiency scale factors. More...
#include <PhotonWeight.h>
Public Member Functions | |
PhotonWeight (Dataset &dataset, Options const &options, PhotonBuilder const *photonBuilder) | |
Constructor. | |
virtual double | NominalWeight () const override |
Computes the total photon efficiency weight for the current event. | |
double | PhotonSF (Photon const &photon) const |
Gives scale factor for a photon. | |
Static Private Member Functions | |
static std::unique_ptr< TH2 > | ReadHistogram (std::string const &pathsWithNames) |
Reads a histogram with given path and name. | |
Private Attributes | |
std::vector< std::unique_ptr < TH2 > > | photonTable_ |
Histograms of different type of photon scale factors. | |
PhotonBuilder const * | photonBuilder_ |
Non-owning pointer to object that provides collection of photons. |
Applies photon identification efficiency scale factors.
The computation is done using the tight photon provided by the builder given to the constructor. The scale factors applied are read from ROOT files specified in the master configuration. Systematic uncertainties are not (yet) provided.
double PhotonWeight::PhotonSF | ( | Photon const & | photon | ) | const |
Gives scale factor for a photon.
This function searches in the scale factor table and returns the scale factor for the photon. If pt is higher than the last bin, it will return the value of last bin.
static std::unique_ptr<TH2> PhotonWeight::ReadHistogram | ( | std::string const & | pathsWithNames | ) | [static, private] |
Reads a histogram with given path and name.
Checks for and reports errors. The returned histogram is owned by the caller.
std::vector<std::unique_ptr<TH2> > PhotonWeight::photonTable_ [private] |
Histograms of different type of photon scale factors.
They are stored in 2D format with eta in X-axis and pt in Y-axis.