Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
A primary event from a Monte-Carlo generator. More...
#include <bayeux/genbb_help/primary_event.h>
Public Types | |
typedef std::list< primary_particle > | particles_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_3d & | get_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_type & | get_particles () const |
Return a const reference to the list of primary particles. More... | |
particles_col_type & | grab_particles () |
Return a mutable reference to the list of primary particles. More... | |
void | add_particle (const primary_particle &) |
Add a primary particle. More... | |
primary_particle & | add_particle () |
Add a primary particle. More... | |
unsigned int | get_number_of_particles () const |
Return the number of primary particles. More... | |
const primary_particle & | get_particle (int) const |
Return a const reference to primary particle at given index. More... | |
primary_particle & | grab_particle (int) |
Return a mutable reference to primary particle at given index. More... | |
const primary_particle * | get_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::properties & | get_auxiliaries () const |
Return a const reference to the auxiliary properties. More... | |
datatools::properties & | grab_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_) |
A primary event from a Monte-Carlo generator.
typedef std::list<primary_particle> genbb::primary_event::particles_col_type |
Collection of primary particles.
genbb::primary_event::primary_event | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
protected |
Set default attibutes values.
void genbb::primary_event::add_particle | ( | const primary_particle & | ) |
Add a primary particle.
primary_particle& genbb::primary_event::add_particle | ( | ) |
Add a primary particle.
void genbb::primary_event::assign_generation_ids | ( | ) |
Assign generation Ids to all particle.
void genbb::primary_event::compute_classification | ( | ) |
Compute the classification string.
void genbb::primary_event::dump | ( | std::ostream & | a_out = std::clog , |
const std::string & | a_indent = "" |
||
) | const |
Print.
void genbb::primary_event::dump | ( | std::ostream & | a_out, |
const std::string & | a_title, | ||
const std::string & | a_indent | ||
) | const |
Print.
const datatools::properties& genbb::primary_event::get_auxiliaries | ( | ) | const |
Return a const reference to the auxiliary properties.
const std::string& genbb::primary_event::get_classification | ( | ) | const |
Return the classification string.
double genbb::primary_event::get_genbb_weight | ( | ) | const |
Return the weight.
const std::string& genbb::primary_event::get_label | ( | ) | const |
Return the label.
unsigned int genbb::primary_event::get_number_of_particles | ( | ) | const |
Return the number of primary particles.
const primary_particle& genbb::primary_event::get_particle | ( | int | ) | const |
Return a const reference to primary particle at given index.
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.
const particles_col_type& genbb::primary_event::get_particles | ( | ) | const |
Return a const reference to the list of primary particles.
double genbb::primary_event::get_time | ( | ) | const |
Return the time.
double genbb::primary_event::get_total_kinetic_energy | ( | ) | const |
Return the total kinetic energy of the event.
const geomtools::vector_3d& genbb::primary_event::get_vertex | ( | ) | const |
Return the time.
datatools::properties& genbb::primary_event::grab_auxiliaries | ( | ) |
Return a mutable reference to the auxiliary properties.
primary_particle& genbb::primary_event::grab_particle | ( | int | ) |
Return a mutable reference to primary particle at given index.
particles_col_type& genbb::primary_event::grab_particles | ( | ) |
Return a mutable reference to the list of primary particles.
bool genbb::primary_event::has_classification | ( | ) | const |
Check if classification is set.
bool genbb::primary_event::has_label | ( | ) | const |
Check if label is set.
bool genbb::primary_event::has_time | ( | ) | const |
Check if time is defined.
bool genbb::primary_event::has_vertex | ( | ) | const |
Check if vertex is defined.
bool genbb::primary_event::is_genbb_weighted | ( | ) | const |
Check if the event is weighted.
bool genbb::primary_event::is_valid | ( | ) | const |
Check the validity of the primary event.
void genbb::primary_event::remove_generation_ids | ( | ) |
Remove generation Ids from all particle.
void genbb::primary_event::remove_particle | ( | int | type_, |
int | occurence_ = 0 |
||
) |
Remove particle.
void genbb::primary_event::reset | ( | ) |
Reset the primary event.
void genbb::primary_event::reset_classification | ( | ) |
Reset the classification string.
void genbb::primary_event::reset_label | ( | ) |
Reset the label.
void genbb::primary_event::rotate | ( | double | a_phi, |
double | a_theta, | ||
double | a_delta | ||
) |
Rotate the event.
void genbb::primary_event::set_auxiliaries | ( | const datatools::properties & | ) |
Set auxiliary properties.
void genbb::primary_event::set_classification | ( | const std::string & | c_ | ) |
Set the classification string.
void genbb::primary_event::set_genbb_weight | ( | double | genbb_weight_ | ) |
Set the weight.
void genbb::primary_event::set_label | ( | const std::string & | l_ | ) |
Set the label.
void genbb::primary_event::set_time | ( | double | ) |
Set the time.
void genbb::primary_event::set_vertex | ( | const geomtools::vector_3d & | ) |
Set the vertex.
void genbb::primary_event::shift_particles_time | ( | double | delta_time_, |
int | from_ = 0 |
||
) |
Shift the time of the particles by a delay.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.