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 GsfEleDEtaInSeedCut GsfEleDPhiInCut 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 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

Constructor & Destructor Documentation

CutApplicatorBase::CutApplicatorBase ( )
inline

Definition at line 49 of file CutApplicatorBase.h.

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

Definition at line 51 of file CutApplicatorBase.h.

51 : _name(c.getParameter<std::string>("cutName")) {}
T getParameter(std::string const &) const
const std::string _name
CutApplicatorBase::CutApplicatorBase ( const CutApplicatorBase )
delete
CutApplicatorBase::~CutApplicatorBase ( )
inlineoverride

Destructor.

Definition at line 83 of file CutApplicatorBase.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

83 {};

Member Function Documentation

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; }
virtual CandidateType CutApplicatorBase::candidateType ( ) const
inlinevirtual
const std::string& CutApplicatorBase::name ( void  ) const
inlineoverridevirtual
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, edm::Ptr< T >::isNull(), 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 result_type asCandidate(const argument_type &) const
A arg
Definition: Factorize.h:36
const std::string _name
virtual CandidateType candidateType() const
result_type operator()(const argument_type &) const final
virtual result_type CutApplicatorBase::operator() ( const reco::GsfElectronPtr ) const
inlinevirtual
virtual result_type CutApplicatorBase::operator() ( const pat::ElectronPtr ) const
inlinevirtual

Definition at line 61 of file CutApplicatorBase.h.

61 { return false; }
virtual result_type CutApplicatorBase::operator() ( const reco::PhotonPtr ) const
inlinevirtual
virtual result_type CutApplicatorBase::operator() ( const pat::PhotonPtr ) const
inlinevirtual
virtual result_type CutApplicatorBase::operator() ( const reco::MuonPtr ) const
inlinevirtual
virtual result_type CutApplicatorBase::operator() ( const pat::MuonPtr ) const
inlinevirtual

Definition at line 69 of file CutApplicatorBase.h.

69 { return false; }
virtual result_type CutApplicatorBase::operator() ( const reco::PFTauPtr ) const
inlinevirtual
virtual result_type CutApplicatorBase::operator() ( const pat::TauPtr ) const
inlinevirtual
CutApplicatorBase& CutApplicatorBase::operator= ( const CutApplicatorBase )
delete

Member Data Documentation

const std::string CutApplicatorBase::_name
private