CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
GsfEleEInverseMinusPInverseCut Class Reference
Inheritance diagram for GsfEleEInverseMinusPInverseCut:
CutApplicatorBase candidate_functions::CandidateCut

Public Member Functions

CandidateType candidateType () const override final
 
 GsfEleEInverseMinusPInverseCut (const edm::ParameterSet &c)
 
result_type operator() (const reco::GsfElectronPtr &) const override final
 
double value (const reco::CandidatePtr &cand) const override final
 
- Public Member Functions inherited from CutApplicatorBase
virtual result_type asCandidate (const argument_type &) const
 
 CutApplicatorBase ()
 
 CutApplicatorBase (const edm::ParameterSet &c)
 
 CutApplicatorBase (const CutApplicatorBase &)=delete
 
virtual const std::string & name () const
 
virtual result_type operator() (const argument_type &) const final
 
virtual result_type operator() (const pat::ElectronPtr &) const
 
virtual result_type operator() (const reco::PhotonPtr &) const
 
virtual result_type operator() (const pat::PhotonPtr &) const
 
virtual result_type operator() (const reco::MuonPtr &) const
 
virtual result_type operator() (const pat::MuonPtr &) const
 
virtual result_type operator() (const reco::PFTauPtr &) const
 
virtual result_type operator() (const pat::TauPtr &) const
 
CutApplicatorBaseoperator= (const CutApplicatorBase &)=delete
 
virtual ~CutApplicatorBase ()
 Destructor. More...
 
- Public Member Functions inherited from candidate_functions::CandidateCut
 CandidateCut ()
 
virtual ~CandidateCut ()
 

Private Attributes

const double _barrelCutOff
 
const double _ooemoopCutValueEB
 
const double _ooemoopCutValueEE
 

Additional Inherited Members

- Public Types inherited from CutApplicatorBase
enum  CandidateType {
  NONE, ELECTRON, MUON, PHOTON,
  TAU, PATELECTRON, PATMUON, PATPHOTON,
  PATTAU
}
 

Detailed Description

Definition at line 4 of file GsfEleEInverseMinusPInverseCut.cc.

Constructor & Destructor Documentation

GsfEleEInverseMinusPInverseCut::GsfEleEInverseMinusPInverseCut ( const edm::ParameterSet c)
inline

Definition at line 6 of file GsfEleEInverseMinusPInverseCut.cc.

References operator()(), and value().

6  :
8  _ooemoopCutValueEB(c.getParameter<double>("eInverseMinusPInverseCutValueEB")),
9  _ooemoopCutValueEE(c.getParameter<double>("eInverseMinusPInverseCutValueEE")),
10  _barrelCutOff(c.getParameter<double>("barrelCutOff")){
11  }
T getParameter(std::string const &) const

Member Function Documentation

CandidateType GsfEleEInverseMinusPInverseCut::candidateType ( ) const
inlinefinaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 17 of file GsfEleEInverseMinusPInverseCut.cc.

References CutApplicatorBase::ELECTRON.

17  {
18  return ELECTRON;
19  }
CutApplicatorBase::result_type GsfEleEInverseMinusPInverseCut::operator() ( const reco::GsfElectronPtr cand) const
finaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 31 of file GsfEleEInverseMinusPInverseCut.cc.

References _barrelCutOff, _ooemoopCutValueEB, _ooemoopCutValueEE, funct::abs(), reco::GsfElectron::ecalEnergy(), reco::GsfElectron::eSuperClusterOverP(), reco::GsfElectron::superCluster(), and value().

Referenced by GsfEleEInverseMinusPInverseCut().

31  {
32  const float ooemoopCutValue =
33  ( std::abs(cand->superCluster()->position().eta()) < _barrelCutOff ?
35  const float ecal_energy_inverse = 1.0/cand->ecalEnergy();
36  const float eSCoverP = cand->eSuperClusterOverP();
37  return std::abs(1.0 - eSCoverP)*ecal_energy_inverse < ooemoopCutValue;
38 }
float eSuperClusterOverP() const
Definition: GsfElectron.h:245
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:184
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float ecalEnergy() const
Definition: GsfElectron.h:837
double GsfEleEInverseMinusPInverseCut::value ( const reco::CandidatePtr cand) const
finaloverridevirtual

Implements candidate_functions::CandidateCut.

Definition at line 41 of file GsfEleEInverseMinusPInverseCut.cc.

References funct::abs(), reco::GsfElectron::ecalEnergy(), and reco::GsfElectron::eSuperClusterOverP().

Referenced by GsfEleEInverseMinusPInverseCut(), and operator()().

41  {
42  reco::GsfElectronPtr ele(cand);
43  const float ecal_energy_inverse = 1.0/ele->ecalEnergy();
44  const float eSCoverP = ele->eSuperClusterOverP();
45  return std::abs(1.0 - eSCoverP)*ecal_energy_inverse;
46 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

const double GsfEleEInverseMinusPInverseCut::_barrelCutOff
private

Definition at line 22 of file GsfEleEInverseMinusPInverseCut.cc.

Referenced by operator()().

const double GsfEleEInverseMinusPInverseCut::_ooemoopCutValueEB
private

Definition at line 22 of file GsfEleEInverseMinusPInverseCut.cc.

Referenced by operator()().

const double GsfEleEInverseMinusPInverseCut::_ooemoopCutValueEE
private

Definition at line 22 of file GsfEleEInverseMinusPInverseCut.cc.

Referenced by operator()().