CMS 3D CMS Logo

GsfEleFull5x5E2x5OverE5x5WithSatCut.cc
Go to the documentation of this file.
5 
7 public:
9 
10  result_type operator()(const reco::GsfElectronPtr&) const final;
11 
12  double value(const reco::CandidatePtr& cand) const final;
13 
15 
16 private:
20 };
21 
22 DEFINE_EDM_PLUGIN(CutApplicatorFactory, GsfEleFull5x5E2x5OverE5x5WithSatCut, "GsfEleFull5x5E2x5OverE5x5WithSatCut");
23 
26  minE1x5OverE5x5Cut_(params, "minE1x5OverE5x5"),
27  minE2x5OverE5x5Cut_(params, "minE2x5OverE5x5"),
28  maxNrSatCrysIn5x5Cut_(params, "maxNrSatCrysIn5x5") {}
29 
31  if (cand->nSaturatedXtals() > maxNrSatCrysIn5x5Cut_(cand))
32  return true;
33 
34  const double e5x5 = cand->full5x5_e5x5();
35  const double e2x5OverE5x5 = e5x5 != 0 ? cand->full5x5_e2x5Max() / e5x5 : 0;
36  const double e1x5OverE5x5 = e5x5 != 0 ? cand->full5x5_e1x5() / e5x5 : 0;
37 
38  return e1x5OverE5x5 > minE1x5OverE5x5Cut_(cand) || e2x5OverE5x5 > minE2x5OverE5x5Cut_(cand);
39 }
40 
43  //btw we broke somebodies nice model of assuming every cut is 1D....
44  //what this is returning is fairly meaningless...
45  return ele->full5x5_e1x5() ? ele->full5x5_e2x5Max() / ele->full5x5_e1x5() : 0.;
46 }
float full5x5_e2x5Max() const
Definition: GsfElectron.h:474
float full5x5_e1x5() const
Definition: GsfElectron.h:473
result_type operator()(const reco::GsfElectronPtr &) const final
double value(const reco::CandidatePtr &cand) const final
#define DEFINE_EDM_PLUGIN(factory, type, name)