RecoTauTag
HLTProducers
src
DQMTauProducer.cc
Go to the documentation of this file.
1
#include "
RecoTauTag/HLTProducers/interface/DQMTauProducer.h
"
2
#include "
DataFormats/TrackReco/interface/Track.h
"
3
//
4
// class decleration
5
//
6
7
DQMTauProducer::DQMTauProducer
(
const
edm::ParameterSet
& iConfig) {
8
trackIsolatedJets_
=
9
consumes<reco::IsolatedTauTagInfoCollection>(iConfig.
getParameter
<
edm::InputTag
>(
"TrackIsoJets"
));
10
matchingCone_
= iConfig.
getParameter
<
double
>(
"MatchingCone"
);
11
signalCone_
= iConfig.
getParameter
<
double
>(
"SignalCone"
);
12
ptMin_
= iConfig.
getParameter
<
double
>(
"MinPtTracks"
);
13
14
isolationCone_
= iConfig.
getParameter
<
double
>(
"IsolationCone"
);
15
produces<reco::HLTTauCollection>();
16
}
17
18
DQMTauProducer::~DQMTauProducer
() {}
19
20
void
DQMTauProducer::produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iES) {
21
using namespace
reco
;
22
using namespace
edm
;
23
using namespace
std
;
24
25
HLTTauCollection
*
jetCollection
=
new
HLTTauCollection
;
26
27
edm::Handle<IsolatedTauTagInfoCollection>
tauL25Jets;
28
iEvent
.getByToken(
trackIsolatedJets_
, tauL25Jets);
29
30
IsolatedTauTagInfoCollection
tau
= *(tauL25Jets.
product
());
31
32
float
eta_, phi_, pt_;
33
float
ptLeadTk = 0.;
34
int
trackIsolation = 1000.;
35
int
nTracks
= 1000.;
36
37
for
(
unsigned
int
i
= 0;
i
<
tau
.size();
i
++) {
38
JetTracksAssociationRef
jetTracks
=
tau
[
i
].jtaRef();
39
math::XYZVector
jetDir(
jetTracks
->first->px(),
jetTracks
->first->py(),
jetTracks
->first->pz());
40
eta_ = jetDir.eta();
41
phi_ = jetDir.phi();
42
pt_ =
jetTracks
->first->pt();
43
44
const
TrackRef
leadTk =
tau
[
i
].leadingSignalTrack(jetDir,
matchingCone_
, 1.);
45
if
(!leadTk) {
46
}
else
{
47
trackIsolation = (
int
)
tau
[
i
].
discriminator
(jetDir,
matchingCone_
,
signalCone_
,
isolationCone_
, 1., 1., 0);
48
ptLeadTk = (*leadTk).pt();
49
nTracks
= (
tau
[
i
].tracksInCone((*leadTk).momentum(),
isolationCone_
,
ptMin_
)).size() -
50
(
tau
[
i
].tracksInCone((*leadTk).momentum(),
signalCone_
,
ptMin_
)).size();
51
}
52
HLTTau
pippo(eta_, phi_, pt_, -1, trackIsolation, ptLeadTk, trackIsolation, ptLeadTk);
53
pippo.
setNL25TrackIsolation
(
nTracks
);
54
pippo.
setNL3TrackIsolation
(
nTracks
);
55
jetCollection
->push_back(pippo);
56
}
57
58
std::unique_ptr<reco::HLTTauCollection>
selectedTaus
(
jetCollection
);
59
60
iEvent
.put(
std::move
(
selectedTaus
));
61
}
mps_fire.i
i
Definition:
mps_fire.py:428
edm::Handle::product
T const * product() const
Definition:
Handle.h:70
metsig::tau
Definition:
SignAlgoResolutions.h:49
reco::IsolatedTauTagInfoCollection
std::vector< IsolatedTauTagInfo > IsolatedTauTagInfoCollection
Definition:
IsolatedTauTagInfo.h:95
edm
HLT enums.
Definition:
AlignableModifier.h:19
reco::HLTTau
Definition:
HLTTau.h:15
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
DQMTauProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
DQMTauProducer.cc:20
DQMTauProducer::signalCone_
double signalCone_
Definition:
DQMTauProducer.h:24
BeamSpotPI::nTracks
Definition:
BeamSpotPayloadInspectorHelper.h:42
edm::Handle
Definition:
AssociativeIterator.h:50
DQMTauProducer::DQMTauProducer
DQMTauProducer(const edm::ParameterSet &)
Definition:
DQMTauProducer.cc:7
edm::Ref
Definition:
AssociativeIterator.h:58
reco::HLTTau::setNL25TrackIsolation
void setNL25TrackIsolation(int nTracks)
Definition:
HLTTau.h:67
DQMTauProducer.h
objectSelection_cff.selectedTaus
selectedTaus
======================================
Definition:
objectSelection_cff.py:58
Track.h
PDWG_TauSkim_cff.discriminator
discriminator
Definition:
PDWG_TauSkim_cff.py:7
jetfilter_cfi.jetCollection
jetCollection
Definition:
jetfilter_cfi.py:4
edm::ParameterSet
Definition:
ParameterSet.h:47
DQMTauProducer::~DQMTauProducer
~DQMTauProducer() override
Definition:
DQMTauProducer.cc:18
HLT_FULL_cff.jetTracks
jetTracks
Definition:
HLT_FULL_cff.py:50870
DQMTauProducer::isolationCone_
double isolationCone_
Definition:
DQMTauProducer.h:24
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition:
Vector3D.h:31
createfilelist.int
int
Definition:
createfilelist.py:10
iEvent
int iEvent
Definition:
GenABIO.cc:224
DQMTauProducer::trackIsolatedJets_
edm::EDGetTokenT< reco::IsolatedTauTagInfoCollection > trackIsolatedJets_
Definition:
DQMTauProducer.h:23
edm::EventSetup
Definition:
EventSetup.h:58
reco::HLTTau::setNL3TrackIsolation
void setNL3TrackIsolation(int nTracks)
Definition:
HLTTau.h:68
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
DQMTauProducer::matchingCone_
double matchingCone_
Definition:
DQMTauProducer.h:24
reco::HLTTauCollection
std::vector< HLTTau > HLTTauCollection
collection of HLTTau objects
Definition:
HLTTauFwd.h:9
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
DQMTauProducer::ptMin_
double ptMin_
Definition:
DQMTauProducer.h:24
Generated for CMSSW Reference Manual by
1.8.16