RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleDPhiInCut.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h
"
2
#include "
DataFormats/EgammaCandidates/interface/GsfElectronFwd.h
"
3
#include "
DataFormats/EgammaCandidates/interface/GsfElectron.h
"
4
5
class
GsfEleDPhiInCut
:
public
CutApplicatorBase
{
6
public
:
7
GsfEleDPhiInCut
(
const
edm::ParameterSet
&
c
)
8
:
CutApplicatorBase
(
c
),
9
_dPhiInCutValueEB
(
c
.getParameter<double>(
"dPhiInCutValueEB"
)),
10
_dPhiInCutValueEE
(
c
.getParameter<double>(
"dPhiInCutValueEE"
)),
11
_barrelCutOff
(
c
.getParameter<double>(
"barrelCutOff"
)) {}
12
13
result_type
operator()
(
const
reco::GsfElectronPtr
&)
const
final
;
14
15
double
value
(
const
reco::CandidatePtr
&
cand
)
const
final
;
16
17
CandidateType
candidateType
()
const
final {
return
ELECTRON
; }
18
19
private
:
20
const
double
_dPhiInCutValueEB
,
_dPhiInCutValueEE
,
_barrelCutOff
;
21
};
22
23
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
GsfEleDPhiInCut
,
"GsfEleDPhiInCut"
);
24
25
CutApplicatorBase::result_type
GsfEleDPhiInCut::operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
{
26
const
float
dPhiInCutValue =
27
(
std::abs
(
cand
->superCluster()->position().eta()) <
_barrelCutOff
?
_dPhiInCutValueEB
:
_dPhiInCutValueEE
);
28
return
std::abs
(
cand
->deltaPhiSuperClusterTrackAtVtx()) < dPhiInCutValue;
29
}
30
31
double
GsfEleDPhiInCut::value
(
const
reco::CandidatePtr
&
cand
)
const
{
32
reco::GsfElectronPtr
ele(
cand
);
33
return
std::abs
(ele->
deltaPhiSuperClusterTrackAtVtx
());
34
}
GsfEleDPhiInCut::_dPhiInCutValueEB
const double _dPhiInCutValueEB
Definition:
GsfEleDPhiInCut.cc:20
GsfEleDPhiInCut::_barrelCutOff
const double _barrelCutOff
Definition:
GsfEleDPhiInCut.cc:20
reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx
float deltaPhiSuperClusterTrackAtVtx() const
Definition:
GsfElectron.h:236
GsfEleDPhiInCut::_dPhiInCutValueEE
const double _dPhiInCutValueEE
Definition:
GsfEleDPhiInCut.cc:20
watchdog.const
const
Definition:
watchdog.py:83
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
GsfEleDPhiInCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
GsfEleDPhiInCut.cc:31
GsfElectron.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
GsfElectronFwd.h
edm::ParameterSet
Definition:
ParameterSet.h:36
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
GsfEleDPhiInCut::candidateType
CandidateType candidateType() const final
Definition:
GsfEleDPhiInCut.cc:17
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:34
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
edm::Ptr< reco::GsfElectron >
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
GsfEleDPhiInCut::GsfEleDPhiInCut
GsfEleDPhiInCut(const edm::ParameterSet &c)
Definition:
GsfEleDPhiInCut.cc:7
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
CutApplicatorBase.h
GsfEleDPhiInCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const final
Definition:
GsfEleDPhiInCut.cc:25
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:47
GsfEleDPhiInCut
Definition:
GsfEleDPhiInCut.cc:5
Generated for CMSSW Reference Manual by
1.8.16