CMS 3D CMS Logo

TtGenEventReco.cc
Go to the documentation of this file.
2 
4 
6  srcToken_ ( consumes<reco::GenParticleCollection>(cfg.getParameter<edm::InputTag>( "src" ) ) ),
7  initToken_( consumes<reco::GenParticleCollection>(cfg.getParameter<edm::InputTag>( "init" ) ) )
8 {
9  produces<TtGenEvent>();
10 }
11 
13 {
14 }
15 
16 void
18 {
20  evt.getByToken(srcToken_, parts);
21 
23  evt.getByToken(initToken_, inits);
24 
25  //add TopDecayTree
27 
28  //add InitialStatePartons
29  reco::GenParticleRefProd initParts( inits );
30 
31  //add genEvt to the output stream
32  TtGenEvent* genEvt = new TtGenEvent( cands, initParts );
33  std::unique_ptr<TtGenEvent> gen( genEvt );
34  evt.put(std::move(gen));
35 }
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
~TtGenEventReco() override
edm::EDGetTokenT< reco::GenParticleCollection > initToken_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
Class derived from the TopGenEvent for ttbar events.
Definition: TtGenEvent.h:18
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::GenParticleCollection > srcToken_
def gen(fragment, howMuch)
Production test section ####.
fixed size matrix
HLT enums.
TtGenEventReco(const edm::ParameterSet &)
def move(src, dest)
Definition: eostools.py:510