17 chargedOnly_ = iConfig.
getParameter<
bool>(
"UseOnlyChargedHadrons");
18 minPtLeadObject_ = iConfig.
getParameter<
double>(
"MinPtLeadingObject");
21 double discriminate(
const PFTauRef& pfTau)
const override;
35 if( thePFTauRef->leadChargedHadrCand().
isNonnull() )
37 leadObjectPt = thePFTauRef->leadChargedHadrCand()->pt();
47 if( thePFTauRef->leadCand().
isNonnull() && thePFTauRef->leadChargedHadrCand().
isNonnull() )
49 leadObjectPt = thePFTauRef->leadCand()->pt();
53 return ( leadObjectPt > minPtLeadObject_ ? 1. : 0. );
60 desc.
add<
double>(
"MinPtLeadingObject", 5.0);
66 desc.
add<
bool>(
"UseOnlyChargedHadrons",
false);
68 descriptions.
add(
"pfRecoTauDiscriminationByLeadingObjectPtCut", desc);
T getParameter(std::string const &) const
bool isNonnull() const
Checks for non-null.
double discriminate(const PFTauRef &pfTau) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
PFRecoTauDiscriminationByLeadingObjectPtCut(const edm::ParameterSet &iConfig)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~PFRecoTauDiscriminationByLeadingObjectPtCut() override