/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Classes | Public Types | Public Member Functions | Protected Member Functions | Private Attributes | Friends
HepMC::GenVertex Class Reference

GenVertex contains information about decay vertices. More...

#include <GenVertex.h>

Collaboration diagram for HepMC::GenVertex:
Collaboration graph
[legend]

List of all members.

Classes

class  edge_iterator
 edge iterator More...
class  particle_iterator
 particle iterator More...
class  vertex_iterator
 vertex iterator More...

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
GenVertexoperator= (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
GenParticleremove_particle (GenParticle *particle)
 remove_particle finds *particle in the in and/or out list and removes it from these lists ...
 operator HepMC::FourVector () const
 conversion operator
 operator HepMC::ThreeVector () const
 conversion operator
GenEventparent_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()
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.
bool suggest_barcode (int the_bar_code)
 In general there is no reason to "suggest_barcode".
WeightContainerweights ()
 direct access to the weights container is allowed.
const WeightContainerweights () 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.
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
GenEventm_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

Detailed Description

GenVertex contains information about decay vertices.

HepMC::GenVertex contains the position in space and time of a decay. It also contains lists of incoming and outgoing particles.

Definition at line 47 of file GenVertex.h.


Member Typedef Documentation

const iterator for incoming particles

Definition at line 130 of file GenVertex.h.

const iterator for outgoing particles

Definition at line 133 of file GenVertex.h.


Constructor & Destructor Documentation

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]

Member Function Documentation

void HepMC::GenVertex::swap ( GenVertex other)

swap

GenVertex& HepMC::GenVertex::operator= ( const GenVertex invertex)

shallow

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 ...

it DOES NOT DELETE THE PARTICLE or its relations. You could delete the particle too as follows: delete vtx->remove_particle( particle ); remove a particle

HepMC::GenVertex::operator HepMC::FourVector ( ) const [inline]

conversion operator

Definition at line 366 of file GenVertex.h.

{ return position(); }
HepMC::GenVertex::operator HepMC::ThreeVector ( ) const [inline]

conversion operator

Definition at line 368 of file GenVertex.h.

{ return point3d(); }
GenEvent * HepMC::GenVertex::parent_event ( ) const [inline]

pointer to the event that owns this vertex

Definition at line 372 of file GenVertex.h.

{ return m_event; }
ThreeVector HepMC::GenVertex::point3d ( ) const [inline]

vertex position

Definition at line 374 of file GenVertex.h.

                                                { 
        return ThreeVector(m_position.x(),m_position.y(),m_position.z()); 
    }
FourVector HepMC::GenVertex::position ( ) const [inline]

vertex position and time

Definition at line 370 of file GenVertex.h.

{ return m_position; }
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.

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.

{ return m_id; }
void HepMC::GenVertex::set_id ( int  id) [inline]

set vertex ID

Definition at line 392 of file GenVertex.h.

{ m_id = id; }
int HepMC::GenVertex::barcode ( ) const [inline]

The barcode is the vertex's reference number, every vertex in the event has a unique barcode.

Vertex barcodes are negative numbers, particle barcodes are positive numbers. unique identifier

Definition at line 380 of file GenVertex.h.

{ 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.

{ 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.

    { 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.

                                              { 
        return m_particles_in.begin(); 
    }
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.

                                            { 
        return m_particles_in.end(); 
    }
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.

                                               { 
        return m_particles_out.begin();
    }
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.

                                             {  
        return m_particles_out.end(); 
    }
int HepMC::GenVertex::particles_in_size ( ) const [inline]

number of incoming particles

Definition at line 418 of file GenVertex.h.

                                                  {
        return m_particles_in.size(); 
    }
int HepMC::GenVertex::particles_out_size ( ) const [inline]

number of outgoing particles

Definition at line 422 of file GenVertex.h.

                                                   {
        return m_particles_out.size(); 
    }   
void HepMC::GenVertex::set_parent_event_ ( GenEvent evt) [protected]

only the GenEvent (friend) is allowed to set the parent_event, and barcode.

It is done automatically anytime you add a vertex to an event set parent event

void HepMC::GenVertex::set_barcode_ ( int  the_bar_code) [inline, protected]

set identifier

Definition at line 381 of file GenVertex.h.

{ m_barcode = bc; }
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.

                                                                    {
        return GenVertex::edge_iterator(*this, range);
    }
GenVertex::edge_iterator HepMC::GenVertex::edges_end ( IteratorRange  ) const [inline, protected]

end range

Definition at line 445 of file GenVertex.h.

                                                              {
        return GenVertex::edge_iterator();
    }
GenVertex::vertex_iterator HepMC::GenVertex::vertices_begin ( IteratorRange  range = relatives) [inline]

begin vertex range

Definition at line 468 of file GenVertex.h.

                             {
        // this is not const because the it could return itself
        return vertex_iterator( *this, range );
    }
GenVertex::vertex_iterator HepMC::GenVertex::vertices_end ( IteratorRange  ) [inline]

end vertex range

Definition at line 474 of file GenVertex.h.

                          {
        return vertex_iterator();
    }
GenVertex::particle_iterator HepMC::GenVertex::particles_begin ( IteratorRange  range = relatives) [inline]

begin particle range

Definition at line 489 of file GenVertex.h.

                              {
        return particle_iterator( *this, range );
    }
GenVertex::particle_iterator HepMC::GenVertex::particles_end ( IteratorRange  ) [inline]

end particle range

Definition at line 494 of file GenVertex.h.

                         {
        return particle_iterator();
    }
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


Friends And Related Function Documentation

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


Member Data Documentation

Definition at line 351 of file GenVertex.h.

Definition at line 352 of file GenVertex.h.

Definition at line 353 of file GenVertex.h.

int HepMC::GenVertex::m_id [private]

Definition at line 354 of file GenVertex.h.

Definition at line 355 of file GenVertex.h.

Definition at line 356 of file GenVertex.h.

Definition at line 357 of file GenVertex.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:49:37 for HepMC by doxygen 1.7.4