20 chargeReq_ = iConfig.
getParameter<uint32_t>(
"AbsChargeReq");
21 oneOrThreeProng_ = iConfig.
getParameter<
bool>(
"ApplyOneOrThreeProngCut");
24 double discriminate(
const PFTauRef& pfTau)
const override;
33 uint16_t nSigTk = thePFTauRef->signalChargedHadrCands().size();
34 bool chargeok = (
std::abs(thePFTauRef->charge()) ==
int(chargeReq_));
35 bool oneOrThreeProngOK = ( (nSigTk==1) || (nSigTk==3) || !oneOrThreeProng_ );
37 return ( (chargeok && oneOrThreeProngOK) ? 1. : 0. );
44 desc.
add<
unsigned int>(
"AbsChargeReq", 1);
45 desc.
add<
bool>(
"ApplyOneOrThreeProngCut",
false);
52 descriptions.
add(
"pfRecoTauDiscriminationByCharge", desc);
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
Abs< T >::type abs(const T &t)
~PFRecoTauDiscriminationByCharge() override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double discriminate(const PFTauRef &pfTau) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
PFRecoTauDiscriminationByCharge(const edm::ParameterSet &iConfig)
void add(std::string const &label, ParameterSetDescription const &psetDescription)