CMS 3D CMS Logo

Public Member Functions | Private Attributes

PFJetToCaloProducer Class Reference

#include <PFJetToCaloProducer.h>

Inheritance diagram for PFJetToCaloProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

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

Private Attributes

edm::InputTag tauSrc_

Detailed Description

Definition at line 18 of file PFJetToCaloProducer.h.


Constructor & Destructor Documentation

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.

{ }

Member Function Documentation

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);


}

Member Data Documentation

Definition at line 25 of file PFJetToCaloProducer.h.

Referenced by PFJetToCaloProducer(), and produce().