Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
() {}
25
double
operator()
(
const
PFRecoTauChargedHadron
&)
const
;
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
StringCutObjectSelector
Definition:
StringCutObjectSelector.h:16
MakerMacros.h
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:105
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
StringObjectFunction.h
reco::tau::PFRecoTauChargedHadronStringQuality::failResult_
double failResult_
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:29
StringCutObjectSelector.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
reco::PFRecoTauChargedHadron
Definition:
PFRecoTauChargedHadron.h:20
reco::tau::PFRecoTauChargedHadronStringQuality::selector_
const StringCutObjectSelector< PFRecoTauChargedHadron > selector_
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:27
reco::tau::PFRecoTauChargedHadronQualityPlugin
Definition:
PFRecoTauChargedHadronPlugins.h:53
reco::tau::PFRecoTauChargedHadronStringQuality::operator()
double operator()(const PFRecoTauChargedHadron &) const
Return a number indicating the quality of this chargedHadron.
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:39
metsig::tau
Definition:
SignAlgoResolutions.h:40
reco::tau::PFRecoTauChargedHadronStringQuality::~PFRecoTauChargedHadronStringQuality
~PFRecoTauChargedHadronStringQuality()
Definition:
PFRecoTauChargedHadronQualityPlugins.cc:24
edm::ParameterSet
Definition:
ParameterSet.h:35
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:101
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.5