CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
35 operator()(const reco::GsfElectronPtr& cand) const{
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 }
double value(const reco::CandidatePtr &cand) const overridefinal
GsfEleNormalizedGsfChi2Cut(const edm::ParameterSet &c)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
result_type operator()(const reco::GsfElectronPtr &) const overridefinal
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:169
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
string const
Definition: compareJSON.py:14
CandidateType candidateType() const overridefinal
float normalizedGsfChi2(const reco::GsfElectronPtr &ele)
#define DEFINE_EDM_PLUGIN(factory, type, name)