Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Properties
_
a
c
d
e
f
l
m
o
p
s
t
u
v
+
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
RecoTauTag
RecoTau
plugins
RecoTauChargeCleanerPlugin.cc
Go to the documentation of this file.
1
/*
2
* Original author: Alexander Nehrkorn (RWTH Aachen)
3
*
4
* Description:
5
* This module rejects tau candidates that do not have unit charge.
6
* It takes the fact into account that taus do not necessarily need
7
* to be created from PF charged hadrons only but can be created
8
* from a combination of PF charged hadrons and tracks.
9
*
10
*/
11
12
#include "
RecoTauTag/RecoTau/interface/RecoTauBuilderPlugins.h
"
13
#include "
DataFormats/TauReco/interface/PFTau.h
"
14
#include "
DataFormats/TauReco/interface/PFTauFwd.h
"
15
16
namespace
reco
{
17
namespace
tau
{
18
19
class
RecoTauChargeCleanerPlugin
:
public
RecoTauCleanerPlugin
{
20
public
:
21
explicit
RecoTauChargeCleanerPlugin
(
const
edm::ParameterSet
&,
edm::ConsumesCollector
&& iC);
22
~RecoTauChargeCleanerPlugin
()
override
{}
23
double
operator()
(
const
PFTauRef
&
tau
)
const override
;
24
25
private
:
26
std::vector<unsigned>
nprongs_
;
27
double
failResult_
;
28
int
charge_
;
29
};
30
31
RecoTauChargeCleanerPlugin::RecoTauChargeCleanerPlugin
(
const
edm::ParameterSet
&
pset
,
edm::ConsumesCollector
&& iC)
32
:
RecoTauCleanerPlugin
(
pset
,
std
::
move
(iC)),
33
nprongs_(
pset
.getParameter<
std
::
vector
<unsigned> >(
"nprongs"
)),
34
failResult_(
pset
.getParameter<double>(
"selectionFailValue"
)),
35
charge_(
pset
.getParameter<
int
>(
"passForCharge"
)) {}
36
37
double
RecoTauChargeCleanerPlugin::operator()
(
const
PFTauRef
&
cand
)
const
{
38
int
charge
= 0;
39
unsigned
nChargedPFCandidate(0),
nTrack
(0);
40
for
(
auto
const
& tauCand :
cand
->signalTauChargedHadronCandidates()) {
41
charge
+= tauCand.charge();
42
if
(tauCand.algoIs(
reco::PFRecoTauChargedHadron::kChargedPFCandidate
))
43
nChargedPFCandidate++;
44
else
if
(tauCand.algoIs(
reco::PFRecoTauChargedHadron::kTrack
))
45
nTrack
++;
46
}
47
48
for
(
auto
nprong :
nprongs_
) {
49
if
(nChargedPFCandidate +
nTrack
== nprong)
50
return
abs
(
charge
) -
charge_
;
51
}
52
53
return
failResult_
;
54
}
55
56
}
// namespace tau
57
}
// namespace reco
58
59
#include "
FWCore/Framework/interface/MakerMacros.h
"
60
61
DEFINE_EDM_PLUGIN
(
RecoTauCleanerPluginFactory
,
reco::tau::RecoTauChargeCleanerPlugin
,
"RecoTauChargeCleanerPlugin"
);
PFTauFwd.h
l1ctLayer1_cff.nTrack
nTrack
Definition:
l1ctLayer1_cff.py:59
edm::Ref< PFTauCollection >
reco::PFRecoTauChargedHadron::kChargedPFCandidate
Definition:
PFRecoTauChargedHadron.h:30
RecoTauBuilderPlugins.h
reco::tau::RecoTauChargeCleanerPlugin::~RecoTauChargeCleanerPlugin
~RecoTauChargeCleanerPlugin() override
Definition:
RecoTauChargeCleanerPlugin.cc:22
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
std
Definition:
JetResolutionObject.h:76
PFTau.h
reco::tau::RecoTauChargeCleanerPlugin::RecoTauChargeCleanerPlugin
RecoTauChargeCleanerPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
Definition:
RecoTauChargeCleanerPlugin.cc:31
createfilelist.int
int
Definition:
createfilelist.py:10
edmplugin::PluginFactory
Definition:
PluginFactory.h:35
reco::tau::RecoTauChargeCleanerPlugin::failResult_
double failResult_
Definition:
RecoTauChargeCleanerPlugin.cc:27
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
metsig::tau
Definition:
SignAlgoResolutions.h:49
reco::tau::RecoTauChargeCleanerPlugin::nprongs_
std::vector< unsigned > nprongs_
Definition:
RecoTauChargeCleanerPlugin.cc:26
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition:
ALCARECOTkAlJpsiMuMu_cff.py:47
reco::tau::RecoTauChargeCleanerPlugin
Definition:
RecoTauChargeCleanerPlugin.cc:19
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
reco::tau::RecoTauChargeCleanerPlugin::operator()
double operator()(const PFTauRef &tau) const override
Definition:
RecoTauChargeCleanerPlugin.cc:37
trackerHitRTTI::vector
Definition:
trackerHitRTTI.h:21
edm::ParameterSet
Definition:
ParameterSet.h:47
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:123
cand
Definition:
decayParser.h:32
reco::tau::RecoTauCleanerPlugin
Definition:
RecoTauBuilderPlugins.h:113
MakerMacros.h
reco::PFRecoTauChargedHadron::kTrack
Definition:
PFRecoTauChargedHadron.h:31
eostools.move
def move(src, dest)
Definition:
eostools.py:511
reco::tau::RecoTauChargeCleanerPlugin::charge_
int charge_
Definition:
RecoTauChargeCleanerPlugin.cc:28
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.14