Main Page
Namespaces
Classes
Package Documentation
RecoTauTag
RecoTau
plugins
PFRecoTauDiscriminationByTauPolarization.cc
Go to the documentation of this file.
1
#include "
RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h
"
2
3
/* class PFRecoTauDiscriminationByTauPolarization
4
* created : May 26 2010,
5
* contributors : Sami Lehti (sami.lehti@cern.ch ; HIP, Helsinki)
6
*/
7
8
using namespace
reco
;
9
using namespace
std
;
10
using namespace
edm
;
11
12
class
PFRecoTauDiscriminationByTauPolarization
:
13
public
PFTauDiscriminationProducerBase
{
14
public
:
15
explicit
PFRecoTauDiscriminationByTauPolarization
(
16
const
ParameterSet
& iConfig)
17
:
PFTauDiscriminationProducerBase
(iConfig) {
// retrieve quality cuts
18
rTauMin = iConfig.
getParameter
<
double
>(
"rtau"
);
19
booleanOutput = iConfig.
getParameter
<
bool
>(
"BooleanOutput"
);
20
}
21
22
~PFRecoTauDiscriminationByTauPolarization
()
override
{}
23
24
void
beginEvent(
const
Event
&,
const
EventSetup
&)
override
;
25
double
discriminate(
const
PFTauRef
&)
const override
;
26
27
private
:
28
bool
booleanOutput
;
29
double
rTauMin
;
30
};
31
32
void
PFRecoTauDiscriminationByTauPolarization::beginEvent
(
33
const
Event
&
event
,
const
EventSetup
& eventSetup){}
34
35
double
36
PFRecoTauDiscriminationByTauPolarization::discriminate
(
const
PFTauRef
&
tau
)
const
{
37
38
double
rTau = 0;
39
// rtau for PFTau has to be calculated for leading PF charged hadronic candidate
40
// calculating it from leadingTrack can (and will) give rtau > 1!
41
if
(tau.
isNonnull
() && tau->p() > 0
42
&& tau->leadPFChargedHadrCand().
isNonnull
()) {
43
rTau = tau->leadPFChargedHadrCand()->p()/tau->p();
44
}
45
46
if
(booleanOutput)
return
( rTau > rTauMin ? 1. : 0. );
47
return
rTau;
48
}
49
50
DEFINE_FWK_MODULE
(
PFRecoTauDiscriminationByTauPolarization
);
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PFRecoTauDiscriminationByTauPolarization::rTauMin
double rTauMin
Definition:
PFRecoTauDiscriminationByTauPolarization.cc:29
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition:
Ref.h:253
PFRecoTauDiscriminationByTauPolarization::booleanOutput
bool booleanOutput
Definition:
PFRecoTauDiscriminationByTauPolarization.cc:28
PFRecoTauDiscriminationByTauPolarization::PFRecoTauDiscriminationByTauPolarization
PFRecoTauDiscriminationByTauPolarization(const ParameterSet &iConfig)
Definition:
PFRecoTauDiscriminationByTauPolarization.cc:15
PFRecoTauDiscriminationByTauPolarization::beginEvent
void beginEvent(const Event &, const EventSetup &) override
Definition:
PFRecoTauDiscriminationByTauPolarization.cc:32
TauDiscriminationProducerBase.h
edm::Ref< PFTauCollection >
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
std
Definition:
JetResolutionObject.h:80
PFRecoTauDiscriminationByTauPolarization::discriminate
double discriminate(const PFTauRef &) const override
Definition:
PFRecoTauDiscriminationByTauPolarization.cc:36
PFRecoTauDiscriminationByTauPolarization::~PFRecoTauDiscriminationByTauPolarization
~PFRecoTauDiscriminationByTauPolarization() override
Definition:
PFRecoTauDiscriminationByTauPolarization.cc:22
metsig::tau
Definition:
SignAlgoResolutions.h:40
edm::EventSetup
Definition:
EventSetup.h:54
TauDiscriminationProducerBase
Definition:
TauDiscriminationProducerBase.h:51
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:43
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::Event
Definition:
Event.h:70
PFRecoTauDiscriminationByTauPolarization
Definition:
PFRecoTauDiscriminationByTauPolarization.cc:12
event
Definition:
event.py:1
Generated for CMSSW Reference Manual by
1.8.11