CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MuonTaggerNoIP Class Reference

#include <MuonTaggerNoIP.h>

Inheritance diagram for MuonTaggerNoIP:
JetTagComputer

Public Member Functions

float discriminator (const TagInfoHelper &tagInfo) const override
 b-tag a jet based on track-to-jet parameters in the extened info collection More...
 
 MuonTaggerNoIP (const edm::ParameterSet &configuration)
 explicit ctor More...
 
 ~MuonTaggerNoIP () override
 dtor More...
 
- Public Member Functions inherited from JetTagComputer
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 ()
 

Private Attributes

btag::LeptonSelector m_selector
 

Additional Inherited Members

- Protected Member Functions inherited from JetTagComputer
virtual float discriminator (const reco::BaseTagInfo &) const
 
void uses (unsigned int id, const std::string &label)
 
void uses (const std::string &label)
 

Detailed Description

Definition at line 17 of file MuonTaggerNoIP.h.

Constructor & Destructor Documentation

MuonTaggerNoIP::MuonTaggerNoIP ( const edm::ParameterSet configuration)
inlineexplicit

explicit ctor

Definition at line 21 of file MuonTaggerNoIP.h.

References JetTagComputer::uses().

21  :
22  m_selector(configuration)
23  {
24  uses("slTagInfos");
25  }
btag::LeptonSelector m_selector
void uses(unsigned int id, const std::string &label)
MuonTaggerNoIP::~MuonTaggerNoIP ( )
inlineoverride

dtor

Definition at line 28 of file MuonTaggerNoIP.h.

References discriminator().

28 { }

Member Function Documentation

float MuonTaggerNoIP::discriminator ( const TagInfoHelper tagInfo) const
overridevirtual

b-tag a jet based on track-to-jet parameters in the extened info collection

Reimplemented from JetTagComputer.

Definition at line 8 of file MuonTaggerNoIP.cc.

References reco::SoftLeptonProperties::deltaR, JetTagComputer::TagInfoHelper::get(), mps_fire::i, infinity, info(), reco::JetTagInfo::jet(), reco::TemplatedSoftLeptonTagInfo< REF >::leptons(), m_selector, reco::TemplatedSoftLeptonTagInfo< REF >::properties(), reco::SoftLeptonProperties::ptRel, reco::SoftLeptonProperties::ratioRel, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by ~MuonTaggerNoIP().

8  {
9  MuonTaggerNoIPMLP theNet{};
10  // default value, used if there are no leptons associated to this jet
11  float bestTag = - std::numeric_limits<float>::infinity();
12  const reco::SoftLeptonTagInfo & info = tagInfo.get<reco::SoftLeptonTagInfo>();
13  // if there are multiple leptons, look for the highest tag result
14  for (unsigned int i = 0; i < info.leptons(); i++) {
15  const reco::SoftLeptonProperties & properties = info.properties(i);
16  if (m_selector(properties)) {
17  float tag = theNet.value( 0, properties.ptRel, properties.ratioRel, properties.deltaR, info.jet()->energy(), info.jet()->eta() ) +
18  theNet.value( 1, properties.ptRel, properties.ratioRel, properties.deltaR, info.jet()->energy(), info.jet()->eta() );
19  if (tag > bestTag)
20  bestTag = tag;
21  }
22  }
23  return bestTag;
24 }
static const TGPicture * info(bool iBackgroundIsBlack)
btag::LeptonSelector m_selector
const SoftLeptonProperties & properties(size_t i) const
edm::RefToBase< Jet > jet(void) const override
returns a polymorphic reference to the tagged jet
Definition: JetTagInfo.h:22
const double infinity

Member Data Documentation

btag::LeptonSelector MuonTaggerNoIP::m_selector
private

Definition at line 35 of file MuonTaggerNoIP.h.

Referenced by discriminator().