CMS 3D CMS Logo

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

Public Member Functions

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

const float barrelC0_
 
const float barrelCpt_
 
const float barrelCutOff_
 
EffectiveAreas effectiveAreas_
 
const float endcapC0_
 
const float endcapCpt_
 
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::InputTagcontentTags_
 
std::unordered_map< std::string, edm::EDGetTokencontentTokens_
 

Detailed Description

Definition at line 5 of file GsfEleRelPFIsoScaledCut.cc.

Constructor & Destructor Documentation

◆ GsfEleRelPFIsoScaledCut()

GsfEleRelPFIsoScaledCut::GsfEleRelPFIsoScaledCut ( const edm::ParameterSet c)

Definition at line 26 of file GsfEleRelPFIsoScaledCut.cc.

28  barrelC0_(c.getParameter<double>("barrelC0")),
29  endcapC0_(c.getParameter<double>("endcapC0")),
30  barrelCpt_(c.getParameter<double>("barrelCpt")),
31  endcapCpt_(c.getParameter<double>("endcapCpt")),
32  barrelCutOff_(c.getParameter<double>("barrelCutOff")),
33  effectiveAreas_((c.getParameter<edm::FileInPath>("effAreasConfigFile")).fullPath()) {
34  edm::InputTag rhoTag = c.getParameter<edm::InputTag>("rho");
35  contentTags_.emplace("rho", rhoTag);
36 }

References c, CutApplicatorWithEventContentBase::contentTags_, and HLT_FULL_cff::rhoTag.

Member Function Documentation

◆ candidateType()

CandidateType GsfEleRelPFIsoScaledCut::candidateType ( ) const
inlinefinalvirtual

Reimplemented from CutApplicatorBase.

Definition at line 16 of file GsfEleRelPFIsoScaledCut.cc.

16 { return ELECTRON; }

References CutApplicatorBase::ELECTRON.

◆ getEventContent()

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

Implements CutApplicatorWithEventContentBase.

Definition at line 43 of file GsfEleRelPFIsoScaledCut.cc.

43  {
44  ev.getByLabel(contentTags_["rho"], rhoHandle_);
45 }

References CutApplicatorWithEventContentBase::contentTags_, ev, and rhoHandle_.

◆ operator()()

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

Reimplemented from CutApplicatorBase.

Definition at line 47 of file GsfEleRelPFIsoScaledCut.cc.

47  {
48  // Establish the cut value
49  double absEta = std::abs(cand->superCluster()->eta());
50 
51  const float C0 = (absEta < barrelCutOff_ ? barrelC0_ : endcapC0_);
52  const float Cpt = (absEta < barrelCutOff_ ? barrelCpt_ : endcapCpt_);
53  const float isoCut = C0 + Cpt / cand->pt();
54 
55  return value(cand) < isoCut;
56 }

References funct::abs(), barrelC0_, barrelCpt_, barrelCutOff_, endcapC0_, endcapCpt_, and value().

◆ setConsumes()

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

Implements CutApplicatorWithEventContentBase.

Definition at line 38 of file GsfEleRelPFIsoScaledCut.cc.

38  {
39  auto rho = cc.consumes<double>(contentTags_["rho"]);
40  contentTokens_.emplace("rho", rho);
41 }

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

◆ value()

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

Implements candidate_functions::CandidateCut.

Definition at line 58 of file GsfEleRelPFIsoScaledCut.cc.

58  {
59  // Establish the cut value
61  double absEta = std::abs(ele->superCluster()->eta());
62 
63  // Compute the combined isolation with effective area correction
64  auto pfIso = ele->pfIsolationVariables();
65  const float chad = pfIso.sumChargedHadronPt;
66  const float nhad = pfIso.sumNeutralHadronEt;
67  const float pho = pfIso.sumPhotonEt;
68  const float eA = effectiveAreas_.getEffectiveArea(absEta);
69  const float rho = rhoHandle_.isValid() ? (float)(*rhoHandle_) : 0; // std::max likes float arguments
70  const float iso = chad + std::max(0.0f, nhad + pho - rho * eA);
71  return iso / cand->pt();
72 }

