test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
virtual
~RecoTauRandomCleanerPlugin
(){}
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
TrackValidation_cff.pset
tuple pset
Definition:
TrackValidation_cff.py:374
edm::ParameterSet::exists
bool exists(std::string const ¶meterName) const
checks if a parameter exists
Definition:
ParameterSet.cc:760
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:107
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:31
eostools.move
def move
Definition:
eostools.py:510
metsig::tau
Definition:
SignAlgoResolutions.h:40
convertSQLitetoXML_cfg.output
tuple output
Definition:
convertSQLitetoXML_cfg.py:32
reco::tau::RecoTauRandomCleanerPlugin::~RecoTauRandomCleanerPlugin
virtual ~RecoTauRandomCleanerPlugin()
Definition:
RecoTauRandomCleanerPlugin.cc:19
reco::tau::RecoTauRandomCleanerPlugin::operator()
double operator()(const reco::PFTauRef &) const override
Definition:
RecoTauRandomCleanerPlugin.cc:31
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
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
reco::tau::RecoTauRandomCleanerPlugin
Definition:
RecoTauRandomCleanerPlugin.cc:16
Generated for CMSSW Reference Manual by
1.8.5