00001 #ifndef RecoBTag_SoftLepton_LeptonSelector_h 00002 #define RecoBTag_SoftLepton_LeptonSelector_h 00003 00004 #include <string> 00005 00006 #include "FWCore/Utilities/interface/EDMException.h" 00007 00008 namespace btag { 00009 00010 namespace LeptonSelector { 00011 00013 enum sign { 00014 negative = -1, 00015 any = 0, 00016 positive = 1 00017 }; 00018 00019 inline sign option(const std::string & selection) { 00020 if (selection == "any") 00021 return any; 00022 else if (selection == "negative") 00023 return negative; 00024 else if (selection == "positive") 00025 return positive; 00026 else 00027 throw edm::Exception( edm::errors::Configuration ) << "invalid parameter specified for soft lepton selection"; 00028 } 00029 00030 } // namespace LeptonSelector 00031 00032 } // namespace btag 00033 00034 #endif // RecoBTag_SoftLepton_LeptonSelector_h