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

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  }

References HltBtagPostValidation_cff::c, CutApplicatorWithEventContentBase::contentTags_, and HLT_FULL_cff::rhoTag.

Member Function Documentation

◆ candidateType()

CandidateType GsfEleHadronicOverEMEnergyScaledCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 26 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

26 { return ELECTRON; }

References CutApplicatorBase::ELECTRON.

◆ getEventContent()

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

Implements CutApplicatorWithEventContentBase.

Definition at line 40 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

40  {
41  ev.getByLabel(contentTags_["rho"], rhoHandle_);
42 }

References CutApplicatorWithEventContentBase::contentTags_, ev, and rhoHandle_.

◆ operator()()

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

Reimplemented from CutApplicatorBase.

Definition at line 44 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

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 }

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

◆ setConsumes()

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

Implements CutApplicatorWithEventContentBase.

Definition at line 35 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

35  {
36  auto rho = cc.consumes<double>(contentTags_["rho"]);
37  contentTokens_.emplace("rho", rho);
38 }

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

◆ value()

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

Implements candidate_functions::CandidateCut.

Definition at line 53 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

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

References reco::GsfElectron::hadronicOverEm().

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()().

GsfEleHadronicOverEMEnergyScaledCut::endcapCr_
const float endcapCr_
Definition: GsfEleHadronicOverEMEnergyScaledCut.cc:29
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
GsfEleHadronicOverEMEnergyScaledCut::barrelCr_
const float barrelCr_
Definition: GsfEleHadronicOverEMEnergyScaledCut.cc:29
GsfEleHadronicOverEMEnergyScaledCut::barrelCE_
const float barrelCE_
Definition: GsfEleHadronicOverEMEnergyScaledCut.cc:29
CutApplicatorWithEventContentBase::contentTags_
std::unordered_map< std::string, edm::InputTag > contentTags_
Definition: CutApplicatorWithEventContentBase.h:35
HLT_FULL_cff.rhoTag
rhoTag
Definition: HLT_FULL_cff.py:15052
GsfEleHadronicOverEMEnergyScaledCut::barrelCutOff_
const float barrelCutOff_
Definition: GsfEleHadronicOverEMEnergyScaledCut.cc:29
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
GsfEleHadronicOverEMEnergyScaledCut::barrelC0_
const float barrelC0_
Definition: GsfEleHadronicOverEMEnergyScaledCut.cc:29
DDAxes::rho
CutApplicatorWithEventContentBase::CutApplicatorWithEventContentBase
CutApplicatorWithEventContentBase()
Definition: CutApplicatorWithEventContentBase.h:21
cand
Definition: decayParser.h:32
GsfEleHadronicOverEMEnergyScaledCut::endcapC0_
const float endcapC0_
Definition: GsfEleHadronicOverEMEnergyScaledCut.cc:29
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
cc
edm::Ptr< reco::GsfElectron >
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
CutApplicatorWithEventContentBase::contentTokens_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
Definition: CutApplicatorWithEventContentBase.h:40
fftjetpileupestimator_calo_uncalib_cfi.c0
c0
Definition: fftjetpileupestimator_calo_uncalib_cfi.py:8
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
CutApplicatorBase::ELECTRON
Definition: CutApplicatorBase.h:47
edm::InputTag
Definition: InputTag.h:15
GsfEleHadronicOverEMEnergyScaledCut::endcapCE_
const float endcapCE_
Definition: GsfEleHadronicOverEMEnergyScaledCut.cc:29
GsfEleHadronicOverEMEnergyScaledCut::rhoHandle_
edm::Handle< double > rhoHandle_
Definition: GsfEleHadronicOverEMEnergyScaledCut.cc:30