#include <ElectronMVAEstimatorRun2Fall17.h>
Classes | |
struct | Clip |
Public Member Functions | |
void | constrainMVAVariables (std::vector< float > &) const |
ElectronMVAEstimatorRun2Fall17 (const edm::ParameterSet &conf, bool withIso) | |
ElectronMVAEstimatorRun2Fall17 (const std::string &mvaTag, const std::string &mvaName, bool withIso, const std::string &conversionsTag="reducedEgamma:reducedConversions", const std::string &beamspotTag="offlineBeamSpot", const double ptSplit=10., const double ebSplit=0.800, const double ebeeSplit=1.479, const bool debug=false) | |
std::vector< float > | fillMVAVariables (const edm::Ptr< reco::Candidate > &particle, const edm::Event &) const override |
std::vector< float > | fillMVAVariables (const reco::GsfElectron *particle, const edm::Handle< reco::ConversionCollection > conversions, const reco::BeamSpot *beamSpot, const edm::Handle< double > rho) const |
int | findCategory (const edm::Ptr< reco::Candidate > &particle) const override |
int | findCategory (const reco::GsfElectron *particle) const |
const std::string & | getName () const final |
int | getNCategories () const override |
const std::string & | getTag () const final |
void | init (const std::vector< std::string > &weightFileNames) |
float | mvaValue (const edm::Ptr< reco::Candidate > &particle, const edm::Event &) const override |
float | mvaValue (const reco::GsfElectron *particle, const edm::EventBase &) const |
float | mvaValue (const int iCategory, const std::vector< float > &vars) const |
void | setClips (const std::vector< double > &clipsLowerValues, const std::vector< double > &clipsUpperValues) |
void | setConsumes (edm::ConsumesCollector &&) const final |
~ElectronMVAEstimatorRun2Fall17 () override | |
Public Member Functions inherited from AnyMVAEstimatorRun2Base | |
AnyMVAEstimatorRun2Base (const edm::ParameterSet &conf) | |
virtual void | getEventContent (const edm::Event &iEvent) const final |
template<typename... Args> | |
std::vector< float > | packMVAVariables (const Args...args) const |
virtual | ~AnyMVAEstimatorRun2Base () |
Protected Types | |
enum | MVACategories_ { UNDEFINED = -1, CAT_EB1_PTLow = 0, CAT_EB2_PTLow = 1, CAT_EE_PTLow = 2, CAT_EB1_PTHig = 3, CAT_EB2_PTHig = 4, CAT_EE_PTHig = 5 } |
Protected Attributes | |
const bool | absTrackClusterMatching_ |
const edm::InputTag | beamSpotLabel_ |
std::vector< Clip > | clipsLower_ |
std::vector< Clip > | clipsUpper_ |
const edm::InputTag | conversionsLabelAOD_ |
const edm::InputTag | conversionsLabelMiniAOD_ |
bool | debug_ |
double | ebeeSplit_ |
double | ebSplit_ |
std::vector< std::unique_ptr< const GBRForest > > | gbrForests_ |
const std::string | methodName_ |
const std::string | name_ |
const int | nCategories_ = 6 |
const int | nVar_ = 22 |
double | ptSplit_ |
const edm::InputTag | rhoLabel_ |
const std::string | tag_ |
std::vector< std::string > | varNames_ |
bool | withIso_ |
Additional Inherited Members | |
Public Attributes inherited from AnyMVAEstimatorRun2Base | |
const edm::ParameterSet | _conf |
Definition at line 18 of file ElectronMVAEstimatorRun2Fall17.h.
|
protected |
Enumerator | |
---|---|
UNDEFINED | |
CAT_EB1_PTLow | |
CAT_EB2_PTLow | |
CAT_EE_PTLow | |
CAT_EB1_PTHig | |
CAT_EB2_PTHig | |
CAT_EE_PTHig |
Definition at line 78 of file ElectronMVAEstimatorRun2Fall17.h.
ElectronMVAEstimatorRun2Fall17::ElectronMVAEstimatorRun2Fall17 | ( | const edm::ParameterSet & | conf, |
bool | withIso | ||
) |
Definition at line 3 of file ElectronMVAEstimatorRun2Fall17.cc.
References debug_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), init(), setClips(), mvaElectronID_Fall17_iso_V1_cff::weightFileNames, and withIso_.
|
override |
Definition at line 104 of file ElectronMVAEstimatorRun2Fall17.cc.
Referenced by setClips().
ElectronMVAEstimatorRun2Fall17::ElectronMVAEstimatorRun2Fall17 | ( | const std::string & | mvaTag, |
const std::string & | mvaName, | ||
bool | withIso, | ||
const std::string & | conversionsTag = "reducedEgamma:reducedConversions" , |
||
const std::string & | beamspotTag = "offlineBeamSpot" , |
||
const double | ptSplit = 10. , |
||
const double | ebSplit = 0.800 , |
||
const double | ebeeSplit = 1.479 , |
||
const bool | debug = false |
||
) |
Definition at line 34 of file ElectronMVAEstimatorRun2Fall17.cc.
References debug, debug_, and withIso_.
void ElectronMVAEstimatorRun2Fall17::constrainMVAVariables | ( | std::vector< float > & | vars | ) | const |
Definition at line 546 of file ElectronMVAEstimatorRun2Fall17.cc.
References clip(), clipsLower_, and clipsUpper_.
Referenced by fillMVAVariables(), and getTag().
|
overridevirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 254 of file ElectronMVAEstimatorRun2Fall17.cc.
References beamSpotLabel_, conversions_cfi::conversions, conversionsLabelAOD_, conversionsLabelMiniAOD_, Exception, edm::Ptr< T >::get(), edm::Event::getByLabel(), edm::HandleBase::isValid(), nullptr, edm::Handle< T >::product(), and rhoLabel_.
Referenced by findCategory(), getTag(), and mvaValue().
std::vector< float > ElectronMVAEstimatorRun2Fall17::fillMVAVariables | ( | const reco::GsfElectron * | particle, |
const edm::Handle< reco::ConversionCollection > | conversions, | ||
const reco::BeamSpot * | beamSpot, | ||
const edm::Handle< double > | rho | ||
) | const |
Definition at line 300 of file ElectronMVAEstimatorRun2Fall17.cc.
References funct::abs(), absTrackClusterMatching_, reco::Vertex::chi2(), pat::Electron::closestCtfTrackRef(), reco::GsfElectron::closestCtfTrackRef(), constrainMVAVariables(), reco::GsfElectron::deltaEtaSeedClusterTrackAtCalo(), reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), reco::GsfElectron::ecalEnergy(), reco::GsfElectron::eEleClusterOverPout(), reco::GsfElectron::eSuperClusterOverP(), reco::GsfElectron::fbrem(), findCategory(), objects.autophobj::float, reco::GsfElectron::full5x5_e1x5(), reco::GsfElectron::full5x5_e5x5(), reco::GsfElectron::full5x5_hcalOverEcal(), reco::GsfElectron::full5x5_r9(), reco::GsfElectron::full5x5_sigmaIetaIeta(), reco::GsfElectron::full5x5_sigmaIphiIphi(), edm::Ref< C, T, F >::get(), reco::GsfElectron::gsfTrack(), electrons_cff::hoe, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::isNull(), reco::Vertex::isValid(), ConversionTools::matchedConversion(), reco::HitPattern::MISSING_INNER_HITS, reco::Vertex::ndof(), AnyMVAEstimatorRun2Base::packMVAVariables(), reco::GsfElectron::pfIsolationVariables(), reco::BeamSpot::position(), electrons_cff::r9, reco::GsfElectron::superCluster(), tag_, reco::GsfElectron::trackMomentumAtVtx(), badGlobalMuonTaggersAOD_cff::vtx, and withIso_.
|
overridevirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 202 of file ElectronMVAEstimatorRun2Fall17.cc.
References Exception, edm::Ptr< T >::get(), and nullptr.
Referenced by fillMVAVariables(), getTag(), and mvaValue().
int ElectronMVAEstimatorRun2Fall17::findCategory | ( | const reco::GsfElectron * | particle | ) | const |
Definition at line 215 of file ElectronMVAEstimatorRun2Fall17.cc.
References funct::abs(), CAT_EB1_PTHig, CAT_EB1_PTLow, CAT_EB2_PTHig, CAT_EB2_PTLow, CAT_EE_PTHig, CAT_EE_PTLow, ebeeSplit_, ebSplit_, PVValHelper::eta, fillMVAVariables(), EnergyCorrector::pt, reco::LeafCandidate::pt(), ptSplit_, reco::GsfElectron::superCluster(), and UNDEFINED.
|
inlinefinalvirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 48 of file ElectronMVAEstimatorRun2Fall17.h.
References name_.
Referenced by plotting.Plot::draw().
|
inlineoverridevirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 47 of file ElectronMVAEstimatorRun2Fall17.h.
References nCategories_.
|
inlinefinalvirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 49 of file ElectronMVAEstimatorRun2Fall17.h.
References ecalDrivenElectronSeedsParameters_cff::beamSpot, constrainMVAVariables(), conversions_cfi::conversions, fillMVAVariables(), findCategory(), rho, setConsumes(), and tag_.
void ElectronMVAEstimatorRun2Fall17::init | ( | const std::vector< std::string > & | weightFileNames | ) |
Definition at line 59 of file ElectronMVAEstimatorRun2Fall17.cc.
References GBRForestTools::createGBRForest(), Exception, gbrForests_, mps_fire::i, nCategories_, and electrons_cff::weightFile.
Referenced by ElectronMVAEstimatorRun2Fall17().
|
overridevirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 130 of file ElectronMVAEstimatorRun2Fall17.cc.
References Exception, fillMVAVariables(), findCategory(), edm::Ptr< T >::get(), and nullptr.
Referenced by mvaValue(), and setConsumes().
float ElectronMVAEstimatorRun2Fall17::mvaValue | ( | const reco::GsfElectron * | particle, |
const edm::EventBase & | iEvent | ||
) | const |
Definition at line 146 of file ElectronMVAEstimatorRun2Fall17.cc.
References ecalDrivenElectronSeedsParameters_cff::beamSpot, beamSpotLabel_, conversions_cfi::conversions, conversionsLabelAOD_, fillMVAVariables(), findCategory(), edm::EventBase::getByLabel(), mvaValue(), edm::Handle< T >::product(), rho, and rhoLabel_.
float ElectronMVAEstimatorRun2Fall17::mvaValue | ( | const int | iCategory, |
const std::vector< float > & | vars | ||
) | const |
Definition at line 159 of file ElectronMVAEstimatorRun2Fall17.cc.
References gather_cfg::cout, debug_, gbrForests_, methodName_, mps_fire::result, and withIso_.
void ElectronMVAEstimatorRun2Fall17::setClips | ( | const std::vector< double > & | clipsLowerValues, |
const std::vector< double > & | clipsUpperValues | ||
) |
Definition at line 80 of file ElectronMVAEstimatorRun2Fall17.cc.
References clip(), clipsLower_, clipsUpper_, objects.autophobj::float, mps_fire::i, edm::isFinite(), and ~ElectronMVAEstimatorRun2Fall17().
Referenced by ElectronMVAEstimatorRun2Fall17().
|
finalvirtual |
Reimplemented from AnyMVAEstimatorRun2Base.
Definition at line 107 of file ElectronMVAEstimatorRun2Fall17.cc.
References beamSpotLabel_, conversionsLabelAOD_, conversionsLabelMiniAOD_, mvaValue(), and rhoLabel_.
Referenced by getTag().
|
protected |
Definition at line 132 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by fillMVAVariables().
|
protected |
Definition at line 108 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by fillMVAVariables(), mvaValue(), and setConsumes().
|
protected |
Definition at line 125 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by constrainMVAVariables(), and setClips().
|
protected |
Definition at line 126 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by constrainMVAVariables(), and setClips().
|
protected |
Definition at line 109 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by fillMVAVariables(), mvaValue(), and setConsumes().
|
protected |
Definition at line 110 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by fillMVAVariables(), and setConsumes().
|
protected |
Definition at line 130 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by ElectronMVAEstimatorRun2Fall17(), and mvaValue().
|
protected |
Definition at line 120 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by findCategory().
|
protected |
Definition at line 119 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by findCategory().
|
protected |
Definition at line 100 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by init(), and mvaValue().
|
protected |
Definition at line 102 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by mvaValue().
|
protected |
Definition at line 97 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by getName().
|
protected |
Definition at line 76 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by getNCategories(), and init().
|
protected |
Definition at line 77 of file ElectronMVAEstimatorRun2Fall17.h.
|
protected |
Definition at line 118 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by findCategory().
|
protected |
Definition at line 111 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by fillMVAVariables(), mvaValue(), and setConsumes().
|
protected |
Definition at line 91 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by fillMVAVariables(), and getTag().
|
protected |
Definition at line 122 of file ElectronMVAEstimatorRun2Fall17.h.
|
protected |
Definition at line 128 of file ElectronMVAEstimatorRun2Fall17.h.
Referenced by ElectronMVAEstimatorRun2Fall17(), fillMVAVariables(), and mvaValue().