6#ifndef JetCalibTools_GlobalNNCalibration_H
7#define JetCalibTools_GlobalNNCalibration_H
11#include "lwtnn/LightweightGraph.hh"
132 void loadSplineHists(
const TString & fileName,
const std::string &etajes_name =
"etaJes");
150 std::vector<std::unique_ptr<lwt::LightweightGraph> >
m_lwnns;
std::string m_calibAreaTag
std::vector< std::unique_ptr< TH1 > > m_ptCorrFactors
double getJetDetEta(const xAOD::Jet &jet_reco) const
Returns the detector eta of the jet.
std::vector< double > m_closureEtaBins
std::vector< double > m_JPtS_MinPt_Slopes
std::vector< double > m_JPtS_MinPt_Pt
double getJetWtrk1000(const xAOD::Jet &jet_reco, int PVindex) const
Returns the jet width.
std::vector< TString > m_NNInputs
GlobalNNCalibration()
The constructor.
int getJetNtrk1000(const xAOD::Jet &jet_reco, int PVindex) const
Returns the number of tracks with pT > 1 GeV associated to the jet.
virtual StatusCode initialize() override
Returns the charged fraction of a jet.
void loadSplineHists(const TString &fileName, const std::string &etajes_name="etaJes")
Reads the spline histograms from the file given in the config, and stores them in m_ptCorrFactors.
virtual ~GlobalNNCalibration()=default
The destructor.
double getJetChargedFraction(const xAOD::Jet &jet_reco, int PVindex) const
Returns the charged fraction of a jet.
double getJESPt(const xAOD::Jet &jet_reco) const
Returns the jet pT after the MCJES calibration.
virtual StatusCode calibrate(xAOD::Jet &jet, JetEventInfo &) const override
double getSplineCorr(const int etaBin, double E) const
Returns the correction from spline histogram, which should be applied after the NN correction.
std::map< std::string, double > getJetFeatures(const xAOD::Jet &jet_reco, JetEventInfo &jetEventInfo) const
Returns a map of possible inputs to the NN, and their corresponding values for this jet.
std::vector< double > m_nnEtaBins
int getEtaBin(const xAOD::Jet &jet_reco, const std::vector< double > &etaBins) const
Returns the eta bin, as determined by a list of bin edges.
double getSplineSlope(const int ieta, const double minPt) const
Gets the slope of the spline histogram for a given eta bin, for extrapolation of the calibration.
std::vector< double > m_JPtS_MinPt_R
std::vector< std::unique_ptr< lwt::LightweightGraph > > m_lwnns
JetCalibrationStep(const char *name="JetCalibrationStep")
Jet_v1 Jet
Definition of the current "jet version".