5 #include "HepMC/GenEvent.h"
20 if ( !myGenEvent )
return;
23 HepMC::GenEvent::vertex_const_iterator viter;
24 HepMC::GenEvent::vertex_const_iterator
vbegin = myGenEvent->vertices_begin();
25 HepMC::GenEvent::vertex_const_iterator
vend = myGenEvent->vertices_end();
29 for ( viter=vbegin; viter!=
vend; ++viter ) {
32 HepMC::GenVertex*
v = *viter;
35 v->position().z()/10.,v->position().t()/10.);
43 HepMC::GenVertex::particles_out_const_iterator firstDaughterIt = v->particles_out_const_begin();
44 HepMC::GenVertex::particles_out_const_iterator lastDaughterIt = v->particles_out_const_end();
47 for ( ; firstDaughterIt != lastDaughterIt ; ++firstDaughterIt ) {
52 daugh->momentum().py(),
53 daugh->momentum().pz(),
54 daugh->momentum().e()),
58 myPart.
setID(daugh->pdg_id());
int addSimVertex(const XYZTLorentzVector &decayVertex, int im=-1, FSimVertexType::VertexType type=FSimVertexType::ANY)
Add a new vertex to the Event and to the various lists.
int addSimTrack(const RawParticle *p, int iv, int ig=-1, const HepMC::GenVertex *ev=0)
Add a new track to the Event and to the various lists.
PileUpSimulator(FSimEvent *aSimEvent)
Constructor.
void produce(const HepMC::GenEvent *pu)
Produce N minimum bias events, and add them to the FSimEvent.
~PileUpSimulator()
Default Destructor.
math::XYZTLorentzVector XYZTLorentzVector