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

Generator for single particles with some special kinematics. More...

#include <bayeux/genbb_help/single_particle_generator.h>

Inheritance diagram for genbb::single_particle_generator:
genbb::i_genbb datatools::i_tree_dumpable

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_3dget_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::rngget_random () const
 
mygsl::rnggrab_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::rnggrab_external_random ()
 Return a mutable reference to the external PRNG. More...
 
const mygsl::rngget_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
 

Detailed Description

Generator for single particles with some special kinematics.

Member Enumeration Documentation

◆ direction_mode_type

Enumerator
DIRECTION_Z_AXIS 
DIRECTION_RANDOMIZED 
DIRECTION_CONE 
DIRECTION_DEFAULT 

◆ mode_type

Enumerator
MODE_INVALID 
MODE_MONOKINETIC 
MODE_GAUSSIAN_ENERGY 
MODE_ENERGY_RANGE 
MODE_MULTI_RAYS 
MODE_SPECTRUM 
MODE_DEFAULT 

◆ spectrum_mode_type

Enumerator
SPECTRUM_MODE_TABFUNC 
SPECTRUM_MODE_HISTPDF 

Constructor & Destructor Documentation

◆ single_particle_generator()

genbb::single_particle_generator::single_particle_generator ( )

Constructor.

◆ ~single_particle_generator()

virtual genbb::single_particle_generator::~single_particle_generator ( )
virtual

Destructor.

Member Function Documentation

◆ _init_energy_histo_pdf()

void genbb::single_particle_generator::_init_energy_histo_pdf ( )
protected

Insitialize the energy PDF from an histogram.

◆ _init_energy_spectrum()

void genbb::single_particle_generator::_init_energy_spectrum ( )
protected

Insitialize the energy spectrum.

◆ _load_next()

virtual void genbb::single_particle_generator::_load_next ( primary_event event_,
bool  compute_classification_ = true 
)
protectedvirtual

Shoot the primary event.

Implements genbb::i_genbb.

◆ _set_defaults()

void genbb::single_particle_generator::_set_defaults ( )
protected

Set default attributes' values.

◆ add_multi_ray()

void genbb::single_particle_generator::add_multi_ray ( double  energy_,
double  prob_ 
)

◆ can_external_random()

virtual bool genbb::single_particle_generator::can_external_random ( ) const
virtual

Check if the generator accepts an external PRNG.

Reimplemented from genbb::i_genbb.

◆ get_cone_axis()

const geomtools::vector_3d& genbb::single_particle_generator::get_cone_axis ( ) const

◆ get_cone_max_angle()

double genbb::single_particle_generator::get_cone_max_angle ( ) const

◆ get_cone_min_angle()

double genbb::single_particle_generator::get_cone_min_angle ( ) const

◆ get_direction_mode()

int genbb::single_particle_generator::get_direction_mode ( ) const

◆ get_max_energy()

double genbb::single_particle_generator::get_max_energy ( ) const

◆ get_mean_energy()

double genbb::single_particle_generator::get_mean_energy ( ) const

◆ get_min_energy()

double genbb::single_particle_generator::get_min_energy ( ) const

◆ get_mode()

int genbb::single_particle_generator::get_mode ( ) const

◆ get_particle_mass()

double genbb::single_particle_generator::get_particle_mass ( ) const

◆ get_particle_mass_from_label()

static double genbb::single_particle_generator::get_particle_mass_from_label ( const std::string &  particle_name_)
static

◆ get_particle_name()

const std::string& genbb::single_particle_generator::get_particle_name ( ) const

◆ get_random()

const mygsl::rng& genbb::single_particle_generator::get_random ( ) const

◆ get_sigma_energy()

double genbb::single_particle_generator::get_sigma_energy ( ) const

◆ grab_random()

mygsl::rng& genbb::single_particle_generator::grab_random ( )

◆ has_next()

virtual bool genbb::single_particle_generator::has_next ( )
virtual

Check if a next primary event is available.

Implements genbb::i_genbb.

◆ initialize()

virtual void genbb::single_particle_generator::initialize ( const datatools::properties setup_,
datatools::service_manager service_manager_,
detail::pg_dict_type dictionary_ 
)
virtual

Main initialization interface method.

Implements genbb::i_genbb.

◆ is_cone_direction()

bool genbb::single_particle_generator::is_cone_direction ( ) const

◆ is_initialized()

virtual bool genbb::single_particle_generator::is_initialized ( ) const
virtual

Check initialization status.

Implements genbb::i_genbb.

◆ is_mode_energy_range()

bool genbb::single_particle_generator::is_mode_energy_range ( ) const

◆ is_mode_gaussian_energy()

bool genbb::single_particle_generator::is_mode_gaussian_energy ( ) const

◆ is_mode_monokinetic()

bool genbb::single_particle_generator::is_mode_monokinetic ( ) const

◆ is_mode_multi_rays()

bool genbb::single_particle_generator::is_mode_multi_rays ( ) const

◆ is_mode_spectrum()

bool genbb::single_particle_generator::is_mode_spectrum ( ) const

◆ is_mode_valid()

bool genbb::single_particle_generator::is_mode_valid ( ) const

◆ is_randomized_direction()

bool genbb::single_particle_generator::is_randomized_direction ( ) const

◆ is_z_direction()

bool genbb::single_particle_generator::is_z_direction ( ) const

◆ particle_name_is_valid()

static bool genbb::single_particle_generator::particle_name_is_valid ( const std::string &  particle_name_)
static

◆ reset()

virtual void genbb::single_particle_generator::reset ( )
virtual

Reset.

Implements genbb::i_genbb.

◆ set_cone_axis()

void genbb::single_particle_generator::set_cone_axis ( const geomtools::vector_3d axis_)

◆ set_cone_direction()

void genbb::single_particle_generator::set_cone_direction ( bool  )

◆ set_cone_max_angle()

void genbb::single_particle_generator::set_cone_max_angle ( double  )

◆ set_cone_min_angle()

void genbb::single_particle_generator::set_cone_min_angle ( double  )

◆ set_direction_mode()

void genbb::single_particle_generator::set_direction_mode ( int  )

◆ set_energy_range()

void genbb::single_particle_generator::set_energy_range ( double  min_,
double  max_ 
)

◆ set_energy_spectrum_filename()

void genbb::single_particle_generator::set_energy_spectrum_filename ( const std::string &  filename_)

◆ set_mean_energy()

void genbb::single_particle_generator::set_mean_energy ( double  mean_,
double  sigma_ = 0.0 
)

◆ set_mode()

void genbb::single_particle_generator::set_mode ( int  )

◆ set_particle_mass()

void genbb::single_particle_generator::set_particle_mass ( double  )

◆ set_particle_name()

void genbb::single_particle_generator::set_particle_name ( const std::string &  )

◆ set_randomized_direction()

void genbb::single_particle_generator::set_randomized_direction ( bool  )

◆ set_z_direction()

void genbb::single_particle_generator::set_z_direction ( bool  )

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