28 ecalDrivenEB_(static_cast<
EcalDrivenCode>(c.getParameter<int>(
"ecalDrivenEB"))),
29 ecalDrivenEE_(static_cast<
EcalDrivenCode>(c.getParameter<int>(
"ecalDrivenEE"))),
30 barrelCutOff_(c.getParameter<double>(
"barrelCutOff")) {
33 <<
"error in constructing GsfEleEcalDrivenCut" << std::endl
36 <<
"allowed values are IGNORE:" <<
IGNORE <<
" FAIL:" <<
FAIL <<
" PASS:" <<
PASS;
41 const auto ecalDrivenRequirement =
43 if (ecalDrivenRequirement ==
IGNORE)
45 else if (ecalDrivenRequirement ==
FAIL)
46 return !cand->ecalDriven();
47 else if (ecalDrivenRequirement ==
PASS)
48 return cand->ecalDriven();
51 <<
"default option should not be reached, code has been updated "
52 "without changing the logic, this needs to be fixed";
58 return ele->ecalDriven();
const edm::EventSetup & c
result_type operator()(const reco::GsfElectronPtr &) const final
double value(const reco::CandidatePtr &cand) const final
static bool isValidCutVal(int val)
const double barrelCutOff_
Abs< T >::type abs(const T &t)
GsfEleEcalDrivenCut(const edm::ParameterSet &c)
#define DEFINE_EDM_PLUGIN(factory, type, name)
CandidateType candidateType() const final