CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
PhoAnyPFIsoWithEAAndExpoScalingEBCut Class Reference
Inheritance diagram for PhoAnyPFIsoWithEAAndExpoScalingEBCut:
CutApplicatorWithEventContentBase CutApplicatorBase candidate_functions::CandidateCut

Public Member Functions

CandidateType candidateType () const overridefinal
 
void getEventContent (const edm::EventBase &) overridefinal
 
result_type operator() (const reco::PhotonPtr &) const overridefinal
 
 PhoAnyPFIsoWithEAAndExpoScalingEBCut (const edm::ParameterSet &c)
 
void setConsumes (edm::ConsumesCollector &) overridefinal
 
- Public Member Functions inherited from 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 (const edm::ParameterSet &c)
 
 CutApplicatorBase (const CutApplicatorBase &)=delete
 
const std::string & name () const
 
virtual result_type operator() (const argument_type &) const final
 
virtual result_type operator() (const reco::GsfElectronPtr &) const
 
virtual result_type operator() (const pat::ElectronPtr &) 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
virtual ~CandidateCut ()
 

Private Attributes

edm::Handle< edm::ValueMap
< float > > 
_anyPFIsoMap
 
float _barrelCutOff
 
float _C1_EB
 
float _C1_EE
 
float _C2_EB
 
float _C2_EE
 
float _C3_EB
 
EffectiveAreas _effectiveAreas
 
edm::Handle< double > _rhoHandle
 
bool _useRelativeIso
 

Static Private Attributes

static char anyPFIsoWithEA_ [] = "anyPFIsoWithEA"
 
static char rhoString_ [] = "rho"
 

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::InputTag
contentTags_
 
std::unordered_map
< std::string, edm::EDGetToken
contentTokens_
 

Detailed Description

Definition at line 6 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Constructor & Destructor Documentation

PhoAnyPFIsoWithEAAndExpoScalingEBCut::PhoAnyPFIsoWithEAAndExpoScalingEBCut ( const edm::ParameterSet c)

Definition at line 47 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

References anyPFIsoWithEA_, CutApplicatorWithEventContentBase::contentTags_, edm::ParameterSet::getParameter(), and rhoString_.

47  :
49  _C1_EB(c.getParameter<double>("C1_EB")),
50  _C2_EB(c.getParameter<double>("C2_EB")),
51  _C3_EB(c.getParameter<double>("C3_EB")),
52  _C1_EE(c.getParameter<double>("C1_EE")),
53  _C2_EE(c.getParameter<double>("C2_EE")),
54  _barrelCutOff(c.getParameter<double>("barrelCutOff")),
55  _useRelativeIso(c.getParameter<bool>("useRelativeIso")),
56  _effectiveAreas( (c.getParameter<edm::FileInPath>("effAreasConfigFile")).fullPath())
57 {
58 
59  edm::InputTag maptag = c.getParameter<edm::InputTag>("anyPFIsoMap");
60  contentTags_.emplace(anyPFIsoWithEA_,maptag);
61 
62  edm::InputTag rhoTag = c.getParameter<edm::InputTag>("rho");
63  contentTags_.emplace(rhoString_,rhoTag);
64 
65 }
T getParameter(std::string const &) const
CutApplicatorWithEventContentBase(const edm::ParameterSet &c)
std::unordered_map< std::string, edm::InputTag > contentTags_

Member Function Documentation

CandidateType PhoAnyPFIsoWithEAAndExpoScalingEBCut::candidateType ( ) const
inlinefinaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 15 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

References CutApplicatorBase::PHOTON.

15  {
16  return PHOTON;
17  }
void PhoAnyPFIsoWithEAAndExpoScalingEBCut::getEventContent ( const edm::EventBase ev)
finaloverridevirtual
CutApplicatorBase::result_type PhoAnyPFIsoWithEAAndExpoScalingEBCut::operator() ( const reco::PhotonPtr cand) const
finaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 83 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

References _barrelCutOff, _C1_EB, _C1_EE, _C2_EB, _C2_EE, _C3_EB, _effectiveAreas, _rhoHandle, _useRelativeIso, funct::abs(), create_public_lumi_plots::exp, EffectiveAreas::getEffectiveArea(), bookConverter::max, EnergyCorrector::pt, and rho.

83  {
84 
85  // Figure out the cut value
86  // The value is generally pt-dependent: C1 + pt * C2
87  const float pt = cand->pt();
88 
89  // In this version of the isolation cut we apply
90  // exponential pt scaling to the barrel isolation cut,
91  // and linear pt scaling to the endcap isolation cut.
92  double absEta = std::abs(cand->superCluster()->eta());
93  const float isolationCutValue =
94  ( absEta < _barrelCutOff ?
95  _C1_EB + exp( pt*_C2_EB + _C3_EB)
96  : _C1_EE + pt * _C2_EE);
97 
98  // Retrieve the variable value for this particle
99  float anyPFIso = (*_anyPFIsoMap)[cand];
100 
101  // Apply pile-up correction
102  double eA = _effectiveAreas.getEffectiveArea( absEta );
103  double rho = *_rhoHandle;
104  float anyPFIsoWithEA = std::max(0.0, anyPFIso - rho * eA);
105 
106  // Divide by pT if the relative isolation is requested
107  if( _useRelativeIso )
108  anyPFIsoWithEA /= pt;
109 
110  // Apply the cut and return the result
111  return anyPFIsoWithEA < isolationCutValue;
112 }
Definition: DDAxes.h:10
const float getEffectiveArea(float eta) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void PhoAnyPFIsoWithEAAndExpoScalingEBCut::setConsumes ( edm::ConsumesCollector cc)
finaloverridevirtual

Member Data Documentation

edm::Handle<edm::ValueMap<float> > PhoAnyPFIsoWithEAAndExpoScalingEBCut::_anyPFIsoMap
private

Definition at line 32 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Referenced by getEventContent().

float PhoAnyPFIsoWithEAAndExpoScalingEBCut::_barrelCutOff
private

Definition at line 27 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Referenced by operator()().

float PhoAnyPFIsoWithEAAndExpoScalingEBCut::_C1_EB
private

Definition at line 21 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Referenced by operator()().

float PhoAnyPFIsoWithEAAndExpoScalingEBCut::_C1_EE
private

Definition at line 24 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Referenced by operator()().

float PhoAnyPFIsoWithEAAndExpoScalingEBCut::_C2_EB
private

Definition at line 22 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Referenced by operator()().

float PhoAnyPFIsoWithEAAndExpoScalingEBCut::_C2_EE
private

Definition at line 25 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Referenced by operator()().

float PhoAnyPFIsoWithEAAndExpoScalingEBCut::_C3_EB
private

Definition at line 23 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Referenced by operator()().

EffectiveAreas PhoAnyPFIsoWithEAAndExpoScalingEBCut::_effectiveAreas
private

Definition at line 30 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Referenced by operator()().

edm::Handle< double > PhoAnyPFIsoWithEAAndExpoScalingEBCut::_rhoHandle
private

Definition at line 34 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Referenced by getEventContent(), and operator()().

bool PhoAnyPFIsoWithEAAndExpoScalingEBCut::_useRelativeIso
private

Definition at line 28 of file PhoAnyPFIsoWithEAAndExpoScalingEBCut.cc.

Referenced by operator()().

char PhoAnyPFIsoWithEAAndExpoScalingEBCut::anyPFIsoWithEA_ = "anyPFIsoWithEA"
staticprivate
char PhoAnyPFIsoWithEAAndExpoScalingEBCut::rhoString_ = "rho"
staticprivate