src
RecoJets
JetAssociationAlgorithms
src
JetTracksAssociationExplicit.cc
Go to the documentation of this file.
1
// Associate jets with tracks by simple "dR" criteria
2
// Fedor Ratnikov (UMd), Aug. 28, 2007
3
4
#include "
RecoJets/JetAssociationAlgorithms/interface/JetTracksAssociationExplicit.h
"
5
6
#include "
DataFormats/JetReco/interface/PFJet.h
"
7
#include "
DataFormats/TrackReco/interface/Track.h
"
8
9
JetTracksAssociationExplicit::JetTracksAssociationExplicit
() {}
10
11
void
JetTracksAssociationExplicit::produce
(
reco::JetTracksAssociation::Container
* fAssociation,
12
const
std::vector
<
edm::RefToBase<reco::Jet>
>& fJets,
13
const
std::vector<reco::TrackRef>& fTracks)
const
{
14
for
(
unsigned
j
= 0;
j
< fJets.size(); ++
j
) {
15
reco::PFJet
const
* pfJet =
dynamic_cast<
reco::PFJet
const
*
>
(&*(fJets[
j
]));
16
if
(pfJet !=
nullptr
) {
17
reco::TrackRefVector
assoTracks = pfJet->
getTrackRefs
();
18
reco::JetTracksAssociation::setValue
(fAssociation, fJets[
j
], assoTracks);
19
}
else
{
20
throw
cms::Exception
(
"InvalidConfiguration"
)
21
<<
"From JetTracksAssociationExplicit::produce: Only PFJets are currently supported for this module"
22
<< std::endl;
23
}
24
}
25
}
JetTracksAssociationExplicit::JetTracksAssociationExplicit
JetTracksAssociationExplicit()
Definition:
JetTracksAssociationExplicit.cc:9
Exception
Definition:
hltDiff.cc:245
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
reco::PFJet
Jets made from PFObjects.
Definition:
PFJet.h:20
edm::RefToBase< reco::Jet >
reco::PFJet::getTrackRefs
reco::TrackRefVector getTrackRefs() const
Definition:
PFJet.cc:48
reco::JetTracksAssociation::setValue
bool setValue(Container &, const reco::JetBaseRef &, reco::TrackRefVector)
associate jet with value. Returns false and associate nothing if jet is already associated ...
Definition:
JetTracksAssociation.cc:41
JetTracksAssociationExplicit.h
JetTracksAssociationExplicit::produce
void produce(reco::JetTracksAssociation::Container *fAssociation, const std::vector< edm::RefToBase< reco::Jet > > &fJets, const std::vector< reco::TrackRef > &fTracks) const
Definition:
JetTracksAssociationExplicit.cc:11
edm::AssociationVector
Definition:
AssociationVector.h:67
edm::RefVector< TrackCollection >
Options.const
const
Definition:
Options.py:396
trackerHitRTTI::vector
Definition:
trackerHitRTTI.h:21
Track.h
PFJet.h
Generated for CMSSW Reference Manual by
1.8.14