ATLAS Offline Software
Loading...
Searching...
No Matches
GenVertex.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4/* Author: Andrii Verbytskyi andrii.verbytskyi@mpp.mpg.de */
5
6#ifndef ATLASHEPMC_GENVERTEX_H
7#define ATLASHEPMC_GENVERTEX_H
8#include "HepMC3/GenVertex.h"
9#include "HepMC3/PrintStreams.h"
10#include "AtlasHepMC/Barcode.h"
12namespace HepMC3 {
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(); }
17
20inline std::ostream& operator << (std::ostream& os, GenVertexPtr v) { ConstGenVertexPtr cv = v; Print::line(os,std::move(cv)); return os; }
21}
22namespace HepMC {
23typedef HepMC3::GenVertexPtr GenVertexPtr;
24typedef HepMC3::ConstGenVertexPtr ConstGenVertexPtr;
25inline GenVertexPtr newGenVertexPtr(const HepMC3::FourVector& pos = HepMC3::FourVector::ZERO_VECTOR(), const int i=0) {
26 GenVertexPtr v = std::make_shared<HepMC3::GenVertex>(pos);
27 v->set_status(i);
28 return v;
29}
30inline int barcode_or_id(const ConstGenVertexPtr& p) { return p->id();}
31using HepMC3::GenVertex;
32}
33#endif
std::vector< HepMC3::GenParticlePtr >::const_iterator begin(HepMC3::GenEvent &e)
Definition GenEvent.h:30
std::ostream & operator<<(std::ostream &os, GenParticlePtr p)
Print one-line info with idiomatic C++ printing.
Definition GenParticle.h:16
std::vector< HepMC3::GenParticlePtr >::const_iterator end(HepMC3::GenEvent &e)
Definition GenEvent.h:31
int barcode_or_id(const ConstGenParticlePtr &p)
Definition GenParticle.h:27
GenVertexPtr newGenVertexPtr(const HepMC3::FourVector &pos=HepMC3::FourVector::ZERO_VECTOR(), const int i=0)
Definition GenVertex.h:25
HepMC3::GenVertexPtr GenVertexPtr
Definition GenVertex.h:23
HepMC3::ConstGenVertexPtr ConstGenVertexPtr
Definition GenVertex.h:24