45 _C1_EB(c.getParameter<double>(
"C1_EB")),
46 _C2_EB(c.getParameter<double>(
"C2_EB")),
47 _C1_EE(c.getParameter<double>(
"C1_EE")),
48 _C2_EE(c.getParameter<double>(
"C2_EE")),
49 _barrelCutOff(c.getParameter<double>(
"barrelCutOff")),
50 _useRelativeIso(c.getParameter<bool>(
"useRelativeIso")),
51 _effectiveAreas((c.getParameter<edm::FileInPath>(
"effAreasConfigFile")).
fullPath()) {
76 float anyisoval = -1.0;
78 anyisoval = (*_anyPFIsoMap)[cand];
84 anyisoval = (*_anyPFIsoMap)[cand];
89 const double absEta =
std::abs(cand->superCluster()->eta());
90 const float anyPFIsoWithEACutValue =
99 const float anyPFIsoWithEA =
std::max(0.0, anyPFIso - rho * eA);
103 return anyPFIsoWithEA < anyPFIsoWithEACutValue * (
_useRelativeIso ? cand->pt() : 1.);
112 float anyisoval = -1.0;
114 anyisoval = (*_anyPFIsoMap)[cand];
120 anyisoval = (*_anyPFIsoMap)[cand];
125 double absEta =
std::abs(pho->superCluster()->eta());
133 float anyPFIsoWithEA =
std::max(0.0, anyPFIso - rho * eA);
137 anyPFIsoWithEA /= pho->pt();
140 return anyPFIsoWithEA;
CandidateType candidateType() const final
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void setConsumes(edm::ConsumesCollector &) final
const edm::EventSetup & c
std::unordered_map< std::string, edm::InputTag > contentTags_
static constexpr char anyPFIsoWithEA_[]
static constexpr char rhoString_[]
const float getEffectiveArea(float eta) const
double value(const reco::CandidatePtr &cand) const final
void getEventContent(const edm::EventBase &) final
bool contains(ProductID id) const
edm::Handle< double > _rhoHandle
result_type operator()(const reco::PhotonPtr &) const final
Abs< T >::type abs(const T &t)
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
const_iterator begin() const
T getParameter(std::string const &) const
ProductID id() const
Accessor for product ID.
bool getByLabel(InputTag const &, Handle< T > &) const
edm::Handle< edm::ValueMap< float > > _anyPFIsoMap
#define DEFINE_EDM_PLUGIN(factory, type, name)
EffectiveAreas _effectiveAreas
PhoAnyPFIsoWithEACut(const edm::ParameterSet &c)