6#ifndef ATLASHEPMC_GENVERTEX_H
7#define ATLASHEPMC_GENVERTEX_H
9#include "HepMC3/GenVertex.h"
10#include "HepMC3/PrintStreams.h"
13inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator
begin(
const HepMC3::GenVertex& v) {
return v.particles_out().begin(); }
14inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator
end(
const HepMC3::GenVertex& v) {
return v.particles_out().end(); }
15inline std::vector<HepMC3::GenParticlePtr>::const_iterator
begin(HepMC3::GenVertex& v) {
return v.particles_out().begin(); }
16inline std::vector<HepMC3::GenParticlePtr>::const_iterator
end(HepMC3::GenVertex& v) {
return v.particles_out().end(); }
33 auto e =
p->parent_event();
35 std::shared_ptr<HepMC3::IntAttribute>
barcode=
e->attribute<HepMC3::IntAttribute>(
"barcode",
p->id());
41 auto e =
p->parent_event();
43 std::shared_ptr<HepMC3::IntAttribute>
barcode=
e->attribute<HepMC3::IntAttribute>(
"barcode",
p->id());
46inline int barcode(
const HepMC3::GenVertex& p) {
47 auto e =
p.parent_event();
49 std::shared_ptr<HepMC3::IntAttribute>
barcode=
e->attribute<HepMC3::IntAttribute>(
"barcode",
p.id());
53using HepMC3::GenVertex;
61inline GenVertex::particles_out_const_iterator
begin(
const HepMC::GenVertex& v) {
return v.particles_out_const_begin(); }
62inline GenVertex::particles_out_const_iterator
end(
const HepMC::GenVertex& v) {
return v.particles_out_const_end(); }
65 return new HepMC::GenVertex(pos,i);
68inline void line(std::ostream& os,
const GenVertex& v) {v.print(os);}
69inline void line(std::ostream& os,
const GenVertex* v) {v->print(os);}
72inline std::ostream&
operator<<( std::ostream& os,
const GenVertex* v ) {
if (v)
return os<<(*v);
else return os;}
std::ostream & operator<<(std::ostream &lhs, const TestGaudiProperty &rhs)
void line(std::ostream &os, const GenEvent &e)
GenEvent::particle_iterator begin(HepMC::GenEvent &e)
GenEvent::particle_iterator end(HepMC::GenEvent &e)
std::ostream & operator<<(std::ostream &os, const GenParticle *p)
int barcode_or_id(const ConstGenParticlePtr &p)
HepMC::GenVertex * GenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
const HepMC::GenVertex * ConstGenVertexPtr