#include <MVAJetPuId.h>
Public Types | |
typedef std::map< std::string, std::pair< float *, float > > | variables_list_t |
enum | version_t { USER =-1, CATEv0 =0 } |
Public Member Functions | |
int | computeCutIDflag (float betaStarClassic, float dR2Mean, float nvtx, float jetPt, float jetEta) |
int | computeIDflag (float mva, float jetPt, float jetEta) |
int | computeIDflag (float mva, int ptId, int etaId) |
PileupJetIdentifier | computeIdVariables (const reco::Jet *jet, float jec, const reco::Vertex *, const reco::VertexCollection &, double rho, bool calculateMva=false) |
PileupJetIdentifier | computeMva () |
std::string | dumpVariables () const |
std::pair< int, int > | getJetIdKey (float jetPt, float jetEta) |
const variables_list_t & | getVariables () const |
const std::string | method () const |
MVAJetPuId (int version=CATEv0, const std::string &tmvaWeight="", const std::string &tmvaMethod="", Float_t impactParTkThreshod_=1., const std::vector< std::string > &tmvaVariables=std::vector< std::string >()) | |
MVAJetPuId (const edm::ParameterSet &ps) | |
void | set (const PileupJetIdentifier &) |
~MVAJetPuId () | |
Protected Member Functions | |
void | bookReader () |
void | initVariables () |
void | resetVariables () |
void | runMva () |
void | setup () |
Protected Attributes | |
Float_t | betaStarCut_ [NWPs][NEtas][NPts] |
bool | cutBased_ |
Float_t | impactParTkThreshod_ |
PileupJetIdentifier | internalId_ |
Float_t | mvacut_ [NWPs][NEtas][NPts] |
TMVA::Reader * | reader_ |
Float_t | rmsCut_ [NWPs][NEtas][NPts] |
std::string | tmvaMethod_ |
std::map< std::string, std::string > | tmvaNames_ |
std::vector< std::string > | tmvaSpectators_ |
std::vector< std::string > | tmvaVariables_ |
std::string | tmvaWeights_ |
variables_list_t | variables_ |
Int_t | version_ |
Static Private Attributes | |
static int | NEtas = 4 |
static int | NPts = 4 |
static int | NWPs = 3 |
Definition at line 17 of file MVAJetPuId.h.
typedef std::map<std::string,std::pair<float *,float> > MVAJetPuId::variables_list_t |
Definition at line 42 of file MVAJetPuId.h.
Enumerator | |
---|---|
USER | |
CATEv0 |
Definition at line 25 of file MVAJetPuId.h.
MVAJetPuId::MVAJetPuId | ( | int | version = CATEv0 , |
const std::string & | tmvaWeight = "" , |
||
const std::string & | tmvaMethod = "" , |
||
Float_t | impactParTkThreshod_ = 1. , |
||
const std::vector< std::string > & | tmvaVariables = std::vector<std::string>() |
||
) |
Definition at line 51 of file MVAJetPuId.cc.
References impactParTkThreshod_, reader_, setup(), hltPUIdAlgo_cff::tmvaMethod, tmvaMethod_, hltPUIdAlgo_cff::tmvaVariables, tmvaVariables_, hltPUIdAlgo_cff::tmvaWeights, tmvaWeights_, jets_cff::version, and version_.
MVAJetPuId::MVAJetPuId | ( | const edm::ParameterSet & | ps | ) |
Definition at line 17 of file MVAJetPuId.cc.
References edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), impactParTkThreshod_, PileupJetIdentifier::kLoose, PileupJetIdentifier::kMedium, mvacut_, NPts, NWPs, reader_, setup(), AlCaHLTBitMon_QueryRunRegistry::string, tmvaMethod_, tmvaSpectators_, tmvaVariables_, tmvaWeights_, and version_.
MVAJetPuId::~MVAJetPuId | ( | ) |
|
protected |
Definition at line 140 of file MVAJetPuId.cc.
References relativeConstraints::empty, plotBeamSpotDB::first, reco::details::loadTMVAWeights(), reader_, tmvaMethod_, tmvaNames_, tmvaSpectators_, tmvaVariables_, tmvaWeights_, and variables_.
Referenced by getVariables(), and runMva().
int MVAJetPuId::computeCutIDflag | ( | float | betaStarClassic, |
float | dR2Mean, | ||
float | nvtx, | ||
float | jetPt, | ||
float | jetEta | ||
) |
int MVAJetPuId::computeIDflag | ( | float | mva, |
float | jetPt, | ||
float | jetEta | ||
) |
Definition at line 189 of file MVAJetPuId.cc.
References getJetIdKey().
Referenced by runMva().
int MVAJetPuId::computeIDflag | ( | float | mva, |
int | ptId, | ||
int | etaId | ||
) |
Definition at line 195 of file MVAJetPuId.cc.
References PileupJetIdentifier::kLoose, PileupJetIdentifier::kMedium, PileupJetIdentifier::kTight, and mvacut_.
PileupJetIdentifier MVAJetPuId::computeIdVariables | ( | const reco::Jet * | jet, |
float | jec, | ||
const reco::Vertex * | vtx, | ||
const reco::VertexCollection & | allvtx, | ||
double | rho, | ||
bool | calculateMva = false |
||
) |
Definition at line 210 of file MVAJetPuId.cc.
References a, Assign(), b, EnergyCorrector::c, reco::PFJet::chargedEmEnergy(), reco::PFJet::chargedHadronEnergy(), reco::PFJet::chargedMultiplicity(), PileupJetIdentifier::chgEMfrac_, PileupJetIdentifier::chgHadrfrac_, constexpr, PileupJetIdentifier::d0_, delta, reco::deltaPhi(), reco::deltaR(), PileupJetIdentifier::dRLead2nd_, PileupJetIdentifier::dRMeanEm_, PileupJetIdentifier::dRMeanNeut_, reco::LeafCandidate::energy(), reco::LeafCandidate::eta(), spr::find(), PileupJetIdentifier::fourthFrac_, DivergingColor::frac, reco::PFCandidate::gamma, reco::PFJet::getPFConstituent(), reco::PFJet::getPFConstituents(), reco::PFCandidate::h0, mps_fire::i, internalId_, edm::Ptr< T >::isAvailable(), edm::Ref< C, T, F >::isAvailable(), reco::Vertex::isFake(), edm::Ptr< T >::isNonnull(), edm::Ref< C, T, F >::isNonnull(), edm::Ptr< T >::isNull(), patTestJEC_cfi::jec, metsig::jet, PileupJetIdentifier::jetM_, PileupJetIdentifier::jetPhi_, reco::btau::jetPt, PileupJetIdentifier::leadChEta_, PileupJetIdentifier::leadChPhi_, PileupJetIdentifier::leadChPt_, PileupJetIdentifier::leadEmEta_, PileupJetIdentifier::leadEmPhi_, PileupJetIdentifier::leadEmPt_, PileupJetIdentifier::leadEta_, PileupJetIdentifier::leadFrac_, PileupJetIdentifier::leadNeutEta_, PileupJetIdentifier::leadNeutPhi_, PileupJetIdentifier::leadNeutPt_, PileupJetIdentifier::leadPhi_, PileupJetIdentifier::leadPt_, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, reco::LeafCandidate::mass(), min(), reco::Vertex::ndof(), PileupJetIdentifier::neuEMfrac_, PileupJetIdentifier::neuHadrfrac_, reco::PFJet::neutralEmEnergy(), reco::PFJet::neutralHadronEnergy(), reco::PFJet::neutralMultiplicity(), reco::Vertex::position(), EnergyCorrector::pt, reco::LeafCandidate::pt(), PileupJetIdentifier::pt2A_, PileupJetIdentifier::ptMean_, PileupJetIdentifier::ptRMS_, alignCSCRings::r, resetVariables(), rho, runMva(), PileupJetIdentifier::secondEta_, PileupJetIdentifier::secondFrac_, PileupJetIdentifier::secondPhi_, PileupJetIdentifier::secondPt_, SetPtEtaPhi(), mathSSE::sqrt(), PileupJetIdentifier::sumChPt_, PileupJetIdentifier::sumNePt_, TtFullHadEvtBuilder_cfi::sumPt, PileupJetIdentifier::sumPt_, std::swap(), PileupJetIdentifier::thirdFrac_, reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), and mps_merge::weight.
Referenced by MVAJetPuIdProducer::produce().
PileupJetIdentifier MVAJetPuId::computeMva | ( | ) |
Definition at line 204 of file MVAJetPuId.cc.
References internalId_, and runMva().
Referenced by MVAJetPuIdProducer::produce().
std::string MVAJetPuId::dumpVariables | ( | ) | const |
Definition at line 465 of file MVAJetPuId.cc.
References MillePedeFileConverter_cfg::out, and variables_.
Referenced by method().
std::pair< int, int > MVAJetPuId::getJetIdKey | ( | float | jetPt, |
float | jetEta | ||
) |
Definition at line 174 of file MVAJetPuId.cc.
Referenced by computeIDflag().
|
inline |
Definition at line 49 of file MVAJetPuId.h.
References bookReader(), initVariables(), resetVariables(), runMva(), setup(), and variables_.
|
protected |
Definition at line 490 of file MVAJetPuId.cc.
References pfBoostedDoubleSVAK8TagInfos_cfi::beta, BeamSpotFakeParameters_cfi::betaStar, allConversions_cfi::d0, PileupJetIdentifier::idFlag_, INIT_VARIABLE, internalId_, reco::btau::jetEta, reco::btau::jetPhi, reco::btau::jetPt, large_val, DetachedQuadStep_cff::mva, hpstanc_transforms::nCharged, jets_cff::ptD, rho, and TtFullHadEvtBuilder_cfi::sumPt.
Referenced by getVariables(), and setup().
|
inline |
Definition at line 38 of file MVAJetPuId.h.
References dumpVariables(), AlCaHLTBitMon_QueryRunRegistry::string, and tmvaMethod_.
|
protected |
Definition at line 477 of file MVAJetPuId.cc.
References PileupJetIdentifier::idFlag_, internalId_, and variables_.
Referenced by computeIdVariables(), and getVariables().
|
protected |
Definition at line 166 of file MVAJetPuId.cc.
References bookReader(), computeIDflag(), PileupJetIdentifier::idFlag_, internalId_, PileupJetIdentifier::mva_, reader_, and tmvaMethod_.
Referenced by computeIdVariables(), computeMva(), and getVariables().
void MVAJetPuId::set | ( | const PileupJetIdentifier & | id | ) |
Definition at line 160 of file MVAJetPuId.cc.
References triggerObjects_cff::id, and internalId_.
Referenced by MVAJetPuIdProducer::produce().
|
protected |
Definition at line 71 of file MVAJetPuId.cc.
References initVariables(), tmvaNames_, and tmvaVariables_.
Referenced by getVariables(), and MVAJetPuId().
Definition at line 78 of file MVAJetPuId.h.
|
protected |
Definition at line 75 of file MVAJetPuId.h.
|
protected |
Definition at line 74 of file MVAJetPuId.h.
Referenced by MVAJetPuId().
|
protected |
Definition at line 64 of file MVAJetPuId.h.
Referenced by computeIdVariables(), computeMva(), initVariables(), resetVariables(), runMva(), and set().
Definition at line 76 of file MVAJetPuId.h.
Referenced by computeIDflag(), and MVAJetPuId().
|
staticprivate |
Definition at line 22 of file MVAJetPuId.h.
|
staticprivate |
Definition at line 21 of file MVAJetPuId.h.
Referenced by MVAJetPuId().
|
staticprivate |
Definition at line 20 of file MVAJetPuId.h.
Referenced by MVAJetPuId().
|
protected |
Definition at line 67 of file MVAJetPuId.h.
Referenced by bookReader(), MVAJetPuId(), runMva(), and ~MVAJetPuId().
Definition at line 77 of file MVAJetPuId.h.
|
protected |
Definition at line 68 of file MVAJetPuId.h.
Referenced by bookReader(), method(), MVAJetPuId(), and runMva().
|
protected |
Definition at line 71 of file MVAJetPuId.h.
Referenced by bookReader(), and setup().
|
protected |
Definition at line 70 of file MVAJetPuId.h.
Referenced by bookReader(), and MVAJetPuId().
|
protected |
Definition at line 69 of file MVAJetPuId.h.
Referenced by bookReader(), MVAJetPuId(), and setup().
|
protected |
Definition at line 68 of file MVAJetPuId.h.
Referenced by bookReader(), and MVAJetPuId().
|
protected |
Definition at line 65 of file MVAJetPuId.h.
Referenced by bookReader(), dumpVariables(), getVariables(), and resetVariables().
|
protected |
Definition at line 73 of file MVAJetPuId.h.
Referenced by MVAJetPuId().