#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(), 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 | ( | ) |
|
protected |
Definition at line 125 of file MVAJetPuId.cc.
References cms::cuda::assert(), relativeConstraints::empty, dqmdumpme::first, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, 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, DummyCfis::c, reco::PFJet::chargedEmEnergy(), reco::PFJet::chargedHadronEnergy(), reco::PFJet::chargedMultiplicity(), PileupJetIdentifier::chgEMfrac_, PileupJetIdentifier::chgHadrfrac_, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), PileupJetIdentifier::d0_, dumpMFGeometry_cfg::delta, reco::deltaPhi(), reco::deltaR(), PileupJetIdentifier::dRLead2nd_, PileupJetIdentifier::dRMeanEm_, PileupJetIdentifier::dRMeanNeut_, l1ctLayer1_cff::dZ, 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(), edm::Ptr< T >::isNonnull(), edm::Ref< C, T, F >::isNonnull(), edm::Ptr< T >::isNull(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::iv, jetMETDQMOfflineSource_cff::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, SiStripPI::min, PileupJetIdentifier::neuEMfrac_, PileupJetIdentifier::neuHadrfrac_, reco::PFJet::neutralEmEnergy(), reco::PFJet::neutralHadronEnergy(), reco::PFJet::neutralMultiplicity(), DiDispStaMuonMonitor_cfi::pt, PileupJetIdentifier::pt2A_, PileupJetIdentifier::ptMean_, PileupJetIdentifier::ptRMS_, alignCSCRings::r, resetVariables(), rho, runMva(), PileupJetIdentifier::secondEta_, PileupJetIdentifier::secondFrac_, PileupJetIdentifier::secondPhi_, PileupJetIdentifier::secondPt_, SetPtEtaPhi(), jetUpdater_cfi::sort, mathSSE::sqrt(), PileupJetIdentifier::sumChPt_, PileupJetIdentifier::sumNePt_, TtFullHadEvtBuilder_cfi::sumPt, PileupJetIdentifier::sumPt_, edm::swap(), PileupJetIdentifier::thirdFrac_, L1BJetProducer_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 479 of file MVAJetPuId.cc.
References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, 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 499 of file MVAJetPuId.cc.
References HLT_2024v13_cff::beta, simBeamSpotPI::betaStar, d0, l1ctLayer1_cff::dZ, 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_2024v13_cff::nCharged, jetsAK4_CHS_cff::ptD, rho, and TtFullHadEvtBuilder_cfi::sumPt.
Referenced by setup().
|
inline |
|
protected |
Definition at line 488 of file MVAJetPuId.cc.
References PileupJetIdentifier::idFlag_, internalId_, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, 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 l1ctLayer2EG_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().
|
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().