Main Page
Namespaces
Classes
Package Documentation
RecoTauTag
TauTagTools
plugins
RecoTauRandomCleanerPlugin.cc
Go to the documentation of this file.
1
/*
2
* RecoTauRandomCleanerPlugin
3
*
4
* Author: Evan K. Friis, UC Davis
5
*
6
* A reco tau cleaner plugin that selects a *random* PFTau.
7
*
8
*/
9
10
#include <boost/functional/hash.hpp>
11
#include "
RecoTauTag/RecoTau/interface/RecoTauBuilderPlugins.h
"
12
13
14
namespace
reco
{
namespace
tau
{
15
16
class
RecoTauRandomCleanerPlugin
:
public
RecoTauCleanerPlugin
{
17
public
:
18
RecoTauRandomCleanerPlugin
(
const
edm::ParameterSet
&
pset
,
edm::ConsumesCollector
&&iC);
19
~RecoTauRandomCleanerPlugin
()
override
{}
20
// Get discriminant value for a given tau Ref
21
double
operator()
(
const
reco::PFTauRef
&)
const override
;
22
private
:
23
unsigned
int
seed_
;
24
};
25
26
RecoTauRandomCleanerPlugin::RecoTauRandomCleanerPlugin
(
27
const
edm::ParameterSet
&
pset
,
edm::ConsumesCollector
&&iC):
RecoTauCleanerPlugin
(pset,
std
::
move
(iC)) {
28
seed_
= pset.
exists
(
"seed"
) ? pset.
getParameter
<
unsigned
int
>(
"seed"
) : 1234;
29
}
30
31
double
RecoTauRandomCleanerPlugin::operator()
(
const
reco::PFTauRef
&
tau
)
const
{
32
size_t
output
=
seed_
;
33
boost::hash_combine(output, tau->pt());
34
boost::hash_combine(output, tau->eta());
35
return
output
;
36
}
37
38
}}
// end namespace reco::tautools
39
40
// Register our plugin
41
#include "
FWCore/Framework/interface/MakerMacros.h
"
42
DEFINE_EDM_PLUGIN
(
RecoTauCleanerPluginFactory
,
43
reco::tau::RecoTauRandomCleanerPlugin
,
44
"RecoTauRandomCleanerPlugin"
);
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
edm::Ref< PFTauCollection >
RecoTauBuilderPlugins.h
MakerMacros.h
edm::ParameterSet::exists
bool exists(std::string const ¶meterName) const
checks if a parameter exists
Definition:
ParameterSet.cc:760
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
std
Definition:
JetResolutionObject.h:80
convertSQLitetoXML_cfg.output
output
Definition:
convertSQLitetoXML_cfg.py:32
reco::tau::RecoTauRandomCleanerPlugin::seed_
unsigned int seed_
Definition:
RecoTauRandomCleanerPlugin.cc:23
reco::tau::RecoTauRandomCleanerPlugin::RecoTauRandomCleanerPlugin
RecoTauRandomCleanerPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
Definition:
RecoTauRandomCleanerPlugin.cc:26
edmplugin::PluginFactory
Definition:
PluginFactory.h:32
metsig::tau
Definition:
SignAlgoResolutions.h:40
reco::tau::RecoTauRandomCleanerPlugin::~RecoTauRandomCleanerPlugin
~RecoTauRandomCleanerPlugin() override
Definition:
RecoTauRandomCleanerPlugin.cc:19
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:102
reco::tau::RecoTauCleanerPlugin
Definition:
RecoTauBuilderPlugins.h:116
reco::tau::RecoTauRandomCleanerPlugin::operator()
double operator()(const reco::PFTauRef &) const override
Definition:
RecoTauRandomCleanerPlugin.cc:31
eostools.move
def move(src, dest)
Definition:
eostools.py:510
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
reco::tau::RecoTauRandomCleanerPlugin
Definition:
RecoTauRandomCleanerPlugin.cc:16
Generated for CMSSW Reference Manual by
1.8.11