Main Page
Namespaces
Classes
Package Documentation
SimTracker
TrackHistory
plugins
JetVetoedTracksAssociatorAtVertex.cc
Go to the documentation of this file.
1
// \class JetVetoedTracksAssociatorAtVertex JetTracksAssociatorAtVertex.cc
2
//
3
// Original Author: Andrea Rizzi
4
// Created: Wed Apr 12 11:12:49 CEST 2006
5
// Accommodated for Jet Package by: Fedor Ratnikov Jul. 30, 2007
6
//
7
//
8
9
#include "
DataFormats/Common/interface/EDProductfwd.h
"
10
#include "
DataFormats/Common/interface/View.h
"
11
#include "
DataFormats/JetReco/interface/Jet.h
"
12
#include "
DataFormats/JetReco/interface/JetTracksAssociation.h
"
13
#include "
DataFormats/TrackReco/interface/Track.h
"
14
15
#include "
FWCore/Framework/interface/Event.h
"
16
#include "
FWCore/Framework/interface/MakerMacros.h
"
17
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
18
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
19
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
20
#include "
FWCore/Utilities/interface/InputTag.h
"
21
22
#include "
SimTracker/TrackHistory/interface/JetVetoedTracksAssociatorDRVertex.h
"
23
24
class
JetVetoedTracksAssociatorAtVertex
:
public
edm::stream::EDProducer
<> {
25
public
:
26
JetVetoedTracksAssociatorAtVertex
(
const
edm::ParameterSet
&);
27
~JetVetoedTracksAssociatorAtVertex
()
override
;
28
void
produce
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
29
30
private
:
31
edm::EDGetTokenT<edm::View<reco::Jet>
>
mJets
;
32
edm::EDGetTokenT<reco::TrackCollection>
mTracks
;
33
JetVetoedTracksAssociationDRVertex
mAssociator
;
34
TrackClassifier
classifier
;
35
};
36
37
JetVetoedTracksAssociatorAtVertex::JetVetoedTracksAssociatorAtVertex
(
const
edm::ParameterSet
&fConfig)
38
:
mJets
(consumes<
edm
::
View
<
reco
::
Jet
>>(fConfig.getParameter<
edm
::InputTag>(
"jets"
))),
39
mTracks
(consumes<
reco
::
TrackCollection
>(fConfig.getParameter<
edm
::InputTag>(
"tracks"
))),
40
mAssociator
(fConfig.getParameter<double>(
"coneSize"
)),
41
classifier
(fConfig, consumesCollector()) {
42
produces<reco::JetTracksAssociation::Container>();
43
}
44
45
JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex
() {}
46
47
void
JetVetoedTracksAssociatorAtVertex::produce
(
edm::Event
&
fEvent
,
const
edm::EventSetup
&fSetup) {
48
// Gather contextual information for TrackCategories
49
classifier
.
newEvent
(fEvent, fSetup);
50
51
edm::Handle<edm::View<reco::Jet>
> jets_h;
52
fEvent.
getByToken
(
mJets
, jets_h);
53
edm::Handle<reco::TrackCollection>
tracks_h;
54
fEvent.
getByToken
(
mTracks
, tracks_h);
55
56
std::unique_ptr<reco::JetTracksAssociation::Container>
jetTracks
(
57
new
reco::JetTracksAssociation::Container
(
reco::JetRefBaseProd
(jets_h)));
58
59
// format inputs
60
std::vector<edm::RefToBase<reco::Jet>>
allJets
;
61
allJets.reserve(jets_h->size());
62
for
(
unsigned
i
= 0;
i
< jets_h->size(); ++
i
)
63
allJets.push_back(jets_h->refAt(
i
));
64
std::vector<reco::TrackRef>
allTracks
;
65
allTracks.reserve(tracks_h->size());
66
for
(
unsigned
i
= 0;
i
< tracks_h->size(); ++
i
)
67
allTracks.push_back(
reco::TrackRef
(tracks_h,
i
));
68
// run algo
69
mAssociator
.
produce
(&*jetTracks, allJets, allTracks,
classifier
);
70
// store output
71
fEvent.
put
(
std::move
(jetTracks));
72
}
73
74
DEFINE_FWK_MODULE
(
JetVetoedTracksAssociatorAtVertex
);
reco::JetExtendedAssociation::allJets
std::vector< reco::JetBaseRef > allJets(const Container &)
fill list of all jets associated with values. Return # of jets in the list
Definition:
JetExtendedAssociation.cc:62
MessageLogger.h
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition:
Event.h:125
mps_fire.i
i
Definition:
mps_fire.py:338
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition:
Event.h:517
edm::Ref< TrackCollection >
JetVetoedTracksAssociatorAtVertex::mTracks
edm::EDGetTokenT< reco::TrackCollection > mTracks
Definition:
JetVetoedTracksAssociatorAtVertex.cc:32
Event.h
MakerMacros.h
edm::Handle
Definition:
AssociativeIterator.h:47
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition:
TrackFwd.h:15
JetVetoedTracksAssociationDRVertex::produce
void produce(reco::JetTracksAssociation::Container *fAssociation, const std::vector< edm::RefToBase< reco::Jet >> &fJets, const std::vector< reco::TrackRef > &fTracks, TrackClassifier &classifier) const
Definition:
JetVetoedTracksAssociatorDRVertex.cc:6
JetVetoedTracksAssociatorAtVertex::classifier
TrackClassifier classifier
Definition:
JetVetoedTracksAssociatorAtVertex.cc:34
edm::EDGetTokenT
Definition:
EDGetToken.h:33
ParameterSet.h
JetVetoedTracksAssociatorAtVertex
Definition:
JetVetoedTracksAssociatorAtVertex.cc:24
JetVetoedTracksAssociatorAtVertex::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
JetVetoedTracksAssociatorAtVertex.cc:47
EDProducer.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
allTracks_cfi.allTracks
allTracks
Definition:
allTracks_cfi.py:4
edm::RefToBaseProd
Definition:
RefToBase.h:61
Jet
Definition:
Jet.py:1
JetVetoedTracksAssociatorDRVertex.h
hcaldqm::fEvent
Definition:
DQTask.h:16
View.h
edm::EventSetup
Definition:
EventSetup.h:57
Jet.h
TrackClassifier::newEvent
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
Definition:
TrackClassifier.cc:44
impactParameterTagInfos_cfi.jetTracks
jetTracks
Definition:
impactParameterTagInfos_cfi.py:4
JetVetoedTracksAssociationDRVertex
Definition:
JetVetoedTracksAssociatorDRVertex.h:13
TrackClassifier
Get track history and classify it in function of their .
Definition:
TrackClassifier.h:29
edm::AssociationVector
Definition:
AssociationVector.h:62
EDProductfwd.h
edm::stream::EDProducer
Definition:
EDProducer.h:38
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:44
edm
HLT enums.
Definition:
AlignableModifier.h:17
JetVetoedTracksAssociatorAtVertex::mJets
edm::EDGetTokenT< edm::View< reco::Jet > > mJets
Definition:
JetVetoedTracksAssociatorAtVertex.cc:31
InputTag.h
JetTracksAssociation.h
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::Event
Definition:
Event.h:71
Track.h
JetVetoedTracksAssociatorAtVertex::mAssociator
JetVetoedTracksAssociationDRVertex mAssociator
Definition:
JetVetoedTracksAssociatorAtVertex.cc:33
sistrip::View
View
Definition:
ConstantsForView.h:26
JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex
~JetVetoedTracksAssociatorAtVertex() override
Definition:
JetVetoedTracksAssociatorAtVertex.cc:45
eostools.move
def move(src, dest)
Definition:
eostools.py:511
JetVetoedTracksAssociatorAtVertex::JetVetoedTracksAssociatorAtVertex
JetVetoedTracksAssociatorAtVertex(const edm::ParameterSet &)
Definition:
JetVetoedTracksAssociatorAtVertex.cc:37
Generated for CMSSW Reference Manual by
1.8.11