Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
TopQuarkAnalysis
TopEventProducers
src
TtGenEventReco.cc
Go to the documentation of this file.
1
#include "
FWCore/Utilities/interface/EDMException.h
"
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
4
#include "
AnalysisDataFormats/TopObjects/interface/TtGenEvent.h
"
5
#include "
TopQuarkAnalysis/TopEventProducers/interface/TopDecaySubset.h
"
6
#include "
TopQuarkAnalysis/TopEventProducers/interface/TtGenEventReco.h
"
7
8
TtGenEventReco::TtGenEventReco
(
const
edm::ParameterSet
& cfg):
9
src_ ( cfg.getParameter<edm::InputTag>(
"src"
) ),
10
init_( cfg.getParameter<edm::InputTag>(
"init"
) )
11
{
12
produces<TtGenEvent>();
13
}
14
15
TtGenEventReco::~TtGenEventReco
()
16
{
17
}
18
19
void
20
TtGenEventReco::produce
(
edm::Event
& evt,
const
edm::EventSetup
& setup)
21
{
22
edm::Handle<reco::GenParticleCollection>
parts
;
23
evt.
getByLabel
(
src_
, parts);
24
25
edm::Handle<reco::GenParticleCollection>
inits;
26
evt.
getByLabel
(
init_
, inits);
27
28
//add TopDecayTree
29
reco::GenParticleRefProd
cands( parts );
30
31
//add InitialStatePartons
32
reco::GenParticleRefProd
initParts( inits );
33
34
//add genEvt to the output stream
35
TtGenEvent
*
genEvt
=
new
TtGenEvent
( cands, initParts );
36
std::auto_ptr<TtGenEvent> gen( genEvt );
37
evt.
put
( gen );
38
}
MessageLogger.h
TtGenEventReco::src_
edm::InputTag src_
Definition:
TtGenEventReco.h:29
TtGenEventReco::~TtGenEventReco
~TtGenEventReco()
Definition:
TtGenEventReco.cc:15
CfgNavigationSchool_cfi.parts
dictionary parts
Definition:
CfgNavigationSchool_cfi.py:9
TtGenEvent.h
TopDecaySubset.h
edm::Handle< reco::GenParticleCollection >
TtGenEvtProducer_cfi.genEvt
tuple genEvt
Definition:
TtGenEvtProducer_cfi.py:7
TtGenEvent
Class derived from the TopGenEvent for ttbar events.
Definition:
TtGenEvent.h:18
EDMException.h
edm::Event::put
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition:
Event.h:84
edm::RefProd< GenParticleCollection >
TtGenEventReco.h
edm::EventSetup
Definition:
EventSetup.h:44
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition:
Event.h:359
TtGenEventReco::produce
virtual void produce(edm::Event &, const edm::EventSetup &)
Definition:
TtGenEventReco.cc:20
TtGenEventReco::init_
edm::InputTag init_
Definition:
TtGenEventReco.h:29
TtGenEventReco::TtGenEventReco
TtGenEventReco(const edm::ParameterSet &)
Definition:
TtGenEventReco.cc:8
edm::ParameterSet
Definition:
ParameterSet.h:31
edm::Event
Definition:
Event.h:49
Generated for CMSSW Reference Manual by
1.8.5