![]() |
![]() |
#include <GenericMVAJetTagComputer.h>
Public Member Functions | |
virtual float | discriminator (const TagInfoHelper &info) const |
GenericMVAJetTagComputer (const edm::ParameterSet ¶meters) | |
virtual void | passEventSetup (const edm::EventSetup &es) const |
virtual void | setEventSetup (const edm::EventSetup &es) const |
virtual reco::TaggingVariableList | taggingVariables (const reco::BaseTagInfo &tagInfo) const |
virtual reco::TaggingVariableList | taggingVariables (const TagInfoHelper &info) const |
virtual | ~GenericMVAJetTagComputer () |
Private Attributes | |
std::auto_ptr < TagInfoMVACategorySelector > | categorySelector |
GenericMVAComputerCache | computerCache |
Definition at line 14 of file GenericMVAJetTagComputer.h.
GenericMVAJetTagComputer::GenericMVAJetTagComputer | ( | const edm::ParameterSet & | parameters | ) |
Definition at line 39 of file GenericMVAJetTagComputer.cc.
: computerCache(getCalibrationLabels(params, categorySelector)) { }
GenericMVAJetTagComputer::~GenericMVAJetTagComputer | ( | ) | [virtual] |
Definition at line 45 of file GenericMVAJetTagComputer.cc.
{ }
float GenericMVAJetTagComputer::discriminator | ( | const TagInfoHelper & | info | ) | const [virtual] |
Reimplemented from JetTagComputer.
Definition at line 60 of file GenericMVAJetTagComputer.cc.
References categorySelector, computerCache, GenericMVAComputer::eval(), GenericMVAComputerCache::getComputer(), getHLTprescales::index, taggingVariables(), and diffTreeTool::variables.
{ TaggingVariableList variables = taggingVariables(info); // retrieve index of computer in case categories are used int index = 0; if (categorySelector.get()) { index = categorySelector->findCategory(variables); if (index < 0) return -10.0; } GenericMVAComputer *computer = computerCache.getComputer(index); if (!computer) return -10.0; return computer->eval(variables); }
virtual void GenericMVAJetTagComputer::passEventSetup | ( | const edm::EventSetup & | es | ) | const [inline, virtual] |
Reimplemented in CombinedMVAJetTagComputer.
Definition at line 29 of file GenericMVAJetTagComputer.h.
Referenced by JetTagMVAExtractor::analyze(), JetTagMVATrainer::analyze(), and CombinedMVAJetTagComputer::setEventSetup().
{}
void GenericMVAJetTagComputer::setEventSetup | ( | const edm::EventSetup & | es | ) | const [virtual] |
Reimplemented from JetTagComputer.
Reimplemented in CombinedMVAJetTagComputer.
Definition at line 49 of file GenericMVAJetTagComputer.cc.
References calib, computerCache, edm::EventSetup::get(), edm::ESHandle< T >::product(), and GenericMVAComputerCache::update().
{ // retrieve MVAComputer calibration container edm::ESHandle<Calibration::MVAComputerContainer> calibHandle; es.get<BTauGenericMVAJetTagComputerRcd>().get(calibHandle); const Calibration::MVAComputerContainer *calib = calibHandle.product(); // check for updates computerCache.update(calib); }
TaggingVariableList GenericMVAJetTagComputer::taggingVariables | ( | const reco::BaseTagInfo & | tagInfo | ) | const [virtual] |
Definition at line 81 of file GenericMVAJetTagComputer.cc.
References reco::BaseTagInfo::jet(), metsig::jet, reco::btau::jetEta, reco::btau::jetPt, reco::TaggingVariableList::push_back(), reco::BaseTagInfo::taggingVariables(), and diffTreeTool::variables.
Referenced by JetTagMVAExtractor::analyze(), JetTagMVATrainer::analyze(), TrackProbabilityTagPlotter::analyzeTag(), discriminator(), taggingVariables(), and CombinedMVAJetTagComputer::taggingVariables().
{ TaggingVariableList variables = baseTag.taggingVariables(); // add jet pt and jet eta variables (ordering irrelevant) edm::RefToBase<Jet> jet = baseTag.jet(); variables.push_back(TaggingVariable(btau::jetPt, jet->pt())); variables.push_back(TaggingVariable(btau::jetEta, jet->eta())); return variables; }
TaggingVariableList GenericMVAJetTagComputer::taggingVariables | ( | const TagInfoHelper & | info | ) | const [virtual] |
Reimplemented in CombinedMVAJetTagComputer, GenericMVAJetTagComputerWrapper< Provider, TI1, ti1, TI2, ti2, TI3, ti3, TI4, ti4 >, GenericMVAJetTagComputerWrapper< Provider, TI1, ti1, TI2, ti2, TI3, ti3, btau_dummy::Null, btau_dummy::none >, GenericMVAJetTagComputerWrapper< Provider, TI1, ti1, TI2, ti2, btau_dummy::Null, btau_dummy::none, btau_dummy::Null, btau_dummy::none >, GenericMVAJetTagComputerWrapper< Provider, TI1, ti1, btau_dummy::Null, btau_dummy::none, btau_dummy::Null, btau_dummy::none, btau_dummy::Null, btau_dummy::none >, and GenericMVAJetTagComputerWrapper< Provider, TI1, btau_dummy::none, btau_dummy::Null, btau_dummy::none, btau_dummy::Null, btau_dummy::none, btau_dummy::Null, btau_dummy::none >.
Definition at line 94 of file GenericMVAJetTagComputer.cc.
References JetTagComputer::TagInfoHelper::getBase(), and taggingVariables().
{ return taggingVariables(info.getBase(0)); }
std::auto_ptr<TagInfoMVACategorySelector> GenericMVAJetTagComputer::categorySelector [private] |
Definition at line 32 of file GenericMVAJetTagComputer.h.
Referenced by discriminator().
GenericMVAComputerCache GenericMVAJetTagComputer::computerCache [mutable, private] |
Definition at line 33 of file GenericMVAJetTagComputer.h.
Referenced by discriminator(), and setEventSetup().