24 #include "HepMC/GenVertex.h"
25 #include "HepMC/GenEvent.h"
34 produces<edm::SimTrackContainer>();
35 produces<edm::SimVertexContainer>();
36 produces<FSimVertexTypeCollection>(
"VertexTypes");
37 produces<edm::PSimHitContainer>(
"TrackerHits");
38 produces<edm::PCaloHitContainer>(
"EcalHitsEB");
39 produces<edm::PCaloHitContainer>(
"EcalHitsEE");
40 produces<edm::PCaloHitContainer>(
"EcalHitsES");
41 produces<edm::PCaloHitContainer>(
"HcalHits");
44 if ( simulateMuons ) produces<edm::SimTrackContainer>(
"MuonSimTracks");
55 puToken = consumes<edm::HepMCProduct>(_label);
58 mixSourceToken = consumes<CrossingFrame<edm::HepMCProduct> >(_label);
87 const HepMC::GenEvent* myGenEvent = 0;
100 const HepMC::GenEvent* thePUEvents = 0;
108 if(genPartXF) myGenParticlesXF = &(*genEvtXF);
116 myGenEvent = theHepMCProduct->GetEvent();
121 bool genPart =
false;
127 if ( genPart ) myGenParticles = &(*genEvt);
130 if ( !myGenEvent && !genPart )
131 std::cout <<
"There is no generator input for this event, under "
132 <<
"any form (HepMCProduct, genParticles)" << std::endl
133 <<
"Please check SourceLabel or GenParticleLabel" << std::endl;
140 thePUEvents = isPileUp ? thePileUpEvents->GetEvent() : 0;
146 if (myGenParticlesXF) {
175 calo->loadFromEcalBarrel(*p4);
176 calo->loadFromEcalEndcap(*p5);
177 calo->loadFromPreshower(*p6);
178 calo->loadFromHcal(*p7);
180 calo->loadMuonSimTracks(*m1);
187 iEvent.
put(p3,
"TrackerHits");
188 iEvent.
put(v1,
"VertexTypes");
189 iEvent.
put(p4,
"EcalHitsEB");
190 iEvent.
put(p5,
"EcalHitsEE");
191 iEvent.
put(p6,
"EcalHitsES");
192 iEvent.
put(p7,
"HcalHits");
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
T getParameter(std::string const &) const
std::vector< PCaloHit > PCaloHitContainer
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
edm::InputTag sourceLabel
edm::EDGetTokenT< reco::GenParticleCollection > genParticleToken
FamosManager * famosManager_
edm::InputTag genParticleLabel
virtual void beginRun(edm::Run const &run, const edm::EventSetup &es) override
FamosProducer(edm::ParameterSet const &p)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< FSimVertexType > FSimVertexTypeCollection
collection of FSimVertexType objects
edm::EDGetTokenT< edm::HepMCProduct > puToken
void reconstruct(const HepMC::GenEvent *evt, const reco::GenParticleCollection *particles, const HepMC::GenEvent *pu, const TrackerTopology *tTopo, RandomEngineAndDistribution const *)
The real thing is done here.
CalorimetryManager * calorimetryManager() const
The calorimeter.
edm::EDGetTokenT< edm::HepMCProduct > sourceToken
edm::EDGetTokenT< reco::GenParticleCollection > mixGenParticleToken
std::vector< SimVertex > SimVertexContainer
edm::EDGetTokenT< CrossingFrame< edm::HepMCProduct > > mixSourceToken
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
StreamID streamID() const
std::vector< PSimHit > PSimHitContainer
TrajectoryManager * trackerManager() const
The tracker.
FSimEvent * simEvent() const
The generated event.
std::vector< SimTrack > SimTrackContainer
void setupGeometryAndField(edm::Run const &run, const edm::EventSetup &es)
Get information from the Event Setup.
static std::string const source