PhysicsTools
SelectorUtils
src
CutApplicatorBase.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h
"
2
3
EDM_REGISTER_PLUGINFACTORY
(
CutApplicatorFactory
,
"CutApplicatorFactory"
);
4
5
CutApplicatorBase::result_type
CutApplicatorBase::operator()
(
const
CutApplicatorBase::argument_type
&
arg
)
const
{
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
}
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:47
Exception
Definition:
hltDiff.cc:245
amptDefaultParameters_cff.mu
mu
Definition:
amptDefaultParameters_cff.py:16
CutApplicatorBase::candidateType
virtual CandidateType candidateType() const
Definition:
CutApplicatorBase.h:78
CutApplicatorBase::PATMUON
Definition:
CutApplicatorBase.h:47
funct::arg
A arg
Definition:
Factorize.h:31
CutApplicatorBase::TAU
Definition:
CutApplicatorBase.h:47
CutApplicatorBase::asCandidate
virtual result_type asCandidate(const argument_type &) const
Definition:
CutApplicatorBase.h:76
CutApplicatorBase::operator()
result_type operator()(const argument_type &) const final
Definition:
CutApplicatorBase.cc:5
CutApplicatorBase::NONE
Definition:
CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:35
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
CutApplicatorBase::_name
const std::string _name
Definition:
CutApplicatorBase.h:83
metsig::tau
Definition:
SignAlgoResolutions.h:49
edm::Ptr< Candidate >
EDM_REGISTER_PLUGINFACTORY
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition:
PluginFactory.h:88
CutApplicatorBase::PATELECTRON
Definition:
CutApplicatorBase.h:47
CutApplicatorBase::MUON
Definition:
CutApplicatorBase.h:47
CutApplicatorBase::PATTAU
Definition:
CutApplicatorBase.h:47
CutApplicatorBase::PATPHOTON
Definition:
CutApplicatorBase.h:47
CutApplicatorBase::PHOTON
Definition:
CutApplicatorBase.h:47
CutApplicatorBase.h
Generated for CMSSW Reference Manual by
1.8.14