Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoTauTag
RecoTau
plugins
CaloRecoTauDiscriminationByCharge.cc
Go to the documentation of this file.
1
#include "
RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h
"
2
3
/* class CaloRecoTauDiscriminationByCharge
4
*
5
* Discriminates taus by a |charge| == 1 requirement,
6
* and optionally nTracks == 1 || 3
7
*
8
* Authors : S.Lehti, copied from PFRecoTauDiscriminationByCharge
9
*/
10
11
class
CaloRecoTauDiscriminationByCharge
:
public
CaloTauDiscriminationProducerBase
{
12
public
:
13
explicit
CaloRecoTauDiscriminationByCharge
(
const
edm::ParameterSet
& iConfig)
14
:
CaloTauDiscriminationProducerBase
(iConfig){
15
chargeReq_
= iConfig.
getParameter
<uint32_t>(
"AbsChargeReq"
);
16
oneOrThreeProng_
=
17
iConfig.
getParameter
<
bool
>(
"ApplyOneOrThreeProngCut"
);
18
}
19
~CaloRecoTauDiscriminationByCharge
(){}
20
double
discriminate
(
const
reco::CaloTauRef
& pfTau)
override
;
21
private
:
22
uint32_t
chargeReq_
;
23
bool
oneOrThreeProng_
;
24
};
25
26
double
CaloRecoTauDiscriminationByCharge::discriminate
(
27
const
reco::CaloTauRef
& theTauRef) {
28
uint16_t nSigTk = theTauRef->signalTracks().size();
29
bool
chargeok = (
abs
(theTauRef->charge()) ==
int
(
chargeReq_
));
30
bool
oneOrThreeProngOK = ( (nSigTk==1) || (nSigTk==3) || !
oneOrThreeProng_
);
31
32
return
( (chargeok && oneOrThreeProngOK) ? 1. : 0. );
33
}
34
DEFINE_FWK_MODULE
(
CaloRecoTauDiscriminationByCharge
);
CaloRecoTauDiscriminationByCharge
Definition:
CaloRecoTauDiscriminationByCharge.cc:11
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TauDiscriminationProducerBase.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
CaloRecoTauDiscriminationByCharge::oneOrThreeProng_
bool oneOrThreeProng_
Definition:
CaloRecoTauDiscriminationByCharge.cc:23
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
TauDiscriminationProducerBase
Definition:
TauDiscriminationProducerBase.h:48
CaloRecoTauDiscriminationByCharge::~CaloRecoTauDiscriminationByCharge
~CaloRecoTauDiscriminationByCharge()
Definition:
CaloRecoTauDiscriminationByCharge.cc:19
CaloRecoTauDiscriminationByCharge::CaloRecoTauDiscriminationByCharge
CaloRecoTauDiscriminationByCharge(const edm::ParameterSet &iConfig)
Definition:
CaloRecoTauDiscriminationByCharge.cc:13
edm::ParameterSet
Definition:
ParameterSet.h:35
CaloRecoTauDiscriminationByCharge::chargeReq_
uint32_t chargeReq_
Definition:
CaloRecoTauDiscriminationByCharge.cc:22
edm::Ref
Definition:
AssociativeIterator.h:51
CaloRecoTauDiscriminationByCharge::discriminate
double discriminate(const reco::CaloTauRef &pfTau) override
Definition:
CaloRecoTauDiscriminationByCharge.cc:26
Generated for CMSSW Reference Manual by
1.8.5