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 final;
14 
15  double value(const reco::CandidatePtr& cand) const final;
16 
17  CandidateType candidateType() const 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 }
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:185
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
result_type operator()(const reco::GsfElectronPtr &) const final
double value(const reco::CandidatePtr &cand) const final
GsfEleNormalizedGsfChi2Cut(const edm::ParameterSet &c)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CandidateType candidateType() const final
float normalizedGsfChi2(const reco::GsfElectronPtr &ele)
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:184
#define DEFINE_EDM_PLUGIN(factory, type, name)