Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Biasing algorithm used at primary event generation. More...
#include <bayeux/mctools/biasing/primary_event_bias.h>
Classes | |
struct | biasing_info |
Biasing information associated to a biased primary event. More... | |
struct | poi_entry_type |
Dictionary of points of interest. More... | |
struct | stat_record |
Record counters. More... | |
Public Types | |
enum | bias_mode_type { BIAS_UNDEFINED = 0, BIAS_NONE = 1, BIAS_ONLY_MASTER_PARTICLE = 2, BIAS_ALL_PARTICLES = 3, BIAS_DEFAULT = BIAS_ONLY_MASTER_PARTICLE } |
Biasing modes. More... | |
enum | biased_event_status { BES_UNDEFINED = 0, BES_NORMAL = 1, BES_TRUNCATED = 2, BES_KILLED = 3 } |
Status of a biased primary event. More... | |
typedef std::map< std::string, poi_entry_type > | poi_dict_type |
Dictionary of points of interest. 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 | |
const stat_record & | get_stats () const |
Return the embedded statistics record. More... | |
void | reset_stats () |
Reset the embedded statistics record. More... | |
bool | has_stats_store () const |
Check if a store file is used to record statistics record. More... | |
void | set_stats_store (const std::string &) |
Set the filename of a file used to record statistics record. More... | |
primary_event_bias () | |
Default constructor. More... | |
virtual | ~primary_event_bias () |
Destructor. More... | |
void | set_geometry_manager (const geomtools::manager &) |
Set the geometry manager. More... | |
bool | is_initialized () const |
Check initialization flag. More... | |
void | initialize_simple () |
Initialization. More... | |
void | initialize (const datatools::properties &config_) |
Initialization. More... | |
void | reset () |
Reset. More... | |
void | set_bias_mode (bias_mode_type) |
Set the bias mode. More... | |
bias_mode_type | get_bias_mode () const |
Return the bias mode. More... | |
bool | is_using_no_bias () const |
Check no bias mode. More... | |
bool | is_using_master_particle () const |
Check mode for using a master particle. More... | |
bool | is_using_all_particles () const |
Check mode for using all particles. More... | |
void | add_particle_by_label (const std::string &) |
Add the identifier of the master particle. More... | |
void | add_particle_by_type (int id_) |
Add the identifier of the master particle. More... | |
void | set_particle_minimum_energy (double kemin_) |
Set the minimum kinetic energy of the master particle. More... | |
void | set_particle_maximum_energy (double kemax_) |
Set the maximum kinetic energy of the master particle. More... | |
void | set_master_particle_rank (int rank_) |
Set the rank of the master particle. More... | |
void | set_track_only_master_particle (bool) |
Set the track only flag of the master particle. More... | |
void | set_total_minimum_energy (double) |
Set the total minimum kinetic energy. More... | |
void | set_total_maximum_energy (double) |
Set the total maximum kinetic energy. More... | |
void | set_mapping_name (const std::string &) |
Set the mapping name. More... | |
const std::string & | get_mapping_name () const |
Return the mapping name. More... | |
void | set_logging (datatools::logger::priority) |
Set the logging priority threshold. More... | |
datatools::logger::priority | get_logging () const |
Return the logging priority threshold. More... | |
void | add_point_of_interest (const std::string &poi_name_, const point_of_interest &poi_) |
Add a point of interest. More... | |
bool | has_point_of_interest (const std::string &poi_name_) const |
Check point of interest. More... | |
const poi_entry_type & | get_point_of_interest (const std::string &poi_name_) const |
Return a non mutable reference to a point of interest. More... | |
poi_entry_type & | grab_point_of_interest (const std::string &poi_name_) |
Return a mutable reference to a point of interest. More... | |
void | process (const geomtools::vector_3d &vertex_, genbb::primary_event &event_, biasing_info &info_) |
Bias the primary event. 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 | draw (const geomtools::vector_3d &vertex_, genbb::primary_event &event_) const |
Draw. More... | |
void | store_stats () |
Saev the statistics record. 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 |
Static Public Member Functions | |
static const std::string & | killed_event_label () |
Return the label for a killed event (not tracked at all) More... | |
static const std::string & | truncated_event_label () |
Return the label for a truncated event (some particles are not tracked) More... | |
static const std::string & | normal_event_label () |
Return the label for a normal event (all particles are tracked) More... | |
static const std::string & | biased_event_status_key () |
Return the property key for a normal event. More... | |
static const std::string & | master_particle_flag () |
Return the property flag to tag the master particle. More... | |
static const std::string & | dont_track_this_particle_flag () |
Return the property flag to skip the tracking of a particle. More... | |
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_) |
Static Public Attributes | |
static const int | DEFAULT_PARTICLE_RANK = 0 |
static const int | INVALID_PARTICLE_RANK = -1 |
static const int | ANY_PARTICLE_RANK = 0x7FFFFFFF |
Protected Member Functions | |
void | _set_default () |
Set default attribute values. More... | |
void | _make_candidate_particles (genbb::primary_event &, std::vector< genbb::primary_particle * > &) const |
Build the list of candidate primary particles. More... | |
bool | _validate_particle_direction (const genbb::primary_particle &, const geomtools::vector_3d &) const |
Validate a particle with respect to its direction and the list of PoIs. More... | |
Biasing algorithm used at primary event generation.
typedef std::map<std::string, poi_entry_type> mctools::biasing::primary_event_bias::poi_dict_type |
Dictionary of points of interest.
Biasing modes.
mctools::biasing::primary_event_bias::primary_event_bias | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
protected |
Build the list of candidate primary particles.
|
protected |
Set default attribute values.
|
protected |
Validate a particle with respect to its direction and the list of PoIs.
void mctools::biasing::primary_event_bias::add_particle_by_label | ( | const std::string & | ) |
Add the identifier of the master particle.
void mctools::biasing::primary_event_bias::add_particle_by_type | ( | int | id_ | ) |
Add the identifier of the master particle.
void mctools::biasing::primary_event_bias::add_point_of_interest | ( | const std::string & | poi_name_, |
const point_of_interest & | poi_ | ||
) |
Add a point of interest.
|
static |
Return the property key for a normal event.
|
static |
Return the property flag to skip the tracking of a particle.
void mctools::biasing::primary_event_bias::draw | ( | const geomtools::vector_3d & | vertex_, |
genbb::primary_event & | event_ | ||
) | const |
Draw.
bias_mode_type mctools::biasing::primary_event_bias::get_bias_mode | ( | ) | const |
Return the bias mode.
datatools::logger::priority mctools::biasing::primary_event_bias::get_logging | ( | ) | const |
Return the logging priority threshold.
const std::string& mctools::biasing::primary_event_bias::get_mapping_name | ( | ) | const |
Return the mapping name.
const poi_entry_type& mctools::biasing::primary_event_bias::get_point_of_interest | ( | const std::string & | poi_name_ | ) | const |
Return a non mutable reference to a point of interest.
const stat_record& mctools::biasing::primary_event_bias::get_stats | ( | ) | const |
Return the embedded statistics record.
poi_entry_type& mctools::biasing::primary_event_bias::grab_point_of_interest | ( | const std::string & | poi_name_ | ) |
Return a mutable reference to a point of interest.
bool mctools::biasing::primary_event_bias::has_point_of_interest | ( | const std::string & | poi_name_ | ) | const |
Check point of interest.
bool mctools::biasing::primary_event_bias::has_stats_store | ( | ) | const |
Check if a store file is used to record statistics record.
void mctools::biasing::primary_event_bias::initialize | ( | const datatools::properties & | config_ | ) |
Initialization.
void mctools::biasing::primary_event_bias::initialize_simple | ( | ) |
Initialization.
bool mctools::biasing::primary_event_bias::is_initialized | ( | ) | const |
Check initialization flag.
bool mctools::biasing::primary_event_bias::is_using_all_particles | ( | ) | const |
Check mode for using all particles.
bool mctools::biasing::primary_event_bias::is_using_master_particle | ( | ) | const |
Check mode for using a master particle.
bool mctools::biasing::primary_event_bias::is_using_no_bias | ( | ) | const |
Check no bias mode.
|
static |
Return the label for a killed event (not tracked at all)
|
static |
Return the property flag to tag the master particle.
|
static |
Return the label for a normal event (all particles are tracked)
void mctools::biasing::primary_event_bias::process | ( | const geomtools::vector_3d & | vertex_, |
genbb::primary_event & | event_, | ||
biasing_info & | info_ | ||
) |
Bias the primary event.
void mctools::biasing::primary_event_bias::reset | ( | ) |
Reset.
void mctools::biasing::primary_event_bias::reset_stats | ( | ) |
Reset the embedded statistics record.
void mctools::biasing::primary_event_bias::set_bias_mode | ( | bias_mode_type | ) |
Set the bias mode.
void mctools::biasing::primary_event_bias::set_geometry_manager | ( | const geomtools::manager & | ) |
Set the geometry manager.
void mctools::biasing::primary_event_bias::set_logging | ( | datatools::logger::priority | ) |
Set the logging priority threshold.
void mctools::biasing::primary_event_bias::set_mapping_name | ( | const std::string & | ) |
Set the mapping name.
void mctools::biasing::primary_event_bias::set_master_particle_rank | ( | int | rank_ | ) |
Set the rank of the master particle.
void mctools::biasing::primary_event_bias::set_particle_maximum_energy | ( | double | kemax_ | ) |
Set the maximum kinetic energy of the master particle.
void mctools::biasing::primary_event_bias::set_particle_minimum_energy | ( | double | kemin_ | ) |
Set the minimum kinetic energy of the master particle.
void mctools::biasing::primary_event_bias::set_stats_store | ( | const std::string & | ) |
Set the filename of a file used to record statistics record.
void mctools::biasing::primary_event_bias::set_total_maximum_energy | ( | double | ) |
Set the total maximum kinetic energy.
void mctools::biasing::primary_event_bias::set_total_minimum_energy | ( | double | ) |
Set the total minimum kinetic energy.
void mctools::biasing::primary_event_bias::set_track_only_master_particle | ( | bool | ) |
Set the track only flag of the master particle.
void mctools::biasing::primary_event_bias::store_stats | ( | ) |
Saev the statistics record.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
|
static |
Return the label for a truncated event (some particles are not tracked)
|
static |
|
static |
|
static |