#include <JetTracksAssociatorAtVertex.h>
Public Member Functions | |
JetTracksAssociatorAtVertex (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
virtual | ~JetTracksAssociatorAtVertex () |
Private Attributes | |
JetTracksAssociationDRVertex | mAssociator |
edm::InputTag | mJets |
int | mTrackQuality |
edm::InputTag | mTracks |
Definition at line 19 of file JetTracksAssociatorAtVertex.h.
JetTracksAssociatorAtVertex::JetTracksAssociatorAtVertex | ( | const edm::ParameterSet & | fConfig | ) |
Definition at line 19 of file JetTracksAssociatorAtVertex.cc.
: mJets (fConfig.getParameter<edm::InputTag> ("jets")), mTracks (fConfig.getParameter<edm::InputTag> ("tracks")), mAssociator (fConfig.getParameter<double> ("coneSize")) { produces<reco::JetTracksAssociation::Container> (); }
JetTracksAssociatorAtVertex::~JetTracksAssociatorAtVertex | ( | ) | [virtual] |
Definition at line 27 of file JetTracksAssociatorAtVertex.cc.
{}
void JetTracksAssociatorAtVertex::produce | ( | edm::Event & | fEvent, |
const edm::EventSetup & | fSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 29 of file JetTracksAssociatorAtVertex.cc.
References reco::JetExtendedAssociation::allJets(), muonTagProbeFilters_cff::allTracks, edm::Event::getByLabel(), i, mAssociator, mJets, mTracks, JetTracksAssociationDRVertex::produce(), and edm::Event::put().
{ edm::Handle <edm::View <reco::Jet> > jets_h; fEvent.getByLabel (mJets, jets_h); edm::Handle <reco::TrackCollection> tracks_h; fEvent.getByLabel (mTracks, tracks_h); std::auto_ptr<reco::JetTracksAssociation::Container> jetTracks (new reco::JetTracksAssociation::Container (reco::JetRefBaseProd(jets_h))); // format inputs std::vector <edm::RefToBase<reco::Jet> > allJets; allJets.reserve (jets_h->size()); for (unsigned i = 0; i < jets_h->size(); ++i) allJets.push_back (jets_h->refAt(i)); std::vector <reco::TrackRef> allTracks; allTracks.reserve (tracks_h->size()); // run algo for (unsigned i = 0; i < tracks_h->size(); ++i) { allTracks.push_back (reco::TrackRef (tracks_h, i)); } mAssociator.produce (&*jetTracks, allJets, allTracks); // store output fEvent.put (jetTracks); }
Definition at line 30 of file JetTracksAssociatorAtVertex.h.
Referenced by produce().
Definition at line 27 of file JetTracksAssociatorAtVertex.h.
Referenced by produce().
int JetTracksAssociatorAtVertex::mTrackQuality [private] |
Definition at line 29 of file JetTracksAssociatorAtVertex.h.
Definition at line 28 of file JetTracksAssociatorAtVertex.h.
Referenced by produce().