CMS 3D CMS Logo

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

Public Member Functions

CandidateType candidateType () const override final
 
void getEventContent (const edm::EventBase &) override final
 
 GsfEleEmHadD1IsoRhoCut (const edm::ParameterSet &c)
 
result_type operator() (const reco::GsfElectronPtr &) const override final
 
void setConsumes (edm::ConsumesCollector &) override final
 
double value (const reco::CandidatePtr &cand) const override final
 
- Public Member Functions inherited from CutApplicatorWithEventContentBase
 CutApplicatorWithEventContentBase ()
 
 CutApplicatorWithEventContentBase (const edm::ParameterSet &c)
 
 CutApplicatorWithEventContentBase (const CutApplicatorWithEventContentBase &)=delete
 
CutApplicatorWithEventContentBaseoperator= (const CutApplicatorWithEventContentBase &)=delete
 
virtual ~CutApplicatorWithEventContentBase ()
 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
 
virtual const std::string & name () const
 
virtual 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
 
virtual ~CutApplicatorBase ()
 Destructor. More...
 
- Public Member Functions inherited from candidate_functions::CandidateCut
 CandidateCut ()
 
virtual ~CandidateCut ()
 

Private Attributes

EBEECutValues constTerm_
 
float rhoConstant_
 
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
}
 
- 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 GsfEleEmHadD1IsoRhoCut.cc.

Constructor & Destructor Documentation

GsfEleEmHadD1IsoRhoCut::GsfEleEmHadD1IsoRhoCut ( const edm::ParameterSet c)

Definition at line 39 of file GsfEleEmHadD1IsoRhoCut.cc.

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

39  :
41  rhoConstant_(params.getParameter<double>("rhoConstant")),
42  slopeTerm_(params,"slopeTerm"),
43  slopeStart_(params,"slopeStart"),
44  constTerm_(params,"constTerm"){
45  edm::InputTag rhoTag = params.getParameter<edm::InputTag>("rho");
46  contentTags_.emplace("rho",rhoTag);
47 
48 }
std::unordered_map< std::string, edm::InputTag > contentTags_

Member Function Documentation

CandidateType GsfEleEmHadD1IsoRhoCut::candidateType ( ) const
inlinefinaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 20 of file GsfEleEmHadD1IsoRhoCut.cc.

References CutApplicatorBase::ELECTRON.

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

Implements CutApplicatorWithEventContentBase.

Definition at line 55 of file GsfEleEmHadD1IsoRhoCut.cc.

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

55  {
57 }
std::unordered_map< std::string, edm::InputTag > contentTags_
edm::Handle< double > rhoHandle_
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:94
CutApplicatorBase::result_type GsfEleEmHadD1IsoRhoCut::operator() ( const reco::GsfElectronPtr cand) const
finaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 61 of file GsfEleEmHadD1IsoRhoCut.cc.

References constTerm_, reco::GsfElectron::dr03EcalRecHitSumEt(), reco::GsfElectron::dr03HcalDepth1TowerSumEt(), stringResolutionProvider_cfi::et, reco::LeafCandidate::et(), rho, rhoConstant_, slopeStart_, and slopeTerm_.

Referenced by getEventContent().

61  {
62  const double rho = (*rhoHandle_);
63 
64  const float isolEmHadDepth1 = cand->dr03EcalRecHitSumEt() + cand->dr03HcalDepth1TowerSumEt();
65 
66  const float et = cand->et();
67  const float cutValue = et > slopeStart_(cand) ? slopeTerm_(cand)*(et-slopeStart_(cand)) + constTerm_(cand) : constTerm_(cand);
68  return isolEmHadDepth1 < cutValue + rhoConstant_*rho;
69 }
virtual double et() const final
transverse energy
float dr03HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:545
et
define resolution functions of each parameter
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:544
void GsfEleEmHadD1IsoRhoCut::setConsumes ( edm::ConsumesCollector cc)
finaloverridevirtual

Implements CutApplicatorWithEventContentBase.

Definition at line 50 of file GsfEleEmHadD1IsoRhoCut.cc.

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

50  {
51  auto rho = cc.consumes<double>(contentTags_["rho"]);
52  contentTokens_.emplace("rho",rho);
53 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
std::unordered_map< std::string, edm::InputTag > contentTags_
double GsfEleEmHadD1IsoRhoCut::value ( const reco::CandidatePtr cand) const
finaloverridevirtual

Implements candidate_functions::CandidateCut.

Definition at line 71 of file GsfEleEmHadD1IsoRhoCut.cc.

References reco::GsfElectron::dr03EcalRecHitSumEt(), and reco::GsfElectron::dr03HcalDepth1TowerSumEt().

71  {
72  reco::GsfElectronPtr ele(cand);
73  return ele->dr03EcalRecHitSumEt() + ele->dr03HcalDepth1TowerSumEt();
74 }

Member Data Documentation

EBEECutValues GsfEleEmHadD1IsoRhoCut::constTerm_
private

Definition at line 28 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by operator()().

float GsfEleEmHadD1IsoRhoCut::rhoConstant_
private

Definition at line 25 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by operator()().

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

Definition at line 31 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by getEventContent().

EBEECutValues GsfEleEmHadD1IsoRhoCut::slopeStart_
private

Definition at line 27 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by operator()().

EBEECutValues GsfEleEmHadD1IsoRhoCut::slopeTerm_
private

Definition at line 26 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by operator()().