CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TtGenEventReco.cc
Go to the documentation of this file.
3 
7 
9  src_ ( cfg.getParameter<edm::InputTag>( "src" ) ),
10  init_( cfg.getParameter<edm::InputTag>( "init" ) )
11 {
12  produces<TtGenEvent>();
13 }
14 
16 {
17 }
18 
19 void
21 {
23  evt.getByLabel(src_, parts);
24 
26  evt.getByLabel(init_, inits);
27 
28  //add TopDecayTree
29  reco::GenParticleRefProd cands( parts );
30 
31  //add InitialStatePartons
32  reco::GenParticleRefProd initParts( inits );
33 
34  //add genEvt to the output stream
35  TtGenEvent* genEvt = new TtGenEvent( cands, initParts );
36  std::auto_ptr<TtGenEvent> gen( genEvt );
37  evt.put( gen );
38 }
edm::InputTag src_
Class derived from the TopGenEvent for ttbar events.
Definition: TtGenEvent.h:18
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
virtual void produce(edm::Event &, const edm::EventSetup &)
edm::InputTag init_
TtGenEventReco(const edm::ParameterSet &)