Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
// $Id: JetTracksAssociationExplicit.cc,v 1.1 2012/01/13 21:11:03 srappocc Exp $
4
5
#include "
RecoJets/JetAssociationAlgorithms/interface/JetTracksAssociationExplicit.h
"
6
7
#include "
DataFormats/JetReco/interface/PFJet.h
"
8
#include "
DataFormats/TrackReco/interface/Track.h
"
9
10
JetTracksAssociationExplicit::JetTracksAssociationExplicit
()
11
{}
12
13
void
JetTracksAssociationExplicit::produce
(
reco::JetTracksAssociation::Container
* fAssociation,
14
const
std::vector <
edm::RefToBase<reco::Jet>
>& fJets,
15
const
std::vector <reco::TrackRef>& fTracks)
const
16
{
17
for
(
unsigned
j
= 0;
j
< fJets.size(); ++
j
) {
18
reco::PFJet
const
* pfJet =
dynamic_cast<
reco::PFJet
const
*
>
( &* (fJets[
j
]) ) ;
19
if
( pfJet != 0 ) {
20
reco::TrackRefVector
assoTracks = pfJet->
getTrackRefs
();
21
reco::JetTracksAssociation::setValue
(fAssociation, fJets[
j
], assoTracks);
22
}
else
{
23
throw
cms::Exception
(
"InvalidConfiguration"
)
24
<<
"From JetTracksAssociationExplicit::produce: Only PFJets are currently supported for this module"
<< std::endl;
25
}
26
}
27
}
JetTracksAssociationExplicit::JetTracksAssociationExplicit
JetTracksAssociationExplicit()
Definition:
JetTracksAssociationExplicit.cc:10
edm::RefToBase< reco::Jet >
reco::PFJet
Jets made from PFObjects.
Definition:
PFJet.h:22
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:42
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:13
j
int j
Definition:
DBlmapReader.cc:9
JetTracksAssociationExplicit.h
edm::hlt::Exception
error
Definition:
HLTenums.h:24
edm::AssociationVector
Definition:
AssociationVector.h:58
edm::RefVector< TrackCollection >
reco::PFJet::getTrackRefs
reco::TrackRefVector getTrackRefs() const
Definition:
PFJet.cc:60
Track.h
PFJet.h
Generated for CMSSW Reference Manual by
1.8.5