ATLAS Offline Software
Classes | Functions
TruthHelper Namespace Reference

Classes

class  GenAccessIO
 

Functions

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

Function Documentation

◆ copyBeamParticles() [1/2]

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

◆ copyBeamParticles() [2/2]

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

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 }