CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Private Attributes
JetTagComputer Class Reference

#include <JetTagComputer.h>

Inheritance diagram for JetTagComputer:
CandidateBoostedDoubleSecondaryVertexComputer CharmTagger CombinedMVAV2JetTagComputer ElectronTagger GenericMVAJetTagComputer LeptonTaggerByIP LeptonTaggerByPt LeptonTaggerDistance MuonTagger MuonTaggerNoIP PromptTrackCountingComputer TemplatedJetBProbabilityComputer< Container, Base > TemplatedJetProbabilityComputer< Container, Base > TemplatedSimpleSecondaryVertexComputer< IPTI, VTX > TemplatedTrackCountingComputer< Container, Base >

Classes

class  TagInfoHelper
 

Public Member Functions

const std::vector< std::string > & getInputLabels () const
 
virtual void initialize (const JetTagComputerRecord &)
 
 JetTagComputer ()
 
 JetTagComputer (const edm::ParameterSet &configuration)
 
float operator() (const reco::BaseTagInfo &info) const
 
float operator() (const TagInfoHelper &helper) const
 
void setupDone ()
 
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 14 of file JetTagComputer.h.

Constructor & Destructor Documentation

JetTagComputer::JetTagComputer ( )
inline

Definition at line 84 of file JetTagComputer.h.

84 : m_setupDone(false) {}
virtual JetTagComputer::~JetTagComputer ( )
inlinevirtual

Definition at line 85 of file JetTagComputer.h.

85 {}
JetTagComputer::JetTagComputer ( const edm::ParameterSet configuration)
inlineexplicit

Definition at line 88 of file JetTagComputer.h.

88  :
89  m_setupDone(false) {}

Member Function Documentation

float JetTagComputer::discriminator ( const reco::BaseTagInfo info) const
protectedvirtual

Definition at line 36 of file JetTagComputer.cc.

References Exception.

Referenced by discriminator(), and operator()().

37 {
38  throw cms::Exception("VirtualMethodMissing")
39  << "No virtual method implementation for "
40  << "JetTagComputer::discriminator() defined." << std::endl;
41 }
float JetTagComputer::discriminator ( const TagInfoHelper info) const
protectedvirtual
const std::vector<std::string>& JetTagComputer::getInputLabels ( ) const
inline

Definition at line 97 of file JetTagComputer.h.

References m_inputLabels.

Referenced by MVAJetTagPlotter::tagInfoRequirements().

98  { return m_inputLabels; }
std::vector< std::string > m_inputLabels
virtual void JetTagComputer::initialize ( const JetTagComputerRecord )
inlinevirtual
float JetTagComputer::operator() ( const reco::BaseTagInfo info) const

Definition at line 11 of file JetTagComputer.cc.

References discriminator().

12 {
13  std::vector<const reco::BaseTagInfo*> helper;
14  helper.push_back(&info);
15  return discriminator(TagInfoHelper(helper));
16 }
virtual float discriminator(const reco::BaseTagInfo &) const
float JetTagComputer::operator() ( const TagInfoHelper helper) const
inline

Definition at line 94 of file JetTagComputer.h.

References discriminator().

95  { return discriminator(helper); }
virtual float discriminator(const reco::BaseTagInfo &) const
void JetTagComputer::setupDone ( )
inline

Definition at line 100 of file JetTagComputer.h.

References m_setupDone.

100 { m_setupDone = true; }
void JetTagComputer::uses ( unsigned int  id,
const std::string &  label 
)
protected

Definition at line 18 of file JetTagComputer.cc.

References relativeConstraints::empty, Exception, diffTwoXMLs::label, m_inputLabels, and m_setupDone.

Referenced by CandidateBoostedDoubleSecondaryVertexComputer::CandidateBoostedDoubleSecondaryVertexComputer(), CharmTagger::CharmTagger(), CombinedMVAV2JetTagComputer::CombinedMVAV2JetTagComputer(), ElectronTagger::ElectronTagger(), GenericMVAJetTagComputerWrapper< Provider, TI1, ti1, TI2, ti2, TI3, ti3, TI4, ti4 >::GenericMVAJetTagComputerWrapper(), 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(), CombinedMVAJetTagComputer::initialize(), LeptonTaggerByIP::LeptonTaggerByIP(), LeptonTaggerByPt::LeptonTaggerByPt(), LeptonTaggerDistance::LeptonTaggerDistance(), MuonTagger::MuonTagger(), MuonTaggerNoIP::MuonTaggerNoIP(), PromptTrackCountingComputer::PromptTrackCountingComputer(), TemplatedJetBProbabilityComputer< Container, Base >::TemplatedJetBProbabilityComputer(), TemplatedJetProbabilityComputer< Container, Base >::TemplatedJetProbabilityComputer(), TemplatedSimpleSecondaryVertexComputer< IPTI, VTX >::TemplatedSimpleSecondaryVertexComputer(), and TemplatedTrackCountingComputer< Container, Base >::TemplatedTrackCountingComputer().

19 {
20  if (m_setupDone)
21  throw cms::Exception("InvalidState")
22  << "JetTagComputer::uses called outside of "
23  "constructor" << std::endl;
24 
25  if (id >= m_inputLabels.size())
26  m_inputLabels.resize(id + 1);
27 
28  if (!m_inputLabels[id].empty())
29  throw cms::Exception("InvalidIndex")
30  << "JetTagComputer::uses called with duplicate "
31  "or invalid index" << std::endl;
32 
33  m_inputLabels[id] = label;
34 }
std::vector< std::string > m_inputLabels
void JetTagComputer::uses ( const std::string &  label)
inlineprotected

Definition at line 104 of file JetTagComputer.h.

References uses().

Referenced by uses().

104 { uses(0, label); }
void uses(unsigned int id, const std::string &label)

Member Data Documentation

std::vector<std::string> JetTagComputer::m_inputLabels
private

Definition at line 110 of file JetTagComputer.h.

Referenced by getInputLabels(), and uses().

bool JetTagComputer::m_setupDone
private

Definition at line 111 of file JetTagComputer.h.

Referenced by setupDone(), and uses().