CMS 3D CMS Logo

GsfEleDEtaInSeedCut.cc
Go to the documentation of this file.
3 
5 public:
8  _dEtaInSeedCutValueEB(c.getParameter<double>("dEtaInSeedCutValueEB")),
9  _dEtaInSeedCutValueEE(c.getParameter<double>("dEtaInSeedCutValueEE")),
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  "GsfEleDEtaInSeedCut");
28 
29 //a little temporary 72X fix
30 float dEtaInSeed(const reco::GsfElectronPtr& ele){
31  return ele->superCluster().isNonnull() && ele->superCluster()->seed().isNonnull() ?
32  ele->deltaEtaSuperClusterTrackAtVtx() - ele->superCluster()->eta() + ele->superCluster()->seed()->eta() : std::numeric_limits<float>::max();
33 }
34 
35 CutApplicatorBase::result_type
38  const float dEtaInSeedCutValue =
39  ( std::abs(cand->superCluster()->eta()) < _barrelCutOff ?
41  // return std::abs(cand->deltaEtaSeedClusterTrackAtVtx()) < dEtaInSeedCutValue;
42  return std::abs(dEtaInSeed(cand))<dEtaInSeedCutValue;
43 }
44 
46  reco::GsfElectronPtr ele(cand);
47  return std::abs(dEtaInSeed(ele));
48 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:249
double value(const reco::CandidatePtr &cand) const override final
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:184
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const double _dEtaInSeedCutValueEB
const double _dEtaInSeedCutValueEE
result_type operator()(const reco::GsfElectronPtr &) const override final
CandidateType candidateType() const override final
GsfEleDEtaInSeedCut(const edm::ParameterSet &c)
float dEtaInSeed(const reco::GsfElectronPtr &ele)
#define DEFINE_EDM_PLUGIN(factory, type, name)