#include <PileupJetIdAlgo.h>
Public Types | |
typedef std::map< std::string, std::pair< float *, float > > | variables_list_t |
enum | version_t { USER =-1, PHILv0 =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) |
PileupJetIdentifier | computeMva () |
std::string | dumpVariables () const |
std::pair< int, int > | getJetIdKey (float jetPt, float jetEta) |
std::unique_ptr< const GBRForest > | getMVA (const std::vector< std::string > &, const std::string &) |
float | getMVAval (const std::vector< std::string > &, const std::unique_ptr< const GBRForest > &) |
const variables_list_t & | getVariables () const |
const PileupJetIdentifier::variables_list_t & getVariables() const { return variables_; }; More... | |
const std::string | method () const |
PileupJetIdAlgo (int version=PHILv0, const std::string &tmvaWeight="", const std::string &tmvaMethod="", Float_t impactParTkThreshod_=1., const std::vector< std::string > &tmvaVariables=std::vector< std::string >(), bool runMvas=true) | |
PileupJetIdAlgo (const edm::ParameterSet &ps, bool runMvas) | |
void | set (const PileupJetIdentifier &) |
~PileupJetIdAlgo () | |
Protected Member Functions | |
void | bookReader () |
void | initVariables () |
void | resetVariables () |
void | runMva () |
void | setup () |
Protected Attributes | |
float | betaStarCut_ [3][4][4] |
bool | cutBased_ |
bool | etaBinnedWeights_ |
std::vector< std::unique_ptr< const GBRForest > > | etaReader_ |
float | impactParTkThreshod_ |
PileupJetIdentifier | internalId_ |
std::vector< double > | jEtaMax_ |
std::vector< double > | jEtaMin_ |
float | mvacut_ [3][4][4] |
int | nEtaBins_ |
std::unique_ptr< const GBRForest > | reader_ |
float | rmsCut_ [3][4][4] |
bool | runMvas_ |
std::vector< std::vector< std::string > > | tmvaEtaVariables_ |
std::vector< std::string > | tmvaEtaWeights_ |
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 | version_ |
Definition at line 27 of file PileupJetIdAlgo.h.
typedef std::map<std::string,std::pair<float *,float> > PileupJetIdAlgo::variables_list_t |
Definition at line 47 of file PileupJetIdAlgo.h.
Enumerator | |
---|---|
USER | |
PHILv0 |
Definition at line 29 of file PileupJetIdAlgo.h.
PileupJetIdAlgo::PileupJetIdAlgo | ( | int | version = PHILv0 , |
const std::string & | tmvaWeight = "" , |
||
const std::string & | tmvaMethod = "" , |
||
Float_t | impactParTkThreshod_ = 1. , |
||
const std::vector< std::string > & | tmvaVariables = std::vector<std::string>() , |
||
bool | runMvas = true |
||
) |
Definition at line 91 of file PileupJetIdAlgo.cc.
References impactParTkThreshod_, hltMVAJetPuId_cff::runMvas, runMvas_, setup(), hltPUIdAlgo_cff::tmvaMethod, tmvaMethod_, hltPUIdAlgo_cff::tmvaVariables, tmvaVariables_, hltPUIdAlgo_cff::tmvaWeights, tmvaWeights_, jetIDSelector_cfi::version, and version_.
PileupJetIdAlgo::PileupJetIdAlgo | ( | const edm::ParameterSet & | ps, |
bool | runMvas | ||
) |
ps.getParameter<double>("impactParTkThreshod");
Definition at line 19 of file PileupJetIdAlgo.cc.
References betaStarCut_, cutBased_, etaBinnedWeights_, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), impactParTkThreshod_, jEtaMax_, jEtaMin_, PileupJetIdentifier::kLoose, PileupJetIdentifier::kMedium, mvacut_, nEtaBins_, rmsCut_, hltMVAJetPuId_cff::runMvas, runMvas_, setup(), AlCaHLTBitMon_QueryRunRegistry::string, tmvaEtaVariables_, tmvaEtaWeights_, tmvaMethod_, tmvaSpectators_, tmvaVariables_, tmvaWeights_, PileupJetIDParams_cfi::trainings, USER, findQualityFiles::v, and version_.
PileupJetIdAlgo::~PileupJetIdAlgo | ( | ) |
Definition at line 122 of file PileupJetIdAlgo.cc.
|
protected |
Definition at line 158 of file PileupJetIdAlgo.cc.
References etaBinnedWeights_, etaReader_, getMVA(), nEtaBins_, reader_, tmvaEtaVariables_, tmvaEtaWeights_, tmvaVariables_, tmvaWeights_, and findQualityFiles::v.
Referenced by getVariables(), and setup().
int PileupJetIdAlgo::computeCutIDflag | ( | float | betaStarClassic, |
float | dR2Mean, | ||
float | nvtx, | ||
float | jetPt, | ||
float | jetEta | ||
) |
Definition at line 230 of file PileupJetIdAlgo.cc.
References betaStarCut_, getJetIdKey(), PileupJetIdentifier::kLoose, PileupJetIdentifier::kMedium, PileupJetIdentifier::kTight, cmsBatch::log, and rmsCut_.
Referenced by runMva().
int PileupJetIdAlgo::computeIDflag | ( | float | mva, |
float | jetPt, | ||
float | jetEta | ||
) |
Definition at line 249 of file PileupJetIdAlgo.cc.
References getJetIdKey().
Referenced by runMva().
int PileupJetIdAlgo::computeIDflag | ( | float | mva, |
int | ptId, | ||
int | etaId | ||
) |
Definition at line 256 of file PileupJetIdAlgo.cc.
References PileupJetIdentifier::kLoose, PileupJetIdentifier::kMedium, PileupJetIdentifier::kTight, and mvacut_.
PileupJetIdentifier PileupJetIdAlgo::computeIdVariables | ( | const reco::Jet * | jet, |
float | jec, | ||
const reco::Vertex * | vtx, | ||
const reco::VertexCollection & | allvtx, | ||
double | rho | ||
) |
Definition at line 274 of file PileupJetIdAlgo.cc.
References funct::abs(), assign(), reco::Muon::bestTrack(), reco::Candidate::bestTrack(), reco::Candidate::charge(), reco::PFJet::chargedEmEnergy(), pat::Jet::chargedEmEnergy(), reco::PFJet::chargedHadronEnergy(), pat::Jet::chargedHadronEnergy(), reco::PFJet::chargedMultiplicity(), pat::Jet::chargedMultiplicity(), PileupJetIdentifier::chFrac01_, PileupJetIdentifier::chFrac02_, PileupJetIdentifier::chFrac03_, PileupJetIdentifier::chFrac04_, PileupJetIdentifier::chFrac05_, PileupJetIdentifier::chFrac06_, PileupJetIdentifier::chFrac07_, PileupJetIdentifier::chgEMfrac_, PileupJetIdentifier::chgHadrfrac_, pat::Jet::correctedJet(), PileupJetIdentifier::d0_, reco::CompositePtrCandidate::daughterPtr(), reco::deltaPhi(), reco::deltaR(), PileupJetIdentifier::dRLead2nd_, PileupJetIdentifier::dRLeadCent_, PileupJetIdentifier::dRMeanCh_, PileupJetIdentifier::dRMeanEm_, PileupJetIdentifier::dRMeanNeut_, reco::TrackBase::dxy(), reco::TrackBase::dz(), pat::PackedCandidate::dz(), PileupJetIdentifier::emFrac01_, PileupJetIdentifier::emFrac02_, PileupJetIdentifier::emFrac03_, PileupJetIdentifier::emFrac04_, PileupJetIdentifier::emFrac05_, PileupJetIdentifier::emFrac06_, PileupJetIdentifier::emFrac07_, reco::LeafCandidate::energy(), reco::Candidate::eta(), reco::LeafCandidate::eta(), PileupJetIdentifier::etaW_, PileupJetIdentifier::fourthChFrac_, PileupJetIdentifier::fourthEmFrac_, PileupJetIdentifier::fourthFrac_, PileupJetIdentifier::fourthNeutFrac_, cropTnPTrees::frac, pat::PackedCandidate::fromPV(), edm::Ptr< T >::get(), edm::Ref< C, T, F >::get(), reco::PFCandidate::gsfTrackRef(), mps_fire::i, internalId_, reco::Vertex::isFake(), edm::Ref< C, T, F >::isNonnull(), patTestJEC_cfi::jec, metsig::jet, PileupJetIdentifier::jetM_, PileupJetIdentifier::jetPhi_, reco::btau::jetPt, PileupJetIdentifier::jetW_, PileupJetIdentifier::leadChEta_, PileupJetIdentifier::leadChFrac_, PileupJetIdentifier::leadChPhi_, PileupJetIdentifier::leadChPt_, PileupJetIdentifier::leadEmEta_, PileupJetIdentifier::leadEmFrac_, PileupJetIdentifier::leadEmPhi_, PileupJetIdentifier::leadEmPt_, PileupJetIdentifier::leadEta_, PileupJetIdentifier::leadFrac_, PileupJetIdentifier::leadNeutEta_, PileupJetIdentifier::leadNeutFrac_, PileupJetIdentifier::leadNeutPhi_, PileupJetIdentifier::leadNeutPt_, PileupJetIdentifier::leadPhi_, PileupJetIdentifier::leadPt_, reco::LeafCandidate::mass(), min(), reco::PFCandidate::muonRef(), reco::Jet::nConstituents(), reco::Vertex::ndof(), PileupJetIdentifier::neuEMfrac_, PileupJetIdentifier::neuHadrfrac_, PileupJetIdentifier::neutFrac01_, PileupJetIdentifier::neutFrac02_, PileupJetIdentifier::neutFrac03_, PileupJetIdentifier::neutFrac04_, PileupJetIdentifier::neutFrac05_, PileupJetIdentifier::neutFrac06_, PileupJetIdentifier::neutFrac07_, reco::PFJet::neutralEmEnergy(), pat::Jet::neutralEmEnergy(), reco::PFJet::neutralHadronEnergy(), pat::Jet::neutralHadronEnergy(), reco::PFJet::neutralMultiplicity(), pat::Jet::neutralMultiplicity(), reco::CompositePtrCandidate::numberOfDaughters(), reco::CompositePtrCandidate::numberOfSourceCandidatePtrs(), reco::Candidate::pdgId(), PileupJetIdentifier::phiW_, reco::Vertex::position(), pat::PackedCandidate::pseudoTrack(), EnergyCorrector::pt, reco::Candidate::pt(), reco::LeafCandidate::pt(), PileupJetIdentifier::pt2A_, PileupJetIdentifier::ptDCh_, PileupJetIdentifier::ptDNe_, PileupJetIdentifier::ptMean_, PileupJetIdentifier::ptRMS_, pat::PackedCandidate::PVUsedInFit, alignCSCRings::r, resetVariables(), rho, runMva(), runMvas_, PileupJetIdentifier::secondChFrac_, PileupJetIdentifier::secondEmFrac_, PileupJetIdentifier::secondEta_, PileupJetIdentifier::secondFrac_, PileupJetIdentifier::secondNeutFrac_, PileupJetIdentifier::secondPhi_, PileupJetIdentifier::secondPt_, setPtEtaPhi(), reco::CompositePtrCandidate::sourceCandidatePtr(), mathSSE::sqrt(), PileupJetIdentifier::sumChPt_, PileupJetIdentifier::sumNePt_, TtFullHadEvtBuilder_cfi::sumPt, PileupJetIdentifier::sumPt_, std::swap(), PileupJetIdentifier::thirdChFrac_, PileupJetIdentifier::thirdEmFrac_, PileupJetIdentifier::thirdFrac_, PileupJetIdentifier::thirdNeutFrac_, reco::PFCandidate::trackRef(), reco::Vertex::trackWeight(), and mps_merge::weight.
Referenced by PileupJetIdProducer::produce().
PileupJetIdentifier PileupJetIdAlgo::computeMva | ( | ) |
Definition at line 267 of file PileupJetIdAlgo.cc.
References internalId_, and runMva().
Referenced by PileupJetIdProducer::produce().
std::string PileupJetIdAlgo::dumpVariables | ( | ) | const |
Definition at line 651 of file PileupJetIdAlgo.cc.
References MillePedeFileConverter_cfg::out, and variables_.
Referenced by method().
std::pair< int, int > PileupJetIdAlgo::getJetIdKey | ( | float | jetPt, |
float | jetEta | ||
) |
Definition at line 215 of file PileupJetIdAlgo.cc.
References funct::abs().
Referenced by computeCutIDflag(), and computeIDflag().
std::unique_ptr< const GBRForest > PileupJetIdAlgo::getMVA | ( | const std::vector< std::string > & | varList, |
const std::string & | tmvaWeights | ||
) |
Definition at line 143 of file PileupJetIdAlgo.cc.
References relativeConstraints::empty, plotBeamSpotDB::first, reco::details::loadTMVAWeights(), tmvaMethod_, tmvaNames_, tmvaSpectators_, and variables_.
Referenced by bookReader().
float PileupJetIdAlgo::getMVAval | ( | const std::vector< std::string > & | varList, |
const std::unique_ptr< const GBRForest > & | reader | ||
) |
Definition at line 175 of file PileupJetIdAlgo.cc.
References JetChargeProducer_cfi::var, and variables_.
Referenced by runMva().
|
inline |
const PileupJetIdentifier::variables_list_t & getVariables() const { return variables_; };
Definition at line 55 of file PileupJetIdAlgo.h.
References bookReader(), initVariables(), resetVariables(), runMva(), setup(), and variables_.
|
protected |
Definition at line 679 of file PileupJetIdAlgo.cc.
References beta, BeamSpotFakeParameters_cfi::betaStar, allConversions_cfi::d0, METSignificanceParams_cfi::dRMatch, PileupJetIdentifier::idFlag_, INIT_VARIABLE, internalId_, reco::btau::jetEta, reco::btau::jetPhi, reco::btau::jetPt, large_val, hpstanc_transforms::nCharged, rho, and TtFullHadEvtBuilder_cfi::sumPt.
Referenced by getVariables(), and setup().
|
inline |
Definition at line 43 of file PileupJetIdAlgo.h.
References dumpVariables(), AlCaHLTBitMon_QueryRunRegistry::string, and tmvaMethod_.
|
protected |
Definition at line 664 of file PileupJetIdAlgo.cc.
References PileupJetIdentifier::idFlag_, internalId_, and variables_.
Referenced by computeIdVariables(), and getVariables().
|
protected |
Definition at line 187 of file PileupJetIdAlgo.cc.
References funct::abs(), computeCutIDflag(), computeIDflag(), cutBased_, etaBinnedWeights_, etaReader_, getMVAval(), PileupJetIdentifier::idFlag_, internalId_, jEtaMax_, jEtaMin_, PileupJetIdentifier::mva_, nEtaBins_, reader_, tmvaEtaVariables_, tmvaVariables_, and findQualityFiles::v.
Referenced by computeIdVariables(), computeMva(), and getVariables().
void PileupJetIdAlgo::set | ( | const PileupJetIdentifier & | id | ) |
Definition at line 168 of file PileupJetIdAlgo.cc.
References hcalTTPDigis_cfi::id, and internalId_.
Referenced by PileupJetIdProducer::produce().
|
protected |
Definition at line 111 of file PileupJetIdAlgo.cc.
References bookReader(), cutBased_, initVariables(), runMvas_, tmvaEtaVariables_, tmvaMethod_, tmvaVariables_, USER, and version_.
Referenced by getVariables(), and PileupJetIdAlgo().
|
protected |
Definition at line 88 of file PileupJetIdAlgo.h.
Referenced by computeCutIDflag(), and PileupJetIdAlgo().
|
protected |
Definition at line 80 of file PileupJetIdAlgo.h.
Referenced by PileupJetIdAlgo(), runMva(), and setup().
|
protected |
Definition at line 81 of file PileupJetIdAlgo.h.
Referenced by bookReader(), PileupJetIdAlgo(), and runMva().
|
protected |
Definition at line 70 of file PileupJetIdAlgo.h.
Referenced by bookReader(), and runMva().
|
protected |
Definition at line 79 of file PileupJetIdAlgo.h.
Referenced by PileupJetIdAlgo().
|
protected |
Definition at line 66 of file PileupJetIdAlgo.h.
Referenced by computeIdVariables(), computeMva(), initVariables(), resetVariables(), runMva(), and set().
|
protected |
Definition at line 84 of file PileupJetIdAlgo.h.
Referenced by PileupJetIdAlgo(), and runMva().
|
protected |
Definition at line 83 of file PileupJetIdAlgo.h.
Referenced by PileupJetIdAlgo(), and runMva().
|
protected |
Definition at line 86 of file PileupJetIdAlgo.h.
Referenced by computeIDflag(), and PileupJetIdAlgo().
|
protected |
Definition at line 82 of file PileupJetIdAlgo.h.
Referenced by bookReader(), PileupJetIdAlgo(), and runMva().
|
protected |
Definition at line 69 of file PileupJetIdAlgo.h.
Referenced by bookReader(), and runMva().
|
protected |
Definition at line 87 of file PileupJetIdAlgo.h.
Referenced by computeCutIDflag(), and PileupJetIdAlgo().
|
protected |
Definition at line 85 of file PileupJetIdAlgo.h.
Referenced by computeIdVariables(), PileupJetIdAlgo(), and setup().
|
protected |
Definition at line 74 of file PileupJetIdAlgo.h.
Referenced by bookReader(), PileupJetIdAlgo(), runMva(), and setup().
|
protected |
Definition at line 72 of file PileupJetIdAlgo.h.
Referenced by bookReader(), and PileupJetIdAlgo().
|
protected |
Definition at line 71 of file PileupJetIdAlgo.h.
Referenced by getMVA(), method(), PileupJetIdAlgo(), and setup().
|
protected |
Definition at line 76 of file PileupJetIdAlgo.h.
Referenced by getMVA().
|
protected |
Definition at line 75 of file PileupJetIdAlgo.h.
Referenced by getMVA(), and PileupJetIdAlgo().
|
protected |
Definition at line 73 of file PileupJetIdAlgo.h.
Referenced by bookReader(), PileupJetIdAlgo(), runMva(), and setup().
|
protected |
Definition at line 71 of file PileupJetIdAlgo.h.
Referenced by bookReader(), and PileupJetIdAlgo().
|
protected |
Definition at line 67 of file PileupJetIdAlgo.h.
Referenced by dumpVariables(), getMVA(), getMVAval(), getVariables(), and resetVariables().
|
protected |
Definition at line 78 of file PileupJetIdAlgo.h.
Referenced by PileupJetIdAlgo(), and setup().