CMS 3D CMS Logo

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

Public Member Functions

CandidateType candidateType () const final
 
void getEventContent (const edm::EventBase &) final
 
 GsfEleTrkPtIsoRhoCut (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

EBEECutValues constTerm_
 
EBEECutValues rhoEA_
 
EBEECutValues rhoEtStart_
 
edm::Handle< double > rhoHandle_
 
EBEECutValues slopeStart_
 
EBEECutValues slopeTerm_
 

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 8 of file GsfEleTrkPtIsoRhoCut.cc.

Constructor & Destructor Documentation

◆ GsfEleTrkPtIsoRhoCut()

GsfEleTrkPtIsoRhoCut::GsfEleTrkPtIsoRhoCut ( const edm::ParameterSet c)

Definition at line 33 of file GsfEleTrkPtIsoRhoCut.cc.

35  slopeTerm_(params, "slopeTerm"),
36  slopeStart_(params, "slopeStart"),
37  constTerm_(params, "constTerm"),
38  rhoEtStart_(params, "rhoEtStart"),
39  rhoEA_(params, "rhoEA") {
40  edm::InputTag rhoTag = params.getParameter<edm::InputTag>("rho");
41  contentTags_.emplace("rho", rhoTag);
42 }

References CutApplicatorWithEventContentBase::contentTags_, CalibrationSummaryClient_cfi::params, and HLT_FULL_cff::rhoTag.

Member Function Documentation

◆ candidateType()

CandidateType GsfEleTrkPtIsoRhoCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 19 of file GsfEleTrkPtIsoRhoCut.cc.

19 { return ELECTRON; }

References CutApplicatorBase::ELECTRON.

◆ getEventContent()

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

Implements CutApplicatorWithEventContentBase.

Definition at line 49 of file GsfEleTrkPtIsoRhoCut.cc.

49 { ev.getByLabel(contentTags_["rho"], rhoHandle_); }

References CutApplicatorWithEventContentBase::contentTags_, ev, and rhoHandle_.

◆ operator()()

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

Reimplemented from CutApplicatorBase.

Definition at line 51 of file GsfEleTrkPtIsoRhoCut.cc.

51  {
52  const double rho = (*rhoHandle_);
53  const float isolTrkPt = cand->dr03TkSumPt();
54 
55  const float et = cand->et();
56  const float cutValue =
58 
59  const float rhoCutValue = et >= rhoEtStart_(cand) ? rhoEA_(cand) * rho : 0.;
60 
61  return isolTrkPt < cutValue + rhoCutValue;
62 }

References constTerm_, EgHLTOffHistBins_cfi::et, rho, rhoEA_, rhoEtStart_, slopeStart_, and slopeTerm_.

◆ setConsumes()

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

Implements CutApplicatorWithEventContentBase.

Definition at line 44 of file GsfEleTrkPtIsoRhoCut.cc.

44  {
45  auto rho = cc.consumes<double>(contentTags_["rho"]);
46  contentTokens_.emplace("rho", rho);
47 }

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

◆ value()

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

Implements candidate_functions::CandidateCut.

Definition at line 64 of file GsfEleTrkPtIsoRhoCut.cc.

64  {
66  return ele->dr03TkSumPt();
67 }

References reco::GsfElectron::dr03TkSumPt().

Member Data Documentation

◆ constTerm_

EBEECutValues GsfEleTrkPtIsoRhoCut::constTerm_
private

Definition at line 24 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by operator()().

◆ rhoEA_

EBEECutValues GsfEleTrkPtIsoRhoCut::rhoEA_
private

Definition at line 26 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by operator()().

◆ rhoEtStart_

EBEECutValues GsfEleTrkPtIsoRhoCut::rhoEtStart_
private

Definition at line 25 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by operator()().

◆ rhoHandle_

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

Definition at line 28 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by getEventContent().

◆ slopeStart_

EBEECutValues GsfEleTrkPtIsoRhoCut::slopeStart_
private

Definition at line 23 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by operator()().

◆ slopeTerm_

EBEECutValues GsfEleTrkPtIsoRhoCut::slopeTerm_
private

Definition at line 22 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by operator()().

CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
CutApplicatorWithEventContentBase::contentTags_
std::unordered_map< std::string, edm::InputTag > contentTags_
Definition: CutApplicatorWithEventContentBase.h:35
HLT_FULL_cff.rhoTag
rhoTag
Definition: HLT_FULL_cff.py:14986
GsfEleTrkPtIsoRhoCut::rhoEA_
EBEECutValues rhoEA_
Definition: GsfEleTrkPtIsoRhoCut.cc:26
DDAxes::rho
GsfEleTrkPtIsoRhoCut::rhoHandle_
edm::Handle< double > rhoHandle_
Definition: GsfEleTrkPtIsoRhoCut.cc:28
CutApplicatorWithEventContentBase::CutApplicatorWithEventContentBase
CutApplicatorWithEventContentBase()
Definition: CutApplicatorWithEventContentBase.h:21
GsfEleTrkPtIsoRhoCut::constTerm_
EBEECutValues constTerm_
Definition: GsfEleTrkPtIsoRhoCut.cc:24
cand
Definition: decayParser.h:32
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
cc
edm::Ptr< reco::GsfElectron >
GsfEleTrkPtIsoRhoCut::slopeStart_
EBEECutValues slopeStart_
Definition: GsfEleTrkPtIsoRhoCut.cc:23
GsfEleTrkPtIsoRhoCut::slopeTerm_
EBEECutValues slopeTerm_
Definition: GsfEleTrkPtIsoRhoCut.cc:22
GsfEleTrkPtIsoRhoCut::rhoEtStart_
EBEECutValues rhoEtStart_
Definition: GsfEleTrkPtIsoRhoCut.cc:25
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
CutApplicatorWithEventContentBase::contentTokens_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
Definition: CutApplicatorWithEventContentBase.h:40
CutApplicatorBase::ELECTRON
Definition: CutApplicatorBase.h:47
edm::InputTag
Definition: InputTag.h:15