Main Page
Namespaces
Classes
Package Documentation
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
{
namespace
tau
{
19
20
class
PFRecoTauChargedHadronStringQuality
:
public
PFRecoTauChargedHadronQualityPlugin
21
{
22
public
:
23
explicit
PFRecoTauChargedHadronStringQuality
(
const
edm::ParameterSet
&);
24
~PFRecoTauChargedHadronStringQuality
()
override
{}
25
double
operator()
(
const
PFRecoTauChargedHadron
&)
const override
;
26
private
:
27
const
StringCutObjectSelector<PFRecoTauChargedHadron>
selector_
;
28
const
StringObjectFunction<PFRecoTauChargedHadron>
function_
;
29
double
failResult_
;
30
};
31
32
PFRecoTauChargedHadronStringQuality::PFRecoTauChargedHadronStringQuality
(
const
edm::ParameterSet
&
pset
)
33
:
PFRecoTauChargedHadronQualityPlugin
(pset),
34
selector_
(pset.getParameter<
std
::
string
>(
"selection"
)),
35
function_
(pset.getParameter<
std
::
string
>(
"selectionPassFunction"
)),
36
failResult_
(pset.getParameter<double>(
"selectionFailValue"
))
37
{}
38
39
double
PFRecoTauChargedHadronStringQuality::operator()
(
const
PFRecoTauChargedHadron
&
cand
)
const
40
{
41
if
(
selector_
(cand) )
return
function_
(cand);
42
else
return
failResult_
;
43
}
44
45
}}
// end namespace reco::tau
46
47
#include "
FWCore/Framework/interface/MakerMacros.h
"
48
49
DEFINE_EDM_PLUGIN
(
PFRecoTauChargedHadronQualityPluginFactory
,
reco::tau::PFRecoTauChargedHadronStringQuality
,
"PFRecoTauChargedHadronStringQuality"
);
reco::tau::PFRecoTauChargedHadronStringQuality::PFRecoTauChargedHadronStringQuality
PFRecoTauChargedHadronStringQuality(const edm::ParameterSet &)
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:32
StringObjectFunction
Definition:
StringObjectFunction.h:16
PFRecoTauChargedHadron.h
PFRecoTauChargedHadronPlugins.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
StringCutObjectSelector
Definition:
StringCutObjectSelector.h:16
MakerMacros.h
reco::tau::PFRecoTauChargedHadronStringQuality::~PFRecoTauChargedHadronStringQuality
~PFRecoTauChargedHadronStringQuality() override
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:24
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
std
Definition:
JetResolutionObject.h:80
StringObjectFunction.h
reco::tau::PFRecoTauChargedHadronStringQuality::failResult_
double failResult_
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:29
StringCutObjectSelector.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:33
reco::PFRecoTauChargedHadron
Definition:
PFRecoTauChargedHadron.h:21
reco::tau::PFRecoTauChargedHadronStringQuality::selector_
const StringCutObjectSelector< PFRecoTauChargedHadron > selector_
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:27
reco::tau::PFRecoTauChargedHadronQualityPlugin
Definition:
PFRecoTauChargedHadronPlugins.h:53
metsig::tau
Definition:
SignAlgoResolutions.h:40
reco::tau::PFRecoTauChargedHadronStringQuality::operator()
double operator()(const PFRecoTauChargedHadron &) const override
Return a number indicating the quality of this chargedHadron.
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:39
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:44
edm::ParameterSet
Definition:
ParameterSet.h:36
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:121
cand
Definition:
decayParser.h:34
reco::tau::PFRecoTauChargedHadronStringQuality
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:20
reco::tau::PFRecoTauChargedHadronStringQuality::function_
const StringObjectFunction< PFRecoTauChargedHadron > function_
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:28
Generated for CMSSW Reference Manual by
1.8.11