test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfEleEcalDrivenCut.cc
Go to the documentation of this file.
4 
6 public:
9  ecalDrivenEB_(c.getParameter<int>("ecalDrivenEB")),
10  ecalDrivenEE_(c.getParameter<int>("ecalDrivenEE")),
11  barrelCutOff_(c.getParameter<double>("barrelCutOff")){
12  }
13 
14  result_type operator()(const reco::GsfElectronPtr&) const override final;
15 
16  double value(const reco::CandidatePtr& cand) const override final;
17 
18  CandidateType candidateType() const override final {
19  return ELECTRON;
20  }
21 
22 private:
23  const int ecalDrivenEB_, ecalDrivenEE_;// -1 ignore, 0 = fail ecalDriven, 1 =pass ecalDriven
24  const double barrelCutOff_;
25 };
26 
29  "GsfEleEcalDrivenCut");
30 
31 CutApplicatorBase::result_type
33 operator()(const reco::GsfElectronPtr& cand) const{
34  const bool ecalDriven = std::abs(cand->superCluster()->position().eta()) < barrelCutOff_ ?
36  if(ecalDriven<0) return true;
37  else if(ecalDriven==0) return !cand->ecalDriven();
38  else return cand->ecalDriven();
39 }
40 
42  reco::GsfElectronPtr ele(cand);
43  return ele->ecalDriven();
44 }
CandidateType candidateType() const overridefinal
double value(const reco::CandidatePtr &cand) const overridefinal
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
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
GsfEleEcalDrivenCut(const edm::ParameterSet &c)
#define DEFINE_EDM_PLUGIN(factory, type, name)
result_type operator()(const reco::GsfElectronPtr &) const overridefinal