Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
edm::Ref< PFTauCollection >
reco::PFRecoTauChargedHadron::kChargedPFCandidate
Definition:
PFRecoTauChargedHadron.h:28
RecoTauBuilderPlugins.h
MakerMacros.h
TrackValidation_cff.pset
tuple pset
Definition:
TrackValidation_cff.py:374
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin
Definition:
RecoTauChargedHadronMultiplicityCleanerPlugin.cc:14
reco::PFRecoTauChargedHadron::kPFNeutralHadron
Definition:
PFRecoTauChargedHadron.h:30
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:107
PFTauDiscriminator.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
query.result
tuple result
Definition:
query.py:137
eostools.move
def move
Definition:
eostools.py:510
metsig::tau
Definition:
SignAlgoResolutions.h:40
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:114
reco::PFRecoTauChargedHadron::kTrack
Definition:
PFRecoTauChargedHadron.h:29
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin::operator()
double operator()(const reco::PFTauRef &) const override
Definition:
RecoTauChargedHadronMultiplicityCleanerPlugin.cc:27
Generated for CMSSW Reference Manual by
1.8.5