RecoTauTag
RecoTau
plugins
PFTauDiscriminatorLogicalAndProducer.cc
Go to the documentation of this file.
1
#include "
RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h
"
2
#include <
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
>
3
#include <
FWCore/ParameterSet/interface/ParameterSetDescription.h
>
4
5
/*
6
* class PFRecoTauDiscriminatioLogicalAndProducer
7
*
8
* Applies a boolean operator (AND or OR) to a set
9
* of PFTauDiscriminators. Note that the set of PFTauDiscriminators
10
* is accessed/combined in the base class (the Prediscriminants).
11
*
12
* This class merely exposes this behavior directly by
13
* returning true for all taus that pass the prediscriminants
14
*
15
* revised : Mon Aug 31 12:59:50 PDT 2009
16
* Authors : Michele Pioppi, Evan Friis (UC Davis)
17
*/
18
19
using namespace
reco
;
20
21
class
PFTauDiscriminatorLogicalAndProducer
:
public
PFTauDiscriminationProducerBase
{
22
public
:
23
explicit
PFTauDiscriminatorLogicalAndProducer
(
const
edm::ParameterSet
&);
24
~PFTauDiscriminatorLogicalAndProducer
()
override
{};
25
double
discriminate(
const
PFTauRef
& pfTau)
const override
;
26
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
27
28
private
:
29
double
passResult_
;
30
};
31
32
PFTauDiscriminatorLogicalAndProducer::PFTauDiscriminatorLogicalAndProducer
(
const
edm::ParameterSet
& iConfig)
33
:
PFTauDiscriminationProducerBase
(iConfig) {
34
passResult_
= iConfig.
getParameter
<
double
>(
"PassValue"
);
35
prediscriminantFailValue_
= iConfig.
getParameter
<
double
>(
"FailValue"
);
//defined in base class
36
}
37
38
double
PFTauDiscriminatorLogicalAndProducer::discriminate
(
const
PFTauRef
& pfTau)
const
{
39
// if this function is called on a tau, it is has passed (in the base class)
40
// the set of prediscriminants, using the prescribed boolean operation. thus
41
// we only need to return TRUE
42
return
passResult_
;
43
}
44
45
void
PFTauDiscriminatorLogicalAndProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
46
// PFTauDiscriminatorLogicalAndProducer
47
edm::ParameterSetDescription
desc
;
48
49
{
50
edm::ParameterSetDescription
psd0;
51
psd0.
add
<
std::string
>(
"BooleanOperator"
,
"and"
);
52
{
53
edm::ParameterSetDescription
psd1;
54
psd1.
add
<
double
>(
"cut"
, 0.5);
55
psd1.
add
<
edm::InputTag
>(
"Producer"
,
edm::InputTag
(
"pfRecoTauDiscriminationAgainstElectron"
));
56
psd0.
add
<
edm::ParameterSetDescription
>(
"discr2"
, psd1);
57
}
58
{
59
edm::ParameterSetDescription
psd1;
60
psd1.
add
<
double
>(
"cut"
, 0.5);
61
psd1.
add
<
edm::InputTag
>(
"Producer"
,
edm::InputTag
(
"pfRecoTauDiscriminationByIsolation"
));
62
psd0.
add
<
edm::ParameterSetDescription
>(
"discr1"
, psd1);
63
}
64
desc
.add<
edm::ParameterSetDescription
>(
"Prediscriminants"
, psd0);
65
}
66
67
desc
.add<
double
>(
"PassValue"
, 1.0);
68
desc
.add<
double
>(
"FailValue"
, 0.0);
69
desc
.add<
edm::InputTag
>(
"PFTauProducer"
,
edm::InputTag
(
"pfRecoTauProducer"
));
70
descriptions.
add
(
"PFTauDiscriminatorLogicalAndProducer"
,
desc
);
71
}
72
73
DEFINE_FWK_MODULE
(
PFTauDiscriminatorLogicalAndProducer
);
ConfigurationDescriptions.h
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition:
ParameterSetDescription.h:95
TauDiscriminationProducerBase.h
PFTauDiscriminatorLogicalAndProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
PFTauDiscriminatorLogicalAndProducer.cc:45
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89281
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
PFTauDiscriminatorLogicalAndProducer::~PFTauDiscriminatorLogicalAndProducer
~PFTauDiscriminatorLogicalAndProducer() override
Definition:
PFTauDiscriminatorLogicalAndProducer.cc:24
edm::Ref< PFTauCollection >
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
PFTauDiscriminatorLogicalAndProducer_cfi.PFTauDiscriminatorLogicalAndProducer
PFTauDiscriminatorLogicalAndProducer
Definition:
PFTauDiscriminatorLogicalAndProducer_cfi.py:10
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TauDiscriminationProducerBase
Definition:
TauDiscriminationProducerBase.h:55
PFTauDiscriminatorLogicalAndProducer::passResult_
double passResult_
Definition:
PFTauDiscriminatorLogicalAndProducer.cc:29
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
PFTauDiscriminatorLogicalAndProducer
Definition:
PFTauDiscriminatorLogicalAndProducer.cc:21
PFTauDiscriminatorLogicalAndProducer::PFTauDiscriminatorLogicalAndProducer
PFTauDiscriminatorLogicalAndProducer(const edm::ParameterSet &)
Definition:
PFTauDiscriminatorLogicalAndProducer.cc:32
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
PFTauDiscriminatorLogicalAndProducer::discriminate
double discriminate(const PFTauRef &pfTau) const override
Definition:
PFTauDiscriminatorLogicalAndProducer.cc:38
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::InputTag
Definition:
InputTag.h:15
TauDiscriminationProducerBase::prediscriminantFailValue_
double prediscriminantFailValue_
Definition:
TauDiscriminationProducerBase.h:102
Generated for CMSSW Reference Manual by
1.8.16