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  produces<TtGenEvent>();
9 }
10 
12 
15  evt.getByToken(srcToken_, parts);
16 
18  evt.getByToken(initToken_, inits);
19 
20  //add TopDecayTree
22 
23  //add InitialStatePartons
24  reco::GenParticleRefProd initParts(inits);
25 
26  //add genEvt to the output stream
27  TtGenEvent* genEvt = new TtGenEvent(cands, initParts);
28  std::unique_ptr<TtGenEvent> gen(genEvt);
29  evt.put(std::move(gen));
30 }
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:131
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
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:511