CMS 3D CMS Logo

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

Public Member Functions

CandidateType candidateType () const final
 
void getEventContent (const edm::EventBase &) final
 
 GsfEleHadronicOverEMEnergyScaledCut (const edm::ParameterSet &c)
 
result_type operator() (const reco::GsfElectronPtr &) const final
 
void setConsumes (edm::ConsumesCollector &) final
 
double value (const reco::CandidatePtr &cand) const final
 
- Public Member Functions inherited from CutApplicatorWithEventContentBase
 CutApplicatorWithEventContentBase ()
 
 CutApplicatorWithEventContentBase (const edm::ParameterSet &c)
 
 CutApplicatorWithEventContentBase (const CutApplicatorWithEventContentBase &)=delete
 
CutApplicatorWithEventContentBaseoperator= (const CutApplicatorWithEventContentBase &)=delete
 
 ~CutApplicatorWithEventContentBase () override
 Destructor. More...
 
- 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 float barrelC0_
 
const float barrelCE_
 
const float barrelCr_
 
const float barrelCutOff_
 
const float endcapC0_
 
const float endcapCE_
 
const float endcapCr_
 
edm::Handle< double > rhoHandle_
 

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
 
- Protected Attributes inherited from CutApplicatorWithEventContentBase
std::unordered_map< std::string, edm::InputTagcontentTags_
 
std::unordered_map< std::string, edm::EDGetTokencontentTokens_
 

Detailed Description

Definition at line 4 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Constructor & Destructor Documentation

◆ GsfEleHadronicOverEMEnergyScaledCut()

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

Definition at line 6 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

References DummyCfis::c, CutApplicatorWithEventContentBase::contentTags_, and HLT_2024v14_cff::rhoTag.

8  barrelC0_(c.getParameter<double>("barrelC0")),
9  barrelCE_(c.getParameter<double>("barrelCE")),
10  barrelCr_(c.getParameter<double>("barrelCr")),
11  endcapC0_(c.getParameter<double>("endcapC0")),
12  endcapCE_(c.getParameter<double>("endcapCE")),
13  endcapCr_(c.getParameter<double>("endcapCr")),
14  barrelCutOff_(c.getParameter<double>("barrelCutOff")) {
15  edm::InputTag rhoTag = c.getParameter<edm::InputTag>("rho");
16  contentTags_.emplace("rho", rhoTag);
17  }
std::unordered_map< std::string, edm::InputTag > contentTags_

Member Function Documentation

◆ candidateType()

CandidateType GsfEleHadronicOverEMEnergyScaledCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 26 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

References CutApplicatorBase::ELECTRON.

◆ getEventContent()

void GsfEleHadronicOverEMEnergyScaledCut::getEventContent ( const edm::EventBase ev)
finalvirtual

◆ operator()()

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

Reimplemented from CutApplicatorBase.

Definition at line 44 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

References funct::abs(), barrelC0_, barrelCE_, barrelCr_, barrelCutOff_, fftjetpileupestimator_calo_uncalib_cfi::c0, endcapC0_, endcapCE_, endcapCr_, hcalRecHitTable_cff::energy, nano_mu_digi_cff::float, edm::HandleBase::isValid(), rho, and rhoHandle_.

44  {
45  const double rho = rhoHandle_.isValid() ? (float)(*rhoHandle_) : 0;
46  const float energy = cand->superCluster()->energy();
47  const float c0 = (std::abs(cand->superCluster()->position().eta()) < barrelCutOff_ ? barrelC0_ : endcapC0_);
48  const float cE = (std::abs(cand->superCluster()->position().eta()) < barrelCutOff_ ? barrelCE_ : endcapCE_);
49  const float cR = (std::abs(cand->superCluster()->position().eta()) < barrelCutOff_ ? barrelCr_ : endcapCr_);
50  return cand->hadronicOverEm() < c0 + cE / energy + cR * rho / energy;
51 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValid() const
Definition: HandleBase.h:70

◆ setConsumes()

void GsfEleHadronicOverEMEnergyScaledCut::setConsumes ( edm::ConsumesCollector cc)
finalvirtual

Implements CutApplicatorWithEventContentBase.

Definition at line 35 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

References gpuPixelDoublets::cc, CutApplicatorWithEventContentBase::contentTags_, CutApplicatorWithEventContentBase::contentTokens_, and rho.

35  {
36  auto rho = cc.consumes<double>(contentTags_["rho"]);
37  contentTokens_.emplace("rho", rho);
38 }
std::unordered_map< std::string, edm::InputTag > contentTags_
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
std::unordered_map< std::string, edm::EDGetToken > contentTokens_

◆ value()

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

Implements candidate_functions::CandidateCut.

Definition at line 53 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

References reco::GsfElectron::hadronicOverEm().

53  {
55  return ele->hadronicOverEm();
56 }

Member Data Documentation

◆ barrelC0_

const float GsfEleHadronicOverEMEnergyScaledCut::barrelC0_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

◆ barrelCE_

const float GsfEleHadronicOverEMEnergyScaledCut::barrelCE_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

◆ barrelCr_

const float GsfEleHadronicOverEMEnergyScaledCut::barrelCr_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

◆ barrelCutOff_

const float GsfEleHadronicOverEMEnergyScaledCut::barrelCutOff_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

◆ endcapC0_

const float GsfEleHadronicOverEMEnergyScaledCut::endcapC0_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

◆ endcapCE_

const float GsfEleHadronicOverEMEnergyScaledCut::endcapCE_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

◆ endcapCr_

const float GsfEleHadronicOverEMEnergyScaledCut::endcapCr_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

◆ rhoHandle_

edm::Handle<double> GsfEleHadronicOverEMEnergyScaledCut::rhoHandle_
private

Definition at line 30 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

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