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 edm::ParameterSet &c)
 
 CutApplicatorBase (const CutApplicatorBase &)=delete
 
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 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
 
 ~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.

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.

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

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 }
double pt() const final
transverse momentum
double p() const final
magnitude of momentum vector
float ecalEnergy() const
Definition: GsfElectron.h:896

◆ value()

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

Implements candidate_functions::CandidateCut.

Definition at line 30 of file GsfEleMinEcalEtCut.cc.

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

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 }
double pt() const final
transverse momentum
double p() const final
magnitude of momentum vector
float ecalEnergy() const
Definition: GsfElectron.h:896

Member Data Documentation

◆ minEt_

const double GsfEleMinEcalEtCut::minEt_
private

Definition at line 15 of file GsfEleMinEcalEtCut.cc.

Referenced by operator()().