CMS 3D CMS Logo

Public Member Functions | Private Attributes

PFTauToJetProducer Class Reference

#include <PFTauToJetProducer.h>

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

List of all members.

Public Member Functions

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

Private Attributes

edm::InputTag tauSrc_

Detailed Description

Definition at line 18 of file PFTauToJetProducer.h.


Constructor & Destructor Documentation

PFTauToJetProducer::PFTauToJetProducer ( const edm::ParameterSet iConfig) [explicit]

Definition at line 10 of file PFTauToJetProducer.cc.

References edm::ParameterSet::getParameter(), and tauSrc_.

{

  tauSrc_ = iConfig.getParameter<edm::InputTag>("Source");
  produces<reco::CaloJetCollection>();
}
PFTauToJetProducer::~PFTauToJetProducer ( )

Definition at line 17 of file PFTauToJetProducer.cc.

{ }

Member Function Documentation

void PFTauToJetProducer::produce ( edm::Event iEvent,
const edm::EventSetup iES 
) [virtual]

Implements edm::EDProducer.

Definition at line 19 of file PFTauToJetProducer.cc.

References edm::Event::getByLabel(), i, metsig::jet, edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, timingPdfMaker::specific, and tauSrc_.

{

  using namespace reco;
  using namespace edm;
  using namespace std;
  CaloJet::Specific specific;
  
  CaloJetCollection * jetCollectionTmp = new CaloJetCollection;
  edm::Handle<PFTauCollection> tauJets;
    iEvent.getByLabel( tauSrc_, tauJets );
    PFTauCollection::const_iterator i = tauJets->begin();
    for(;i !=tauJets->end(); i++ ) {
      //      cout <<"Tau Tracks " << i->signalPFChargedHadrCands().size()<<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 PFTauToJetProducer.h.

Referenced by PFTauToJetProducer(), and produce().