RecoEgamma
ElectronIdentification
plugins
cuts
GsfEleMissingHitsCut.cc
Go to the documentation of this file.
1
#include "
PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h
"
2
#include "
DataFormats/EgammaCandidates/interface/GsfElectron.h
"
3
#include "
DataFormats/GsfTrackReco/interface/GsfTrack.h
"
4
5
class
GsfEleMissingHitsCut
:
public
CutApplicatorBase
{
6
public
:
7
GsfEleMissingHitsCut
(
const
edm::ParameterSet
&
c
)
8
:
CutApplicatorBase
(
c
),
9
_maxMissingHitsEB
(
c
.getParameter<unsigned>(
"maxMissingHitsEB"
)),
10
_maxMissingHitsEE
(
c
.getParameter<unsigned>(
"maxMissingHitsEE"
)),
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
int
_maxMissingHitsEB
,
_maxMissingHitsEE
;
21
const
double
_barrelCutOff
;
22
};
23
24
DEFINE_EDM_PLUGIN
(
CutApplicatorFactory
,
GsfEleMissingHitsCut
,
"GsfEleMissingHitsCut"
);
25
26
CutApplicatorBase::result_type
GsfEleMissingHitsCut::operator()
(
const
reco::GsfElectronPtr
&
cand
)
const
{
27
auto
maxMissingHits =
28
(
std::abs
(
cand
->superCluster()->position().eta()) <
_barrelCutOff
?
_maxMissingHitsEB
:
_maxMissingHitsEE
);
29
return
cand
->gsfTrack()->missingInnerHits() <= maxMissingHits;
30
}
31
32
double
GsfEleMissingHitsCut::value
(
const
reco::CandidatePtr
&
cand
)
const
{
33
reco::GsfElectronPtr
ele(
cand
);
34
return
ele->
gsfTrack
()->missingInnerHits();
35
}
GsfEleMissingHitsCut::operator()
result_type operator()(const reco::GsfElectronPtr &) const final
Definition:
GsfEleMissingHitsCut.cc:26
reco::GsfElectron::gsfTrack
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition:
GsfElectron.h:163
GsfEleMissingHitsCut::_maxMissingHitsEB
const int _maxMissingHitsEB
Definition:
GsfEleMissingHitsCut.cc:20
watchdog.const
const
Definition:
watchdog.py:83
GsfEleMissingHitsCut::value
double value(const reco::CandidatePtr &cand) const final
Definition:
GsfEleMissingHitsCut.cc:32
GsfEleMissingHitsCut::_barrelCutOff
const double _barrelCutOff
Definition:
GsfEleMissingHitsCut.cc:21
candidate_functions::CandidateCut::result_type
bool result_type
Definition:
CandidateCut.h:11
GsfEleMissingHitsCut::candidateType
CandidateType candidateType() const final
Definition:
GsfEleMissingHitsCut.cc:17
GsfElectron.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
GsfEleMissingHitsCut
Definition:
GsfEleMissingHitsCut.cc:5
edm::ParameterSet
Definition:
ParameterSet.h:47
CutApplicatorBase::CandidateType
CandidateType
Definition:
CutApplicatorBase.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
cand
Definition:
decayParser.h:32
GsfTrack.h
edm::Ptr< reco::GsfElectron >
CutApplicatorBase
Definition:
CutApplicatorBase.h:45
GsfEleMissingHitsCut::_maxMissingHitsEE
const int _maxMissingHitsEE
Definition:
GsfEleMissingHitsCut.cc:20
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
GsfEleMissingHitsCut::GsfEleMissingHitsCut
GsfEleMissingHitsCut(const edm::ParameterSet &c)
Definition:
GsfEleMissingHitsCut.cc:7
CutApplicatorBase.h
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:46
CutApplicatorBase::ELECTRON
Definition:
CutApplicatorBase.h:47
Generated for CMSSW Reference Manual by
1.8.16