2 #ifndef HEPMC_GEN_VERTEX_H
3 #define HEPMC_GEN_VERTEX_H
20 #ifdef __SUNPRO_CC // Solaris CC 5.2
21 #define NEED_SOLARIS_FRIEND_FEATURE
24 #include "HepMC/WeightContainer.h"
25 #include "HepMC/SimpleVector.h"
26 #include "HepMC/IteratorRange.h"
36 class GenVertexParticleRange;
37 class GenParticleProductionRange;
38 class ConstGenParticleProductionRange;
39 class GenParticleEndRange;
40 class ConstGenParticleEndRange;
58 #ifdef NEED_SOLARIS_FRIEND_FEATURE
67 #endif // NEED_SOLARIS_FRIEND_FEATURE
81 void print( std::ostream& ostr = std::cout )
const;
151 typedef std::vector<HepMC::GenParticle*>::const_iterator
154 typedef std::vector<HepMC::GenParticle*>::const_iterator
195 public std::iterator<std::forward_iterator_tag,HepMC::GenParticle*,ptrdiff_t>{
229 std::vector<HepMC::GenParticle*>::const_iterator m_set_iter;
230 bool m_is_inparticle_iter;
264 public std::iterator<std::forward_iterator_tag,HepMC::GenVertex*,ptrdiff_t>{
271 std::set<const HepMC::GenVertex*>& visited_vertices );
294 std::set<const HepMC::GenVertex*>&
312 std::set<const HepMC::GenVertex*>* m_visited_vertices;
340 public std::iterator<std::forward_iterator_tag,GenParticle*,ptrdiff_t>{
388 std::vector<HepMC::GenParticle*> m_particles_in;
389 std::vector<HepMC::GenParticle*> m_particles_out;
422 {
return m_weights; }
436 return m_particles_in.begin();
441 return m_particles_in.end();
446 return m_particles_out.begin();
451 return m_particles_out.end();
455 return m_particles_in.size();
459 return m_particles_out.size();
469 return !(**
this == *a);
493 return !(**
this == *a);
522 return !(**
this == *a);
537 #endif // HEPMC_GEN_VERTEX_H
void convert_position(const double &)
vertex_iterator & operator++(void)
Pre-fix increment.
GenParticleEndRange particles_out(GenParticle &, IteratorRange range=relatives)
outgoing particle range
particle_iterator particles_begin(IteratorRange range=relatives)
begin particle range
GenVertex * follow_edge_()
non-null if recursive iter. created
bool operator==(const vertex_iterator &) const
equality
const GenVertex * vertex_root() const
root vertex of this iteration
bool operator!=(const particle_iterator &) const
inequality
int barcode() const
unique identifier
edge_iterator edges_end(IteratorRange) const
end range
double z() const
return z
vertex_iterator vertices_end(IteratorRange)
end vertex range
bool is_parent() const
true if parent of root vtx
std::vector< HepMC::GenParticle * >::const_iterator particles_in_const_iterator
const iterator for incoming particles
GenParticle * remove_particle(GenParticle *particle)
remove a particle
edge_iterator edges_begin(IteratorRange range=family) const
begin range
void print(std::ostream &ostr=std::cout) const
print vertex information
ThreeVector point3d() const
vertex position
void add_particle_in(GenParticle *inparticle)
add incoming particle
GenParticle * operator*(void) const
return a pointer to a particle
void copy_with_own_set(const vertex_iterator &v_iter, std::set< const HepMC::GenVertex * > &visited_vertices)
intended for internal use only.
particles_out_const_iterator particles_out_const_end() const
end iteration of outgoing particles
std::vector< HepMC::GenParticle * >::const_iterator particles_out_const_iterator
const iterator for outgoing particles
bool suggest_barcode(int the_bar_code)
In general there is no reason to "suggest_barcode".
GenVertex * vertex_root() const
vertex that this iterator begins from
edge_iterator & operator++(void)
Pre-fix increment.
void set_id(int id)
set vertex ID
vertex_iterator & operator=(const vertex_iterator &)
make a copy
GenVertexParticleRange acts like a collection of particles.
double y() const
return y
void set_position(const FourVector &position=FourVector(0, 0, 0, 0))
set vertex position and time
vertex_iterator vertices_begin(IteratorRange range=relatives)
begin vertex range
void set_barcode_(int the_bar_code)
set identifier
GenVertex contains information about decay vertices.
bool is_child() const
true if child of root vtx
The GenEvent class is the core of HepMC.
GenParticleEndRange acts like a collection of particles.
particle_iterator particles_end(IteratorRange)
end particle range
bool operator==(const GenVertex &a) const
equality
void remove_particle_out(GenParticle *)
for internal use only - remove particle from outgoing list
void add_particle_out(GenParticle *outparticle)
add outgoing particle
GenVertex * operator*(void) const
return a pointer to a vertex
particles_in_const_iterator particles_in_const_end() const
end iteration of incoming particles
GenVertexParticleRange particles(IteratorRange range=relatives)
particle range
double check_momentum_conservation() const
|Sum (three_mom_in-three_mom_out)|
bool operator!=(const GenVertex &a) const
inequality
void change_parent_event_(GenEvent *evt)
for use with swap
ThreeVector is a simple representation of a position or displacement 3 vector.
double x() const
return x
GenEvent * parent_event() const
pointer to the event that owns this vertex
int particles_out_size() const
number of outgoing particles
bool operator==(const edge_iterator &a) const
equality
void remove_particle_in(GenParticle *)
for internal use only - remove particle from incoming list
particles_out_const_iterator particles_out_const_begin() const
begin iteration of outgoing particles
friend std::ostream & operator<<(std::ostream &, const GenVertex &)
print vertex information
edge_iterator & operator=(const edge_iterator &p)
make a copy
GenParticleProductionRange acts like a collection of particles.
particle_iterator & operator++(void)
Pre-fix increment.
WeightContainer & weights()
direct access to the weights container is allowed.
const FourVector & position() const
vertex position and time
void set_parent_event_(GenEvent *evt)
set parent event
FourVector is a simple representation of a physics 4 vector.
bool operator!=(const edge_iterator &a) const
inequality
IteratorRange
type of iteration
GenParticle * advance_to_first_()
"first" particle
int edges_size(IteratorRange range=family) const
size
Container for the Weights associated with an event or vertex.
void copy_recursive_iterator_(const vertex_iterator *recursive_v_iter)
copy recursive iterator
bool operator==(const particle_iterator &) const
equality
GenVertex(const FourVector &position=FourVector(0, 0, 0, 0), int id=0, const WeightContainer &weights=std::vector< double >())
default constructor
particles_in_const_iterator particles_in_const_begin() const
begin iteration of incoming particles
int particles_in_size() const
number of incoming particles
GenParticle * operator*(void) const
return a pointer to a particle
void delete_adopted_particles()
for internal use only
void swap(GenVertex &other)
swap
GenParticleProductionRange particles_in(GenParticle &, IteratorRange range=relatives)
incoming particle range
IteratorRange range() const
iterator range
particle_iterator & operator=(const particle_iterator &)
make a copy
The GenParticle class contains information about generated particles.
bool operator!=(const vertex_iterator &) const
inequality
GenVertex & operator=(const GenVertex &invertex)
shallow