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