#include <AnyJetToCaloJetProducer.h>
Public Member Functions | |
AnyJetToCaloJetProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~AnyJetToCaloJetProducer () | |
Private Attributes | |
edm::InputTag | jetSrc_ |
Definition at line 13 of file AnyJetToCaloJetProducer.h.
AnyJetToCaloJetProducer::AnyJetToCaloJetProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 6 of file AnyJetToCaloJetProducer.cc.
References edm::ParameterSet::getParameter(), and jetSrc_.
{ jetSrc_ = iConfig.getParameter<edm::InputTag>("Source"); produces<reco::CaloJetCollection>(); }
AnyJetToCaloJetProducer::~AnyJetToCaloJetProducer | ( | ) |
Definition at line 12 of file AnyJetToCaloJetProducer.cc.
{ }
void AnyJetToCaloJetProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iES | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 14 of file AnyJetToCaloJetProducer.cc.
References edm::Event::getByLabel(), i, metsig::jet, fwrapper::jets, jetSrc_, and edm::Event::put().
{ std::auto_ptr<reco::CaloJetCollection> newjets(new reco::CaloJetCollection()); edm::Handle<edm::View<reco::Jet> > jets; if (iEvent.getByLabel( jetSrc_, jets )) { for(edm::View<reco::Jet>::const_iterator i = jets->begin(); i != jets->end(); i++ ) { reco::CaloJet jet(i->p4(), i->vertex(), reco::CaloJet::Specific()); newjets->push_back(jet); } } iEvent.put(newjets); }
Definition at line 24 of file AnyJetToCaloJetProducer.h.
Referenced by AnyJetToCaloJetProducer(), and produce().