#include <TopQuarkAnalysis/TopEventProducers/interface/StGenEventReco.h>
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_ |
Definition at line 15 of file StGenEventReco.h.
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 | ( | ) |
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 }
edm::InputTag StGenEventReco::init_ [private] |
edm::InputTag StGenEventReco::src_ [private] |