HepMC3 event record library
Public Member Functions | Private Attributes
HepMC3Event Class Reference

HEPEvent Interface to HepMC classes. More...

#include <HepMC3Event.h>

+ Inheritance diagram for HepMC3Event:
+ Collaboration diagram for HepMC3Event:

Public Member Functions

 HepMC3Event (HepMC3::GenEvent &e, bool include_self_decay=true)
 
 ~HepMC3Event ()
 
int GetNumOfParticles ()
 
int GetEventNumber ()
 
void SetNumOfParticles (int n)
 
void SetEventNumber (int ev)
 
HEPParticle * GetParticle (int idx)
 
HepMC3ParticleGetParticleWithId (int id)
 
void SetParticle (int idx, HEPParticle *particle)
 
void AddParticle (HEPParticle *particle)
 
void Clear (int fromIdx)
 
void InsertParticle (int at_idx, HEPParticle *p)
 
void AddParticle (int id, int pdgid, int status, int mother, int mother2, int firstdaughter, int lastdaughter, double E, double px, double py, double pz, double m, double vx, double vy, double vz, double tau)
 
std::vector< double > * Sum4Momentum ()
 
bool CountSelfDecays ()
 
HEPParticleList * FindParticle (int pdg, HEPParticleList *list)
 

Private Attributes

HepMC3Particle ** particles
 
bool count_self_decays
 
HepMC3::GenEventevt
 
int m_particle_count
 

Detailed Description

HEPEvent Interface to HepMC classes.

This class provides a set of methods that allow access to event data stored in HepMC format. The HepMC data structures are used by HEP programs as storage for event records in C++

This class extends the GenEvent class and implements the methods of HEPEvent used by MC-TESTER. Not all functions are needed by the MC-TESTER, so dummy defintion are introduced for these

Definition at line 30 of file HepMC3Event.h.

Constructor & Destructor Documentation

HepMC3Event ( HepMC3::GenEvent e,
bool  include_self_decay = true 
)

Constructor for HepMC3Event. Creates a new event using the event info from GenEvent e. Also copies each particle into a HepMC3Particle and stores them as a list.

Destructor for HepMC3Event

Member Function Documentation

void AddParticle ( HEPParticle *  particle)

Dummy function definition. Do not use

void AddParticle ( int  id,
int  pdgid,
int  status,
int  mother,
int  mother2,
int  firstdaughter,
int  lastdaughter,
double  E,
double  px,
double  py,
double  pz,
double  m,
double  vx,
double  vy,
double  vz,
double  tau 
)

Dummy function definition. Do not use

void Clear ( int  fromIdx)

Dummy function definition. Do not use

HEPParticleList* FindParticle ( int  pdg,
HEPParticleList *  list 
)

Implementation of FindParticle needed for excluding "self decays"

int GetEventNumber ( )

returns the event number

int GetNumOfParticles ( )

return the number of particles in the event

HEPParticle* GetParticle ( int  idx)

Returns the HEPParticle with id "idx". This is the id number as used by MC-TESTER and not the id number from the original GenParticle. Note: Indecies begin at 1.

HepMC3Particle* GetParticleWithId ( int  id)

Returns the HepMC3Particle by its id. This is the ID number from the original GenParticle and not the ID used by MC-TESTER.

void InsertParticle ( int  at_idx,
HEPParticle *  p 
)

Dummy function definition. Do not use

void SetEventNumber ( int  ev)

Dummy function definition. Do not use

void SetNumOfParticles ( int  n)

Dummy function definition. Do not use

void SetParticle ( int  idx,
HEPParticle *  particle 
)

Dummy function definition. Do not use

Field Documentation

bool count_self_decays
private

Flag for how particles decaying into there own type are treated

Definition at line 37 of file HepMC3Event.h.

HepMC3Particle** particles
private

List of particles in the event

Definition at line 34 of file HepMC3Event.h.


The documentation for this class was generated from the following file: