CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

TtGenEventReco Class Reference

#include <TtGenEventReco.h>

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

List of all members.

Public Member Functions

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

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 TtGenEventReco.h.


Constructor & Destructor Documentation

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

Definition at line 8 of file TtGenEventReco.cc.

                                                        :
  src_ ( cfg.getParameter<edm::InputTag>( "src"  ) ),
  init_( cfg.getParameter<edm::InputTag>( "init" ) )
{
  produces<TtGenEvent>();
}
TtGenEventReco::~TtGenEventReco ( )

Definition at line 15 of file TtGenEventReco.cc.

{
}

Member Function Documentation

void TtGenEventReco::fillInitialPartons ( const reco::GenParticle ,
std::vector< const reco::GenParticle * > &   
) [private]
void TtGenEventReco::produce ( edm::Event evt,
const edm::EventSetup setup 
) [virtual]

Implements edm::EDProducer.

Definition at line 20 of file TtGenEventReco.cc.

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

{     
  edm::Handle<reco::GenParticleCollection> parts;
  evt.getByLabel(src_,  parts);

  edm::Handle<reco::GenParticleCollection> inits;
  evt.getByLabel(init_, inits);

  //add TopDecayTree
  reco::GenParticleRefProd cands( parts );

  //add InitialStatePartons
  reco::GenParticleRefProd initParts( inits );

  //add genEvt to the output stream
  TtGenEvent* genEvt = new TtGenEvent( cands, initParts );
  std::auto_ptr<TtGenEvent> gen( genEvt );
  evt.put( gen );
}

Member Data Documentation

Definition at line 29 of file TtGenEventReco.h.

Referenced by produce().

Definition at line 29 of file TtGenEventReco.h.

Referenced by produce().