42 isoCutEBLowPt_(c.getParameter<double>(
"isoCutEBLowPt")),
43 isoCutEBHighPt_(c.getParameter<double>(
"isoCutEBHighPt")),
44 isoCutEELowPt_(c.getParameter<double>(
"isoCutEELowPt")),
45 isoCutEEHighPt_(c.getParameter<double>(
"isoCutEEHighPt")),
46 isoType_(c.getParameter<int>(
"isoType")),
47 ptCutOff_(c.getParameter<double>(
"ptCutOff")),
48 barrelCutOff_(c.getParameter<double>(
"barrelCutOff")),
49 isRelativeIso_(c.getParameter<bool>(
"isRelativeIso")),
50 effectiveAreas_((c.getParameter<edm::FileInPath>(
"effAreasConfigFile")).
fullPath()) {
66 double absEta =
std::abs(cand->superCluster()->eta());
70 throw cms::Exception(
"ERROR: this VID selection is meant to be run on miniAOD/PAT only")
72 <<
"Change input format to PAT/miniAOD or contact Egamma experts" << std::endl
82 float isoValue = -999;
84 isoValue = elPat->ecalPFClusterIso();
86 isoValue = elPat->hcalPFClusterIso();
88 throw cms::Exception(
"ERROR: unknown type requested for PF cluster isolation.")
90 <<
"Check VID configuration." << std::endl;
92 float isoValueCorr =
std::max(0.0
f, isoValue - rho * eA);
102 double absEta =
std::abs(ele->superCluster()->eta());
106 throw cms::Exception(
"ERROR: this VID selection is meant to be run on miniAOD/PAT only")
108 <<
"Change input format to PAT/miniAOD or contact Egamma experts" << std::endl
115 float isoValue = -999;
117 isoValue = elPat->ecalPFClusterIso();
119 isoValue = elPat->hcalPFClusterIso();
121 throw cms::Exception(
"ERROR: unknown type requested for PF cluster isolation.")
123 <<
"Check VID configuration." << std::endl;
125 float isoValueCorr =
std::max(0.0
f, isoValue - rho * eA);
129 isoValueCorr /= ele->pt();
edm::Handle< double > rhoHandle_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EventSetup & c
std::unordered_map< std::string, edm::InputTag > contentTags_
static constexpr char rhoString_[]
T const * get() const
Returns C++ pointer to the item.
EffectiveAreas effectiveAreas_
const float getEffectiveArea(float eta) const
Abs< T >::type abs(const T &t)
result_type operator()(const reco::GsfElectronPtr &) const final
double value(const reco::CandidatePtr &cand) const final
CandidateType candidateType() const final
const float isoCutEELowPt_
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
const float isoCutEBLowPt_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
GsfEleCalPFClusterIsoCut(const edm::ParameterSet &c)
T getParameter(std::string const &) const
const float isoCutEEHighPt_
Analysis-level electron class.
void getEventContent(const edm::EventBase &) final
bool getByLabel(InputTag const &, Handle< T > &) const
const float isoCutEBHighPt_
#define DEFINE_EDM_PLUGIN(factory, type, name)
const float barrelCutOff_
void setConsumes(edm::ConsumesCollector &) final