CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfEleDeltaBetaIsoCutStandalone.cc
Go to the documentation of this file.
6 
7 
9 public:
11 
12  result_type operator()(const reco::GsfElectronPtr&) const override final;
13 
14  CandidateType candidateType() const override final {
15  return ELECTRON;
16  }
17 
18 private:
21  const bool _relativeIso;
22 
23 };
24 
27  "GsfEleDeltaBetaIsoCutStandalone");
28 
31  _isoCutEBLowPt(c.getParameter<double>("isoCutEBLowPt")),
32  _isoCutEBHighPt(c.getParameter<double>("isoCutEBHighPt")),
33  _isoCutEELowPt(c.getParameter<double>("isoCutEELowPt")),
34  _isoCutEEHighPt(c.getParameter<double>("isoCutEEHighPt")),
35  _deltaBetaConstant(c.getParameter<double>("deltaBetaConstant")),
36  _ptCutOff(c.getParameter<double>("ptCutOff")),
37  _barrelCutOff(c.getParameter<double>("barrelCutOff")),
38  _relativeIso(c.getParameter<bool>("isRelativeIso")) {
39 }
40 
41 CutApplicatorBase::result_type
43 operator()(const reco::GsfElectronPtr& cand) const{
44  const float isoCut =
45  ( cand->p4().pt() < _ptCutOff ?
46  ( std::abs(cand->superCluster()->position().eta()) < _barrelCutOff ?
48  ( std::abs(cand->superCluster()->position().eta()) < _barrelCutOff ?
51  cand->pfIsolationVariables();
52  const float chad = pfIso.sumChargedHadronPt;
53  const float nhad = pfIso.sumNeutralHadronEt;
54  const float pho = pfIso.sumPhotonEt;
55  const float puchad = pfIso.sumPUPt;
56  float iso = chad + std::max(0.0f, nhad + pho - _deltaBetaConstant*puchad);
57  if( _relativeIso ) iso /= cand->p4().pt();
58  return iso < isoCut;
59 }
result_type operator()(const reco::GsfElectronPtr &) const overridefinal
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
Definition: GsfElectron.h:566
CandidateType candidateType() const overridefinal
GsfEleDeltaBetaIsoCutStandalone(const edm::ParameterSet &c)
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Definition: GsfElectron.h:561
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
Definition: GsfElectron.h:560
string const
Definition: compareJSON.py:14
#define DEFINE_EDM_PLUGIN(factory, type, name)
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
Definition: GsfElectron.h:559