Main Page
Namespaces
Classes
Package Documentation
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
()
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
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< PFTau >
PFTau.h
edm::Ref< PFTauCollection >
reco::tau::RecoTauStringCleanerPlugin::RecoTauStringCleanerPlugin
RecoTauStringCleanerPlugin(const edm::ParameterSet &, edm::ConsumesCollector &&iC)
Definition:
RecoTauStringCleanerPlugin.cc:37
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
RecoTauBuilderPlugins.h
StringCutObjectSelector< PFTau >
MakerMacros.h
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:80
reco::tau::RecoTauStringCleanerPlugin::failResult_
double failResult_
Definition:
RecoTauStringCleanerPlugin.cc:34
StringObjectFunction.h
StringCutObjectSelector.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:32
reco::tau::RecoTauStringCleanerPlugin::selector_
const StringCutObjectSelector< PFTau > selector_
Definition:
RecoTauStringCleanerPlugin.cc:32
metsig::tau
Definition:
SignAlgoResolutions.h:40
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:43
reco::tau::RecoTauStringCleanerPlugin::operator()
double operator()(const PFTauRef &tau) const override
Definition:
RecoTauStringCleanerPlugin.cc:44
edm::ParameterSet
Definition:
ParameterSet.h:36
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:109
cand
Definition:
decayParser.h:34
reco::tau::RecoTauCleanerPlugin
Definition:
RecoTauBuilderPlugins.h:116
reco::tau::RecoTauStringCleanerPlugin
Definition:
RecoTauStringCleanerPlugin.cc:24
eostools.move
def move(src, dest)
Definition:
eostools.py:511
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
Generated for CMSSW Reference Manual by
1.8.11