Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoTauTag
RecoTau
plugins
PFRecoTauDiscriminationByNProngs.cc
Go to the documentation of this file.
1
#include "
RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h
"
2
#include "
FWCore/Utilities/interface/InputTag.h
"
3
4
/* class PFRecoTauDiscriminationByNProngs
5
* created : August 30 2010,
6
* contributors : Sami Lehti (sami.lehti@cern.ch ; HIP, Helsinki)
7
* based on H+ tau ID by Lauri Wendland
8
*/
9
10
using namespace
reco
;
11
using namespace
std;
12
using namespace
edm;
13
14
class
PFRecoTauDiscriminationByNProngs
:
public
PFTauDiscriminationProducerBase
{
15
public
:
16
explicit
PFRecoTauDiscriminationByNProngs
(
const
ParameterSet
& iConfig):
PFTauDiscriminationProducerBase
(iConfig){
17
nprongs = iConfig.
getParameter
<uint32_t>(
"nProngs"
);
18
booleanOutput = iConfig.
getParameter
<
bool
>(
"BooleanOutput"
);
19
}
20
21
~PFRecoTauDiscriminationByNProngs
(){}
22
23
void
beginEvent(
const
edm::Event
&,
const
edm::EventSetup
&);
24
double
discriminate(
const
reco::PFTauRef
&);
25
26
private
:
27
28
uint32_t
nprongs
;
29
bool
booleanOutput
;
30
};
31
32
void
PFRecoTauDiscriminationByNProngs::beginEvent
(
const
Event
&
iEvent
,
const
EventSetup
& iSetup){}
33
34
double
PFRecoTauDiscriminationByNProngs::discriminate
(
const
PFTauRef
&
tau
){
35
36
bool
accepted =
false
;
37
int
np
= tau->signalTracks().size();
38
39
if
((np == 1 && (nprongs == 1 || nprongs == 0)) ||
40
(np == 3 && (nprongs == 3 || nprongs == 0)) ) accepted =
true
;
41
42
if
(!accepted) np = 0;
43
if
(booleanOutput)
return
accepted;
44
return
np
;
45
}
46
47
DEFINE_FWK_MODULE
(
PFRecoTauDiscriminationByNProngs
);
48
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PFRecoTauDiscriminationByNProngs::discriminate
double discriminate(const reco::PFTauRef &)
Definition:
PFRecoTauDiscriminationByNProngs.cc:34
TauDiscriminationProducerBase.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:105
iEvent
int iEvent
Definition:
GenABIO.cc:243
np
int np
Definition:
AMPTWrapper.h:33
PFRecoTauDiscriminationByNProngs::nprongs
uint32_t nprongs
Definition:
PFRecoTauDiscriminationByNProngs.cc:28
PFRecoTauDiscriminationByNProngs
Definition:
PFRecoTauDiscriminationByNProngs.cc:14
PFRecoTauDiscriminationByNProngs::~PFRecoTauDiscriminationByNProngs
~PFRecoTauDiscriminationByNProngs()
Definition:
PFRecoTauDiscriminationByNProngs.cc:21
metsig::tau
Definition:
SignAlgoResolutions.h:41
edm::EventSetup
Definition:
EventSetup.h:44
TauDiscriminationProducerBase
Definition:
TauDiscriminationProducerBase.h:47
PFRecoTauDiscriminationByNProngs::beginEvent
void beginEvent(const edm::Event &, const edm::EventSetup &)
Definition:
PFRecoTauDiscriminationByNProngs.cc:32
PFRecoTauDiscriminationByNProngs::PFRecoTauDiscriminationByNProngs
PFRecoTauDiscriminationByNProngs(const ParameterSet &iConfig)
Definition:
PFRecoTauDiscriminationByNProngs.cc:16
InputTag.h
edm::ParameterSet
Definition:
ParameterSet.h:35
PFRecoTauDiscriminationByNProngs::booleanOutput
bool booleanOutput
Definition:
PFRecoTauDiscriminationByNProngs.cc:29
edm::Event
Definition:
Event.h:50
edm::Ref< PFTauCollection >
Generated for CMSSW Reference Manual by
1.8.5