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 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 override 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

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

Constructor & Destructor Documentation

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

Definition at line 41 of file GsfEleTrkPtIsoRhoCut.cc.

References CutApplicatorWithEventContentBase::contentTags_, edm::ParameterSet::getParameter(), and regressionModifier_cfi::rhoTag.

41  :
43  slopeTerm_(params,"slopeTerm"),
44  slopeStart_(params,"slopeStart"),
45  constTerm_(params,"constTerm"),
46  rhoEtStart_(params,"rhoEtStart"),
47  rhoEA_(params,"rhoEA")
48 {
49  edm::InputTag rhoTag = params.getParameter<edm::InputTag>("rho");
50  contentTags_.emplace("rho",rhoTag);
51 }
std::unordered_map< std::string, edm::InputTag > contentTags_

Member Function Documentation

CandidateType GsfEleTrkPtIsoRhoCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 20 of file GsfEleTrkPtIsoRhoCut.cc.

References CutApplicatorBase::ELECTRON.

20  {
21  return ELECTRON;
22  }
void GsfEleTrkPtIsoRhoCut::getEventContent ( const edm::EventBase ev)
finalvirtual

Implements CutApplicatorWithEventContentBase.

Definition at line 58 of file GsfEleTrkPtIsoRhoCut.cc.

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

58  {
60 }
std::unordered_map< std::string, edm::InputTag > contentTags_
edm::Handle< double > rhoHandle_
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:92
CutApplicatorBase::result_type GsfEleTrkPtIsoRhoCut::operator() ( const reco::GsfElectronPtr cand) const
finalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 64 of file GsfEleTrkPtIsoRhoCut.cc.

References constTerm_, reco::GsfElectron::dr03TkSumPt(), stringResolutionProvider_cfi::et, reco::LeafCandidate::et(), rho, rhoEA_, rhoEtStart_, slopeStart_, slopeTerm_, and value().

Referenced by getEventContent().

64  {
65  const double rho = (*rhoHandle_);
66  const float isolTrkPt = cand->dr03TkSumPt();
67 
68  const float et = cand->et();
69  const float cutValue = et > slopeStart_(cand) ? slopeTerm_(cand)*(et-slopeStart_(cand)) + constTerm_(cand) : constTerm_(cand);
70 
71  const float rhoCutValue = et >= rhoEtStart_(cand) ? rhoEA_(cand)*rho : 0.;
72 
73  return isolTrkPt < cutValue+rhoCutValue;
74 }
double et() const final
transverse energy
float dr03TkSumPt() const
Definition: GsfElectron.h:552
et
define resolution functions of each parameter
void GsfEleTrkPtIsoRhoCut::setConsumes ( edm::ConsumesCollector cc)
finalvirtual

Implements CutApplicatorWithEventContentBase.

Definition at line 53 of file GsfEleTrkPtIsoRhoCut.cc.

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

53  {
54  auto rho = cc.consumes<double>(contentTags_["rho"]);
55  contentTokens_.emplace("rho",rho);
56 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
std::unordered_map< std::string, edm::InputTag > contentTags_
double GsfEleTrkPtIsoRhoCut::value ( const reco::CandidatePtr cand) const
finalvirtual

Implements candidate_functions::CandidateCut.

Definition at line 77 of file GsfEleTrkPtIsoRhoCut.cc.

References reco::GsfElectron::dr03TkSumPt().

Referenced by operator()().

77  {
78  reco::GsfElectronPtr ele(cand);
79  return ele->dr03TkSumPt();
80 }

Member Data Documentation

EBEECutValues GsfEleTrkPtIsoRhoCut::constTerm_
private

Definition at line 28 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by operator()().

EBEECutValues GsfEleTrkPtIsoRhoCut::rhoEA_
private

Definition at line 30 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by operator()().

EBEECutValues GsfEleTrkPtIsoRhoCut::rhoEtStart_
private

Definition at line 29 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by operator()().

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

Definition at line 33 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by getEventContent().

EBEECutValues GsfEleTrkPtIsoRhoCut::slopeStart_
private

Definition at line 27 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by operator()().

EBEECutValues GsfEleTrkPtIsoRhoCut::slopeTerm_
private

Definition at line 26 of file GsfEleTrkPtIsoRhoCut.cc.

Referenced by operator()().