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 GsfEleDeltaBetaIsoCutStandalone GsfEleDEtaInCut GsfEleDEtaInLinearCut GsfEleDEtaInSeedCut GsfEleDPhiInCut GsfEleE2x5OverE5x5Cut GsfEleEcalDrivenCut GsfEleEInverseMinusPInverseCut GsfEleFull5x5E2x5OverE5x5Cut GsfEleFull5x5E2x5OverE5x5WithSatCut GsfEleFull5x5SigmaIEtaIEtaCut GsfEleFull5x5SigmaIEtaIEtaWithSatCut GsfEleHadronicOverEMCut GsfEleHadronicOverEMLinearCut GsfEleMinEcalEtCut GsfEleMissingHitsCut GsfEleNormalizedGsfChi2Cut 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 override 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 51 of file CutApplicatorBase.h.

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

Definition at line 53 of file CutApplicatorBase.h.

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

Destructor.

Definition at line 92 of file CutApplicatorBase.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

92 {};

Member Function Documentation

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

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

Definition at line 85 of file CutApplicatorBase.h.

Referenced by operator()().

85 {return false;}
virtual CandidateType CutApplicatorBase::candidateType ( ) const
inlinevirtual

Reimplemented in GsfEleHadronicOverEMEnergyScaledCut, MuonSelectorVIDWrapper< selectionType, arbitrationType >, GsfEleSCEtaMultiRangeCut, PhoSCEtaMultiRangeCut, GsfEleSCMaxAbsEtaCut, GsfEleCalPFClusterIsoCut, GsfEleTrkPtIsoRhoCut, GsfEleConversionVetoCut, GsfEleDeltaBetaIsoCut, GsfEleDEtaInLinearCut, GsfEleDPhiInCut, GsfEleDxyCut, GsfEleDzCut, GsfEleEmHadD1IsoRhoCut, GsfEleMissingHitsCut, PhoGenericRhoPtScaledCut, GsfEleDEtaInCut, GsfEleDEtaInSeedCut, GsfEleEffAreaPFIsoCut, GsfEleEInverseMinusPInverseCut, GsfEleHadronicOverEMCut, GsfEleNormalizedGsfChi2Cut, GsfEleRelPFIsoScaledCut, GsfEleSigmaIEtaIEtaCut, GsfEleTrkPtIsoCut, GsfEleValueMapIsoRhoCut, PhoAnyPFIsoWithEAAndExpoScalingCut, PhoAnyPFIsoWithEAAndExpoScalingEBCut, PhoAnyPFIsoWithEAAndQuadScalingCut, PhoAnyPFIsoWithEACut, PhoHadronicOverEMCut, PhoSingleTowerHadOverEmCut, GsfEleDeltaBetaIsoCutStandalone, GsfEleE2x5OverE5x5Cut, GsfEleHadronicOverEMLinearCut, PhoMVACut, GsfEleMVACut, PhoFull5x5SigmaIEtaIEtaValueMapCut, GsfEleFull5x5E2x5OverE5x5Cut, GsfEleFull5x5E2x5OverE5x5WithSatCut, GsfEleFull5x5SigmaIEtaIEtaWithSatCut, GsfEleEcalDrivenCut, GsfEleFull5x5SigmaIEtaIEtaCut, GsfEleMinEcalEtCut, PhoFull5x5SigmaIEtaIEtaCut, MuonDxyCut, MuonDzCut, MuonPOGStandardCut, MuonMatchCut, MuonMomQualityCut, MuonSegmentCompatibilityCut, MuonTrackCut, and MuonTypeByOrCut.

Definition at line 87 of file CutApplicatorBase.h.

References NONE.

Referenced by operator()().

const std::string& CutApplicatorBase::name ( void  ) const
inlineoverridevirtual
CutApplicatorBase::result_type CutApplicatorBase::operator() ( const argument_type arg) const
finaloverridevirtual

Implements candidate_functions::CandidateCut.

Definition at line 7 of file CutApplicatorBase.cc.

References _name, asCandidate(), candidateType(), ELECTRON, Exception, edm::Ptr< T >::isNull(), RPCpg::mu, MUON, NONE, PATELECTRON, PATMUON, PATPHOTON, PATTAU, PHOTON, metsig::tau, and TAU.

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

Definition at line 70 of file CutApplicatorBase.h.

70 {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 78 of file CutApplicatorBase.h.

78 {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