test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
37 operator()(const reco::GsfElectronPtr& cand) const{
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 }
double value(const reco::CandidatePtr &cand) const overridefinal
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const double _dEtaInSeedCutValueEB
const double _dEtaInSeedCutValueEE
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
GsfEleDEtaInSeedCut(const edm::ParameterSet &c)
float dEtaInSeed(const reco::GsfElectronPtr &ele)
result_type operator()(const reco::GsfElectronPtr &) const overridefinal
string const
Definition: compareJSON.py:14
#define DEFINE_EDM_PLUGIN(factory, type, name)
CandidateType candidateType() const overridefinal