CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
GsfEleEcalDrivenCut Class Reference
Inheritance diagram for GsfEleEcalDrivenCut:
CutApplicatorBase candidate_functions::CandidateCut

Public Member Functions

CandidateType candidateType () const overridefinal
 
 GsfEleEcalDrivenCut (const edm::ParameterSet &c)
 
result_type operator() (const reco::GsfElectronPtr &) const overridefinal
 
double value (const reco::CandidatePtr &cand) const overridefinal
 
- 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 int ecalDrivenEB_
 
const int ecalDrivenEE_
 

Additional Inherited Members

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

Detailed Description

Definition at line 5 of file GsfEleEcalDrivenCut.cc.

Constructor & Destructor Documentation

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

Definition at line 7 of file GsfEleEcalDrivenCut.cc.

7  :
9  ecalDrivenEB_(c.getParameter<int>("ecalDrivenEB")),
10  ecalDrivenEE_(c.getParameter<int>("ecalDrivenEE")),
11  barrelCutOff_(c.getParameter<double>("barrelCutOff")){
12  }
T getParameter(std::string const &) const

Member Function Documentation

CandidateType GsfEleEcalDrivenCut::candidateType ( ) const
inlinefinaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 18 of file GsfEleEcalDrivenCut.cc.

References CutApplicatorBase::ELECTRON.

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

Reimplemented from CutApplicatorBase.

Definition at line 33 of file GsfEleEcalDrivenCut.cc.

References funct::abs(), barrelCutOff_, ecalDrivenEB_, and ecalDrivenEE_.

33  {
34  const bool ecalDriven = std::abs(cand->superCluster()->position().eta()) < barrelCutOff_ ?
36  if(ecalDriven<0) return true;
37  else if(ecalDriven==0) return !cand->ecalDriven();
38  else return cand->ecalDriven();
39 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double GsfEleEcalDrivenCut::value ( const reco::CandidatePtr cand) const
finaloverridevirtual

Implements candidate_functions::CandidateCut.

Definition at line 41 of file GsfEleEcalDrivenCut.cc.

41  {
42  reco::GsfElectronPtr ele(cand);
43  return ele->ecalDriven();
44 }

Member Data Documentation

const double GsfEleEcalDrivenCut::barrelCutOff_
private

Definition at line 24 of file GsfEleEcalDrivenCut.cc.

Referenced by operator()().

const int GsfEleEcalDrivenCut::ecalDrivenEB_
private

Definition at line 23 of file GsfEleEcalDrivenCut.cc.

Referenced by operator()().

const int GsfEleEcalDrivenCut::ecalDrivenEE_
private

Definition at line 23 of file GsfEleEcalDrivenCut.cc.

Referenced by operator()().