CMS 3D CMS Logo

PhotonXGBoostEstimator.cc
Go to the documentation of this file.
2 
4  booster_ = std::make_unique<pat::XGBooster>(weightsFile.fullPath());
5  booster_->addFeature("rawEnergy");
6  booster_->addFeature("r9");
7  booster_->addFeature("sigmaIEtaIEta");
8  booster_->addFeature("etaWidth");
9  booster_->addFeature("phiWidth");
10  booster_->addFeature("s4");
11  booster_->addFeature("eta");
12  booster_->addFeature("hOvrE");
13  booster_->addFeature("ecalPFIso");
14 
15  best_ntree_limit_ = best_ntree_limit;
16 }
17 
18 float PhotonXGBoostEstimator::computeMva(float rawEnergyIn,
19  float r9In,
20  float sigmaIEtaIEtaIn,
21  float etaWidthIn,
22  float phiWidthIn,
23  float s4In,
24  float etaIn,
25  float hOvrEIn,
26  float ecalPFIsoIn) const {
27  return booster_->predict(
28  {rawEnergyIn, r9In, sigmaIEtaIEtaIn, etaWidthIn, phiWidthIn, s4In, etaIn, hOvrEIn, ecalPFIsoIn},
30 }
std::unique_ptr< pat::XGBooster > booster_
float computeMva(float rawEnergyIn, float r9In, float sigmaIEtaIEtaIn, float etaWidthIn, float phiWidthIn, float s4In, float etaIn, float hOvrEIn, float ecalPFIsoIn) const
PhotonXGBoostEstimator(const edm::FileInPath &weightsFile, int best_ntree_limit)