CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::InputTag
contentTags_
 
std::unordered_map
< std::string, edm::EDGetToken
contentTokens_
 

Detailed Description

Definition at line 4 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Constructor & Destructor Documentation

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

Definition at line 6 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

References CutApplicatorWithEventContentBase::contentTags_, edm::ParameterSet::getParameter(), and HLT_FULL_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")) {
16  contentTags_.emplace("rho", rhoTag);
17  }
std::unordered_map< std::string, edm::InputTag > contentTags_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Function Documentation

CandidateType GsfEleHadronicOverEMEnergyScaledCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 26 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

References CutApplicatorBase::ELECTRON.

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

Implements CutApplicatorWithEventContentBase.

Definition at line 40 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

References CutApplicatorWithEventContentBase::contentTags_, edm::EventBase::getByLabel(), and rhoHandle_.

40  {
42 }
std::unordered_map< std::string, edm::InputTag > contentTags_
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:92
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_, endcapC0_, endcapCE_, endcapCr_, relval_parameters_module::energy, 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
void GsfEleHadronicOverEMEnergyScaledCut::setConsumes ( edm::ConsumesCollector cc)
finalvirtual

Implements CutApplicatorWithEventContentBase.

Definition at line 35 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

References edm::ConsumesCollector::consumes(), CutApplicatorWithEventContentBase::contentTags_, CutApplicatorWithEventContentBase::contentTokens_, and rho.

35  {
36  auto rho = cc.consumes<double>(contentTags_["rho"]);
37  contentTokens_.emplace("rho", rho);
38 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::unordered_map< std::string, edm::InputTag > contentTags_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
double GsfEleHadronicOverEMEnergyScaledCut::value ( const reco::CandidatePtr cand) const
finalvirtual

Member Data Documentation

const float GsfEleHadronicOverEMEnergyScaledCut::barrelC0_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

const float GsfEleHadronicOverEMEnergyScaledCut::barrelCE_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

const float GsfEleHadronicOverEMEnergyScaledCut::barrelCr_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

const float GsfEleHadronicOverEMEnergyScaledCut::barrelCutOff_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

const float GsfEleHadronicOverEMEnergyScaledCut::endcapC0_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

const float GsfEleHadronicOverEMEnergyScaledCut::endcapCE_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

const float GsfEleHadronicOverEMEnergyScaledCut::endcapCr_
private

Definition at line 29 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

Referenced by operator()().

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

Definition at line 30 of file GsfEleHadronicOverEMEnergyScaledCut.cc.

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