References funct::abs(), effectiveAreas_, f, dqmMemoryStats::float, EffectiveAreas::getEffectiveArea(), edm::HandleBase::isValid(), SiStripPI::max, reco::GsfElectron::pfIsolationVariables(), rho, rhoHandle_, reco::GsfElectron::PflowIsolationVariables::sumChargedHadronPt, and reco::GsfElectron::superCluster().

Referenced by operator()().

Member Data Documentation

◆ barrelC0_

const float GsfEleRelPFIsoScaledCut::barrelC0_
private

Definition at line 19 of file GsfEleRelPFIsoScaledCut.cc.

Referenced by operator()().

◆ barrelCpt_

const float GsfEleRelPFIsoScaledCut::barrelCpt_
private

Definition at line 19 of file GsfEleRelPFIsoScaledCut.cc.

Referenced by operator()().

◆ barrelCutOff_

const float GsfEleRelPFIsoScaledCut::barrelCutOff_
private

Definition at line 19 of file GsfEleRelPFIsoScaledCut.cc.

Referenced by operator()().

◆ effectiveAreas_

EffectiveAreas GsfEleRelPFIsoScaledCut::effectiveAreas_
private

Definition at line 20 of file GsfEleRelPFIsoScaledCut.cc.

Referenced by value().

◆ endcapC0_

const float GsfEleRelPFIsoScaledCut::endcapC0_
private

Definition at line 19 of file GsfEleRelPFIsoScaledCut.cc.

Referenced by operator()().

◆ endcapCpt_

const float GsfEleRelPFIsoScaledCut::endcapCpt_
private

Definition at line 19 of file GsfEleRelPFIsoScaledCut.cc.

Referenced by operator()().

◆ rhoHandle_

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

Definition at line 21 of file GsfEleRelPFIsoScaledCut.cc.

Referenced by getEventContent(), and value().

dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
GsfEleRelPFIsoScaledCut::effectiveAreas_
EffectiveAreas effectiveAreas_
Definition: GsfEleRelPFIsoScaledCut.cc:20
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
GsfEleRelPFIsoScaledCut::barrelCutOff_
const float barrelCutOff_
Definition: GsfEleRelPFIsoScaledCut.cc:19
GsfEleRelPFIsoScaledCut::barrelC0_
const float barrelC0_
Definition: GsfEleRelPFIsoScaledCut.cc:19
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
edm::FileInPath
Definition: FileInPath.h:64
DDAxes::rho
CutApplicatorWithEventContentBase::CutApplicatorWithEventContentBase
CutApplicatorWithEventContentBase()
Definition: CutApplicatorWithEventContentBase.h:21
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
cand
Definition: decayParser.h:32
GsfEleRelPFIsoScaledCut::endcapCpt_
const float endcapCpt_
Definition: GsfEleRelPFIsoScaledCut.cc:19
cc
GsfEleRelPFIsoScaledCut::rhoHandle_
edm::Handle< double > rhoHandle_
Definition: GsfEleRelPFIsoScaledCut.cc:21
edm::Ptr< reco::GsfElectron >
GsfEleRelPFIsoScaledCut::barrelCpt_
const float barrelCpt_
Definition: GsfEleRelPFIsoScaledCut.cc:19
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
CutApplicatorWithEventContentBase::contentTokens_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
Definition: CutApplicatorWithEventContentBase.h:40
EffectiveAreas::getEffectiveArea
const float getEffectiveArea(float eta) const
Definition: EffectiveAreas.cc:44
GsfEleRelPFIsoScaledCut::endcapC0_
const float endcapC0_
Definition: GsfEleRelPFIsoScaledCut.cc:19
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
CutApplicatorBase::ELECTRON
Definition: CutApplicatorBase.h:47
edm::InputTag
Definition: InputTag.h:15
GsfEleRelPFIsoScaledCut::value
double value(const reco::CandidatePtr &cand) const final
Definition: GsfEleRelPFIsoScaledCut.cc:58