CMS 3D CMS Logo

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