CMS 3D CMS Logo

GsfEleNormalizedGsfChi2Cut.cc
Go to the documentation of this file.
3 
5 public:
8  normalizedGsfChi2CutValueEB_(c.getParameter<double>("normalizedGsfChi2CutValueEB")),
9  normalizedGsfChi2CutValueEE_(c.getParameter<double>("normalizedGsfChi2CutValueEE")),
10  barrelCutOff_(c.getParameter<double>("barrelCutOff")){
11  }
12 
13  result_type operator()(const reco::GsfElectronPtr&) const override final;
14 
15  double value(const reco::CandidatePtr& cand) const override final;
16 
17  CandidateType candidateType() const override final {
18  return ELECTRON;
19  }
20 
21 private:
23 };
24 
27  "GsfEleNormalizedGsfChi2Cut");
28 
30  return ele->gsfTrack().isNonnull() ? ele->gsfTrack()->normalizedChi2() : std::numeric_limits<float>::max();
31 }
32 
33 CutApplicatorBase::result_type
36  const float normalizedGsfChi2CutValue =
37  ( std::abs(cand->superCluster()->eta()) < barrelCutOff_ ?
39 
40  return std::abs(normalizedGsfChi2(cand)) < normalizedGsfChi2CutValue;
41 }
42 
44  reco::GsfElectronPtr ele(cand);
45  return std::abs(normalizedGsfChi2(ele));
46 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
double value(const reco::CandidatePtr &cand) const override final
GsfEleNormalizedGsfChi2Cut(const edm::ParameterSet &c)
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:184
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
result_type operator()(const reco::GsfElectronPtr &) const override final
float normalizedGsfChi2(const reco::GsfElectronPtr &ele)
#define DEFINE_EDM_PLUGIN(factory, type, name)
CandidateType candidateType() const override final
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:185