Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | Protected Member Functions | List of all members
genbb::primary_event Class Reference

A primary event from a Monte-Carlo generator. More...

#include <bayeux/genbb_help/primary_event.h>

Inheritance diagram for genbb::primary_event:
datatools::i_serializable datatools::i_tree_dumpable

Public Types

typedef std::list< primary_particleparticles_col_type
 Collection of primary particles. More...
 
- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 }
 Enumeration for standard output streams. More...
 

Public Member Functions

bool is_valid () const
 Check the validity of the primary event. More...
 
void reset ()
 Reset the primary event. More...
 
bool has_time () const
 Check if time is defined. More...
 
void set_time (double)
 Set the time. More...
 
double get_time () const
 Return the time. More...
 
bool has_vertex () const
 Check if vertex is defined. More...
 
void set_vertex (const geomtools::vector_3d &)
 Set the vertex. More...
 
const geomtools::vector_3dget_vertex () const
 Return the time. More...
 
void set_genbb_weight (double genbb_weight_)
 Set the weight. More...
 
double get_genbb_weight () const
 Return the weight. More...
 
bool is_genbb_weighted () const
 Check if the event is weighted. More...
 
const particles_col_typeget_particles () const
 Return a const reference to the list of primary particles. More...
 
particles_col_typegrab_particles ()
 Return a mutable reference to the list of primary particles. More...
 
void add_particle (const primary_particle &)
 Add a primary particle. More...
 
primary_particleadd_particle ()
 Add a primary particle. More...
 
unsigned int get_number_of_particles () const
 Return the number of primary particles. More...
 
const primary_particleget_particle (int) const
 Return a const reference to primary particle at given index. More...
 
primary_particlegrab_particle (int)
 Return a mutable reference to primary particle at given index. More...
 
const primary_particleget_particle_of_type (int type_, int occurence_=0) const
 Return a const pointer to primary particle of a certain type with given occurence. More...
 
void remove_particle (int type_, int occurence_=0)
 Remove particle. More...
 
bool has_label () const
 Check if label is set. More...
 
const std::string & get_label () const
 Return the label. More...
 
void set_label (const std::string &l_)
 Set the label. More...
 
void reset_label ()
 Reset the label. More...
 
bool has_classification () const
 Check if classification is set. More...
 
const std::string & get_classification () const
 Return the classification string. More...
 
void set_classification (const std::string &c_)
 Set the classification string. More...
 
void reset_classification ()
 Reset the classification string. More...
 
void compute_classification ()
 Compute the classification string. More...
 
void rotate (double a_phi, double a_theta, double a_delta)
 Rotate the event. More...
 
double get_total_kinetic_energy () const
 Return the total kinetic energy of the event. More...
 
const datatools::propertiesget_auxiliaries () const
 Return a const reference to the auxiliary properties. More...
 
datatools::propertiesgrab_auxiliaries ()
 Return a mutable reference to the auxiliary properties. More...
 
void set_auxiliaries (const datatools::properties &)
 Set auxiliary properties. More...
 
void shift_particles_time (double delta_time_, int from_=0)
 Shift the time of the particles by a delay. More...
 
 primary_event ()
 Default constructor. More...
 
virtual ~primary_event ()
 Destructor. More...
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart print. More...
 
void dump (std::ostream &a_out=std::clog, const std::string &a_indent="") const
 Print. More...
 
void dump (std::ostream &a_out, const std::string &a_title, const std::string &a_indent) const
 Print. More...
 
void assign_generation_ids ()
 Assign generation Ids to all particle. More...
 
void remove_generation_ids ()
 Remove generation Ids from all particle. More...
 
- Public Member Functions inherited from datatools::i_serializable
 i_serializable ()
 Default constructor. More...
 
virtual ~i_serializable ()
 Destructor. More...
 
virtual const std::string & get_serial_tag () const =0
 Return the serialization string identifier of the class. More...
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 Constructor. More...
 
virtual ~i_tree_dumpable ()
 Destructor. More...
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 Main new interface method for printing. More...
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 Printing with jsonized options. More...
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 Printing with jsonized options. More...
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 

Protected Member Functions

void _set_defaults ()
 Set default attibutes values. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 

Detailed Description

A primary event from a Monte-Carlo generator.

Member Typedef Documentation

◆ particles_col_type

Collection of primary particles.

Constructor & Destructor Documentation

◆ primary_event()

genbb::primary_event::primary_event ( )

Default constructor.

◆ ~primary_event()

virtual genbb::primary_event::~primary_event ( )
virtual

Destructor.

Member Function Documentation

◆ _set_defaults()

void genbb::primary_event::_set_defaults ( )
protected

Set default attibutes values.

◆ add_particle() [1/2]

void genbb::primary_event::add_particle ( const primary_particle )

