Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoTauTag
RecoTau
plugins
RecoTauStringCleanerPlugin.cc
Go to the documentation of this file.
1
/*
2
* =====================================================================================
3
* Filename: RecoTauStringCleanerPlugin.cc
4
*
5
* Description: Rank taus by a string function. There are three arguments,
6
* a binary [selection] string, an expression to return if that
7
* selection passes, and value to return if the selection
8
* fails.
9
* Created: 11/11/2010 11:09:52
10
*
11
* Author: Evan K. Friis (UC Davis), evan.klose.friis@cern.ch
12
* =====================================================================================
13
*/
14
15
#include "
RecoTauTag/RecoTau/interface/RecoTauBuilderPlugins.h
"
16
#include "
DataFormats/TauReco/interface/PFTau.h
"
17
#include "
DataFormats/TauReco/interface/PFTauFwd.h
"
18
19
#include "
CommonTools/Utils/interface/StringCutObjectSelector.h
"
20
#include "
CommonTools/Utils/interface/StringObjectFunction.h
"
21
22
namespace
reco
{
namespace
tau
{
23
24
class
RecoTauStringCleanerPlugin
:
public
RecoTauCleanerPlugin
25
{
26
public
:
27
explicit
RecoTauStringCleanerPlugin
(
const
edm::ParameterSet
&,
edm::ConsumesCollector
&&iC);
28
~RecoTauStringCleanerPlugin
() {}
29
double
operator()
(
const
PFTauRef
&
tau
)
const override
;
30
31
private
:
32
const
StringCutObjectSelector<PFTau>
selector_
;
33
const
StringObjectFunction<PFTau>
function_
;
34
double
failResult_
;
35
};
36
37
RecoTauStringCleanerPlugin::RecoTauStringCleanerPlugin
(
const
edm::ParameterSet
& pset,
edm::ConsumesCollector
&&iC)
38
:
RecoTauCleanerPlugin
(pset,std::move(iC)),
39
selector_(pset.getParameter<std::
string
>(
"selection"
)),
40
function_(pset.getParameter<std::
string
>(
"selectionPassFunction"
)),
41
failResult_(pset.getParameter<double>(
"selectionFailValue"
))
42
{}
43
44
double
RecoTauStringCleanerPlugin::operator()
(
const
PFTauRef
& cand)
const
45
{
46
if
(
selector_
(*cand) )
return
function_
(*cand);
47
else
return
failResult_
;
48
}
49
50
}}
// end namespace reco::tau
51
52
#include "
FWCore/Framework/interface/MakerMacros.h
"
53
54
DEFINE_EDM_PLUGIN
(
RecoTauCleanerPluginFactory
,
reco::tau::RecoTauStringCleanerPlugin
,
"RecoTauStringCleanerPlugin"
);
PFTauFwd.h
StringObjectFunction
Definition:
StringObjectFunction.h:16
PFTau.h
reco::tau::RecoTauStringCleanerPlugin::RecoTauStringCleanerPlugin
RecoTauStringCleanerPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
Definition:
RecoTauStringCleanerPlugin.cc:37
RecoTauBuilderPlugins.h
StringCutObjectSelector
Definition:
StringCutObjectSelector.h:16
MakerMacros.h
reco::tau::RecoTauStringCleanerPlugin::function_
const StringObjectFunction< PFTau > function_
Definition:
RecoTauStringCleanerPlugin.cc:33
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:105
reco::tau::RecoTauStringCleanerPlugin::~RecoTauStringCleanerPlugin
~RecoTauStringCleanerPlugin()
Definition:
RecoTauStringCleanerPlugin.cc:28
reco::tau::RecoTauStringCleanerPlugin::failResult_
double failResult_
Definition:
RecoTauStringCleanerPlugin.cc:34
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
StringObjectFunction.h
StringCutObjectSelector.h
reco::tau::RecoTauStringCleanerPlugin::operator()
double operator()(const PFTauRef &tau) const override
Definition:
RecoTauStringCleanerPlugin.cc:44
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
reco::tau::RecoTauStringCleanerPlugin::selector_
const StringCutObjectSelector< PFTau > selector_
Definition:
RecoTauStringCleanerPlugin.cc:32
metsig::tau
Definition:
SignAlgoResolutions.h:40
edm::ParameterSet
Definition:
ParameterSet.h:35
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:101
reco::tau::RecoTauCleanerPlugin
Definition:
RecoTauBuilderPlugins.h:115
reco::tau::RecoTauStringCleanerPlugin
Definition:
RecoTauStringCleanerPlugin.cc:24
edm::Ref< PFTauCollection >
edm::ConsumesCollector
Definition:
ConsumesCollector.h:32
Generated for CMSSW Reference Manual by
1.8.5