Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-31 02:19:53

0001 #ifndef RecoBTag_SoftLepton_LeptonSelector_h
0002 #define RecoBTag_SoftLepton_LeptonSelector_h
0003 
0004 #include <string>
0005 
0006 #include "DataFormats/BTauReco/interface/SoftLeptonTagInfo.h"
0007 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0010 
0011 namespace btag {
0012 
0013   class LeptonSelector {
0014   public:
0015     LeptonSelector(const edm::ParameterSet &params);
0016     ~LeptonSelector();
0017 
0018     bool operator()(const reco::SoftLeptonProperties &properties, bool use3d = true) const;
0019 
0020     inline bool isAny() const { return m_sign == any; }
0021     inline bool isPositive() const { return m_sign == positive; }
0022     inline bool isNegative() const { return m_sign == negative; }
0023 
0024     static void fillPSetDescription(edm::ParameterSetDescription &desc);
0025 
0026   private:
0027     /// optionally select leptons based on their impact parameter sign
0028 
0029     enum sign { negative = -1, any = 0, positive = 1 };
0030 
0031     static sign option(const std::string &election);
0032 
0033     sign m_sign;
0034     reco::SoftLeptonProperties::Quality::Generic m_leptonId;
0035     float m_qualityCut;
0036   };
0037 
0038 }  // namespace btag
0039 
0040 #endif  // RecoBTag_SoftLepton_LeptonSelector_h