RecoTauTag
RecoTau
plugins
RecoTauChargedHadronMultiplicityCleanerPlugin.cc
Go to the documentation of this file.
1
/*
2
* RecoTauChargedHadronMultiplicityCleanerPlugin
3
*
4
* Author: Christian Veelken, NICPB Tallinn
5
*
6
* A reco tau cleaner plugin that ranks the PFTaus by the number of charged hadrons.
7
*/
8
9
#include "
RecoTauTag/RecoTau/interface/RecoTauBuilderPlugins.h
"
10
#include "
DataFormats/TauReco/interface/PFTauDiscriminator.h
"
11
12
namespace
reco
{
13
namespace
tau
{
14
15
class
RecoTauChargedHadronMultiplicityCleanerPlugin
:
public
RecoTauCleanerPlugin
{
16
public
:
17
RecoTauChargedHadronMultiplicityCleanerPlugin
(
const
edm::ParameterSet
&
pset
,
edm::ConsumesCollector
&& iC);
18
19
// Get ranking value for a given tau Ref
20
double
operator()
(
const
reco::PFTauRef
&)
const override
;
21
};
22
23
RecoTauChargedHadronMultiplicityCleanerPlugin::RecoTauChargedHadronMultiplicityCleanerPlugin
(
24
const
edm::ParameterSet
&
pset
,
edm::ConsumesCollector
&& iC)
25
:
RecoTauCleanerPlugin
(
pset
,
std
::
move
(iC)) {}
26
27
double
RecoTauChargedHadronMultiplicityCleanerPlugin::operator()
(
const
reco::PFTauRef
&
tau
)
const
{
28
// Get the ranking value for this tau.
29
// N.B. lower value means more "tau like"!
30
double
result
= 0.;
31
const
std::vector<PFRecoTauChargedHadron>& chargedHadrons =
tau
->signalTauChargedHadronCandidates();
32
for
(std::vector<PFRecoTauChargedHadron>::const_iterator
chargedHadron
= chargedHadrons.begin();
33
chargedHadron
!= chargedHadrons.end();
34
++
chargedHadron
) {
35
if
(
chargedHadron
->algo() ==
PFRecoTauChargedHadron::kChargedPFCandidate
)
36
result
-= 8.;
37
else
if
(
chargedHadron
->algo() ==
PFRecoTauChargedHadron::kTrack
)
38
result
-= 4.;
39
else
if
(
chargedHadron
->algo() ==
PFRecoTauChargedHadron::kPFNeutralHadron
)
40
result
-= 2.;
41
else
42
result
-= 1.;
43
}
44
return
result
;
45
}
46
47
}
// namespace tau
48
}
// namespace reco
49
50
// Register our plugin
51
#include "
FWCore/Framework/interface/MakerMacros.h
"
52
DEFINE_EDM_PLUGIN
(
RecoTauCleanerPluginFactory
,
53
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin
,
54
"RecoTauChargedHadronMultiplicityCleanerPlugin"
);
PFTauDiscriminator.h
metsig::tau
Definition:
SignAlgoResolutions.h:49
muons2muons_cfi.chargedHadron
chargedHadron
Definition:
muons2muons_cfi.py:26
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
edm::Ref< PFTauCollection >
MakerMacros.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
edm::ParameterSet
Definition:
ParameterSet.h:47
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
reco::PFRecoTauChargedHadron::kChargedPFCandidate
Definition:
PFRecoTauChargedHadron.h:30
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin::RecoTauChargedHadronMultiplicityCleanerPlugin
RecoTauChargedHadronMultiplicityCleanerPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
Definition:
RecoTauChargedHadronMultiplicityCleanerPlugin.cc:23
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin
Definition:
RecoTauChargedHadronMultiplicityCleanerPlugin.cc:15
RecoTauBuilderPlugins.h
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
reco::PFRecoTauChargedHadron::kPFNeutralHadron
Definition:
PFRecoTauChargedHadron.h:32
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin::operator()
double operator()(const reco::PFTauRef &) const override
Definition:
RecoTauChargedHadronMultiplicityCleanerPlugin.cc:27
reco::tau::RecoTauCleanerPlugin
Definition:
RecoTauBuilderPlugins.h:116
mps_fire.result
result
Definition:
mps_fire.py:311
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
reco::PFRecoTauChargedHadron::kTrack
Definition:
PFRecoTauChargedHadron.h:31
Generated for CMSSW Reference Manual by
1.8.16