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 
14  CandidateType candidateType() const final {
15  return ELECTRON;
16  }
17 
18 private:
22 
23 
24 };
25 
28  "GsfEleFull5x5E2x5OverE5x5WithSatCut");
29 
31  CutApplicatorBase(params),
32  minE1x5OverE5x5Cut_(params,"minE1x5OverE5x5"),
33  minE2x5OverE5x5Cut_(params,"minE2x5OverE5x5"),
34  maxNrSatCrysIn5x5Cut_(params,"maxNrSatCrysIn5x5")
35 {
36 
37 }
38 
39 
40 CutApplicatorBase::result_type
43 
44  if(cand->nSaturatedXtals()>maxNrSatCrysIn5x5Cut_(cand)) return true;
45 
46  const double e5x5 = cand->full5x5_e5x5();
47  const double e2x5OverE5x5 = e5x5!=0 ? cand->full5x5_e2x5Max()/e5x5 : 0;
48  const double e1x5OverE5x5 = e5x5!=0 ? cand->full5x5_e1x5()/e5x5 : 0;
49 
50  return e1x5OverE5x5 > minE1x5OverE5x5Cut_(cand) || e2x5OverE5x5 > minE2x5OverE5x5Cut_(cand);
51 
52 }
53 
55 value(const reco::CandidatePtr& cand) const {
56  reco::GsfElectronPtr ele(cand);
57  //btw we broke somebodies nice model of assuming every cut is 1D....
58  //what this is returning is fairly meaningless...
59  return ele->full5x5_e1x5() ? ele->full5x5_e2x5Max()/ele->full5x5_e1x5() : 0.;
60 }
float nSaturatedXtals() const
Definition: GsfElectron.h:512
float full5x5_e5x5() const
Definition: GsfElectron.h:459
float full5x5_e1x5() const
Definition: GsfElectron.h:457
result_type operator()(const reco::GsfElectronPtr &) const final
float full5x5_e2x5Max() const
Definition: GsfElectron.h:458
#define DEFINE_EDM_PLUGIN(factory, type, name)
double value(const reco::CandidatePtr &cand) const final