CMS 3D CMS Logo

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

Public Member Functions

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

EBEECutValuesInt maxNrSatCrysIn5x5Cut_
 
EBEECutValues minE1x5OverE5x5Cut_
 
EBEECutValues minE2x5OverE5x5Cut_
 
edm::Handle< edm::ValueMap< int > > nrSatCrysValueMap_
 

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 6 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

Constructor & Destructor Documentation

GsfEleFull5x5E2x5OverE5x5WithSatCut::GsfEleFull5x5E2x5OverE5x5WithSatCut ( const edm::ParameterSet c)

Definition at line 33 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

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

33  :
35  minE1x5OverE5x5Cut_(params,"minE1x5OverE5x5"),
36  minE2x5OverE5x5Cut_(params,"minE2x5OverE5x5"),
37  maxNrSatCrysIn5x5Cut_(params,"maxNrSatCrysIn5x5"){
38  contentTags_.emplace("nrSatCrysValueMap",params.getParameter<edm::InputTag>("nrSatCrysValueMap"));
39 }
std::unordered_map< std::string, edm::InputTag > contentTags_

Member Function Documentation

CandidateType GsfEleFull5x5E2x5OverE5x5WithSatCut::candidateType ( ) const
inlinefinaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 17 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

References CutApplicatorBase::ELECTRON.

17  {
18  return ELECTRON;
19  }
void GsfEleFull5x5E2x5OverE5x5WithSatCut::getEventContent ( const edm::EventBase ev)
finaloverridevirtual

Implements CutApplicatorWithEventContentBase.

Definition at line 45 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

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

45  {
46  ev.getByLabel(contentTags_["nrSatCrysValueMap"],nrSatCrysValueMap_);
47 
48 }
std::unordered_map< std::string, edm::InputTag > contentTags_
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:89
edm::Handle< edm::ValueMap< int > > nrSatCrysValueMap_
CutApplicatorBase::result_type GsfEleFull5x5E2x5OverE5x5WithSatCut::operator() ( const reco::GsfElectronPtr cand) const
finaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 53 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

References heepElectronID_HEEPV50_CSA14_25ns_cff::e5x5, reco::GsfElectron::full5x5_e1x5(), reco::GsfElectron::full5x5_e2x5Max(), reco::GsfElectron::full5x5_e5x5(), maxNrSatCrysIn5x5Cut_, minE1x5OverE5x5Cut_, minE2x5OverE5x5Cut_, nrSatCrysValueMap_, and value().

Referenced by getEventContent().

53  {
54 
55  if((*nrSatCrysValueMap_)[cand]>maxNrSatCrysIn5x5Cut_(cand)) return true;
56 
57  const double e5x5 = cand->full5x5_e5x5();
58  const double e2x5OverE5x5 = e5x5!=0 ? cand->full5x5_e2x5Max()/e5x5 : 0;
59  const double e1x5OverE5x5 = e5x5!=0 ? cand->full5x5_e1x5()/e5x5 : 0;
60 
61  return e1x5OverE5x5 > minE1x5OverE5x5Cut_(cand) || e2x5OverE5x5 > minE2x5OverE5x5Cut_(cand);
62 
63 }
float full5x5_e5x5() const
Definition: GsfElectron.h:459
float full5x5_e1x5() const
Definition: GsfElectron.h:457
float full5x5_e2x5Max() const
Definition: GsfElectron.h:458
edm::Handle< edm::ValueMap< int > > nrSatCrysValueMap_
void GsfEleFull5x5E2x5OverE5x5WithSatCut::setConsumes ( edm::ConsumesCollector cc)
finaloverridevirtual

Implements CutApplicatorWithEventContentBase.

Definition at line 41 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

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

41  {
42  contentTokens_.emplace("nrSatCrysValueMap",cc.consumes<edm::ValueMap<int> >(contentTags_["nrSatCrysValueMap"]));
43 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
std::unordered_map< std::string, edm::InputTag > contentTags_
double GsfEleFull5x5E2x5OverE5x5WithSatCut::value ( const reco::CandidatePtr cand) const
finaloverridevirtual

Implements candidate_functions::CandidateCut.

Definition at line 66 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

References reco::GsfElectron::full5x5_e1x5(), and reco::GsfElectron::full5x5_e2x5Max().

Referenced by operator()().

66  {
67  reco::GsfElectronPtr ele(cand);
68  //btw we broke somebodies nice model of assuming every cut is 1D....
69  //what this is returning is fairly meaningless...
70  return ele->full5x5_e1x5() ? ele->full5x5_e2x5Max()/ele->full5x5_e1x5() : 0.;
71 }

Member Data Documentation

EBEECutValuesInt GsfEleFull5x5E2x5OverE5x5WithSatCut::maxNrSatCrysIn5x5Cut_
private

Definition at line 24 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

Referenced by operator()().

EBEECutValues GsfEleFull5x5E2x5OverE5x5WithSatCut::minE1x5OverE5x5Cut_
private

Definition at line 22 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

Referenced by operator()().

EBEECutValues GsfEleFull5x5E2x5OverE5x5WithSatCut::minE2x5OverE5x5Cut_
private

Definition at line 23 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

Referenced by operator()().

edm::Handle<edm::ValueMap<int> > GsfEleFull5x5E2x5OverE5x5WithSatCut::nrSatCrysValueMap_
private

Definition at line 25 of file GsfEleFull5x5E2x5OverE5x5WithSatCut.cc.

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