CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PhotonHcalOverEcalCut< isBC > Class Template Reference
Inheritance diagram for PhotonHcalOverEcalCut< isBC >:
CutApplicatorBase candidate_functions::CandidateCut

Public Member Functions

CandidateType candidateType () const final
 
result_type operator() (const reco::PhotonPtr &) const final
 
 PhotonHcalOverEcalCut (const edm::ParameterSet &c)
 
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 reco::GsfElectronPtr &) const
 
virtual result_type operator() (const pat::ElectronPtr &) const
 
virtual result_type operator() (const reco::MuonPtr &) const
 
virtual result_type operator() (const pat::MuonPtr &) const
 
CutApplicatorBaseoperator= (const CutApplicatorBase &)=delete
 
 ~CutApplicatorBase () override
 Destructor. More...
 
- Public Member Functions inherited from candidate_functions::CandidateCut
 CandidateCut ()
 
virtual ~CandidateCut ()
 

Private Attributes

const float _barrelCutOff
 
const float _hcalOverEcalCutValueEB
 
const float _hcalOverEcalCutValueEE
 

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

template<bool isBC>
class PhotonHcalOverEcalCut< isBC >

Definition at line 5 of file PhotonHcalOverEcalCut.cc.

Constructor & Destructor Documentation

◆ PhotonHcalOverEcalCut()

template<bool isBC>
PhotonHcalOverEcalCut< isBC >::PhotonHcalOverEcalCut ( const edm::ParameterSet c)
inline

Definition at line 7 of file PhotonHcalOverEcalCut.cc.

9  _hcalOverEcalCutValueEB(c.getParameter<double>("hcalOverEcalCutValueEB")),
10  _hcalOverEcalCutValueEE(c.getParameter<double>("hcalOverEcalCutValueEE")),
11  _barrelCutOff(c.getParameter<double>("barrelCutOff")) {}

Member Function Documentation

◆ candidateType()

template<bool isBC>
CandidateType PhotonHcalOverEcalCut< isBC >::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 17 of file PhotonHcalOverEcalCut.cc.

References CutApplicatorBase::PHOTON.

◆ operator()()

template<bool isBC>
CutApplicatorBase::result_type PhotonHcalOverEcalCut< isBC >::operator() ( const reco::PhotonPtr cand) const
finalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 27 of file PhotonHcalOverEcalCut.cc.

References funct::abs(), and ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr().

27  {
28  const float hcalOverEcalCutValue =
30 
31  if constexpr (isBC)
32  return cand->hcalOverEcalBc() < hcalOverEcalCutValue;
33  else
34  return cand->hcalOverEcal() < hcalOverEcalCutValue;
35 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ value()

template<bool isBC>
double PhotonHcalOverEcalCut< isBC >::value ( const reco::CandidatePtr cand) const
finalvirtual

Implements candidate_functions::CandidateCut.

Definition at line 38 of file PhotonHcalOverEcalCut.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr().

38  {
39  reco::PhotonPtr pho(cand);
40  if constexpr (isBC)
41  return pho->hcalOverEcalBc();
42  else
43  return pho->hcalOverEcal();
44 }

Member Data Documentation

◆ _barrelCutOff

template<bool isBC>
const float PhotonHcalOverEcalCut< isBC >::_barrelCutOff
private

Definition at line 20 of file PhotonHcalOverEcalCut.cc.

◆ _hcalOverEcalCutValueEB

template<bool isBC>
const float PhotonHcalOverEcalCut< isBC >::_hcalOverEcalCutValueEB
private

Definition at line 20 of file PhotonHcalOverEcalCut.cc.

◆ _hcalOverEcalCutValueEE

template<bool isBC>
const float PhotonHcalOverEcalCut< isBC >::_hcalOverEcalCutValueEE
private

Definition at line 20 of file PhotonHcalOverEcalCut.cc.