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
{
23
namespace
tau
{
24
25
class
RecoTauStringCleanerPlugin
:
public
RecoTauCleanerPlugin
{
26
public
:
27
explicit
RecoTauStringCleanerPlugin
(
const
edm::ParameterSet
&,
edm::ConsumesCollector
&& iC);
28
~RecoTauStringCleanerPlugin
()
override
{}
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
double
RecoTauStringCleanerPlugin::operator()
(
const
PFTauRef
&
cand
)
const
{
44
if
(
selector_
(*
cand
))
45
return
function_
(*
cand
);
46
else
47
return
failResult_
;
48
}
49
50
}
// namespace tau
51
}
// namespace reco
52
53
#include "
FWCore/Framework/interface/MakerMacros.h
"
54
55
DEFINE_EDM_PLUGIN
(
RecoTauCleanerPluginFactory
,
reco::tau::RecoTauStringCleanerPlugin
,
"RecoTauStringCleanerPlugin"
);
PFTauFwd.h
StringObjectFunction< PFTau >
edm::Ref< PFTauCollection >
reco::tau::RecoTauStringCleanerPlugin::RecoTauStringCleanerPlugin
RecoTauStringCleanerPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
Definition:
RecoTauStringCleanerPlugin.cc:37
RecoTauBuilderPlugins.h
StringCutObjectSelector< PFTau >
reco::tau::RecoTauStringCleanerPlugin::~RecoTauStringCleanerPlugin
~RecoTauStringCleanerPlugin() override
Definition:
RecoTauStringCleanerPlugin.cc:28
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
reco::tau::RecoTauStringCleanerPlugin::function_
const StringObjectFunction< PFTau > function_
Definition:
RecoTauStringCleanerPlugin.cc:33
std
Definition:
JetResolutionObject.h:76
PFTau.h
reco::tau::RecoTauStringCleanerPlugin::failResult_
double failResult_
Definition:
RecoTauStringCleanerPlugin.cc:34
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
StringObjectFunction.h
StringCutObjectSelector.h
reco::tau::RecoTauStringCleanerPlugin::operator()
double operator()(const PFTauRef &tau) const override
Definition:
RecoTauStringCleanerPlugin.cc:43
edmplugin::PluginFactory
Definition:
PluginFactory.h:35
reco::tau::RecoTauStringCleanerPlugin::selector_
const StringCutObjectSelector< PFTau > selector_
Definition:
RecoTauStringCleanerPlugin.cc:32
tau
Definition:
TauWPThreshold.h:12
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
edm::ParameterSet
Definition:
ParameterSet.h:48
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:123
cand
Definition:
decayParser.h:32
reco::tau::RecoTauCleanerPlugin
Definition:
RecoTauBuilderPlugins.h:113
reco::tau::RecoTauStringCleanerPlugin
Definition:
RecoTauStringCleanerPlugin.cc:25
MakerMacros.h
eostools.move
def move(src, dest)
Definition:
eostools.py:511
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.14