File indexing completed on 2023-03-17 11:17:15
0001 #include <limits>
0002
0003 #include "DataFormats/BTauReco/interface/CandSoftLeptonTagInfo.h"
0004 #include "RecoBTag/SoftLepton/interface/LeptonTaggerByPt.h"
0005 #include "RecoBTag/SoftLepton/interface/LeptonSelector.h"
0006
0007
0008 float LeptonTaggerByPt::discriminator(const TagInfoHelper& tagInfo) const {
0009
0010 float bestTag = -std::numeric_limits<float>::infinity();
0011 const reco::CandSoftLeptonTagInfo& info = tagInfo.get<reco::CandSoftLeptonTagInfo>();
0012
0013 for (unsigned int i = 0; i < info.leptons(); i++) {
0014 const reco::SoftLeptonProperties& properties = info.properties(i);
0015 if (m_selector(properties)) {
0016 float tag = properties.ptRel;
0017 if (tag > bestTag)
0018 bestTag = tag;
0019 }
0020 }
0021 return bestTag;
0022 }