#include <GenVertex.h>
Collaboration diagram for HepMC::GenVertex:
Public Types | |
typedef std::vector< HepMC::GenParticle * >::const_iterator | particles_in_const_iterator |
const iterator for incoming particles | |
typedef std::vector< HepMC::GenParticle * >::const_iterator | particles_out_const_iterator |
const iterator for outgoing particles | |
Public Member Functions | |
GenVertex (const FourVector &position=FourVector(0, 0, 0, 0), int id=0, const WeightContainer &weights=std::vector< double >()) | |
default constructor | |
GenVertex (const GenVertex &invertex) | |
shallow copy | |
virtual | ~GenVertex () |
void | swap (GenVertex &other) |
swap | |
GenVertex & | operator= (const GenVertex &invertex) |
shallow | |
bool | operator== (const GenVertex &a) const |
equality | |
bool | operator!= (const GenVertex &a) const |
inequality | |
void | print (std::ostream &ostr=std::cout) const |
print vertex information | |
double | check_momentum_conservation () const |
|Sum (mom_in-mom_out)| | |
void | add_particle_in (GenParticle *inparticle) |
add incoming particle | |
void | add_particle_out (GenParticle *outparticle) |
add outgoing particle | |
GenParticle * | remove_particle (GenParticle *particle) |
remove_particle finds *particle in the in and/or out list and removes it from these lists . remove a particle | |
operator HepMC::FourVector () const | |
conversion operator | |
operator HepMC::ThreeVector () const | |
conversion operator | |
GenEvent * | parent_event () const |
pointer to the event that owns this vertex | |
ThreeVector | point3d () const |
vertex position | |
FourVector | position () const |
vertex position and time | |
void | set_position (const FourVector &position=FourVector(0, 0, 0, 0)) |
set vertex position and time | |
int | id () const |
we don't define what you use the id for -- but we imagine, for example it might code the meaning of the weights() vertex ID | |
void | set_id (int id) |
set vertex ID | |
int | barcode () const |
The barcode is the vertex's reference number, every vertex in the event has a unique barcode. unique identifier. | |
bool | suggest_barcode (int the_bar_code) |
In general there is no reason to "suggest_barcode". | |
WeightContainer & | weights () |
direct access to the weights container is allowed. | |
const WeightContainer & | weights () const |
const direct access to the weights container | |
particles_in_const_iterator | particles_in_const_begin () const |
begin iteration of incoming particles | |
particles_in_const_iterator | particles_in_const_end () const |
end iteration of incoming particles | |
particles_out_const_iterator | particles_out_const_begin () const |
begin iteration of outgoing particles | |
particles_out_const_iterator | particles_out_const_end () const |
end iteration of outgoing particles | |
int | particles_in_size () const |
number of incoming particles | |
int | particles_out_size () const |
number of outgoing particles | |
vertex_iterator | vertices_begin (IteratorRange range=relatives) |
begin vertex range | |
vertex_iterator | vertices_end (IteratorRange) |
end vertex range | |
particle_iterator | particles_begin (IteratorRange range=relatives) |
begin particle range | |
particle_iterator | particles_end (IteratorRange) |
end particle range | |
Protected Member Functions | |
void | set_parent_event_ (GenEvent *evt) |
only the GenEvent (friend) is allowed to set the parent_event, and barcode. set parent event | |
void | set_barcode_ (int the_bar_code) |
set identifier | |
void | change_parent_event_ (GenEvent *evt) |
for use with swap | |
int | edges_size (IteratorRange range=family) const |
size | |
edge_iterator | edges_begin (IteratorRange range=family) const |
begin range | |
edge_iterator | edges_end (IteratorRange) const |
end range | |
void | delete_adopted_particles () |
for internal use only | |
void | remove_particle_in (GenParticle *) |
for internal use only - remove particle from incoming list | |
void | remove_particle_out (GenParticle *) |
for internal use only - remove particle from outgoing list | |
Private Attributes | |
FourVector | m_position |
std::vector< HepMC::GenParticle * > | m_particles_in |
std::vector< HepMC::GenParticle * > | m_particles_out |
int | m_id |
WeightContainer | m_weights |
GenEvent * | m_event |
int | m_barcode |
Friends | |
class | GenEvent |
class | edge_iterator |
class | vertex_iterator |
class | particle_iterator |
std::ostream & | operator<< (std::ostream &, const GenVertex &) |
print vertex information | |
Classes | |
class | edge_iterator |
iterate over the family of edges connected to m_vertex begins with parents (incoming particles) then children (outgoing) This is not a recursive iterator . More... | |
class | particle_iterator |
Iterates over all particles connected via a graph. More... | |
class | vertex_iterator |
Iterates over all vertices connected via a graph to this vertex. More... |
It also contains lists of incoming and outgoing particles.
Definition at line 47 of file GenVertex.h.
typedef std::vector<HepMC::GenParticle*>::const_iterator HepMC::GenVertex::particles_in_const_iterator |
typedef std::vector<HepMC::GenParticle*>::const_iterator HepMC::GenVertex::particles_out_const_iterator |
HepMC::GenVertex::GenVertex | ( | const FourVector & | position = FourVector(0, 0, 0, 0) , |
|
int | id = 0 , |
|||
const WeightContainer & | weights = std::vector< double >() | |||
) |
default constructor
HepMC::GenVertex::GenVertex | ( | const GenVertex & | invertex | ) |
shallow copy
virtual HepMC::GenVertex::~GenVertex | ( | ) | [virtual] |
void HepMC::GenVertex::swap | ( | GenVertex & | other | ) |
swap
bool HepMC::GenVertex::operator== | ( | const GenVertex & | a | ) | const |
equality
bool HepMC::GenVertex::operator!= | ( | const GenVertex & | a | ) | const |
inequality
void HepMC::GenVertex::print | ( | std::ostream & | ostr = std::cout |
) | const |
print vertex information
double HepMC::GenVertex::check_momentum_conservation | ( | ) | const |
|Sum (mom_in-mom_out)|
void HepMC::GenVertex::add_particle_in | ( | GenParticle * | inparticle | ) |
add incoming particle
void HepMC::GenVertex::add_particle_out | ( | GenParticle * | outparticle | ) |
add outgoing particle
GenParticle* HepMC::GenVertex::remove_particle | ( | GenParticle * | particle | ) |
remove_particle finds *particle in the in and/or out list and removes it from these lists . remove a particle
.. it DOES NOT DELETE THE PARTICLE or its relations. You could delete the particle too as follows: delete vtx->remove_particle( particle );
HepMC::GenVertex::operator HepMC::FourVector | ( | ) | const [inline] |
HepMC::GenVertex::operator HepMC::ThreeVector | ( | ) | const [inline] |
GenEvent * HepMC::GenVertex::parent_event | ( | ) | const [inline] |
pointer to the event that owns this vertex
Definition at line 372 of file GenVertex.h.
00372 { return m_event; }
ThreeVector HepMC::GenVertex::point3d | ( | ) | const [inline] |
vertex position
Definition at line 374 of file GenVertex.h.
00374 { 00375 return ThreeVector(m_position.x(),m_position.y(),m_position.z()); 00376 }
FourVector HepMC::GenVertex::position | ( | ) | const [inline] |
void HepMC::GenVertex::set_position | ( | const FourVector & | position = FourVector(0, 0, 0, 0) |
) | [inline] |
set vertex position and time
Definition at line 388 of file GenVertex.h.
00388 { 00389 m_position = position; 00390 }
int HepMC::GenVertex::id | ( | ) | const [inline] |
we don't define what you use the id for -- but we imagine, for example it might code the meaning of the weights() vertex ID
Definition at line 378 of file GenVertex.h.
00378 { return m_id; }
void HepMC::GenVertex::set_id | ( | int | id | ) | [inline] |
int HepMC::GenVertex::barcode | ( | ) | const [inline] |
The barcode is the vertex's reference number, every vertex in the event has a unique barcode. unique identifier.
Vertex barcodes are negative numbers, particle barcodes are positive numbers.
Definition at line 380 of file GenVertex.h.
00380 { return m_barcode; }
bool HepMC::GenVertex::suggest_barcode | ( | int | the_bar_code | ) |
In general there is no reason to "suggest_barcode".
WeightContainer & HepMC::GenVertex::weights | ( | ) | [inline] |
direct access to the weights container is allowed.
Definition at line 383 of file GenVertex.h.
00383 { return m_weights; }
const WeightContainer & HepMC::GenVertex::weights | ( | ) | const [inline] |
const direct access to the weights container
Definition at line 385 of file GenVertex.h.
00386 { return m_weights; }
GenVertex::particles_in_const_iterator HepMC::GenVertex::particles_in_const_begin | ( | ) | const [inline] |
begin iteration of incoming particles
Definition at line 399 of file GenVertex.h.
00399 { 00400 return m_particles_in.begin(); 00401 }
GenVertex::particles_in_const_iterator HepMC::GenVertex::particles_in_const_end | ( | ) | const [inline] |
end iteration of incoming particles
Definition at line 404 of file GenVertex.h.
00404 { 00405 return m_particles_in.end(); 00406 }
GenVertex::particles_out_const_iterator HepMC::GenVertex::particles_out_const_begin | ( | ) | const [inline] |
begin iteration of outgoing particles
Definition at line 409 of file GenVertex.h.
00409 { 00410 return m_particles_out.begin(); 00411 }
GenVertex::particles_out_const_iterator HepMC::GenVertex::particles_out_const_end | ( | ) | const [inline] |
end iteration of outgoing particles
Definition at line 414 of file GenVertex.h.
00414 { 00415 return m_particles_out.end(); 00416 }
int HepMC::GenVertex::particles_in_size | ( | ) | const [inline] |
number of incoming particles
Definition at line 418 of file GenVertex.h.
00418 { 00419 return m_particles_in.size(); 00420 }
int HepMC::GenVertex::particles_out_size | ( | ) | const [inline] |
number of outgoing particles
Definition at line 422 of file GenVertex.h.
00422 { 00423 return m_particles_out.size(); 00424 }
void HepMC::GenVertex::set_parent_event_ | ( | GenEvent * | evt | ) | [protected] |
only the GenEvent (friend) is allowed to set the parent_event, and barcode. set parent event
It is done automatically anytime you add a vertex to an event
void HepMC::GenVertex::set_barcode_ | ( | int | the_bar_code | ) | [inline, protected] |
void HepMC::GenVertex::change_parent_event_ | ( | GenEvent * | evt | ) | [protected] |
for use with swap
int HepMC::GenVertex::edges_size | ( | IteratorRange | range = family |
) | const [protected] |
size
GenVertex::edge_iterator HepMC::GenVertex::edges_begin | ( | IteratorRange | range = family |
) | const [inline, protected] |
begin range
Definition at line 440 of file GenVertex.h.
00441 { 00442 return GenVertex::edge_iterator(*this, range); 00443 }
GenVertex::edge_iterator HepMC::GenVertex::edges_end | ( | IteratorRange | ) | const [inline, protected] |
end range
Definition at line 445 of file GenVertex.h.
00446 { 00447 return GenVertex::edge_iterator(); 00448 }
GenVertex::vertex_iterator HepMC::GenVertex::vertices_begin | ( | IteratorRange | range = relatives |
) | [inline] |
begin vertex range
Definition at line 468 of file GenVertex.h.
00469 { 00470 // this is not const because the it could return itself 00471 return vertex_iterator( *this, range ); 00472 }
GenVertex::vertex_iterator HepMC::GenVertex::vertices_end | ( | IteratorRange | ) | [inline] |
end vertex range
Definition at line 474 of file GenVertex.h.
00475 { 00476 return vertex_iterator(); 00477 }
GenVertex::particle_iterator HepMC::GenVertex::particles_begin | ( | IteratorRange | range = relatives |
) | [inline] |
begin particle range
Definition at line 489 of file GenVertex.h.
00490 { 00491 return particle_iterator( *this, range ); 00492 }
GenVertex::particle_iterator HepMC::GenVertex::particles_end | ( | IteratorRange | ) | [inline] |
end particle range
Definition at line 494 of file GenVertex.h.
00495 { 00496 return particle_iterator(); 00497 }
void HepMC::GenVertex::delete_adopted_particles | ( | ) | [protected] |
for internal use only
void HepMC::GenVertex::remove_particle_in | ( | GenParticle * | ) | [protected] |
for internal use only - remove particle from incoming list
void HepMC::GenVertex::remove_particle_out | ( | GenParticle * | ) | [protected] |
for internal use only - remove particle from outgoing list
friend class GenEvent [friend] |
Definition at line 51 of file GenVertex.h.
friend class edge_iterator [friend] |
Definition at line 206 of file GenVertex.h.
friend class vertex_iterator [friend] |
Definition at line 285 of file GenVertex.h.
friend class particle_iterator [friend] |
Definition at line 333 of file GenVertex.h.
std::ostream& operator<< | ( | std::ostream & | , | |
const GenVertex & | ||||
) | [friend] |
print vertex information
FourVector HepMC::GenVertex::m_position [private] |
Definition at line 351 of file GenVertex.h.
std::vector<HepMC::GenParticle*> HepMC::GenVertex::m_particles_in [private] |
Definition at line 352 of file GenVertex.h.
std::vector<HepMC::GenParticle*> HepMC::GenVertex::m_particles_out [private] |
Definition at line 353 of file GenVertex.h.
int HepMC::GenVertex::m_id [private] |
Definition at line 354 of file GenVertex.h.
WeightContainer HepMC::GenVertex::m_weights [private] |
Definition at line 355 of file GenVertex.h.
GenEvent* HepMC::GenVertex::m_event [private] |
Definition at line 356 of file GenVertex.h.
int HepMC::GenVertex::m_barcode [private] |
Definition at line 357 of file GenVertex.h.