CMS 3D CMS Logo

Public Member Functions | Private Attributes

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.

        : mJets (fConfig.getParameter<edm::InputTag> ("jets")),
        mTracks (fConfig.getParameter<edm::InputTag> ("tracks")),
        mAssociator (fConfig.getParameter<double> ("coneSize")),
        classifier(fConfig)
{
    produces<reco::JetTracksAssociation::Container> ();
}
JetVetoedTracksAssociatorAtVertex::~JetVetoedTracksAssociatorAtVertex ( ) [virtual]

Definition at line 47 of file JetVetoedTracksAssociatorAtVertex.cc.

{}

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::JetExtendedAssociation::allJets(), muonTagProbeFilters_cff::allTracks, classifier, edm::Event::getByLabel(), i, mAssociator, mJets, mTracks, TrackClassifier::newEvent(), JetVetoedTracksAssociationDRVertex::produce(), and edm::Event::put().

{
    // Gather contextual information for TrackCategories
    classifier.newEvent(fEvent, fSetup);

    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());
    for (unsigned i = 0; i < tracks_h->size(); ++i) allTracks.push_back (reco::TrackRef (tracks_h, i));
    // run algo
    mAssociator.produce (&*jetTracks, allJets, allTracks, classifier);
    // store output
    fEvent.put (jetTracks);
}

Member Data Documentation

Definition at line 35 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

Definition at line 34 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

Definition at line 32 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().

Definition at line 33 of file JetVetoedTracksAssociatorAtVertex.cc.

Referenced by produce().