src
RecoTauTag
RecoTau
plugins
RecoTauSoftTwoProngTausCleanerPlugin.cc
Go to the documentation of this file.
1
/*
2
* RecoTauSoftTwoProngTausCleanerPlugin
3
*
4
* Author: Christian Veelken, NICPB Tallinn
5
*
6
* Remove 2-prong PFTaus with a low pT track, in order to reduce rate of 1-prong taus migrating to 2-prong decay mode
7
*/
8
9
#include "
RecoTauTag/RecoTau/interface/RecoTauBuilderPlugins.h
"
10
#include "
DataFormats/TauReco/interface/PFTauDiscriminator.h
"
11
#include "
RecoTauTag/RecoTau/interface/pfRecoTauChargedHadronAuxFunctions.h
"
12
13
namespace
reco
{
14
namespace
tau
{
15
16
class
RecoTauSoftTwoProngTausCleanerPlugin
:
public
RecoTauCleanerPlugin
{
17
public
:
18
RecoTauSoftTwoProngTausCleanerPlugin
(
const
edm::ParameterSet
&
pset
,
edm::ConsumesCollector
&& iC);
19
20
// Get ranking value for a given tau Ref
21
double
operator()
(
const
reco::PFTauRef
&)
const override
;
22
23
private
:
24
double
minTrackPt_
;
25
};
26
27
RecoTauSoftTwoProngTausCleanerPlugin::RecoTauSoftTwoProngTausCleanerPlugin
(
const
edm::ParameterSet
&
pset
,
28
edm::ConsumesCollector
&& iC)
29
:
RecoTauCleanerPlugin
(
pset
,
std
::
move
(iC)) {
30
minTrackPt_
=
pset
.getParameter<
double
>(
"minTrackPt"
);
31
}
32
33
double
RecoTauSoftTwoProngTausCleanerPlugin::operator()
(
const
reco::PFTauRef
&
tau
)
const
{
34
double
result
= 0.;
35
const
std::vector<PFRecoTauChargedHadron>& chargedHadrons =
tau
->signalTauChargedHadronCandidates();
36
if
(chargedHadrons.size() == 2) {
37
for
(std::vector<PFRecoTauChargedHadron>::const_iterator
chargedHadron
= chargedHadrons.begin();
38
chargedHadron
!= chargedHadrons.end();
39
++
chargedHadron
) {
40
const
reco::Track
*
track
=
getTrackFromChargedHadron
(*
chargedHadron
);
41
if
(!(
track
!=
nullptr
&&
track
->pt() >
minTrackPt_
))
42
result
+= 1.e+3;
43
}
44
}
45
return
result
;
46
}
47
48
}
// namespace tau
49
}
// namespace reco
50
51
// Register our plugin
52
#include "
FWCore/Framework/interface/MakerMacros.h
"
53
DEFINE_EDM_PLUGIN
(
RecoTauCleanerPluginFactory
,
54
reco::tau::RecoTauSoftTwoProngTausCleanerPlugin
,
55
"RecoTauSoftTwoProngTausCleanerPlugin"
);
pfRecoTauChargedHadronAuxFunctions.h
mps_fire.result
result
Definition:
mps_fire.py:311
edm::Ref< PFTauCollection >
RecoTauBuilderPlugins.h
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
std
Definition:
JetResolutionObject.h:76
PFTauDiscriminator.h
reco::tau::RecoTauSoftTwoProngTausCleanerPlugin::RecoTauSoftTwoProngTausCleanerPlugin
RecoTauSoftTwoProngTausCleanerPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
Definition:
RecoTauSoftTwoProngTausCleanerPlugin.cc:27
edmplugin::PluginFactory
Definition:
PluginFactory.h:35
metsig::tau
Definition:
SignAlgoResolutions.h:49
HPSPFTauProducerPuppi_cfi.chargedHadron
chargedHadron
Definition:
HPSPFTauProducerPuppi_cfi.py:7
reco::Track
Definition:
Track.h:27
reco::tau::getTrackFromChargedHadron
const reco::Track * getTrackFromChargedHadron(const reco::PFRecoTauChargedHadron &chargedHadron)
Definition:
pfRecoTauChargedHadronAuxFunctions.cc:12
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
reco::tau::RecoTauSoftTwoProngTausCleanerPlugin
Definition:
RecoTauSoftTwoProngTausCleanerPlugin.cc:16
HLT_2022v15_cff.track
track
Definition:
HLT_2022v15_cff.py:9644
reco::tau::RecoTauSoftTwoProngTausCleanerPlugin::operator()
double operator()(const reco::PFTauRef &) const override
Definition:
RecoTauSoftTwoProngTausCleanerPlugin.cc:33
edm::ParameterSet
Definition:
ParameterSet.h:47
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:123
reco::tau::RecoTauCleanerPlugin
Definition:
RecoTauBuilderPlugins.h:113
MakerMacros.h
reco::tau::RecoTauSoftTwoProngTausCleanerPlugin::minTrackPt_
double minTrackPt_
Definition:
RecoTauSoftTwoProngTausCleanerPlugin.cc:24
eostools.move
def move(src, dest)
Definition:
eostools.py:511
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.14