Add a primary particle.

◆ add_particle() [2/2]

primary_particle& genbb::primary_event::add_particle ( )

Add a primary particle.

◆ assign_generation_ids()

void genbb::primary_event::assign_generation_ids ( )

Assign generation Ids to all particle.

◆ compute_classification()

void genbb::primary_event::compute_classification ( )

Compute the classification string.

◆ dump() [1/2]

void genbb::primary_event::dump ( std::ostream &  a_out = std::clog,
const std::string &  a_indent = "" 
) const

Print.

◆ dump() [2/2]

void genbb::primary_event::dump ( std::ostream &  a_out,
const std::string &  a_title,
const std::string &  a_indent 
) const

Print.

◆ get_auxiliaries()

const datatools::properties& genbb::primary_event::get_auxiliaries ( ) const

Return a const reference to the auxiliary properties.

◆ get_classification()

const std::string& genbb::primary_event::get_classification ( ) const

Return the classification string.

◆ get_genbb_weight()

double genbb::primary_event::get_genbb_weight ( ) const

Return the weight.

◆ get_label()

const std::string& genbb::primary_event::get_label ( ) const

Return the label.

◆ get_number_of_particles()

unsigned int genbb::primary_event::get_number_of_particles ( ) const

Return the number of primary particles.

◆ get_particle()

const primary_particle& genbb::primary_event::get_particle ( int  ) const

Return a const reference to primary particle at given index.

◆ get_particle_of_type()

const primary_particle* genbb::primary_event::get_particle_of_type ( int  type_,
int  occurence_ = 0 
) const

Return a const pointer to primary particle of a certain type with given occurence.

◆ get_particles()

const particles_col_type& genbb::primary_event::get_particles ( ) const

Return a const reference to the list of primary particles.

◆ get_time()

double genbb::primary_event::get_time ( ) const

Return the time.

◆ get_total_kinetic_energy()

double genbb::primary_event::get_total_kinetic_energy ( ) const

Return the total kinetic energy of the event.

◆ get_vertex()

const geomtools::vector_3d& genbb::primary_event::get_vertex ( ) const

Return the time.

◆ grab_auxiliaries()

datatools::properties& genbb::primary_event::grab_auxiliaries ( )

Return a mutable reference to the auxiliary properties.

◆ grab_particle()

primary_particle& genbb::primary_event::grab_particle ( int  )

Return a mutable reference to primary particle at given index.

◆ grab_particles()

particles_col_type& genbb::primary_event::grab_particles ( )

Return a mutable reference to the list of primary particles.

◆ has_classification()

bool genbb::primary_event::has_classification ( ) const

Check if classification is set.

◆ has_label()

bool genbb::primary_event::has_label ( ) const

Check if label is set.

◆ has_time()

bool genbb::primary_event::has_time ( ) const

Check if time is defined.

◆ has_vertex()

bool genbb::primary_event::has_vertex ( ) const

Check if vertex is defined.

◆ is_genbb_weighted()

bool genbb::primary_event::is_genbb_weighted ( ) const

Check if the event is weighted.

◆ is_valid()

bool genbb::primary_event::is_valid ( ) const

Check the validity of the primary event.

◆ remove_generation_ids()

void genbb::primary_event::remove_generation_ids ( )

Remove generation Ids from all particle.

◆ remove_particle()

void genbb::primary_event::remove_particle ( int  type_,
int  occurence_ = 0 
)

Remove particle.

◆ reset()

void genbb::primary_event::reset ( )

Reset the primary event.

◆ reset_classification()

void genbb::primary_event::reset_classification ( )

Reset the classification string.

◆ reset_label()

void genbb::primary_event::reset_label ( )

Reset the label.

◆ rotate()

void genbb::primary_event::rotate ( double  a_phi,
double  a_theta,
double  a_delta 
)

Rotate the event.

◆ set_auxiliaries()

void genbb::primary_event::set_auxiliaries ( const datatools::properties )

Set auxiliary properties.

◆ set_classification()

void genbb::primary_event::set_classification ( const std::string &  c_)

Set the classification string.

◆ set_genbb_weight()

void genbb::primary_event::set_genbb_weight ( double  genbb_weight_)

Set the weight.

◆ set_label()

void genbb::primary_event::set_label ( const std::string &  l_)

Set the label.

◆ set_time()

void genbb::primary_event::set_time ( double  )

Set the time.

◆ set_vertex()

void genbb::primary_event::set_vertex ( const geomtools::vector_3d )

Set the vertex.

◆ shift_particles_time()

void genbb::primary_event::shift_particles_time ( double  delta_time_,
int  from_ = 0 
)

Shift the time of the particles by a delay.

◆ tree_dump()

virtual void genbb::primary_event::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.


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