ATLAS Offline Software
Loading...
Searching...
No Matches
TruthHelper Namespace Reference

Classes

class  GenAccessIO

Functions

void copyBeamParticles (const HepMC::GenEvent &inEvt, HepMC::GenEvent &outEvt)

Function Documentation

◆ copyBeamParticles()

void TruthHelper::copyBeamParticles ( const HepMC::GenEvent & inEvt,
HepMC::GenEvent & outEvt )

Definition at line 21 of file copyBeamParticles.cxx.

23{
24#ifndef HEPMC3
25 if (inEvt.valid_beam_particles()) {
26 std::pair<HepMC::GenParticle*,HepMC::GenParticle*> bp = inEvt.beam_particles();
27 outEvt.set_beam_particles (outEvt.barcode_to_particle (bp.first->barcode()),
28 outEvt.barcode_to_particle (bp.second->barcode()));
29 }
30#endif
31}