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 PhoHadronicOverEMCut PhoSCEtaMultiRangeCut PhoSingleTowerHadOverEmCut

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 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::GsfElectronPtr &) 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 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

Enumerator
NONE 
ELECTRON 
MUON 
PHOTON 
TAU 
PATELECTRON 
PATMUON 
PATPHOTON 
PATTAU 

Definition at line 47 of file CutApplicatorBase.h.

Constructor & Destructor Documentation

◆ CutApplicatorBase() [1/3]

CutApplicatorBase::CutApplicatorBase ( )
inline

Definition at line 49 of file CutApplicatorBase.h.

49 : CandidateCut() {}

◆ CutApplicatorBase() [2/3]

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

Definition at line 51 of file CutApplicatorBase.h.

51 : _name(c.getParameter<std::string>("cutName")) {}

◆ 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 ExpressionEvaluatorCut, ExpressionEvaluatorCutWithEventContent, MaxAbsEtaCut, MinPtCut, MinPtCutInEtaRanges, and EtaMultiRangeCut.

Definition at line 76 of file CutApplicatorBase.h.

76 { return false; }

Referenced by operator()().

◆ 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.

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 }

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

◆ operator()() [2/9]

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

Definition at line 61 of file CutApplicatorBase.h.

61 { return false; }

◆ operator()() [3/9]

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

Definition at line 69 of file CutApplicatorBase.h.

69 { return false; }

◆ operator()() [4/9]

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

◆ operator()() [5/9]

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

◆ operator()() [6/9]

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

◆ operator()() [7/9]

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

◆ operator()() [8/9]

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

◆ operator()() [9/9]

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

◆ operator=()

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

Member Data Documentation

◆ _name

const std::string CutApplicatorBase::_name
private
CutApplicatorBase::PATTAU
Definition: CutApplicatorBase.h:47
CutApplicatorBase::PHOTON
Definition: CutApplicatorBase.h:47
metsig::tau
Definition: SignAlgoResolutions.h:49
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
CutApplicatorBase::candidateType
virtual CandidateType candidateType() const
Definition: CutApplicatorBase.h:78
CutApplicatorBase::operator()
result_type operator()(const argument_type &) const final
Definition: CutApplicatorBase.cc:5
CutApplicatorBase::PATMUON
Definition: CutApplicatorBase.h:47
CutApplicatorBase::asCandidate
virtual result_type asCandidate(const argument_type &) const
Definition: CutApplicatorBase.h:76
candidate_functions::CandidateCut::CandidateCut
CandidateCut()
Definition: CandidateCut.h:13
CutApplicatorBase::MUON
Definition: CutApplicatorBase.h:47
CutApplicatorBase::PATELECTRON
Definition: CutApplicatorBase.h:47
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CutApplicatorBase::NONE
Definition: CutApplicatorBase.h:47
CutApplicatorBase::PATPHOTON
Definition: CutApplicatorBase.h:47
CutApplicatorBase::_name
const std::string _name
Definition: CutApplicatorBase.h:83
edm::Ptr< reco::GsfElectron >
Exception
Definition: hltDiff.cc:245
funct::arg
A arg
Definition: Factorize.h:31
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
CutApplicatorBase::TAU
Definition: CutApplicatorBase.h:47
CutApplicatorBase::ELECTRON
Definition: CutApplicatorBase.h:47