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 |
Definition at line 25 of file JetVetoedTracksAssociatorAtVertex.cc.
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] |
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 }