CMS 3D CMS Logo

LeptonTaggerByIP.cc
Go to the documentation of this file.
1 #include <limits>
2 
6 
8 float LeptonTaggerByIP::discriminator(const TagInfoHelper & tagInfo) const {
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  float sipsig = m_use3d ? properties.sip3dsig : properties.sip2dsig;
16  if (m_selector.isNegative())
17  sipsig = -sipsig;
18  if (m_selector(properties, m_use3d)) {
19  float tag = sipsig;
20  if (tag > bestTag)
21  bestTag = tag;
22  }
23  }
24  return bestTag;
25 }
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
bool isNegative() const
float discriminator(const TagInfoHelper &tagInfo) const override
b-tag a jet based on track-to-jet parameters in the extened info collection