Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:36

0001 #include <limits>
0002 
0003 #include "DataFormats/BTauReco/interface/SoftLeptonTagInfo.h"
0004 #include "RecoBTag/SoftLepton/interface/LeptonTaggerDistance.h"
0005 
0006 /// b-tag a jet based on track-to-jet pseudo-angular distance
0007 float LeptonTaggerDistance::discriminator(const TagInfoHelper& tagInfo) const {
0008   const reco::SoftLeptonTagInfo& info = tagInfo.get<reco::SoftLeptonTagInfo>();
0009   // if there are any leptons, look for any one within the requested deltaR
0010   for (unsigned int i = 0; i < info.leptons(); i++) {
0011     if (info.properties(i).deltaR <= m_maxDistance)
0012       return 1.0;
0013   }
0014   // default value, used if there are no leptons associated to this jet
0015   return -std::numeric_limits<float>::infinity();
0016 }