Main Page
Namespaces
Classes
Package Documentation
RecoTauTag
TauTagTools
plugins
RecoTauRandomDiscriminant.cc
Go to the documentation of this file.
1
/*
2
* Produce a tau discriminator that produces a random discriminant output,
3
* useful for testing.
4
*
5
* Author: Evan Friis, UC Davis
6
*
7
*/
8
9
#include "
RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h
"
10
#include "TRandom3.h"
11
12
namespace
{
13
class
PFTauRandomDiscriminator final :
public
PFTauDiscriminationProducerBase
{
14
public
:
15
PFTauRandomDiscriminator(
const
edm::ParameterSet
&
pset
):
16
PFTauDiscriminationProducerBase
(pset) {
17
passRate_ = pset.
getParameter
<
double
>(
"passRate"
);
18
}
19
20
double
discriminate
(
const
reco::PFTauRef
&
tau
)
const override
{
21
return
randy_.Rndm() < passRate_;
22
}
23
private
:
24
mutable
TRandom3 randy_;
25
double
passRate_;
26
};
27
}
28
DEFINE_FWK_MODULE
(PFTauRandomDiscriminator);
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TauDiscriminationProducerBase.h
edm::Ref< PFTauCollection >
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
metsig::tau
Definition:
SignAlgoResolutions.h:40
TauDiscriminationProducerBase::discriminate
virtual double discriminate(const TauRef &tau) const =0
TauDiscriminationProducerBase
Definition:
TauDiscriminationProducerBase.h:51
edm::ParameterSet
Definition:
ParameterSet.h:36
Generated for CMSSW Reference Manual by
1.8.11