Main Page
Namespaces
Classes
Package Documentation
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
6
CutApplicatorBase::
7
operator()
(
const
CutApplicatorBase::argument_type&
arg
)
const
{
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
}
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:48
Exception
Definition:
hltDiff.cc:292
CutApplicatorBase::asCandidate
virtual result_type asCandidate(const argument_type &) const
Definition:
CutApplicatorBase.h:85
CutApplicatorBase::PATMUON
Definition:
CutApplicatorBase.h:49
funct::arg
A arg
Definition:
Factorize.h:37
CutApplicatorBase::TAU
Definition:
CutApplicatorBase.h:48
CutApplicatorBase::operator()
virtual result_type operator()(const argument_type &) const final
CutApplicatorBase::NONE
Definition:
CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
CutApplicatorBase::_name
const std::string _name
Definition:
CutApplicatorBase.h:92
metsig::tau
Definition:
SignAlgoResolutions.h:40
edm::Ptr< reco::GsfElectron >
RPCpg::mu
const int mu
Definition:
Constants.h:22
EDM_REGISTER_PLUGINFACTORY
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition:
PluginFactory.h:90
CutApplicatorBase::PATELECTRON
Definition:
CutApplicatorBase.h:49
CutApplicatorBase::candidateType
virtual CandidateType candidateType() const
Definition:
CutApplicatorBase.h:87
CutApplicatorBase::MUON
Definition:
CutApplicatorBase.h:48
CutApplicatorBase::PATTAU
Definition:
CutApplicatorBase.h:49
CutApplicatorBase::PATPHOTON
Definition:
CutApplicatorBase.h:49
CutApplicatorBase::PHOTON
Definition:
CutApplicatorBase.h:48
CutApplicatorBase.h
Generated for CMSSW Reference Manual by
1.8.11