CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:133
tuple cfg
Definition: looper.py:296
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
Class derived from the TopGenEvent for ttbar events.
Definition: TtGenEvent.h:18
void produce(edm::Event &, const edm::EventSetup &) override
def move
Definition: eostools.py:511
edm::EDGetTokenT< reco::GenParticleCollection > srcToken_
TtGenEventReco(const edm::ParameterSet &)