Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Generator for single particles with some special kinematics. More...
#include <bayeux/genbb_help/single_particle_generator.h>
Classes | |
struct | ion_data_type |
struct | multi_rays_record_type |
struct | neutrino_data_type |
Public Types | |
enum | mode_type { MODE_INVALID = -1, MODE_MONOKINETIC = 0, MODE_GAUSSIAN_ENERGY = 1, MODE_ENERGY_RANGE = 2, MODE_MULTI_RAYS = 3, MODE_SPECTRUM = 4, MODE_DEFAULT = MODE_MONOKINETIC } |
enum | spectrum_mode_type { SPECTRUM_MODE_TABFUNC = 0, SPECTRUM_MODE_HISTPDF = 1 } |
enum | direction_mode_type { DIRECTION_Z_AXIS = 0, DIRECTION_RANDOMIZED = 1, DIRECTION_CONE = 2, DIRECTION_DEFAULT = DIRECTION_Z_AXIS } |
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 | |
void | set_direction_mode (int) |
int | get_direction_mode () const |
bool | is_randomized_direction () const |
void | set_randomized_direction (bool) |
bool | is_cone_direction () const |
void | set_cone_direction (bool) |
void | set_cone_max_angle (double) |
double | get_cone_max_angle () const |
void | set_cone_min_angle (double) |
double | get_cone_min_angle () const |
void | set_cone_axis (const geomtools::vector_3d &axis_) |
void | set_z_direction (bool) |
bool | is_z_direction () const |
const geomtools::vector_3d & | get_cone_axis () const |
const std::string & | get_particle_name () const |
void | set_particle_name (const std::string &) |
double | get_particle_mass () const |
void | set_particle_mass (double) |
virtual bool | can_external_random () const |
Check if the generator accepts an external PRNG. More... | |
const mygsl::rng & | get_random () const |
mygsl::rng & | grab_random () |
int | get_mode () const |
void | set_mode (int) |
bool | is_mode_valid () const |
bool | is_mode_monokinetic () const |
bool | is_mode_gaussian_energy () const |
bool | is_mode_energy_range () const |
bool | is_mode_multi_rays () const |
bool | is_mode_spectrum () const |
double | get_mean_energy () const |
double | get_sigma_energy () const |
void | set_mean_energy (double mean_, double sigma_=0.0) |
double | get_min_energy () const |
double | get_max_energy () const |
void | set_energy_range (double min_, double max_) |
void | add_multi_ray (double energy_, double prob_) |
void | set_energy_spectrum_filename (const std::string &filename_) |
single_particle_generator () | |
Constructor. More... | |
virtual | ~single_particle_generator () |
Destructor. More... | |
virtual void | initialize (const datatools::properties &setup_, datatools::service_manager &service_manager_, detail::pg_dict_type &dictionary_) |
Main initialization interface method. More... | |
virtual void | reset () |
Reset. More... | |
virtual bool | has_next () |
Check if a next primary event is available. More... | |
virtual bool | is_initialized () const |
Check initialization status. More... | |
Public Member Functions inherited from genbb::i_genbb | |
bool | has_name () const |
Check for a non-empty name. More... | |
const std::string & | get_name () const |
Return the name of the event generator. More... | |
void | set_name (const std::string &) |
Set the name of the event generator. More... | |
void | reset_name () |
Reset the name of the event generator. More... | |
i_genbb () | |
Constructor. More... | |
virtual | ~i_genbb () |
Destructor. More... | |
virtual void | load_next (primary_event &event_, bool compute_classification_=true) |
Load a new 'primary_event' object. More... | |
virtual bool | has_external_random () const |
Check if the generator uses an external PRNG. More... | |
virtual void | set_external_random (mygsl::rng &) |
Set an external PRNG. More... | |
virtual void | reset_external_random () |
Reset an external PRNG. More... | |
mygsl::rng & | grab_external_random () |
Return a mutable reference to the external PRNG. More... | |
const mygsl::rng & | get_external_random () const |
Return a non-mutable reference to the external PRNG. More... | |
virtual void | initialize_simple () |
Simple initialization (no external resource) More... | |
virtual void | initialize_standalone (const datatools::properties &setup_) |
Initialization from a container of properties. More... | |
virtual void | initialize_with_service_only (const datatools::properties &setup_, datatools::service_manager &service_manager_) |
Initialization from a container of properties and a service manager. More... | |
virtual void | initialize_with_dictionary_only (const datatools::properties &setup_, detail::pg_dict_type &dictionary_) |
Initialization from a container of properties, a service manager and a dictionnary of vertex generators. More... | |
datatools::logger::priority | get_logging_priority () const |
Return the logging priority threshold. More... | |
void | set_logging_priority (datatools::logger::priority p) |
Set the logging priority threshold. More... | |
bool | is_debug () const |
Check the debug logging. More... | |
void | set_assign_generation_ids (bool) |
Set the flag to assign unique generation Ids to primary particles. More... | |
bool | is_assign_generation_ids () const |
Check the flag to assign unique generation Ids to primary particles. 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... | |
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 double | get_particle_mass_from_label (const std::string &particle_name_) |
static bool | particle_name_is_valid (const std::string &particle_name_) |
Static Public Member Functions inherited from genbb::i_genbb | |
static void | base_initialize_ocd (datatools::object_configuration_description &) |
OCD interface. 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_) |
Protected Member Functions | |
virtual void | _load_next (primary_event &event_, bool compute_classification_=true) |
Shoot the primary event. More... | |
void | _init_energy_spectrum () |
Insitialize the energy spectrum. More... | |
void | _init_energy_histo_pdf () |
Insitialize the energy PDF from an histogram. More... | |
void | _set_defaults () |
Set default attributes' values. More... | |
Protected Member Functions inherited from genbb::i_genbb | |
void | _initialize_base (const datatools::properties &setup_) |
Base initialization. More... | |
Additional Inherited Members | |
Protected Attributes inherited from genbb::i_genbb | |
datatools::logger::priority | _logging_priority |
Generator for single particles with some special kinematics.
genbb::single_particle_generator::single_particle_generator | ( | ) |
Constructor.
|
virtual |
Destructor.
|
protected |
Insitialize the energy PDF from an histogram.
|
protected |
Insitialize the energy spectrum.
|
protectedvirtual |
Shoot the primary event.
Implements genbb::i_genbb.
|
protected |
Set default attributes' values.
void genbb::single_particle_generator::add_multi_ray | ( | double | energy_, |
double | prob_ | ||
) |
|
virtual |
Check if the generator accepts an external PRNG.
Reimplemented from genbb::i_genbb.
const geomtools::vector_3d& genbb::single_particle_generator::get_cone_axis | ( | ) | const |
double genbb::single_particle_generator::get_cone_max_angle | ( | ) | const |
double genbb::single_particle_generator::get_cone_min_angle | ( | ) | const |
int genbb::single_particle_generator::get_direction_mode | ( | ) | const |
double genbb::single_particle_generator::get_max_energy | ( | ) | const |
double genbb::single_particle_generator::get_mean_energy | ( | ) | const |
double genbb::single_particle_generator::get_min_energy | ( | ) | const |
int genbb::single_particle_generator::get_mode | ( | ) | const |
double genbb::single_particle_generator::get_particle_mass | ( | ) | const |
|
static |
const std::string& genbb::single_particle_generator::get_particle_name | ( | ) | const |
const mygsl::rng& genbb::single_particle_generator::get_random | ( | ) | const |
double genbb::single_particle_generator::get_sigma_energy | ( | ) | const |
mygsl::rng& genbb::single_particle_generator::grab_random | ( | ) |
|
virtual |
Check if a next primary event is available.
Implements genbb::i_genbb.
|
virtual |
Main initialization interface method.
Implements genbb::i_genbb.
bool genbb::single_particle_generator::is_cone_direction | ( | ) | const |
|
virtual |
Check initialization status.
Implements genbb::i_genbb.
bool genbb::single_particle_generator::is_mode_energy_range | ( | ) | const |
bool genbb::single_particle_generator::is_mode_gaussian_energy | ( | ) | const |
bool genbb::single_particle_generator::is_mode_monokinetic | ( | ) | const |
bool genbb::single_particle_generator::is_mode_multi_rays | ( | ) | const |
bool genbb::single_particle_generator::is_mode_spectrum | ( | ) | const |
bool genbb::single_particle_generator::is_mode_valid | ( | ) | const |
bool genbb::single_particle_generator::is_randomized_direction | ( | ) | const |
bool genbb::single_particle_generator::is_z_direction | ( | ) | const |
|
static |
|
virtual |
Reset.
Implements genbb::i_genbb.
void genbb::single_particle_generator::set_cone_axis | ( | const geomtools::vector_3d & | axis_ | ) |
void genbb::single_particle_generator::set_cone_direction | ( | bool | ) |
void genbb::single_particle_generator::set_cone_max_angle | ( | double | ) |
void genbb::single_particle_generator::set_cone_min_angle | ( | double | ) |
void genbb::single_particle_generator::set_direction_mode | ( | int | ) |
void genbb::single_particle_generator::set_energy_range | ( | double | min_, |
double | max_ | ||
) |
void genbb::single_particle_generator::set_energy_spectrum_filename | ( | const std::string & | filename_ | ) |
void genbb::single_particle_generator::set_mean_energy | ( | double | mean_, |
double | sigma_ = 0.0 |
||
) |
void genbb::single_particle_generator::set_mode | ( | int | ) |
void genbb::single_particle_generator::set_particle_mass | ( | double | ) |
void genbb::single_particle_generator::set_particle_name | ( | const std::string & | ) |
void genbb::single_particle_generator::set_randomized_direction | ( | bool | ) |
void genbb::single_particle_generator::set_z_direction | ( | bool | ) |