CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LeptonTaggerByPt.cc
Go to the documentation of this file.
1 #include <limits>
2 
6 
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 T & get(unsigned int index=0) const
const SoftLeptonProperties & properties(size_t i) const
const double infinity
btag::LeptonSelector m_selector
virtual float discriminator(const TagInfoHelper &tagInfo) const
b-tag a jet based on track-to-jet parameters in the extened info collection