test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoTauTag
RecoTau
plugins
CaloRecoTauDiscriminationByNProngs.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 CaloRecoTauDiscriminationByNProngs
5
* created : September 23 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
13
class
CaloRecoTauDiscriminationByNProngs
14
:
public
CaloTauDiscriminationProducerBase
{
15
public
:
16
explicit
CaloRecoTauDiscriminationByNProngs
(
const
edm::ParameterSet
& iConfig)
17
:
CaloTauDiscriminationProducerBase
(iConfig) {
18
nprongs = iConfig.
getParameter
<uint32_t>(
"nProngs"
);
19
booleanOutput = iConfig.
getParameter
<
bool
>(
"BooleanOutput"
);
20
}
21
~CaloRecoTauDiscriminationByNProngs
(){}
22
double
discriminate(
const
reco::CaloTauRef
&)
override
;
23
24
private
:
25
uint32_t
nprongs
;
26
bool
booleanOutput
;
27
};
28
29
30
double
CaloRecoTauDiscriminationByNProngs::discriminate
(
const
CaloTauRef
&
tau
){
31
bool
accepted =
false
;
32
int
np
= tau->signalTracks().size();
33
if
((np == 1 && (nprongs == 1 || nprongs == 0)) ||
34
(np == 3 && (nprongs == 3 || nprongs == 0)) ) accepted =
true
;
35
if
(!accepted) np = 0;
36
if
(booleanOutput)
return
accepted;
37
return
np
;
38
}
39
40
DEFINE_FWK_MODULE
(
CaloRecoTauDiscriminationByNProngs
);
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TauDiscriminationProducerBase.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
CaloRecoTauDiscriminationByNProngs::CaloRecoTauDiscriminationByNProngs
CaloRecoTauDiscriminationByNProngs(const edm::ParameterSet &iConfig)
Definition:
CaloRecoTauDiscriminationByNProngs.cc:16
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:107
np
int np
Definition:
AMPTWrapper.h:33
metsig::tau
Definition:
SignAlgoResolutions.h:40
CaloRecoTauDiscriminationByNProngs::booleanOutput
bool booleanOutput
Definition:
CaloRecoTauDiscriminationByNProngs.cc:26
TauDiscriminationProducerBase
Definition:
TauDiscriminationProducerBase.h:48
CaloRecoTauDiscriminationByNProngs
Definition:
CaloRecoTauDiscriminationByNProngs.cc:13
CaloRecoTauDiscriminationByNProngs::~CaloRecoTauDiscriminationByNProngs
~CaloRecoTauDiscriminationByNProngs()
Definition:
CaloRecoTauDiscriminationByNProngs.cc:21
InputTag.h
edm::ParameterSet
Definition:
ParameterSet.h:35
CaloRecoTauDiscriminationByNProngs::nprongs
uint32_t nprongs
Definition:
CaloRecoTauDiscriminationByNProngs.cc:25
CaloRecoTauDiscriminationByNProngs::discriminate
double discriminate(const reco::CaloTauRef &) override
Definition:
CaloRecoTauDiscriminationByNProngs.cc:30
edm::Ref
Definition:
AssociativeIterator.h:51
Generated for CMSSW Reference Manual by
1.8.5