CMS 3D CMS Logo

StGenEventReco Class Reference

#include <TopQuarkAnalysis/TopEventProducers/interface/StGenEventReco.h>

Inheritance diagram for StGenEventReco:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

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

Private Member Functions

void fillInitialPartons (const reco::GenParticle *, std::vector< const reco::GenParticle * > &)

Private Attributes

edm::InputTag init_
edm::InputTag src_


Detailed Description

Definition at line 15 of file StGenEventReco.h.


Constructor & Destructor Documentation

StGenEventReco::StGenEventReco ( const edm::ParameterSet cfg  )  [explicit]

Definition at line 11 of file StGenEventReco.cc.

00011                                                         :
00012   src_ ( cfg.getParameter<edm::InputTag>( "src"  ) ),
00013   init_( cfg.getParameter<edm::InputTag>( "init" ) )
00014 {
00015   produces<StGenEvent>();
00016 }

StGenEventReco::~StGenEventReco (  ) 

Definition at line 18 of file StGenEventReco.cc.

00019 {
00020 }


Member Function Documentation

void StGenEventReco::fillInitialPartons ( const reco::GenParticle ,
std::vector< const reco::GenParticle * > &   
) [private]

void StGenEventReco::produce ( edm::Event evt,
const edm::EventSetup setup 
) [virtual]

Implements edm::EDProducer.

Definition at line 23 of file StGenEventReco.cc.

References TtGenEvtProducer_cfi::genEvt, edm::Event::getByLabel(), init_, edm::Event::put(), and src_.

00024 {     
00025   edm::Handle<reco::GenParticleCollection> parts;
00026   evt.getByLabel(src_,  parts);
00027 
00028   edm::Handle<reco::GenParticleCollection> inits;
00029   evt.getByLabel(init_, inits);
00030 
00031   //add TopDecayTree
00032   reco::GenParticleRefProd cands( parts );
00033 
00034   //add InitialStatePartons
00035   reco::GenParticleRefProd initParts( inits );
00036 
00037   //add genEvt to the output stream
00038   StGenEvent* genEvt = new StGenEvent( cands, initParts );
00039   std::auto_ptr<StGenEvent> gen( genEvt );
00040   evt.put( gen );
00041 }


Member Data Documentation

edm::InputTag StGenEventReco::init_ [private]

Definition at line 28 of file StGenEventReco.h.

Referenced by produce().

edm::InputTag StGenEventReco::src_ [private]

Definition at line 28 of file StGenEventReco.h.

Referenced by produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:50 2009 for CMSSW by  doxygen 1.5.4