#include <ElectronMVAEstimatorRun2Spring16HZZ.h>
Classes | |
struct | AllVariables |
Public Types | |
enum | mvaCategories { UNDEFINED = -1, CAT_EB1_PT5to10 = 0, CAT_EB2_PT5to10 = 1, CAT_EE_PT5to10 = 2, CAT_EB1_PT10plus = 3, CAT_EB2_PT10plus = 4, CAT_EE_PT10plus = 5 } |
Public Member Functions | |
void | constrainMVAVariables (AllVariables &) const |
std::unique_ptr< const GBRForest > | createSingleReader (const int iCategory, const edm::FileInPath &weightFile) |
ElectronMVAEstimatorRun2Spring16HZZ (const edm::ParameterSet &conf) | |
ElectronMVAEstimatorRun2Spring16HZZ () | |
ElectronMVAEstimatorRun2Spring16HZZ (const std::string &mvaTag, const std::string &conversionsTag="reducedEgamma:reducedConversions", const std::string &beamspotTag="offlineBeamSpot") | |
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 |
int | findCategory (const edm::Ptr< reco::Candidate > &particle) const override |
int | findCategory (const reco::GsfElectron *particle) const |
virtual const std::string & | getName () const override final |
virtual int | getNCategories () const override |
virtual const std::string & | getTag () const override final |
void | init (const std::vector< std::string > weightFileNames) |
bool | isEndcapCategory (int category) const |
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 | setConsumes (edm::ConsumesCollector &&) const override final |
~ElectronMVAEstimatorRun2Spring16HZZ () | |
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 () |
Public Attributes | |
const int | nCategories = 6 |
Public Attributes inherited from AnyMVAEstimatorRun2Base | |
const edm::ParameterSet | _conf |
Private Attributes | |
AllVariables | allMVAVars_ |
const edm::InputTag | beamSpotLabel_ |
const edm::InputTag | conversionsLabelAOD_ |
const edm::InputTag | conversionsLabelMiniAOD_ |
std::vector< std::unique_ptr< const GBRForest > > | gbrForest_s |
const std::string | MethodName_ |
const std::string | name_ = "ElectronMVAEstimatorRun2Spring16HZZ" |
const std::string | tag_ |
Definition at line 22 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
Enumerator | |
---|---|
UNDEFINED | |
CAT_EB1_PT5to10 | |
CAT_EB2_PT5to10 | |
CAT_EE_PT5to10 | |
CAT_EB1_PT10plus | |
CAT_EB2_PT10plus | |
CAT_EE_PT10plus |
Definition at line 29 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
ElectronMVAEstimatorRun2Spring16HZZ::ElectronMVAEstimatorRun2Spring16HZZ | ( | const edm::ParameterSet & | conf | ) |
Definition at line 13 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References edm::ParameterSet::getParameter(), init(), and mvaElectronID_PHYS14_PU20bx25_nonTrig_V1_cff::weightFileNames.
ElectronMVAEstimatorRun2Spring16HZZ::ElectronMVAEstimatorRun2Spring16HZZ | ( | ) |
Definition at line 45 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
ElectronMVAEstimatorRun2Spring16HZZ::ElectronMVAEstimatorRun2Spring16HZZ | ( | const std::string & | mvaTag, |
const std::string & | conversionsTag = "reducedEgamma:reducedConversions" , |
||
const std::string & | beamspotTag = "offlineBeamSpot" |
||
) |
Definition at line 48 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References ~ElectronMVAEstimatorRun2Spring16HZZ().
ElectronMVAEstimatorRun2Spring16HZZ::~ElectronMVAEstimatorRun2Spring16HZZ | ( | ) |
Definition at line 60 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
Referenced by ElectronMVAEstimatorRun2Spring16HZZ().
void ElectronMVAEstimatorRun2Spring16HZZ::constrainMVAVariables | ( | AllVariables & | allMVAVars | ) | const |
Definition at line 468 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::deta, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::detacalo, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::dphi, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::eleEoPout, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::EoP, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::fbrem, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::gsfchi2, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::kfchi2, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::OneMinusE1x5E5x5, and ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::R9.
Referenced by fillMVAVariables(), and getTag().
std::unique_ptr< const GBRForest > ElectronMVAEstimatorRun2Spring16HZZ::createSingleReader | ( | const int | iCategory, |
const edm::FileInPath & | weightFile | ||
) |
Definition at line 187 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References allMVAVars_, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::convVtxFitProbability, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::deta, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::detacalo, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::dphi, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::eClass, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::eleEoPout, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::EoP, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::etawidth, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::expectedMissingInnerHits, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::fbrem, fillMVAVariables(), edm::FileInPath::fullPath(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::gsfchi2, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::gsfhits, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::HoE, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::IoEmIoP, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::isBarrel, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::isEndcap, isEndcapCategory(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::kfchi2, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::kfhits, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::mcCBmatchingCategory, MethodName_, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::OneMinusE1x5E5x5, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::phiwidth, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::PreShowerOverRaw, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::pt, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::R9, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::SCeta, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::see, and ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::spp.
Referenced by init(), and isEndcapCategory().
|
overridevirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 259 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References beamSpotLabel_, conversions_cfi::conversions, conversionsLabelAOD_, conversionsLabelMiniAOD_, Exception, edm::Ptr< T >::get(), edm::Event::getByLabel(), edm::HandleBase::isValid(), NULL, and edm::Handle< T >::product().
Referenced by createSingleReader(), getTag(), and mvaValue().
std::vector< float > ElectronMVAEstimatorRun2Spring16HZZ::fillMVAVariables | ( | const reco::GsfElectron * | particle, |
const edm::Handle< reco::ConversionCollection > | conversions, | ||
const reco::BeamSpot * | beamSpot | ||
) | const |
Definition at line 299 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References funct::abs(), reco::Vertex::chi2(), pat::Electron::closestCtfTrackRef(), reco::GsfElectron::closestCtfTrackRef(), constexpr, constrainMVAVariables(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::convVtxFitProbability, reco::GsfElectron::deltaEtaSeedClusterTrackAtCalo(), reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::deta, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::detacalo, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::dphi, reco::GsfElectron::ecalEnergy(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::eClass, reco::GsfElectron::eEleClusterOverPout(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::eleEoPout, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::EoP, reco::GsfElectron::eSuperClusterOverP(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::etawidth, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::expectedInnerHits, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::expectedMissingInnerHits, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::fbrem, reco::GsfElectron::fbrem(), findCategory(), 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(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::gsfchi2, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::gsfhits, reco::GsfElectron::gsfTrack(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::HoE, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::IoEmIoP, edm::Ref< C, T, F >::isAvailable(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::isBarrel, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::isEndcap, isEndcapCategory(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::isNull(), reco::Vertex::isValid(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::kfchi2, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::kfhits, ConversionTools::matchedConversion(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::mcCBmatchingCategory, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::mcEventWeight, reco::HitPattern::MISSING_INNER_HITS, eostools::move(), reco::Vertex::ndof(), NULL, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::OneMinusE1x5E5x5, AnyMVAEstimatorRun2Base::packMVAVariables(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::pfRelIso, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::phiwidth, reco::BeamSpot::position(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::PreShowerOverRaw, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::pt, reco::LeafCandidate::pt(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::R9, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::SCeta, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::see, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::spp, reco::GsfElectron::superCluster(), reco::GsfElectron::trackMomentumAtVtx(), and ElectronMVAEstimatorRun2Spring16HZZ::AllVariables::vtxconv.
|
overridevirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 130 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References edm::Ptr< T >::get(), and NULL.
Referenced by fillMVAVariables(), getTag(), and mvaValue().
int ElectronMVAEstimatorRun2Spring16HZZ::findCategory | ( | const reco::GsfElectron * | particle | ) | const |
Definition at line 142 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References funct::abs(), CAT_EB1_PT10plus, CAT_EB1_PT5to10, CAT_EB2_PT10plus, CAT_EB2_PT5to10, CAT_EE_PT10plus, CAT_EE_PT5to10, stringResolutionProvider_cfi::eta, isEndcapCategory(), EnergyCorrector::pt, reco::LeafCandidate::pt(), reco::GsfElectron::superCluster(), and UNDEFINED.
|
inlinefinaloverridevirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 108 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
References name_.
Referenced by plotting.Plot::draw().
|
inlineoverridevirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 106 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
References python.rootplot.argparse::category, isEndcapCategory(), and nCategories.
|
inlinefinaloverridevirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 109 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
References ecalDrivenElectronSeedsParameters_cff::beamSpot, constrainMVAVariables(), conversions_cfi::conversions, fillMVAVariables(), findCategory(), setConsumes(), and tag_.
void ElectronMVAEstimatorRun2Spring16HZZ::init | ( | const std::vector< std::string > | weightFileNames | ) |
Definition at line 26 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References createSingleReader(), Exception, gbrForest_s, i, nCategories, and candidateChargeBTagComputer_cfi::weightFile.
Referenced by ElectronMVAEstimatorRun2Spring16HZZ().
bool ElectronMVAEstimatorRun2Spring16HZZ::isEndcapCategory | ( | int | category | ) | const |
Definition at line 176 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References CAT_EE_PT10plus, CAT_EE_PT5to10, createSingleReader(), and GeomDetEnumerators::isEndcap().
Referenced by createSingleReader(), fillMVAVariables(), findCategory(), and getNCategories().
|
overridevirtual |
Implements AnyMVAEstimatorRun2Base.
Definition at line 79 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References fillMVAVariables(), findCategory(), and eostools::move().
Referenced by mvaValue(), and setConsumes().
float ElectronMVAEstimatorRun2Spring16HZZ::mvaValue | ( | const reco::GsfElectron * | particle, |
const edm::EventBase & | iEvent | ||
) | const |
Definition at line 87 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References ecalDrivenElectronSeedsParameters_cff::beamSpot, beamSpotLabel_, conversions_cfi::conversions, conversionsLabelAOD_, fillMVAVariables(), findCategory(), edm::EventBase::getByLabel(), eostools::move(), mvaValue(), and edm::Handle< T >::product().
float ElectronMVAEstimatorRun2Spring16HZZ::mvaValue | ( | const int | iCategory, |
const std::vector< float > & | vars | ||
) | const |
Definition at line 98 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References gather_cfg::cout, debug, gbrForest_s, MethodName_, and mps_fire::result.
|
finaloverridevirtual |
Reimplemented from AnyMVAEstimatorRun2Base.
Definition at line 64 of file ElectronMVAEstimatorRun2Spring16HZZ.cc.
References beamSpotLabel_, conversionsLabelAOD_, conversionsLabelMiniAOD_, and mvaValue().
Referenced by getTag().
|
private |
Definition at line 143 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
Referenced by createSingleReader().
|
private |
Definition at line 149 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
Referenced by fillMVAVariables(), mvaValue(), and setConsumes().
|
private |
Definition at line 151 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
Referenced by fillMVAVariables(), mvaValue(), and setConsumes().
|
private |
Definition at line 152 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
Referenced by fillMVAVariables(), and setConsumes().
|
private |
Definition at line 139 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
Referenced by init(), and mvaValue().
|
private |
Definition at line 142 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
Referenced by createSingleReader(), and mvaValue().
|
private |
Definition at line 132 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
Referenced by getName().
const int ElectronMVAEstimatorRun2Spring16HZZ::nCategories = 6 |
Definition at line 28 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
Referenced by getNCategories(), and init().
|
private |
Definition at line 136 of file ElectronMVAEstimatorRun2Spring16HZZ.h.
Referenced by getTag().