Main Page
Namespaces
Classes
Package Documentation
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
{
namespace
tau
{
13
14
class
RecoTauChargedHadronMultiplicityCleanerPlugin
:
public
RecoTauCleanerPlugin
15
{
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
(
const
edm::ParameterSet
&
pset
,
edm::ConsumesCollector
&& iC)
24
:
RecoTauCleanerPlugin
(pset,
std
::
move
(iC))
25
{}
26
27
double
RecoTauChargedHadronMultiplicityCleanerPlugin::operator()
(
const
reco::PFTauRef
&
tau
)
const
28
{
29
// Get the ranking value for this tau.
30
// N.B. lower value means more "tau like"!
31
double
result
= 0.;
32
const
std::vector<PFRecoTauChargedHadron>& chargedHadrons = tau->signalTauChargedHadronCandidates();
33
for
( std::vector<PFRecoTauChargedHadron>::const_iterator
chargedHadron
= chargedHadrons.begin();
34
chargedHadron
!= chargedHadrons.end(); ++
chargedHadron
) {
35
if
(
chargedHadron
->algo() ==
PFRecoTauChargedHadron::kChargedPFCandidate
) result -= 8.;
36
else
if
(
chargedHadron
->algo() ==
PFRecoTauChargedHadron::kTrack
) result -= 4.;
37
else
if
(
chargedHadron
->algo() ==
PFRecoTauChargedHadron::kPFNeutralHadron
) result -= 2.;
38
else
result -= 1.;
39
}
40
return
result
;
41
}
42
43
}}
// end namespace reco::tau
44
45
// Register our plugin
46
#include "
FWCore/Framework/interface/MakerMacros.h
"
47
DEFINE_EDM_PLUGIN
(
RecoTauCleanerPluginFactory
,
48
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin
,
49
"RecoTauChargedHadronMultiplicityCleanerPlugin"
);
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin::RecoTauChargedHadronMultiplicityCleanerPlugin
RecoTauChargedHadronMultiplicityCleanerPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
Definition:
RecoTauChargedHadronMultiplicityCleanerPlugin.cc:23
mps_fire.result
result
Definition:
mps_fire.py:113
edm::Ref< PFTauCollection >
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin::operator()
double operator()(const reco::PFTauRef &) const override
Definition:
RecoTauChargedHadronMultiplicityCleanerPlugin.cc:27
reco::PFRecoTauChargedHadron::kChargedPFCandidate
Definition:
PFRecoTauChargedHadron.h:28
RecoTauBuilderPlugins.h
MakerMacros.h
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin
Definition:
RecoTauChargedHadronMultiplicityCleanerPlugin.cc:14
std
Definition:
JetResolutionObject.h:76
reco::PFRecoTauChargedHadron::kPFNeutralHadron
Definition:
PFRecoTauChargedHadron.h:30
PFTauDiscriminator.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
metsig::tau
Definition:
SignAlgoResolutions.h:40
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:43
edm::ParameterSet
Definition:
ParameterSet.h:36
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:101
reco::tau::RecoTauCleanerPlugin
Definition:
RecoTauBuilderPlugins.h:116
muons2muons_cfi.chargedHadron
chargedHadron
Definition:
muons2muons_cfi.py:26
reco::PFRecoTauChargedHadron::kTrack
Definition:
PFRecoTauChargedHadron.h:29
eostools.move
def move(src, dest)
Definition:
eostools.py:510
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
Generated for CMSSW Reference Manual by
1.8.11