#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 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.
Enumerator | |
---|---|
USER | |
CATEv0 |
Definition at line 22 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(), mvaPFMET_Data_cff::tmvaMethod, tmvaMethod_, mvaPFMET_Data_cff::tmvaVariables, tmvaVariables_, mvaPFMET_Data_cff::tmvaWeights, tmvaWeights_, relval_steps::version, and version_.
MVAJetPuId::MVAJetPuId | ( | const edm::ParameterSet & | ps | ) |
Definition at line 16 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 125 of file MVAJetPuId.cc.
References cms::cuda::assert(), relativeConstraints::empty, 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().
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, 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, c, reco::PFJet::chargedEmEnergy(), reco::PFJet::chargedHadronEnergy(), reco::PFJet::chargedMultiplicity(), PileupJetIdentifier::chgEMfrac_, PileupJetIdentifier::chgHadrfrac_, PileupJetIdentifier::d0_, CommonMethods::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(), gpuVertexFinder::iv, 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_, cuda_std::lower_bound(), reco::LeafCandidate::mass(), SiStripPI::min, reco::Vertex::ndof(), PileupJetIdentifier::neuEMfrac_, PileupJetIdentifier::neuHadrfrac_, reco::PFJet::neutralEmEnergy(), reco::PFJet::neutralHadronEnergy(), reco::PFJet::neutralMultiplicity(), reco::Vertex::position(), DiDispStaMuonMonitor_cfi::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_, PileupJetIdentifier::sumPt_, std::swap(), PileupJetIdentifier::thirdFrac_, reco::Vertex::tracks_begin(), reco::Vertex::tracks_end(), and histoStyle::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 submitPVResolutionJobs::out, and variables_.
std::pair< int, int > MVAJetPuId::getJetIdKey | ( | float | jetPt, |
float | jetEta | ||
) |
Definition at line 156 of file MVAJetPuId.cc.
Referenced by computeIDflag().
|
inline |
|
protected |
Definition at line 500 of file MVAJetPuId.cc.
References HLT_FULL_cff::beta, d0, PileupJetIdentifier::idFlag_, INIT_VARIABLE, internalId_, reco::btau::jetEta, reco::btau::jetPhi, reco::btau::jetPt, large_val, beam_dqm_sourceclient-live_cfg::mva, and rho.
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_, 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 gpuClustering::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().
|
staticprivate |
Definition at line 19 of file MVAJetPuId.h.
|
staticprivate |
Definition at line 18 of file MVAJetPuId.h.
Referenced by MVAJetPuId().
|
staticprivate |
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().