CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
CutApplicatorBase Class Reference

#include <CutApplicatorBase.h>

Inheritance diagram for CutApplicatorBase:
candidate_functions::CandidateCut CutApplicatorWithEventContentBase EtaMultiRangeCut ExpressionEvaluatorCut GsfEleEBEECut GsfEleEcalDrivenCut GsfEleFull5x5E2x5OverE5x5Cut GsfEleFull5x5E2x5OverE5x5WithSatCut GsfEleFull5x5SigmaIEtaIEtaCut GsfEleFull5x5SigmaIEtaIEtaWithSatCut GsfEleHadronicOverEMLinearCut GsfEleMinEcalEtCut GsfEleMissingHitsCut GsfEleSCEtaMultiRangeCut GsfEleSCMaxAbsEtaCut GsfEleSigmaIEtaIEtaCut GsfEleTrkPtIsoCut MaxAbsEtaCut MinPtCut MinPtCutInEtaRanges MuonMatchCut MuonMomQualityCut MuonSegmentCompatibilityCut MuonSelectorVIDWrapper< selectionType, arbitrationType > MuonTrackCut MuonTypeByOrCut PhoFull5x5SigmaIEtaIEtaCut PhoSCEtaMultiRangeCut PhotonHcalOverEcalCut< isBC >

Public Types

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
 

Public Member Functions

virtual result_type asCandidate (const argument_type &) const
 
virtual CandidateType candidateType () const
 
 CutApplicatorBase ()
 
 CutApplicatorBase (const edm::ParameterSet &c)
 
 CutApplicatorBase (const CutApplicatorBase &)=delete
 
const std::string & name () const override
 
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 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
 
 ~CutApplicatorBase () override
 Destructor. More...
 
- Public Member Functions inherited from candidate_functions::CandidateCut
 CandidateCut ()
 
virtual double value (const reco::CandidatePtr &) const =0
 
virtual ~CandidateCut ()
 

Private Attributes

const std::string _name
 

Detailed Description

Definition at line 45 of file CutApplicatorBase.h.

Member Enumeration Documentation

◆ CandidateType

Constructor & Destructor Documentation

◆ CutApplicatorBase() [1/3]

CutApplicatorBase::CutApplicatorBase ( )
inline

Definition at line 49 of file CutApplicatorBase.h.

◆ CutApplicatorBase() [2/3]

CutApplicatorBase::CutApplicatorBase ( const edm::ParameterSet c)
inline

Definition at line 51 of file CutApplicatorBase.h.

◆ CutApplicatorBase() [3/3]

CutApplicatorBase::CutApplicatorBase ( const CutApplicatorBase )
delete

◆ ~CutApplicatorBase()

CutApplicatorBase::~CutApplicatorBase ( )
inlineoverride

Destructor.

Definition at line 83 of file CutApplicatorBase.h.

83 {};

Member Function Documentation

◆ asCandidate()

virtual result_type CutApplicatorBase::asCandidate ( const argument_type ) const
inlinevirtual

Reimplemented in MinPtCutInEtaRanges, EtaMultiRangeCut, ExpressionEvaluatorCut, ExpressionEvaluatorCutWithEventContent, MaxAbsEtaCut, and MinPtCut.

Definition at line 76 of file CutApplicatorBase.h.

Referenced by operator()().

76 { return false; }

◆ candidateType()

virtual CandidateType CutApplicatorBase::candidateType ( ) const
inlinevirtual

◆ name()

const std::string& CutApplicatorBase::name ( void  ) const
inlineoverridevirtual

◆ operator()() [1/9]

CutApplicatorBase::result_type CutApplicatorBase::operator() ( const argument_type arg) const
finalvirtual

Implements candidate_functions::CandidateCut.

Definition at line 5 of file CutApplicatorBase.cc.

References _name, asCandidate(), candidateType(), ELECTRON, Exception, amptDefaultParameters_cff::mu, MUON, NONE, PATELECTRON, PATMUON, PATPHOTON, PATTAU, PHOTON, TAU, and metsig::tau.

5  {
6  if (arg.isNull()) {
7  throw cms::Exception("BadProductPtr") << _name << "received a bad product ref to process!" << std::endl;
8  }
9 
10  switch (candidateType()) {
11  case ELECTRON: {
12  const reco::GsfElectronPtr ele(arg);
13  return this->operator()(ele);
14  } break;
15  case MUON: {
16  const reco::MuonPtr mu(arg);
17  return this->operator()(mu);
18  } break;
19  case PHOTON: {
20  const reco::PhotonPtr pho(arg);
21  return this->operator()(pho);
22  } break;
23  case TAU: {
24  const reco::PFTauPtr tau(arg);
25  return this->operator()(tau);
26  } break;
27  case PATELECTRON: {
28  const pat::ElectronPtr ele(arg);
29  return this->operator()(ele);
30  } break;
31  case PATMUON: {
32  const pat::MuonPtr mu(arg);
33  return this->operator()(mu);
34  } break;
35  case PATPHOTON: {
36  const pat::PhotonPtr pho(arg);
37  return this->operator()(pho);
38  } break;
39  case PATTAU: {
40  const pat::TauPtr tau(arg);
41  return this->operator()(tau);
42  } break;
43  case NONE: {
44  return asCandidate(arg);
45  break;
46  }
47  default:
48  throw cms::Exception("BadCandidateType") << "Unknown candidate type";
49  }
50 }
virtual CandidateType candidateType() const
A arg
Definition: Factorize.h:31
virtual result_type asCandidate(const argument_type &) const
result_type operator()(const argument_type &) const final
const std::string _name

◆ operator()() [2/9]

virtual result_type CutApplicatorBase::operator() ( const reco::GsfElectronPtr ) const
inlinevirtual

◆ operator()() [3/9]

virtual result_type CutApplicatorBase::operator() ( const pat::ElectronPtr ) const
inlinevirtual

Definition at line 61 of file CutApplicatorBase.h.

61 { return false; }

◆ operator()() [4/9]

virtual result_type CutApplicatorBase::operator() ( const reco::PhotonPtr ) const
inlinevirtual

◆ operator()() [5/9]

virtual result_type CutApplicatorBase::operator() ( const pat::PhotonPtr ) const
inlinevirtual

◆ operator()() [6/9]

virtual result_type CutApplicatorBase::operator() ( const reco::MuonPtr ) const
inlinevirtual

◆ operator()() [7/9]

virtual result_type CutApplicatorBase::operator() ( const pat::MuonPtr ) const
inlinevirtual

Definition at line 69 of file CutApplicatorBase.h.

69 { return false; }

◆ operator()() [8/9]

virtual result_type CutApplicatorBase::operator() ( const reco::PFTauPtr ) const
inlinevirtual

◆ operator()() [9/9]

virtual result_type CutApplicatorBase::operator() ( const pat::TauPtr ) const
inlinevirtual

◆ operator=()

CutApplicatorBase& CutApplicatorBase::operator= ( const CutApplicatorBase )
delete

Member Data Documentation

◆ _name

const std::string CutApplicatorBase::_name
private