RecoTauTag
RecoTau
plugins
RecoTauPiZeroQualityPlugins.cc
Go to the documentation of this file.
1
/*
2
* RecoTauPiZeroStringQuality
3
*
4
* Author: Evan K. Friis, UC Davis
5
*
6
* RecoTau quality plugin that returns the value given by the supplied string
7
* expression. A string cut can additionally be applied. The PiZeros
8
* that fail the cut will be associated with a default value.
9
*
10
*
11
*/
12
13
#include "
RecoTauTag/RecoTau/interface/RecoTauPiZeroPlugins.h
"
14
#include "
DataFormats/TauReco/interface/RecoTauPiZero.h
"
15
16
#include "
CommonTools/Utils/interface/StringCutObjectSelector.h
"
17
#include "
CommonTools/Utils/interface/StringObjectFunction.h
"
18
19
namespace
reco
{
20
namespace
tau
{
21
22
class
RecoTauPiZeroStringQuality
:
public
RecoTauPiZeroQualityPlugin
{
23
public
:
24
explicit
RecoTauPiZeroStringQuality
(
const
edm::ParameterSet
&);
25
~RecoTauPiZeroStringQuality
()
override
{}
26
double
operator()
(
const
RecoTauPiZero
&)
const override
;
27
28
private
:
29
const
StringCutObjectSelector<RecoTauPiZero>
selector_
;
30
const
StringObjectFunction<RecoTauPiZero>
function_
;
31
double
failResult_
;
32
};
33
34
RecoTauPiZeroStringQuality::RecoTauPiZeroStringQuality
(
const
edm::ParameterSet
&
pset
)
35
:
RecoTauPiZeroQualityPlugin
(
pset
),
36
selector_(
pset
.getParameter<
std
::
string
>(
"selection"
)),
37
function_(
pset
.getParameter<
std
::
string
>(
"selectionPassFunction"
)),
38
failResult_(
pset
.getParameter<double>(
"selectionFailValue"
)) {}
39
40
double
RecoTauPiZeroStringQuality::operator()
(
const
RecoTauPiZero
&
cand
)
const
{
41
if
(
selector_
(
cand
)) {
42
return
function_
(
cand
);
43
}
else
{
44
return
failResult_
;
45
}
46
}
47
}
// namespace tau
48
}
// namespace reco
49
50
#include "
FWCore/Framework/interface/MakerMacros.h
"
51
DEFINE_EDM_PLUGIN
(
RecoTauPiZeroQualityPluginFactory
,
52
reco::tau::RecoTauPiZeroStringQuality
,
53
"RecoTauPiZeroStringQuality"
);
StringObjectFunction
Definition:
StringObjectFunction.h:16
StringCutObjectSelector
Definition:
StringCutObjectSelector.h:16
reco::tau::RecoTauPiZeroStringQuality::~RecoTauPiZeroStringQuality
~RecoTauPiZeroStringQuality() override
Definition:
RecoTauPiZeroQualityPlugins.cc:25
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
std
Definition:
JetResolutionObject.h:76
reco::tau::RecoTauPiZeroStringQuality::function_
const StringObjectFunction< RecoTauPiZero > function_
Definition:
RecoTauPiZeroQualityPlugins.cc:30
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
StringObjectFunction.h
reco::tau::RecoTauPiZeroStringQuality::RecoTauPiZeroStringQuality
RecoTauPiZeroStringQuality(const edm::ParameterSet &)
Definition:
RecoTauPiZeroQualityPlugins.cc:34
reco::tau::RecoTauPiZeroStringQuality::operator()
double operator()(const RecoTauPiZero &) const override
Return a number indicating the quality of this PiZero.
Definition:
RecoTauPiZeroQualityPlugins.cc:40
StringCutObjectSelector.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:35
reco::tau::RecoTauPiZeroQualityPlugin
Definition:
RecoTauPiZeroPlugins.h:46
reco::tau::RecoTauPiZeroStringQuality::selector_
const StringCutObjectSelector< RecoTauPiZero > selector_
Definition:
RecoTauPiZeroQualityPlugins.cc:29
metsig::tau
Definition:
SignAlgoResolutions.h:49
RecoTauPiZero.h
RecoTauPiZeroPlugins.h
reco::tau::RecoTauPiZeroStringQuality::failResult_
double failResult_
Definition:
RecoTauPiZeroQualityPlugins.cc:31
reco::RecoTauPiZero
Definition:
RecoTauPiZero.h:7
reco::tau::RecoTauPiZeroStringQuality
Definition:
RecoTauPiZeroQualityPlugins.cc:22
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
edm::ParameterSet
Definition:
ParameterSet.h:47
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:123
cand
Definition:
decayParser.h:32
MakerMacros.h
Generated for CMSSW Reference Manual by
1.8.14