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 
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 }
edm::RefProd< GenParticleCollection >
TtGenEventReco.h
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
reco::GenParticleCollection
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
Definition: GenParticleFwd.h:13
TtGenEvent
Class derived from the TopGenEvent for ttbar events.
Definition: TtGenEvent.h:18
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle< reco::GenParticleCollection >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
TtGenEventReco::srcToken_
edm::EDGetTokenT< reco::GenParticleCollection > srcToken_
Definition: TtGenEventReco.h:14
contentValuesFiles.parts
parts
Definition: contentValuesFiles.py:58
TtGenEventReco::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: TtGenEventReco.cc:13
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:531
gen
Definition: PythiaDecays.h:13
TtGenEventReco::~TtGenEventReco
~TtGenEventReco() override
Definition: TtGenEventReco.cc:11
TtGenEventReco::TtGenEventReco
TtGenEventReco(const edm::ParameterSet &)
Definition: TtGenEventReco.cc:5
HLT_FULL_cff.cands
cands
Definition: HLT_FULL_cff.py:15208
edm::ParameterSet
Definition: ParameterSet.h:47
TtGenEvent.h
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::EventSetup
Definition: EventSetup.h:57
looper.cfg
cfg
Definition: looper.py:297
eostools.move
def move(src, dest)
Definition: eostools.py:511
relval_steps.gen
def gen(fragment, howMuch)
Production test section ####.
Definition: relval_steps.py:509
edm::Event
Definition: Event.h:73
TtGenEvtProducer_cfi.genEvt
genEvt
Definition: TtGenEvtProducer_cfi.py:7
TtGenEventReco::initToken_
edm::EDGetTokenT< reco::GenParticleCollection > initToken_
Definition: TtGenEventReco.h:15