CMS 3D CMS Logo

JetVetoedTracksAssociatorAtVertex Class Reference

Inheritance diagram for JetVetoedTracksAssociatorAtVertex:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 JetVetoedTracksAssociatorAtVertex (const edm::ParameterSet &)
virtual void produce (edm::Event &, const edm::EventSetup &)
virtual ~JetVetoedTracksAssociatorAtVertex ()

Private Attributes

TrackClassifier classifier
JetVetoedTracksAssociationDRVertex mAssociator
edm::InputTag mJets
edm::InputTag mTracks


Detailed Description

Definition at line 25 of file JetVetoedTracksAssociatorAtVertex.cc.


Constructor & Destructor Documentation

JetVetoedTracksAssociatorAtVertex::JetVetoedTracksAssociatorAtVertex ( const edm::ParameterSet fConfig  ) 

Definition at line 38 of file JetVetoedTracksAssociatorAtVertex.cc.

00039         : mJets (fConfig.getParameter<edm::InputTag> ("jets")),
00040         mTracks (fConfig.getParameter<edm::InputTag> ("tracks")),
00041         mAssociator (fConfig.getParameter<double> ("coneSize")),
00042         classifier(fConfig)
00043 {
00044     produces<reco::JetTracksAssociation::Container> ();
00045 }

JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex (  )  [virtual]

Definition at line 47 of file JetVetoedTracksAssociatorAtVertex.cc.

00047 {}


Member Function Documentation

void JetVetoedTracksAssociatorAtVertex::produce ( edm::Event fEvent,
const edm::EventSetup fSetup 
) [virtual]

Implements edm::EDProducer.

Definition at line 49 of file JetVetoedTracksAssociatorAtVertex.cc.

References reco::JetTracksAssociation::allJets(), python::MinBiasTracking_cff::allTracks, classifier, edm::Event::getByLabel(), i, mAssociator, mJets, mTracks, TrackClassifier::newEvent(), JetVetoedTracksAssociationDRVertex::produce(), and edm::Event::put().

00050 {
00051     // Gather contextual information for TrackCategories
00052     classifier.newEvent(fEvent, fSetup);
00053 
00054     edm::Handle <edm::View <reco::Jet> > jets_h;
00055     fEvent.getByLabel (mJets, jets_h);
00056     edm::Handle <reco::TrackCollection> tracks_h;
00057     fEvent.getByLabel (mTracks, tracks_h);
00058 
00059     std::auto_ptr<reco::JetTracksAssociation::Container> jetTracks (new reco::JetTracksAssociation::Container (reco::JetRefBaseProd(jets_h)));
00060 
00061     // format inputs
00062     std::vector <edm::RefToBase<reco::Jet> > allJets;
00063     allJets.reserve (jets_h->size());
00064     for (unsigned i = 0; i < jets_h->size(); ++i) allJets.push_back (jets_h->refAt(i));
00065     std::vector <reco::TrackRef> allTracks;
00066     allTracks.reserve (tracks_h->size());
00067     for (unsigned i = 0; i < tracks_h->size(); ++i) allTracks.push_back (reco::TrackRef (tracks_h, i));
00068     // run algo
00069     mAssociator.produce (&*jetTracks, allJets, allTracks, classifier);
00070     // store output
00071     fEvent.put (jetTracks);
00072 }


Member Data Documentation

TrackClassifier JetVetoedTracksAssociatorAtVertex::classifier [private]

Definition at line 35 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

JetVetoedTracksAssociationDRVertex JetVetoedTracksAssociatorAtVertex::mAssociator [private]

Definition at line 34 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

edm::InputTag JetVetoedTracksAssociatorAtVertex::mJets [private]

Definition at line 32 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

edm::InputTag JetVetoedTracksAssociatorAtVertex::mTracks [private]

Definition at line 33 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:26:14 2009 for CMSSW by  doxygen 1.5.4