#include <PFJetToCaloProducer.h>
Public Member Functions | |
PFJetToCaloProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~PFJetToCaloProducer () | |
Private Attributes | |
edm::InputTag | tauSrc_ |
Definition at line 18 of file PFJetToCaloProducer.h.
PFJetToCaloProducer::PFJetToCaloProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 10 of file PFJetToCaloProducer.cc.
References edm::ParameterSet::getParameter(), and tauSrc_.
{ tauSrc_ = iConfig.getParameter<edm::InputTag>("Source"); produces<reco::CaloJetCollection>(); }
PFJetToCaloProducer::~PFJetToCaloProducer | ( | ) |
Definition at line 17 of file PFJetToCaloProducer.cc.
{ }
void PFJetToCaloProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iES | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 19 of file PFJetToCaloProducer.cc.
References edm::Event::getByLabel(), i, metsig::jet, edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, and tauSrc_.
{ using namespace reco; using namespace edm; using namespace std; CaloJet::Specific specific; CaloJetCollection * jetCollectionTmp = new CaloJetCollection; edm::Handle<PFJetCollection> tauJets; iEvent.getByLabel( tauSrc_, tauJets ); PFJetCollection::const_iterator i = tauJets->begin(); for(;i !=tauJets->end(); i++ ) { // cout <<"Jet Tracks"<<i->chargedHadronMultiplicity()<<std::endl; CaloJet jet(i->p4(),i->vertex(),specific); jet.setPdgId(15); jetCollectionTmp->push_back(jet); } auto_ptr<reco::CaloJetCollection> selectedTaus(jetCollectionTmp); iEvent.put(selectedTaus); }
edm::InputTag PFJetToCaloProducer::tauSrc_ [private] |
Definition at line 25 of file PFJetToCaloProducer.h.
Referenced by PFJetToCaloProducer(), and produce().