33 #ifndef GENBB_HELP_SINGLE_PARTICLE_GENERATOR_H 34 #define GENBB_HELP_SINGLE_PARTICLE_GENERATOR_H 1 41 #include <boost/scoped_ptr.hpp> 165 virtual void reset();
181 bool compute_classification_ =
true);
202 std::string _particle_name_;
203 boost::scoped_ptr<ion_data_type> _ion_data_;
204 boost::scoped_ptr<neutrino_data_type> _neutrino_data_;
205 double _particle_mass_;
207 double _mean_energy_;
208 double _sigma_energy_;
212 std::vector<multi_rays_record_type> _multi_rays_records_;
215 std::string _spectrum_interpolation_name_;
216 std::string _energy_spectrum_filename_;
222 int _direction_mode_;
223 double _cone_max_angle_;
224 double _cone_min_angle_;
226 unsigned long _seed_;
227 boost::scoped_ptr<mygsl::rng> _random_;
241 #endif // GENBB_HELP_SINGLE_PARTICLE_GENERATOR_H virtual void _load_next(primary_event &event_, bool compute_classification_=true)
Shoot the primary event.
bool is_mode_gaussian_energy() const
void set_particle_mass(double)
Definition: single_particle_generator.h:79
bool is_cone_direction() const
Definition: single_particle_generator.h:69
static bool particle_name_is_valid(const std::string &particle_name_)
void set_mean_energy(double mean_, double sigma_=0.0)
Definition: single_particle_generator.h:68
GENBB particle generator abstract base class.
Definition: i_genbb.h:59
double get_sigma_energy() const
static double get_particle_mass_from_label(const std::string &particle_name_)
double get_particle_mass() const
Definition: single_particle_generator.h:97
Definition: single_particle_generator.h:65
const std::string & get_particle_name() const
virtual void reset()
Reset.
bool is_mode_monokinetic() const
void set_cone_max_angle(double)
virtual void initialize(const datatools::properties &setup_, datatools::service_manager &service_manager_, detail::pg_dict_type &dictionary_)
Main initialization interface method.
double probability
Probability of the ray.
Definition: single_particle_generator.h:99
int Z
Atomic number.
Definition: single_particle_generator.h:86
void set_cone_min_angle(double)
void set_direction_mode(int)
Tabulated function.
Definition: tabulated_function.h:34
Definition: single_particle_generator.h:74
std::string flavour
Neutrino flavour ("electron", "muon", "tau")
Definition: single_particle_generator.h:93
int Q
Ion charge.
Definition: single_particle_generator.h:89
mygsl::rng & grab_random()
bool is_z_direction() const
double get_cone_max_angle() const
void add_multi_ray(double energy_, double prob_)
Definition: single_particle_generator.h:92
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
bool is_mode_energy_range() const
Definition: single_particle_generator.h:85
void set_randomized_direction(bool)
void _set_defaults()
Set default attributes' values.
bool antineutrino
Neutrino/antineutrino flag.
Definition: single_particle_generator.h:94
bool is_mode_valid() const
virtual bool is_initialized() const
Check initialization status.
void _init_energy_spectrum()
Insitialize the energy spectrum.
virtual bool can_external_random() const
Check if the generator accepts an external PRNG.
Definition: single_particle_generator.h:75
Definition: single_particle_generator.h:81
#define GENBB_PG_REGISTRATION_INTERFACE(GENBB_CLASS_NAME)
Definition: genbb_macros.h:22
Definition: single_particle_generator.h:64
Definition: single_particle_generator.h:66
Definition: single_particle_generator.h:80
bool is_mode_spectrum() const
const mygsl::rng & get_random() const
double Estar
Excitation energy.
Definition: single_particle_generator.h:88
Top-level namespace of the Bayeux/genbb_help module library.
Definition: alpha_decay.h:51
bool is_mode_multi_rays() const
spectrum_mode_type
Definition: single_particle_generator.h:73
One dimensional histogram.
Definition: histogram.h:30
Definition: single_particle_generator.h:67
void set_cone_direction(bool)
void set_z_direction(bool)
double get_min_energy() const
int A
Number of nucleons.
Definition: single_particle_generator.h:87
void set_particle_name(const std::string &)
Generator for single particles with some special kinematics.
Definition: single_particle_generator.h:59
double energy
Monokinetic energy of the ray.
Definition: single_particle_generator.h:98
PDF associated to a one dimensional histogram.
Definition: histogram.h:252
A primary event from a Monte-Carlo generator.
Definition: primary_event.h:60
double get_cone_min_angle() const
double cumul_probability
Cumulative probability.
Definition: single_particle_generator.h:100
Definition: single_particle_generator.h:70
double get_max_energy() const
void set_cone_axis(const geomtools::vector_3d &axis_)
int get_direction_mode() const
direction_mode_type
Definition: single_particle_generator.h:78
const geomtools::vector_3d & get_cone_axis() const
Definition: single_particle_generator.h:82
void set_energy_range(double min_, double max_)
double get_mean_energy() const
std::map< std::string, pg_entry_type > pg_dict_type
Definition: pg_tools.h:134
Von Neumann's rejection method for one dimensional PDF.
Definition: von_neumann_method.h:31
virtual ~single_particle_generator()
Destructor.
void _init_energy_histo_pdf()
Insitialize the energy PDF from an histogram.
bool is_randomized_direction() const
virtual bool has_next()
Check if a next primary event is available.
Pseudo random number generator.
Definition: rng.h:53
void set_energy_spectrum_filename(const std::string &filename_)
mode_type
Definition: single_particle_generator.h:63
single_particle_generator()
Constructor.