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
public
:
26
explicit
RecoTauStringCleanerPlugin
(
const
edm::ParameterSet
&);
27
~RecoTauStringCleanerPlugin
() {}
28
double
operator()
(
const
PFTauRef
&
tau
)
const
;
29
private
:
30
const
StringCutObjectSelector<PFTau>
selector_
;
31
const
StringObjectFunction<PFTau>
function_
;
32
double
failResult_
;
33
};
34
35
RecoTauStringCleanerPlugin::RecoTauStringCleanerPlugin
(
36
const
edm::ParameterSet
& pset):
RecoTauCleanerPlugin
(pset),
37
selector_(pset.getParameter<std::string>(
"selection"
)),
38
function_(pset.getParameter<std::string>(
"selectionPassFunction"
)),
39
failResult_(pset.getParameter<double>(
"selectionFailValue"
)) {}
40
41
double
RecoTauStringCleanerPlugin::operator()
(
const
PFTauRef
& cand)
const
{
42
if
(
selector_
(*cand))
43
return
function_
(*cand);
44
else
45
return
failResult_
;
46
}
47
48
}}
// end namespace reco::tau
49
50
#include "
FWCore/Framework/interface/MakerMacros.h
"
51
DEFINE_EDM_PLUGIN
(
RecoTauCleanerPluginFactory
,
52
reco::tau::RecoTauStringCleanerPlugin
,
53
"RecoTauStringCleanerPlugin"
);
PFTauFwd.h
StringObjectFunction
Definition:
StringObjectFunction.h:16
PFTau.h
RecoTauBuilderPlugins.h
StringCutObjectSelector
Definition:
StringCutObjectSelector.h:16
MakerMacros.h
reco::tau::RecoTauStringCleanerPlugin::function_
const StringObjectFunction< PFTau > function_
Definition:
RecoTauStringCleanerPlugin.cc:31
reco::tau::RecoTauStringCleanerPlugin::RecoTauStringCleanerPlugin
RecoTauStringCleanerPlugin(const edm::ParameterSet &)
Definition:
RecoTauStringCleanerPlugin.cc:35
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:105
reco::tau::RecoTauStringCleanerPlugin::~RecoTauStringCleanerPlugin
~RecoTauStringCleanerPlugin()
Definition:
RecoTauStringCleanerPlugin.cc:27
reco::tau::RecoTauStringCleanerPlugin::failResult_
double failResult_
Definition:
RecoTauStringCleanerPlugin.cc:32
StringObjectFunction.h
StringCutObjectSelector.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
reco::tau::RecoTauStringCleanerPlugin::selector_
const StringCutObjectSelector< PFTau > selector_
Definition:
RecoTauStringCleanerPlugin.cc:30
metsig::tau
Definition:
SignAlgoResolutions.h:41
reco::tau::RecoTauStringCleanerPlugin::operator()
double operator()(const PFTauRef &tau) const
Definition:
RecoTauStringCleanerPlugin.cc:41
edm::ParameterSet
Definition:
ParameterSet.h:35
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:207
reco::tau::RecoTauCleanerPlugin
Definition:
RecoTauBuilderPlugins.h:108
reco::tau::RecoTauStringCleanerPlugin
Definition:
RecoTauStringCleanerPlugin.cc:24
edm::Ref< PFTauCollection >
Generated for CMSSW Reference Manual by
1.8.5