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