CMS 3D CMS Logo

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

#include <LeptonTaggerByPt.h>

Inheritance diagram for LeptonTaggerByPt:
JetTagComputer

Public Member Functions

virtual float discriminator (const TagInfoHelper &tagInfo) const
 b-tag a jet based on track-to-jet parameters in the extened info collection More...
 
 LeptonTaggerByPt (const edm::ParameterSet &configuration)
 explicit ctor More...
 
virtual ~LeptonTaggerByPt ()
 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

Implementation of muon b-tagging cutting on the lepton's transverse momentum relative to the jet axis

Author
Andrea 'fwyzard' Bocci, Universita' di Firenze

Definition at line 16 of file LeptonTaggerByPt.h.

Constructor & Destructor Documentation

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

explicit ctor

Definition at line 20 of file LeptonTaggerByPt.h.

References JetTagComputer::uses().

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

dtor

Definition at line 27 of file LeptonTaggerByPt.h.

27 { }

Member Function Documentation

float LeptonTaggerByPt::discriminator ( const TagInfoHelper tagInfo) const
virtual

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

Reimplemented from JetTagComputer.

Definition at line 8 of file LeptonTaggerByPt.cc.

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

8  {
9  // default value, used if there are no leptons associated to this jet
10  float bestTag = - std::numeric_limits<float>::infinity();
12  // if there are multiple leptons, look for the one with the highest pT_rel
13  for (unsigned int i = 0; i < info.leptons(); i++) {
14  const reco::SoftLeptonProperties & properties = info.properties(i);
15  if (m_selector(properties)) {
16  float tag = properties.ptRel;
17  if (tag > bestTag)
18  bestTag = tag;
19  }
20  }
21  return bestTag;
22 }
int i
Definition: DBlmapReader.cc:9
static const TGPicture * info(bool iBackgroundIsBlack)
const SoftLeptonProperties & properties(size_t i) const
const double infinity
btag::LeptonSelector m_selector

Member Data Documentation

btag::LeptonSelector LeptonTaggerByPt::m_selector
private

Definition at line 34 of file LeptonTaggerByPt.h.

Referenced by discriminator().