![]() |
![]() |
#include <JetTagComputer.h>
Classes | |
class | TagInfoHelper |
Public Member Functions | |
const std::vector< std::string > & | getInputLabels () const |
JetTagComputer (const edm::ParameterSet &configuration) | |
JetTagComputer () | |
float | operator() (const reco::BaseTagInfo &info) const |
float | operator() (const TagInfoHelper &helper) const |
virtual void | setEventSetup (const edm::EventSetup &) const |
virtual | ~JetTagComputer () |
Protected Member Functions | |
virtual float | discriminator (const reco::BaseTagInfo &) const |
virtual float | discriminator (const TagInfoHelper &) const |
void | uses (unsigned int id, const std::string &label) |
void | uses (const std::string &label) |
Private Attributes | |
std::vector< std::string > | m_inputLabels |
bool | m_setupDone |
Definition at line 12 of file JetTagComputer.h.
JetTagComputer::JetTagComputer | ( | ) | [inline] |
Definition at line 57 of file JetTagComputer.h.
: m_setupDone(false) {}
virtual JetTagComputer::~JetTagComputer | ( | ) | [inline, virtual] |
Definition at line 58 of file JetTagComputer.h.
{}
JetTagComputer::JetTagComputer | ( | const edm::ParameterSet & | configuration | ) | [inline, explicit] |
Definition at line 61 of file JetTagComputer.h.
: m_setupDone(false) {}
float JetTagComputer::discriminator | ( | const reco::BaseTagInfo & | info | ) | const [protected, virtual] |
Definition at line 36 of file JetTagComputer.cc.
References Exception.
Referenced by discriminator(), and operator()().
{ throw cms::Exception("VirtualMethodMissing") << "No virtual method implementation for " << "JetTagComputer::discriminator() defined." << std::endl; }
float JetTagComputer::discriminator | ( | const TagInfoHelper & | info | ) | const [protected, virtual] |
Reimplemented in JetBProbabilityComputer, JetProbabilityComputer, NegativeTrackCountingComputer, PromptTrackCountingComputer, TrackCountingComputer, SimpleSecondaryVertexComputer, ElectronTagger, LeptonTaggerByIP, LeptonTaggerByPt, LeptonTaggerDistance, MuonTagger, MuonTaggerNoIP, and GenericMVAJetTagComputer.
Definition at line 43 of file JetTagComputer.cc.
References discriminator(), and JetTagComputer::TagInfoHelper::getBase().
{ return discriminator(info.getBase(0)); }
const std::vector<std::string>& JetTagComputer::getInputLabels | ( | ) | const [inline] |
Definition at line 70 of file JetTagComputer.h.
References m_inputLabels, and m_setupDone.
Referenced by JetTagMVAExtractor::setup(), JetTagMVATrainer::setup(), JetTagProducer::setup(), and MVAJetTagPlotter::tagInfoRequirements().
{ m_setupDone = true; return m_inputLabels; }
float JetTagComputer::operator() | ( | const reco::BaseTagInfo & | info | ) | const |
Definition at line 11 of file JetTagComputer.cc.
References discriminator().
{ std::vector<const reco::BaseTagInfo*> helper; helper.push_back(&info); return discriminator(TagInfoHelper(helper)); }
float JetTagComputer::operator() | ( | const TagInfoHelper & | helper | ) | const [inline] |
Definition at line 67 of file JetTagComputer.h.
References discriminator().
{ return discriminator(helper); }
virtual void JetTagComputer::setEventSetup | ( | const edm::EventSetup & | ) | const [inline, virtual] |
Reimplemented in CombinedMVAJetTagComputer, and GenericMVAJetTagComputer.
Definition at line 64 of file JetTagComputer.h.
Referenced by JetTagProducer::produce(), and JetTagProducer::setup().
{}
void JetTagComputer::uses | ( | unsigned int | id, |
const std::string & | label | ||
) | [protected] |
Definition at line 18 of file JetTagComputer.cc.
References relativeConstraints::empty, Exception, label, m_inputLabels, and m_setupDone.
Referenced by ElectronTagger::ElectronTagger(), GenericMVAJetTagComputerWrapper< Provider, TI1, ti1, TI2, ti2, TI3, ti3, btau_dummy::Null, btau_dummy::none >::GenericMVAJetTagComputerWrapper(), GenericMVAJetTagComputerWrapper< Provider, TI1, ti1, TI2, ti2, btau_dummy::Null, btau_dummy::none, btau_dummy::Null, btau_dummy::none >::GenericMVAJetTagComputerWrapper(), GenericMVAJetTagComputerWrapper< Provider, TI1, ti1, btau_dummy::Null, btau_dummy::none, btau_dummy::Null, btau_dummy::none, btau_dummy::Null, btau_dummy::none >::GenericMVAJetTagComputerWrapper(), GenericMVAJetTagComputerWrapper< Provider, TI1, ti1, TI2, ti2, TI3, ti3, TI4, ti4 >::GenericMVAJetTagComputerWrapper(), JetBProbabilityComputer::JetBProbabilityComputer(), JetProbabilityComputer::JetProbabilityComputer(), LeptonTaggerByIP::LeptonTaggerByIP(), LeptonTaggerByPt::LeptonTaggerByPt(), LeptonTaggerDistance::LeptonTaggerDistance(), MuonTagger::MuonTagger(), MuonTaggerNoIP::MuonTaggerNoIP(), CombinedMVAJetTagComputer::setEventSetup(), SimpleSecondaryVertexComputer::SimpleSecondaryVertexComputer(), and TrackCountingComputer::TrackCountingComputer().
{ if (m_setupDone) throw cms::Exception("InvalidState") << "JetTagComputer::uses called outside of " "constructor" << std::endl; if (id >= m_inputLabels.size()) m_inputLabels.resize(id + 1); if (!m_inputLabels[id].empty()) throw cms::Exception("InvalidIndex") << "JetTagComputer::uses called with duplicate " "or invalid index" << std::endl; m_inputLabels[id] = label; }
void JetTagComputer::uses | ( | const std::string & | label | ) | [inline, protected] |
std::vector<std::string> JetTagComputer::m_inputLabels [private] |
Definition at line 81 of file JetTagComputer.h.
Referenced by getInputLabels(), and uses().
bool JetTagComputer::m_setupDone [mutable, private] |
Definition at line 82 of file JetTagComputer.h.
Referenced by getInputLabels(), and uses().