24#include "marley/ChebyshevInterpolatingFunction.hh"
25#include "marley/Fragment.hh"
26#include "marley/Generator.hh"
27#include "marley/IteratorToPointerMember.hh"
28#include "marley/Level.hh"
29#include "marley/MassTable.hh"
30#include "marley/Parity.hh"
31#include "marley/marley_utils.hh"
85 virtual void do_decay(
double& Exf,
int& two_Jf,
87 compound_nucleus, std::shared_ptr< HepMC3::GenParticle >&
88 emitted_particle, std::shared_ptr< HepMC3::GenParticle >&
95 template<
typename It >
static inline
129 const std::shared_ptr< HepMC3::GenParticle >& compound_nucleus,
130 std::shared_ptr< HepMC3::GenParticle >& emitted_particle,
131 std::shared_ptr< HepMC3::GenParticle >& residual_nucleus,
174 virtual void do_decay(
double& Ex,
int& two_J,
176 compound_nucleus, std::shared_ptr< HepMC3::GenParticle >&
177 emitted_particle, std::shared_ptr< HepMC3::GenParticle >&
179 const final override;
181 inline virtual bool is_continuum() const final
override {
return false; }
225 GammaExitChannel() {}
228 {
return marley_utils::PHOTON; }
242 double gamma_energy(
double Exf )
const;
265 virtual void compute_total_width() final override;
267 virtual
void do_decay(
double& Ex,
int& two_J,
268 marley::
Parity& Pi, const std::shared_ptr< HepMC3::GenParticle >&
269 compound_nucleus, std::shared_ptr< HepMC3::GenParticle >&
270 emitted_particle, std::shared_ptr< HepMC3::GenParticle >&
271 residual_nucleus,
int& qIon, marley::
Generator& gen )
272 const final override;
274 virtual
double differential_width(
double Exf,
275 bool store_jpi_widths = false ) const = 0;
277 inline virtual
bool is_continuum() const final
override {
return true; }
306 void sample_spin_parity(
double Exf,
int& two_Jf,
marley::Parity& Pf,
321 inline const std::vector< std::unique_ptr< SpinParityWidth > >&
335 mutable std::vector< std::unique_ptr< SpinParityWidth > >
346 mutable std::unique_ptr<marley::ChebyshevInterpolatingFunction>
Exf_cdf_;
370 :
ExitChannel( pdgi, qi, Exi, twoJi, Pi, rho_i, sdb ),
376 virtual void compute_total_width() final override;
382 public GammaExitChannel
397 virtual void compute_total_width() final override;
415 int two_j_fr,
int ell )
431 :
ExitChannel( pdgi, qi, Exi, twoJi, Pi, rho_i, sdb ),
438 virtual double differential_width(
double Exf,
439 bool store_jpi_widths =
false ) const final override;
441 inline virtual
double E_c_max() const final
override
448 public GammaExitChannel
469 double Ec_min) :
ExitChannel( pdgi, qi, Exi, twoJi, Pi, rho_i, sdb ),
476 virtual double differential_width(
double Exf,
477 bool store_jpi_widths =
false ) const final override;
479 inline virtual
double E_c_max() const final
override
const std::vector< std::unique_ptr< SpinParityWidth > > & get_spw_table() const
Grants const access to the vector of SpinParityWidth objects.
ContinuumExitChannel(double Ec_min, int lmax)
std::vector< std::unique_ptr< SpinParityWidth > > jpi_widths_table_
Table of possible final-state spin-parities together with their partial differential decay widths.
void set_skip_jpi_sampling(bool skip_it) const
Sets the flag that will skip sampling of a final-state nuclear spin-parity value in do_decay()
virtual void compute_total_width() final override
bool skip_jpi_sampling_
Flag that allows skipping the sampling of a final nuclear spin-parity (useful only for testing purpos...
SpinParityWidth * last_sampled_spw_
Points to the last SpinParityWidth object sampled in a previous call to sample_spin_parity()
double E_c_min() const
Returns the minimum excitation energy bound for the continuum.
virtual double E_c_max() const =0
Returns the maximum accessible excitation energy to be used when integrating over the continuum.
const SpinParityWidth * get_last_sampled_spw() const
Returns a pointer to the last sampled SpinParityWidth object.
void clear_jpi_widths() const
Helper function that resets the table of SpinParityWidth objects.
double E_c_min_
Minimum accessible nuclear excitation energy (MeV) in the continuum.
virtual bool is_continuum() const final override
Returns true if this channel accesses the particle-unbound continuum of nuclear levels or false other...
std::unique_ptr< marley::ChebyshevInterpolatingFunction > Exf_cdf_
Chebyshev polynomial interpolant to the cumulative density function for the final-state nuclear excit...
const marley::Level & final_level_
Reference to the final-state nuclear level.
virtual void do_decay(double &Ex, int &two_J, marley::Parity &Pi, const std::shared_ptr< HepMC3::GenParticle > &compound_nucleus, std::shared_ptr< HepMC3::GenParticle > &emitted_particle, std::shared_ptr< HepMC3::GenParticle > &residual_nucleus, int &qIon, marley::Generator &gen) const final override
Simulates a nuclear decay into this channel.
virtual bool is_continuum() const final override
Returns true if this channel accesses the particle-unbound continuum of nuclear levels or false other...
const marley::Level & get_final_level() const
Get a const reference to the final-state nuclear level.
DiscreteExitChannel(const marley::Level &flev)
Abstract base class for compound nucleus de-excitation channels.
static marley::IteratorToPointerMember< It, double > make_width_iterator(It it)
Convert an iterator that points to an ExitChannel object into an iterator to the ExitChannel's width_...
int twoJi_
Two times the initial nuclear spin .
virtual bool emits_fragment() const =0
Returns true if this channel involves fragment emission or false if it involves gamma-ray emission.
int pdgi_
PDG code for the initial nucleus.
double width_
Total decay width into this channel (MeV)
marley::StructureDatabase * sdb_
StructureDatabase to use in calculations.
marley::Parity Pi_
Initial nuclear parity .
double width() const
Get the total decay width into this channel (MeV)
ExitChannel(int pdgi, int qi, double Exi, int twoJi, marley::Parity Pi, double rho_i, marley::StructureDatabase &sdb)
virtual void compute_total_width()=0
virtual void prepare_products(const std::shared_ptr< HepMC3::GenParticle > &compound_nucleus, std::shared_ptr< HepMC3::GenParticle > &emitted_particle, std::shared_ptr< HepMC3::GenParticle > &residual_nucleus, double Exf, int &qf, marley::Generator &gen) const
Helper function that prepares Particle objects representing the products of the two-body decay.
virtual int emitted_particle_pdg() const =0
Returns the PDG code for the particle (gamma-ray or nuclear fragment) emitted by decays into this Exi...
virtual void do_decay(double &Exf, int &two_Jf, marley::Parity &Pf, const std::shared_ptr< HepMC3::GenParticle > &compound_nucleus, std::shared_ptr< HepMC3::GenParticle > &emitted_particle, std::shared_ptr< HepMC3::GenParticle > &residual_nucleus, int &qIon, marley::Generator &gen) const =0
Simulates a nuclear decay into this channel.
virtual bool is_continuum() const =0
Returns true if this channel accesses the particle-unbound continuum of nuclear levels or false other...
double Exi_
Initial nuclear excitation energy (MeV)
virtual int final_nucleus_pdg() const =0
Returns the PDG code for the final nucleus.
double one_over_two_pi_rho_i_
FragmentContinuumExitChannel(int pdgi, int qi, double Exi, int twoJi, marley::Parity Pi, double rho_i, marley::StructureDatabase &sdb, double Ec_min, const marley::Fragment &frag)
virtual double E_c_max() const final override
Returns the maximum accessible excitation energy to be used when integrating over the continuum.
virtual void compute_total_width() final override
FragmentDiscreteExitChannel(int pdgi, int qi, double Exi, int twoJi, marley::Parity Pi, double rho_i, marley::StructureDatabase &sdb, const marley::Level &flev, const marley::Fragment &frag)
FragmentExitChannel(const marley::Fragment &fragment)
virtual int emitted_particle_pdg() const final override
Returns the PDG code for the particle (gamma-ray or nuclear fragment) emitted by decays into this Exi...
int fragment_pdg_
PDG code identifying the emitted fragment.
virtual int final_nucleus_pdg() const final override
Returns the PDG code for the final nucleus.
double max_Exf() const
Helper function that returns that maximum possible excitation energy for the daughter nucleus after e...
virtual bool emits_fragment() const final override
Returns true if this channel involves fragment emission or false if it involves gamma-ray emission.
Simple container for storing reference data about each of the nuclear fragments considered by MARLEY'...
virtual double E_c_max() const final override
Returns the maximum accessible excitation energy to be used when integrating over the continuum.
GammaContinuumExitChannel(int pdgi, int qi, double Exi, int twoJi, marley::Parity Pi, double rho_i, marley::StructureDatabase &sdb, double Ec_min)
virtual void compute_total_width() final override
GammaDiscreteExitChannel(int pdgi, int qi, double Exi, int twoJi, marley::Parity Pi, double rho_i, marley::StructureDatabase &sdb, const marley::Level &flev)
virtual bool emits_fragment() const final override
Returns true if this channel involves fragment emission or false if it involves gamma-ray emission.
virtual int emitted_particle_pdg() const final override
Returns the PDG code for the particle (gamma-ray or nuclear fragment) emitted by decays into this Exi...
virtual int final_nucleus_pdg() const final override
Returns the PDG code for the final nucleus.
TransitionType
Electromagnetic transitions in nuclei may be classified by their multipolarity (electric vs....
The MARLEY Event generator.
Template class that creates an iterator to a class member based on an iterator to a pointer (either b...
A discrete nuclear energy level.
Type-safe representation of a parity value (either +1 or -1)
Container for nuclear structure information organized by nuclide.
A spin-parity value with its corresponding partial decay width.
SpinParityWidth(int twoJ, marley::Parity p, double w)
double diff_width
Partial differential decay width (MeV)
marley::Parity Pf
Final nuclear parity.
int twoJf
Final nuclear spin.
int two_j_frag
Two times the fragment total angular momentum.
int orb_l
Orbital angular momentum.
FragmentSpinParityWidth(int twoJ, marley::Parity p, double w, int two_j_fr, int ell)
int multipolarity
Multipolarity of this gamma-ray emission.
GammaSpinParityWidth(int twoJ, marley::Parity p, double w, int mpol)