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 final
 
void getEventContent (const edm::EventBase &) final
 
 GsfEleEmHadD1IsoRhoCut (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_
 
EleEnergyRetriever energyRetriever_
 
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
}
 
- 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 6 of file GsfEleEmHadD1IsoRhoCut.cc.

Constructor & Destructor Documentation

◆ GsfEleEmHadD1IsoRhoCut()

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

Definition at line 31 of file GsfEleEmHadD1IsoRhoCut.cc.

33  rhoConstant_(params.getParameter<double>("rhoConstant")),
34  slopeTerm_(params, "slopeTerm"),
35  slopeStart_(params, "slopeStart"),
36  constTerm_(params, "constTerm"),
37  energyRetriever_(params.getParameter<std::string>("energyType")) {
38  edm::InputTag rhoTag = params.getParameter<edm::InputTag>("rho");
39  contentTags_.emplace("rho", rhoTag);
40 }

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

Member Function Documentation

◆ candidateType()

CandidateType GsfEleEmHadD1IsoRhoCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 17 of file GsfEleEmHadD1IsoRhoCut.cc.

17 { return ELECTRON; }

References CutApplicatorBase::ELECTRON.

◆ getEventContent()

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

Implements CutApplicatorWithEventContentBase.

Definition at line 47 of file GsfEleEmHadD1IsoRhoCut.cc.

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

References CutApplicatorWithEventContentBase::contentTags_, ev, and rhoHandle_.

◆ operator()()

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

Reimplemented from CutApplicatorBase.

Definition at line 51 of file GsfEleEmHadD1IsoRhoCut.cc.

51  {
52  const double rho = (*rhoHandle_);
53 
54  const float isolEmHadDepth1 = cand->dr03EcalRecHitSumEt() + cand->dr03HcalDepth1TowerSumEt();
55 
56  const float sinTheta = cand->p() != 0. ? cand->pt() / cand->p() : 0.;
57  const float et = energyRetriever_(*cand) * sinTheta;
58 
59  const float cutValue =
61  return isolEmHadDepth1 < cutValue + rhoConstant_ * rho;
62 }

References constTerm_, energyRetriever_, EgHLTOffHistBins_cfi::et, rho, rhoConstant_, slopeStart_, and slopeTerm_.

◆ setConsumes()

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

Implements CutApplicatorWithEventContentBase.

Definition at line 42 of file GsfEleEmHadD1IsoRhoCut.cc.

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

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

◆ value()

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

Implements candidate_functions::CandidateCut.

Definition at line 64 of file GsfEleEmHadD1IsoRhoCut.cc.

64  {
66  return ele->dr03EcalRecHitSumEt() + ele->dr03HcalDepth1TowerSumEt();
67 }

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

Member Data Documentation

◆ constTerm_

EBEECutValues GsfEleEmHadD1IsoRhoCut::constTerm_
private

Definition at line 23 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by operator()().

◆ energyRetriever_

EleEnergyRetriever GsfEleEmHadD1IsoRhoCut::energyRetriever_
private

Definition at line 24 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by operator()().

◆ rhoConstant_

float GsfEleEmHadD1IsoRhoCut::rhoConstant_
private

Definition at line 20 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by operator()().

◆ rhoHandle_

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

Definition at line 26 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by getEventContent().

◆ slopeStart_

EBEECutValues GsfEleEmHadD1IsoRhoCut::slopeStart_
private

Definition at line 22 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by operator()().

◆ slopeTerm_

EBEECutValues GsfEleEmHadD1IsoRhoCut::slopeTerm_
private

Definition at line 21 of file GsfEleEmHadD1IsoRhoCut.cc.

Referenced by operator()().

CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
GsfEleEmHadD1IsoRhoCut::rhoConstant_
float rhoConstant_
Definition: GsfEleEmHadD1IsoRhoCut.cc:20
CutApplicatorWithEventContentBase::contentTags_
std::unordered_map< std::string, edm::InputTag > contentTags_
Definition: CutApplicatorWithEventContentBase.h:35
HLT_FULL_cff.rhoTag
rhoTag
Definition: HLT_FULL_cff.py:14988
GsfEleEmHadD1IsoRhoCut::slopeStart_
EBEECutValues slopeStart_
Definition: GsfEleEmHadD1IsoRhoCut.cc:22
DDAxes::rho
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GsfEleEmHadD1IsoRhoCut::slopeTerm_
EBEECutValues slopeTerm_
Definition: GsfEleEmHadD1IsoRhoCut.cc:21
CutApplicatorWithEventContentBase::CutApplicatorWithEventContentBase
CutApplicatorWithEventContentBase()
Definition: CutApplicatorWithEventContentBase.h:21
cand
Definition: decayParser.h:32
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
cc
edm::Ptr< reco::GsfElectron >
GsfEleEmHadD1IsoRhoCut::constTerm_
EBEECutValues constTerm_
Definition: GsfEleEmHadD1IsoRhoCut.cc:23
GsfEleEmHadD1IsoRhoCut::energyRetriever_
EleEnergyRetriever energyRetriever_
Definition: GsfEleEmHadD1IsoRhoCut.cc:24
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
CutApplicatorWithEventContentBase::contentTokens_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
Definition: CutApplicatorWithEventContentBase.h:40
GsfEleEmHadD1IsoRhoCut::rhoHandle_
edm::Handle< double > rhoHandle_
Definition: GsfEleEmHadD1IsoRhoCut.cc:26
CutApplicatorBase::ELECTRON
Definition: CutApplicatorBase.h:47
edm::InputTag
Definition: InputTag.h:15