#include <GenEvent.h>
Collaboration diagram for HepMC::GenEvent:
Public Member Functions | |
GenEvent (int signal_process_id=0, int event_number=0, GenVertex *signal_vertex=0, const WeightContainer &weights=std::vector< double >(), const std::vector< long > &randomstates=std::vector< long >()) | |
default constructor creates null pointers to HeavyIon and PdfInfo | |
GenEvent (int signal_process_id, int event_number, GenVertex *signal_vertex, const WeightContainer &weights, const std::vector< long > &randomstates, const HeavyIon &ion, const PdfInfo &pdf) | |
explicit constructor that takes HeavyIon and PdfInfo | |
GenEvent (const GenEvent &inevent) | |
deep copy | |
GenEvent & | operator= (const GenEvent &inevent) |
make a deep copy | |
virtual | ~GenEvent () |
deletes all vertices/particles in this evt | |
void | swap (GenEvent &other) |
swap | |
void | print (std::ostream &ostr=std::cout) const |
dumps to ostr | |
void | print_version (std::ostream &ostr=std::cout) const |
dumps release version to ostr | |
GenParticle * | barcode_to_particle (int barCode) const |
Each vertex or particle has a barcode, which is just an integer which uniquely identifies it inside the event (i.e. | |
GenVertex * | barcode_to_vertex (int barCode) const |
Each vertex or particle has a barcode, which is just an integer which uniquely identifies it inside the event (i.e. | |
int | signal_process_id () const |
The integer ID that uniquely specifies this signal process, i.e. | |
int | event_number () const |
event number | |
int | mpi () const |
Returns the number of multi parton interactions in the event. | |
double | event_scale () const |
energy scale, see hep-ph/0109068 | |
double | alphaQCD () const |
QCD coupling, see hep-ph/0109068. | |
double | alphaQED () const |
QED coupling, see hep-ph/0109068. | |
GenVertex * | signal_process_vertex () const |
pointer to the vertex containing the signal process | |
bool | valid_beam_particles () const |
test to see if we have two valid beam particles | |
std::pair< HepMC::GenParticle *, HepMC::GenParticle * > | beam_particles () const |
pair of pointers to the two incoming beam particles | |
WeightContainer & | weights () |
direct access to the weights container is allowed. direct access to WeightContainer | |
const WeightContainer & | weights () const |
direct access to WeightContainer | |
HeavyIon const * | heavy_ion () const |
access the HeavyIon container if it exists | |
HeavyIon * | heavy_ion () |
PdfInfo const * | pdf_info () const |
access the PdfInfo container if it exists | |
PdfInfo * | pdf_info () |
std::vector< long > | random_states () const |
Vector of integers which specify the random number generator's state for this event. | |
void | set_signal_process_id (int id) |
set unique signal process id | |
void | set_event_number (int eventno) |
set event number | |
void | set_mpi (int) |
Use this to set the number of multi parton interactions in each event. | |
void | set_event_scale (double scale) |
set energy scale | |
void | set_alphaQCD (double a) |
set QCD coupling | |
void | set_alphaQED (double a) |
set QED coupling | |
void | set_signal_process_vertex (GenVertex *) |
set pointer to the vertex containing the signal process | |
bool | set_beam_particles (GenParticle *, GenParticle *) |
set incoming beam particles | |
bool | set_beam_particles (std::pair< HepMC::GenParticle *, HepMC::GenParticle * > const &) |
use a pair of GenParticle*'s to set incoming beam particles | |
void | set_random_states (const std::vector< long > &randomstates) |
provide random state information | |
void | set_heavy_ion (const HeavyIon &ion) |
provide a pointer to the HeavyIon container | |
void | set_pdf_info (const PdfInfo &p) |
provide a pointer to the PdfInfo container | |
int | particles_size () const |
how many particle barcodes exist? | |
bool | particles_empty () const |
return true if there are no particle barcodes | |
int | vertices_size () const |
how many vertex barcodes exist? | |
bool | vertices_empty () const |
return true if there are no vertex barcodes | |
bool | add_vertex (GenVertex *vtx) |
adds to evt and adopts | |
bool | remove_vertex (GenVertex *vtx) |
erases vtx from evt | |
void | clear () |
empties the entire event | |
vertex_const_iterator | vertices_begin () const |
begin vertex iteration | |
vertex_const_iterator | vertices_end () const |
end vertex iteration | |
vertex_iterator | vertices_begin () |
begin vertex iteration | |
vertex_iterator | vertices_end () |
end vertex iteration | |
particle_const_iterator | particles_begin () const |
begin particle iteration | |
particle_const_iterator | particles_end () const |
end particle iteration | |
particle_iterator | particles_begin () |
begin particle iteration | |
particle_iterator | particles_end () |
end particle iteration | |
Protected Member Functions | |
bool | set_barcode (GenParticle *p, int suggested_barcode=0) |
set the barcode - intended for use by GenParticle | |
bool | set_barcode (GenVertex *v, int suggested_barcode=0) |
set the barcode - intended for use by GenVertex | |
void | remove_barcode (GenParticle *p) |
intended for use by GenParticle | |
void | remove_barcode (GenVertex *v) |
intended for use by GenVertex | |
void | delete_all_vertices () |
delete all vertices owned by this event | |
Private Attributes | |
int | m_signal_process_id |
int | m_event_number |
int | m_mpi |
double | m_event_scale |
double | m_alphaQCD |
double | m_alphaQED |
GenVertex * | m_signal_process_vertex |
GenParticle * | m_beam_particle_1 |
GenParticle * | m_beam_particle_2 |
WeightContainer | m_weights |
std::vector< long > | m_random_states |
std::map< int, HepMC::GenVertex *, std::greater< int > > | m_vertex_barcodes |
std::map< int, HepMC::GenParticle *, std::less< int > > | m_particle_barcodes |
HeavyIon * | m_heavy_ion |
PdfInfo * | m_pdf_info |
Friends | |
class | GenParticle |
class | GenVertex |
class | vertex_const_iterator |
class | vertex_iterator |
class | particle_const_iterator |
class | particle_iterator |
Classes | |
class | particle_const_iterator |
HepMC::GenEvent::particle_const_iterator is used to iterate over all particles in the event. More... | |
class | particle_iterator |
HepMC::GenEvent::particle_iterator is used to iterate over all particles in the event. More... | |
class | vertex_const_iterator |
HepMC::GenEvent::vertex_const_iterator is used to iterate over all vertices in the event. More... | |
class | vertex_iterator |
HepMC::GenEvent::vertex_iterator is used to iterate over all vertices in the event. More... |
GenEvent is structured as a set of vertices which contain the particles.
Definition at line 142 of file GenEvent.h.
HepMC::GenEvent::GenEvent | ( | int | signal_process_id = 0 , |
|
int | event_number = 0 , |
|||
GenVertex * | signal_vertex = 0 , |
|||
const WeightContainer & | weights = std::vector< double >() , |
|||
const std::vector< long > & | randomstates = std::vector< long >() | |||
) |
HepMC::GenEvent::GenEvent | ( | int | signal_process_id, | |
int | event_number, | |||
GenVertex * | signal_vertex, | |||
const WeightContainer & | weights, | |||
const std::vector< long > & | randomstates, | |||
const HeavyIon & | ion, | |||
const PdfInfo & | ||||
) |
HepMC::GenEvent::GenEvent | ( | const GenEvent & | inevent | ) |
deep copy
virtual HepMC::GenEvent::~GenEvent | ( | ) | [virtual] |
deletes all vertices/particles in this evt
void HepMC::GenEvent::swap | ( | GenEvent & | other | ) |
swap
void HepMC::GenEvent::print | ( | std::ostream & | ostr = std::cout |
) | const |
dumps to ostr
void HepMC::GenEvent::print_version | ( | std::ostream & | ostr = std::cout |
) | const |
dumps release version to ostr
GenParticle * HepMC::GenEvent::barcode_to_particle | ( | int | barCode | ) | const [inline] |
Each vertex or particle has a barcode, which is just an integer which uniquely identifies it inside the event (i.e.
there is a one to one mapping between particle memory addresses and particle barcodes... and the same applied for vertices).
The value of a barcode has NO MEANING and NO ORDER! For the user's convenience, when an event is read in via an IO_method from an indexed list (like the HEPEVT common block), then the index will become the barcode for that particle.
Particle barcodes are always positive integers. The barcodes are chosen and set automatically when a vertex or particle comes under the ownership of an event (i.e. it is contained in an event).
Definition at line 618 of file GenEvent.h.
00619 { 00620 std::map<int,HepMC::GenParticle*>::const_iterator i 00621 = m_particle_barcodes.find(barCode); 00622 return ( i != m_particle_barcodes.end() ) ? (*i).second : 0; 00623 }
GenVertex * HepMC::GenEvent::barcode_to_vertex | ( | int | barCode | ) | const [inline] |
Each vertex or particle has a barcode, which is just an integer which uniquely identifies it inside the event (i.e.
there is a one to one mapping between particle memory addresses and particle barcodes... and the same applied for vertices).
The value of a barcode has NO MEANING and NO ORDER! For the user's convenience, when an event is read in via an IO_method from an indexed list (like the HEPEVT common block), then the index will become the barcode for that particle.
Vertex barcodes are always negative integers. The barcodes are chosen and set automatically when a vertex or particle comes under the ownership of an event (i.e. it is contained in an event).
Definition at line 638 of file GenEvent.h.
00639 { 00640 std::map<int,GenVertex*,std::greater<int> >::const_iterator i 00641 = m_vertex_barcodes.find(barCode); 00642 return ( i != m_vertex_barcodes.end() ) ? (*i).second : 0; 00643 }
int HepMC::GenEvent::signal_process_id | ( | ) | const [inline] |
The integer ID that uniquely specifies this signal process, i.e.
MSUB in Pythia. It is necessary to package this with each event rather than with the run because many processes may be generated within one run.
Definition at line 522 of file GenEvent.h.
00523 { return m_signal_process_id; }
int HepMC::GenEvent::event_number | ( | ) | const [inline] |
int HepMC::GenEvent::mpi | ( | ) | const [inline] |
Returns the number of multi parton interactions in the event.
This number is -1 if it is not set.
Definition at line 529 of file GenEvent.h.
00529 { return m_mpi; }
double HepMC::GenEvent::event_scale | ( | ) | const [inline] |
energy scale, see hep-ph/0109068
Definition at line 531 of file GenEvent.h.
00531 { return m_event_scale; }
double HepMC::GenEvent::alphaQCD | ( | ) | const [inline] |
QCD coupling, see hep-ph/0109068.
Definition at line 533 of file GenEvent.h.
00533 { return m_alphaQCD; }
double HepMC::GenEvent::alphaQED | ( | ) | const [inline] |
QED coupling, see hep-ph/0109068.
Definition at line 535 of file GenEvent.h.
00535 { return m_alphaQED; }
GenVertex * HepMC::GenEvent::signal_process_vertex | ( | ) | const [inline] |
pointer to the vertex containing the signal process
returns a (mutable) pointer to the signal process vertex
Definition at line 537 of file GenEvent.h.
00537 { 00539 return m_signal_process_vertex; 00540 }
bool HepMC::GenEvent::valid_beam_particles | ( | ) | const |
test to see if we have two valid beam particles
std::pair< HepMC::GenParticle *, HepMC::GenParticle * > HepMC::GenEvent::beam_particles | ( | ) | const [inline] |
pair of pointers to the two incoming beam particles
Definition at line 659 of file GenEvent.h.
00659 { 00660 return std::pair<GenParticle *,GenParticle *> (m_beam_particle_1, m_beam_particle_2); 00661 }
WeightContainer & HepMC::GenEvent::weights | ( | ) | [inline] |
direct access to the weights container is allowed. direct access to WeightContainer
Thus you can use myevt.weights()[2]; to access element 2 of the weights. or use myevt.weights().push_back( mywgt ); to add an element. and you can set the weights with myevt.weights() = myvector;
Definition at line 542 of file GenEvent.h.
00542 { return m_weights; }
const WeightContainer & HepMC::GenEvent::weights | ( | ) | const [inline] |
direct access to WeightContainer
Definition at line 544 of file GenEvent.h.
00545 { return m_weights; }
HeavyIon const * HepMC::GenEvent::heavy_ion | ( | ) | const [inline] |
access the HeavyIon container if it exists
Definition at line 547 of file GenEvent.h.
00548 { return m_heavy_ion; }
HeavyIon * HepMC::GenEvent::heavy_ion | ( | ) | [inline] |
PdfInfo const * HepMC::GenEvent::pdf_info | ( | ) | const [inline] |
access the PdfInfo container if it exists
Definition at line 553 of file GenEvent.h.
00554 { return m_pdf_info; }
PdfInfo * HepMC::GenEvent::pdf_info | ( | ) | [inline] |
std::vector< long > HepMC::GenEvent::random_states | ( | ) | const [inline] |
Vector of integers which specify the random number generator's state for this event.
It is left to the generator to make use of this. We envision a vector of RndmStatesTags to be included with a run class which would specify the meaning of the random_states.
Definition at line 564 of file GenEvent.h.
00565 { return m_random_states; }
void HepMC::GenEvent::set_signal_process_id | ( | int | id | ) | [inline] |
set unique signal process id
Definition at line 567 of file GenEvent.h.
00568 { m_signal_process_id = id; }
void HepMC::GenEvent::set_event_number | ( | int | eventno | ) | [inline] |
void HepMC::GenEvent::set_mpi | ( | int | ) | [inline] |
Use this to set the number of multi parton interactions in each event.
Definition at line 574 of file GenEvent.h.
00575 { m_mpi = nmpi; }
void HepMC::GenEvent::set_event_scale | ( | double | scale | ) | [inline] |
void HepMC::GenEvent::set_alphaQCD | ( | double | a | ) | [inline] |
void HepMC::GenEvent::set_alphaQED | ( | double | a | ) | [inline] |
void HepMC::GenEvent::set_signal_process_vertex | ( | GenVertex * | ) | [inline] |
set pointer to the vertex containing the signal process
Definition at line 584 of file GenEvent.h.
00584 { 00585 m_signal_process_vertex = vtx; 00586 if ( m_signal_process_vertex ) add_vertex( m_signal_process_vertex ); 00587 }
bool HepMC::GenEvent::set_beam_particles | ( | GenParticle * | , | |
GenParticle * | ||||
) |
set incoming beam particles
bool HepMC::GenEvent::set_beam_particles | ( | std::pair< HepMC::GenParticle *, HepMC::GenParticle * > const & | ) |
use a pair of GenParticle*'s to set incoming beam particles
void HepMC::GenEvent::set_random_states | ( | const std::vector< long > & | randomstates | ) | [inline] |
provide random state information
Definition at line 595 of file GenEvent.h.
00597 { m_random_states = randomstates; }
void HepMC::GenEvent::set_heavy_ion | ( | const HeavyIon & | ion | ) | [inline] |
provide a pointer to the HeavyIon container
Definition at line 589 of file GenEvent.h.
00590 { m_heavy_ion = new HeavyIon(ion); }
void HepMC::GenEvent::set_pdf_info | ( | const PdfInfo & | p | ) | [inline] |
provide a pointer to the PdfInfo container
Definition at line 592 of file GenEvent.h.
00593 { m_pdf_info = new PdfInfo(p); }
int HepMC::GenEvent::particles_size | ( | ) | const [inline] |
how many particle barcodes exist?
Definition at line 645 of file GenEvent.h.
00645 { 00646 return (int)m_particle_barcodes.size(); 00647 }
bool HepMC::GenEvent::particles_empty | ( | ) | const [inline] |
return true if there are no particle barcodes
Definition at line 648 of file GenEvent.h.
00648 { 00649 return (bool)m_particle_barcodes.empty(); 00650 }
int HepMC::GenEvent::vertices_size | ( | ) | const [inline] |
how many vertex barcodes exist?
Definition at line 651 of file GenEvent.h.
00651 { 00652 return (int)m_vertex_barcodes.size(); 00653 }
bool HepMC::GenEvent::vertices_empty | ( | ) | const [inline] |
return true if there are no vertex barcodes
Definition at line 654 of file GenEvent.h.
00654 { 00655 return (bool)m_vertex_barcodes.empty(); 00656 }
bool HepMC::GenEvent::add_vertex | ( | GenVertex * | vtx | ) |
adds to evt and adopts
bool HepMC::GenEvent::remove_vertex | ( | GenVertex * | vtx | ) |
erases vtx from evt
void HepMC::GenEvent::clear | ( | ) |
empties the entire event
vertex_const_iterator HepMC::GenEvent::vertices_begin | ( | ) | const [inline] |
begin vertex iteration
Definition at line 294 of file GenEvent.h.
00295 { return GenEvent::vertex_const_iterator( 00296 m_vertex_barcodes.begin() ); }
vertex_const_iterator HepMC::GenEvent::vertices_end | ( | ) | const [inline] |
end vertex iteration
Definition at line 298 of file GenEvent.h.
00299 { return GenEvent::vertex_const_iterator( 00300 m_vertex_barcodes.end() ); }
vertex_iterator HepMC::GenEvent::vertices_begin | ( | ) | [inline] |
begin vertex iteration
Definition at line 351 of file GenEvent.h.
00352 { return GenEvent::vertex_iterator( 00353 m_vertex_barcodes.begin() ); }
vertex_iterator HepMC::GenEvent::vertices_end | ( | ) | [inline] |
end vertex iteration
Definition at line 355 of file GenEvent.h.
00356 { return GenEvent::vertex_iterator( 00357 m_vertex_barcodes.end() ); }
particle_const_iterator HepMC::GenEvent::particles_begin | ( | ) | const [inline] |
begin particle iteration
Definition at line 413 of file GenEvent.h.
00414 { return GenEvent::particle_const_iterator( 00415 m_particle_barcodes.begin() ); }
particle_const_iterator HepMC::GenEvent::particles_end | ( | ) | const [inline] |
end particle iteration
Definition at line 417 of file GenEvent.h.
00418 { return GenEvent::particle_const_iterator( 00419 m_particle_barcodes.end() ); }
particle_iterator HepMC::GenEvent::particles_begin | ( | ) | [inline] |
begin particle iteration
Definition at line 466 of file GenEvent.h.
00467 { return GenEvent::particle_iterator( 00468 m_particle_barcodes.begin() ); }
particle_iterator HepMC::GenEvent::particles_end | ( | ) | [inline] |
end particle iteration
Definition at line 470 of file GenEvent.h.
00471 { return GenEvent::particle_iterator( 00472 m_particle_barcodes.end() ); }
bool HepMC::GenEvent::set_barcode | ( | GenParticle * | p, | |
int | suggested_barcode = 0 | |||
) | [protected] |
set the barcode - intended for use by GenParticle
bool HepMC::GenEvent::set_barcode | ( | GenVertex * | v, | |
int | suggested_barcode = 0 | |||
) | [protected] |
set the barcode - intended for use by GenVertex
void HepMC::GenEvent::remove_barcode | ( | GenParticle * | p | ) | [inline, protected] |
intended for use by GenParticle
Definition at line 599 of file GenEvent.h.
00600 { m_particle_barcodes.erase( p->barcode() ); }
void HepMC::GenEvent::remove_barcode | ( | GenVertex * | v | ) | [inline, protected] |
intended for use by GenVertex
Definition at line 602 of file GenEvent.h.
00603 { m_vertex_barcodes.erase( v->barcode() ); }
void HepMC::GenEvent::delete_all_vertices | ( | ) | [protected] |
delete all vertices owned by this event
friend class GenParticle [friend] |
Definition at line 143 of file GenEvent.h.
friend class GenVertex [friend] |
Definition at line 144 of file GenEvent.h.
friend class vertex_const_iterator [friend] |
Definition at line 292 of file GenEvent.h.
friend class vertex_iterator [friend] |
Definition at line 349 of file GenEvent.h.
friend class particle_const_iterator [friend] |
Definition at line 411 of file GenEvent.h.
friend class particle_iterator [friend] |
Definition at line 464 of file GenEvent.h.
int HepMC::GenEvent::m_signal_process_id [private] |
Definition at line 492 of file GenEvent.h.
int HepMC::GenEvent::m_event_number [private] |
Definition at line 493 of file GenEvent.h.
int HepMC::GenEvent::m_mpi [private] |
Definition at line 494 of file GenEvent.h.
double HepMC::GenEvent::m_event_scale [private] |
Definition at line 495 of file GenEvent.h.
double HepMC::GenEvent::m_alphaQCD [private] |
Definition at line 496 of file GenEvent.h.
double HepMC::GenEvent::m_alphaQED [private] |
Definition at line 497 of file GenEvent.h.
Definition at line 498 of file GenEvent.h.
GenParticle* HepMC::GenEvent::m_beam_particle_1 [private] |
Definition at line 499 of file GenEvent.h.
GenParticle* HepMC::GenEvent::m_beam_particle_2 [private] |
Definition at line 500 of file GenEvent.h.
WeightContainer HepMC::GenEvent::m_weights [private] |
Definition at line 501 of file GenEvent.h.
std::vector<long> HepMC::GenEvent::m_random_states [private] |
Definition at line 503 of file GenEvent.h.
std::map< int,HepMC::GenVertex*,std::greater<int> > HepMC::GenEvent::m_vertex_barcodes [private] |
Definition at line 506 of file GenEvent.h.
std::map< int,HepMC::GenParticle*,std::less<int> > HepMC::GenEvent::m_particle_barcodes [private] |
Definition at line 507 of file GenEvent.h.
HeavyIon* HepMC::GenEvent::m_heavy_ion [private] |
Definition at line 508 of file GenEvent.h.
PdfInfo* HepMC::GenEvent::m_pdf_info [private] |
Definition at line 509 of file GenEvent.h.