#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 (const edm::ParameterSet &ps) | |
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 >()) | |
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 constexpr int | NEtas = 4 |
static constexpr int | NPts = 4 |
static constexpr int | NWPs = 3 |
Definition at line 16 of file MVAJetPuId.h.
typedef std::map<std::string, std::pair<float *, float> > MVAJetPuId::variables_list_t |
Definition at line 45 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 50 of file MVAJetPuId.cc.
References impactParTkThreshod_, reader_, setup(), hltPUIdAlgo_cff::tmvaMethod, tmvaMethod_, hltPUIdAlgo_cff::tmvaVariables, tmvaVariables_, hltPUIdAlgo_cff::tmvaWeights, tmvaWeights_, BeamSplash_cfg::version, and version_.
MVAJetPuId::MVAJetPuId | ( | const edm::ParameterSet & | ps | ) |
Definition at line 16 of file MVAJetPuId.cc.
References edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, impactParTkThreshod_, PileupJetIdentifier::kLoose, PileupJetIdentifier::kMedium, mvacut_, NPts, NWPs, reader_, setup(), AlCaHLTBitMon_QueryRunRegistry::string, tmvaMethod_, tmvaSpectators_, tmvaVariables_, tmvaWeights_, and version_.
MVAJetPuId::~MVAJetPuId | ( | ) |
Definition at line 105 of file MVAJetPuId.cc.
References reader_.
|
protected |
Definition at line 125 of file MVAJetPuId.cc.
References cms::cuda::assert(), relativeConstraints::empty, dqmdumpme::first, reco::details::loadTMVAWeights(), reader_, tmvaMethod_, tmvaNames_, tmvaSpectators_, tmvaVariables_, tmvaWeights_, and variables_.
Referenced by 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 175 of file MVAJetPuId.cc.
References getJetIdKey(), reco::btau::jetEta, reco::btau::jetPt, and beam_dqm_sourceclient-live_cfg::mva.
Referenced by runMva().
int MVAJetPuId::computeIDflag | ( | float | mva, |
int | ptId, | ||
int | etaId | ||
) |
Definition at line 180 of file MVAJetPuId.cc.
References PileupJetIdentifier::kLoose, PileupJetIdentifier::kMedium, PileupJetIdentifier::kTight, beam_dqm_sourceclient-live_cfg::mva, 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 196 of file MVAJetPuId.cc.
References a, cms::cuda::assert(), Assign(), b, StoredPileupJetIdentifier::beta_, StoredPileupJetIdentifier::betaClassic_, StoredPileupJetIdentifier::betaStar_, StoredPileupJetIdentifier::betaStarClassic_, HltBtagPostValidation_cff::c, reco::PFJet::chargedEmEnergy(), reco::PFJet::chargedHadronEnergy(), reco::PFJet::chargedMultiplicity(), PileupJetIdentifier::chgEMfrac_, PileupJetIdentifier::chgHadrfrac_, PileupJetIdentifier::d0_, dumpMFGeometry_cfg::delta, reco::deltaPhi(), reco::deltaR(), StoredPileupJetIdentifier::dR2Mean_, PileupJetIdentifier::dRLead2nd_, StoredPileupJetIdentifier::dRMean_, PileupJetIdentifier::dRMeanEm_, PileupJetIdentifier::dRMeanNeut_, StoredPileupJetIdentifier::dZ_, spr::find(), PileupJetIdentifier::fourthFrac_, cropTnPTrees::frac, StoredPileupJetIdentifier::frac01_, StoredPileupJetIdentifier::frac02_, StoredPileupJetIdentifier::frac03_, StoredPileupJetIdentifier::frac04_, 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(), jetMETDQMOfflineSource_cff::jec, metsig::jet, StoredPileupJetIdentifier::jetEta_, PileupJetIdentifier::jetM_, PileupJetIdentifier::jetPhi_, reco::btau::jetPt, StoredPileupJetIdentifier::jetPt_, StoredPileupJetIdentifier::jetR_, StoredPileupJetIdentifier::jetRchg_, 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_, cuda_std::lower_bound(), StoredPileupJetIdentifier::majW_, min(), StoredPileupJetIdentifier::minW_, StoredPileupJetIdentifier::nCharged_, reco::Vertex::ndof(), PileupJetIdentifier::neuEMfrac_, PileupJetIdentifier::neuHadrfrac_, reco::PFJet::neutralEmEnergy(), reco::PFJet::neutralHadronEnergy(), reco::PFJet::neutralMultiplicity(), StoredPileupJetIdentifier::nNeutrals_, StoredPileupJetIdentifier::nParticles_, reco::Vertex::position(), DiDispStaMuonMonitor_cfi::pt, PileupJetIdentifier::pt2A_, StoredPileupJetIdentifier::ptD_, PileupJetIdentifier::ptMean_, PileupJetIdentifier::ptRMS_, alignCSCRings::r, resetVariables(), rho, StoredPileupJetIdentifier::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(), badGlobalMuonTaggersAOD_cff::vtx, and mps_merge::weight.
Referenced by MVAJetPuIdProducer::produce().
PileupJetIdentifier MVAJetPuId::computeMva | ( | ) |
Definition at line 191 of file MVAJetPuId.cc.
References internalId_, and runMva().
Referenced by MVAJetPuIdProducer::produce().
std::string MVAJetPuId::dumpVariables | ( | ) | const |
Definition at line 480 of file MVAJetPuId.cc.
References MillePedeFileConverter_cfg::out, and variables_.
std::pair< int, int > MVAJetPuId::getJetIdKey | ( | float | jetPt, |
float | jetEta | ||
) |
Definition at line 156 of file MVAJetPuId.cc.
References reco::btau::jetEta, and reco::btau::jetPt.
Referenced by computeIDflag().
|
inline |
|
protected |
Definition at line 500 of file MVAJetPuId.cc.
References zMuMuMuonUserData::beta, BeamSpotFakeParameters_cfi::betaStar, d0, PileupJetIdentifier::idFlag_, INIT_VARIABLE, internalId_, reco::btau::jetEta, reco::btau::jetPhi, reco::btau::jetPt, LHEJetFilter_cfi::jetR, large_val, beam_dqm_sourceclient-live_cfg::mva, HLT_2018_cff::nCharged, jets_cff::ptD, rho, and TtFullHadEvtBuilder_cfi::sumPt.
Referenced by setup().
|
inline |
|
protected |
Definition at line 489 of file MVAJetPuId.cc.
References PileupJetIdentifier::idFlag_, internalId_, and variables_.
Referenced by computeIdVariables().
|
protected |
Definition at line 145 of file MVAJetPuId.cc.
References bookReader(), computeIDflag(), PileupJetIdentifier::idFlag_, internalId_, StoredPileupJetIdentifier::jetEta_, StoredPileupJetIdentifier::jetPt_, PileupJetIdentifier::mva_, reader_, and tmvaMethod_.
Referenced by computeIdVariables(), and computeMva().
void MVAJetPuId::set | ( | const PileupJetIdentifier & | id | ) |
Definition at line 143 of file MVAJetPuId.cc.
References triggerObjects_cff::id, and internalId_.
Referenced by MVAJetPuIdProducer::produce().
|
protected |
Definition at line 66 of file MVAJetPuId.cc.
References initVariables(), tmvaNames_, and tmvaVariables_.
Referenced by MVAJetPuId().
Definition at line 75 of file MVAJetPuId.h.
|
protected |
Definition at line 72 of file MVAJetPuId.h.
|
protected |
Definition at line 71 of file MVAJetPuId.h.
Referenced by MVAJetPuId().
|
protected |
Definition at line 61 of file MVAJetPuId.h.
Referenced by computeIdVariables(), computeMva(), initVariables(), resetVariables(), runMva(), and set().
Definition at line 73 of file MVAJetPuId.h.
Referenced by computeIDflag(), and MVAJetPuId().
|
staticconstexprprivate |
Definition at line 19 of file MVAJetPuId.h.
|
staticconstexprprivate |
Definition at line 18 of file MVAJetPuId.h.
Referenced by MVAJetPuId().
|
staticconstexprprivate |
Definition at line 17 of file MVAJetPuId.h.
Referenced by MVAJetPuId().
|
protected |
Definition at line 64 of file MVAJetPuId.h.
Referenced by bookReader(), MVAJetPuId(), runMva(), and ~MVAJetPuId().
Definition at line 74 of file MVAJetPuId.h.
|
protected |
Definition at line 65 of file MVAJetPuId.h.
Referenced by bookReader(), method(), MVAJetPuId(), and runMva().
|
protected |
Definition at line 68 of file MVAJetPuId.h.
Referenced by bookReader(), and setup().
|
protected |
Definition at line 67 of file MVAJetPuId.h.
Referenced by bookReader(), and MVAJetPuId().
|
protected |
Definition at line 66 of file MVAJetPuId.h.
Referenced by bookReader(), MVAJetPuId(), and setup().
|
protected |
Definition at line 65 of file MVAJetPuId.h.
Referenced by bookReader(), and MVAJetPuId().
|
protected |
Definition at line 62 of file MVAJetPuId.h.
Referenced by bookReader(), dumpVariables(), getVariables(), and resetVariables().
|
protected |
Definition at line 70 of file MVAJetPuId.h.
Referenced by MVAJetPuId().