CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

const double minEt_
 

Additional Inherited Members

- Public Types inherited from CutApplicatorBase
enum  CandidateType {
  NONE, ELECTRON, MUON, PHOTON,
  TAU, PATELECTRON, PATMUON, PATPHOTON,
  PATTAU
}
 
- Public Types inherited from candidate_functions::CandidateCut
using argument_type = reco::CandidatePtr
 
using result_type = bool
 

Detailed Description

Definition at line 4 of file GsfEleMinEcalEtCut.cc.

Constructor & Destructor Documentation

◆ GsfEleMinEcalEtCut()

GsfEleMinEcalEtCut::GsfEleMinEcalEtCut ( const edm::ParameterSet c)

Definition at line 20 of file GsfEleMinEcalEtCut.cc.

21  : CutApplicatorBase(c), minEt_(c.getParameter<double>("minEt")) {}

Member Function Documentation

◆ candidateType()

CandidateType GsfEleMinEcalEtCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 12 of file GsfEleMinEcalEtCut.cc.

12 { return ELECTRON; }

References CutApplicatorBase::ELECTRON.

◆ operator()()

CutApplicatorBase::result_type GsfEleMinEcalEtCut::operator() ( const reco::GsfElectronPtr cand) const
finalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 23 of file GsfEleMinEcalEtCut.cc.

23  {
24  const reco::GsfElectron& ele = *cand;
25  const float sinTheta = ele.p() != 0 ? ele.pt() / ele.p() : 0.;
26  const float et = ele.ecalEnergy() * sinTheta;
27  return et > minEt_;
28 }

References reco::GsfElectron::ecalEnergy(), EgHLTOffHistBins_cfi::et, minEt_, reco::LeafCandidate::p(), and reco::LeafCandidate::pt().

◆ value()

double GsfEleMinEcalEtCut::value ( const reco::CandidatePtr cand) const
finalvirtual

Implements candidate_functions::CandidateCut.

Definition at line 30 of file GsfEleMinEcalEtCut.cc.

30  {
31  const reco::GsfElectronPtr elePtr(cand);
32  const reco::GsfElectron& ele = *elePtr;
33  const float sinTheta = ele.p() != 0 ? ele.pt() / ele.p() : 0.;
34  const float et = ele.ecalEnergy() * sinTheta;
35  return et;
36 }

References reco::GsfElectron::ecalEnergy(), EgHLTOffHistBins_cfi::et, reco::LeafCandidate::p(), and reco::LeafCandidate::pt().

Member Data Documentation

◆ minEt_

const double GsfEleMinEcalEtCut::minEt_
private

Definition at line 15 of file GsfEleMinEcalEtCut.cc.

Referenced by operator()().

CutApplicatorBase::CutApplicatorBase
CutApplicatorBase()
Definition: CutApplicatorBase.h:49
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
reco::GsfElectron
Definition: GsfElectron.h:35
cand
Definition: decayParser.h:34
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
edm::Ptr< reco::GsfElectron >
GsfEleMinEcalEtCut::minEt_
const double minEt_
Definition: GsfEleMinEcalEtCut.cc:15
reco::LeafCandidate::p
double p() const final
magnitude of momentum vector
Definition: LeafCandidate.h:123
CutApplicatorBase::ELECTRON
Definition: CutApplicatorBase.h:47
reco::GsfElectron::ecalEnergy
float ecalEnergy() const
Definition: GsfElectron.h:820