CMS 3D CMS Logo

Classes | Public Member Functions | Protected Member Functions | Private Attributes

JetTagComputer Class Reference

#include <JetTagComputer.h>

Inheritance diagram for JetTagComputer:
ElectronTagger GenericMVAJetTagComputer JetBProbabilityComputer JetProbabilityComputer LeptonTaggerByIP LeptonTaggerByPt LeptonTaggerDistance MuonTagger MuonTaggerNoIP SimpleSecondaryVertexComputer TrackCountingComputer

List of all members.

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

Detailed Description

Definition at line 12 of file JetTagComputer.h.


Constructor & Destructor Documentation

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) {}

Member Function Documentation

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]
const std::vector<std::string>& JetTagComputer::getInputLabels ( ) const [inline]
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]

Definition at line 75 of file JetTagComputer.h.

References uses().

Referenced by uses().

{ uses(0, label); }

Member Data Documentation

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().