MARLEY (Model of Argon Reaction Low Energy Yields)  v1.1.0
A Monte Carlo event generator for tens-of-MeV neutrino-nucleus interactions in liquid argon
 All Classes Functions Variables Enumerations Pages
ExitChannel.hh
1 #pragma once
2 #include <vector>
3 
4 #include "marley/Fragment.hh"
5 #include "marley/Generator.hh"
6 #include "marley/IteratorToPointerMember.hh"
7 #include "marley/Level.hh"
8 #include "marley/MassTable.hh"
9 #include "marley/Parity.hh"
10 
11 namespace marley {
12 
14  class ExitChannel {
15 
16  public:
17 
19  ExitChannel(double width) : width_(width) {}
20 
21  virtual ~ExitChannel() = default;
22 
25  virtual bool is_continuum() const = 0;
26 
29  virtual bool emits_fragment() const = 0;
30 
41  virtual void do_decay(double& Ex, int& two_J,
42  marley::Parity& Pi, marley::Particle& emitted_particle,
43  marley::Particle& residual_nucleus, marley::Generator& gen) = 0;
44 
49  template<typename It> static inline
52  {
54  double>(it, &marley::ExitChannel::width_);
55  }
56 
58  inline double width() const { return width_; }
59 
60  protected:
61 
63  double width_;
64  };
65 
69  public:
70 
75  marley::Particle residue) : ExitChannel(width), final_level_(flev),
76  residue_(residue) {}
77 
78  inline virtual bool is_continuum() const final override { return false; }
79 
81  inline const marley::Level& get_final_level() const
82  { return final_level_; }
85 
86  protected:
91  };
92 
96 
97  public:
98 
104  marley::Particle residue, const marley::Fragment& frag)
105  : DiscreteExitChannel(width, flev, residue), fragment_(frag) {}
106 
107  inline virtual bool emits_fragment() const final override { return true; }
108 
110  inline const marley::Fragment& get_fragment() const { return fragment_; }
111 
112  virtual void do_decay(double& Ex, int& two_J,
113  marley::Parity& Pi, marley::Particle& emitted_particle,
114  marley::Particle& residual_nucleus, marley::Generator& /*unused*/)
115  override;
116 
117  protected:
118 
121  };
122 
126 
127  public:
128 
133  marley::Particle residue) : DiscreteExitChannel(width, flev, residue) {}
134 
135  inline virtual bool emits_fragment() const final override
136  { return false; }
137 
138  virtual void do_decay(double& Ex, int& two_J,
139  marley::Parity& Pi, marley::Particle& emitted_particle,
140  marley::Particle& residual_nucleus, marley::Generator& /*unused*/)
141  override;
142  };
143 
144 
148  {
149  public:
150 
159  ContinuumExitChannel(double width, double Emin, double Emax,
160  marley::Particle gs_residue) : marley::ExitChannel(width),
161  Emin_(Emin), Emax_(Emax), gs_residue_(gs_residue) {}
162 
163  inline virtual bool is_continuum() const final override { return true; }
164 
165  protected:
166 
171 
175  SpinParityWidth(int twoJ, marley::Parity p, double w)
176  : twoJf(twoJ), Pf(p), width(w) {}
177 
178  int twoJf;
180  double width;
181  };
182 
183  double Emin_;
184  double Emax_;
186 
189  std::vector<SpinParityWidth> jpi_widths_table_;
190  };
191 
195  {
196  public:
197 
209  FragmentContinuumExitChannel(double width, double Emin, double Emax,
210  std::function<double(double&, double)> Epdf,
211  const marley::Fragment& frag, marley::Particle gs_residue)
212  : marley::ContinuumExitChannel(width, Emin, Emax, gs_residue),
213  Epdf_(Epdf), fragment_(frag) {}
214 
215  inline virtual bool emits_fragment() const final override { return true; }
216 
218  inline const marley::Fragment& get_fragment() const { return fragment_; }
219 
227  void sample_spin_parity(int& twoJ, marley::Parity& Pi,
228  marley::Generator& gen, double Exf, double Ea);
229 
230  virtual void do_decay(double& Ex, int& two_J,
231  marley::Parity& Pi, marley::Particle& emitted_particle,
232  marley::Particle& residual_nucleus, marley::Generator& gen)
233  override;
234 
235  protected:
243  std::function<double(double&, double)> Epdf_;
245  };
246 
250  {
251  public:
252 
263  GammaContinuumExitChannel(double width, double Emin, double Emax,
264  std::function<double(double)> Epdf, marley::Particle gs_residue)
265  : marley::ContinuumExitChannel(width, Emin, Emax, gs_residue),
266  Epdf_(Epdf) {}
267 
268  inline virtual bool emits_fragment() const final override
269  { return false; }
270 
280  void sample_spin_parity(int Z, int A, int& twoJ, marley::Parity& Pi,
281  double Exi, double Exf, marley::Generator& gen);
282 
283  virtual void do_decay(double& Ex, int& two_J,
284  marley::Parity& Pi, marley::Particle& emitted_particle,
285  marley::Particle& residual_nucleus, marley::Generator& gen)
286  override;
287 
288  protected:
289 
295  std::function<double(double)> Epdf_;
296 
297  private:
298 
309  double store_gamma_jpi_width(double Exf, int twoJf, marley::Parity Pi,
310  double tcE, double tcM, int mpol, marley::LevelDensityModel& ldm);
311  };
312 }
virtual bool emits_fragment() const finaloverride
Returns true if this decay channel involves fragment emission or false if it involves gamma-ray emiss...
Definition: ExitChannel.hh:135
virtual bool emits_fragment() const finaloverride
Returns true if this decay channel involves fragment emission or false if it involves gamma-ray emiss...
Definition: ExitChannel.hh:215
marley::Particle gs_residue_
Ground-state residual nucleus.
Definition: ExitChannel.hh:185
FragmentDiscreteExitChannel(double width, marley::Level &flev, marley::Particle residue, const marley::Fragment &frag)
Definition: ExitChannel.hh:103
void sample_spin_parity(int &twoJ, marley::Parity &Pi, marley::Generator &gen, double Exf, double Ea)
Sample a final-state spin and parity for the residual nucleus.
Definition: ExitChannel.cc:47
std::function< double(double &, double)> Epdf_
Probability density function describing the distribution of final-state nuclear excitation energies w...
Definition: ExitChannel.hh:243
double width() const
Get the partial decay width to this channel.
Definition: ExitChannel.hh:58
virtual bool emits_fragment() const finaloverride
Returns true if this decay channel involves fragment emission or false if it involves gamma-ray emiss...
Definition: ExitChannel.hh:107
marley::Level & get_final_level()
Get a non-const reference to the final-state nuclear level.
Definition: ExitChannel.hh:84
const marley::Fragment & get_fragment() const
Get a reference to the emitted Fragment.
Definition: ExitChannel.hh:110
virtual void do_decay(double &Ex, int &two_J, marley::Parity &Pi, marley::Particle &emitted_particle, marley::Particle &residual_nucleus, marley::Generator &) override
Simulates a nuclear decay into this channel.
Definition: ExitChannel.cc:18
double Emax_
Maximum accessible nuclear excitation energy (MeV)
Definition: ExitChannel.hh:184
Abstract base class for compound nucleus de-excitation channels.
Definition: ExitChannel.hh:14
Momentum four-vector for a simulated particle.
Definition: Particle.hh:16
ContinuumExitChannel(double width, double Emin, double Emax, marley::Particle gs_residue)
Definition: ExitChannel.hh:159
Fragment emission ExitChannel that leads to the unbound continuum in the final state ...
Definition: ExitChannel.hh:194
virtual bool emits_fragment() const finaloverride
Returns true if this decay channel involves fragment emission or false if it involves gamma-ray emiss...
Definition: ExitChannel.hh:268
SpinParityWidth(int twoJ, marley::Parity p, double w)
Definition: ExitChannel.hh:175
FragmentContinuumExitChannel(double width, double Emin, double Emax, std::function< double(double &, double)> Epdf, const marley::Fragment &frag, marley::Particle gs_residue)
Definition: ExitChannel.hh:209
static marley::IteratorToPointerMember< It, marley::ExitChannel, double > make_width_iterator(It it)
Convert an iterator that points to an ExitChannel object into an iterator to the ExitChannel's width_...
Definition: ExitChannel.hh:51
GammaContinuumExitChannel(double width, double Emin, double Emax, std::function< double(double)> Epdf, marley::Particle gs_residue)
Definition: ExitChannel.hh:263
Type-safe representation of a parity value (either +1 or -1)
Definition: Parity.hh:9
virtual void do_decay(double &Ex, int &two_J, marley::Parity &Pi, marley::Particle &emitted_particle, marley::Particle &residual_nucleus, marley::Generator &gen) override
Simulates a nuclear decay into this channel.
Definition: ExitChannel.cc:119
std::vector< SpinParityWidth > jpi_widths_table_
Table of possible final-state spin-parities together with their partial decay widths.
Definition: ExitChannel.hh:189
double Emin_
Minimum accessible nuclear excitation energy (MeV)
Definition: ExitChannel.hh:183
DiscreteExitChannel(double width, marley::Level &flev, marley::Particle residue)
Definition: ExitChannel.hh:74
virtual bool emits_fragment() const =0
Returns true if this decay channel involves fragment emission or false if it involves gamma-ray emiss...
Fragment emission ExitChannel that leads to a discrete nuclear level in the final state ...
Definition: ExitChannel.hh:95
Gamma emission exit channel that leads to a discrete nuclear level in the final state ...
Definition: ExitChannel.hh:125
virtual bool is_continuum() const finaloverride
Returns true if this channel accesses the particle-unbound continuum of nuclear levels or false other...
Definition: ExitChannel.hh:78
GammaDiscreteExitChannel(double width, marley::Level &flev, marley::Particle residue)
Definition: ExitChannel.hh:132
double width
Partial decay width (MeV)
Definition: ExitChannel.hh:180
The MARLEY Event generator.
Definition: Generator.hh:20
virtual void do_decay(double &Ex, int &two_J, marley::Parity &Pi, marley::Particle &emitted_particle, marley::Particle &residual_nucleus, marley::Generator &gen)=0
Simulates a nuclear decay into this channel.
const marley::Fragment & fragment_
Emitted Fragment.
Definition: ExitChannel.hh:244
Simple container for storing reference data about each of the nuclear fragments considered by MARLEY'...
Definition: Fragment.hh:11
int twoJf
Final nuclear spin.
Definition: ExitChannel.hh:178
Abstract base class for models of nuclear level densities.
Definition: LevelDensityModel.hh:7
A discrete nuclear energy level.
Definition: Level.hh:13
Gamma emission exit channel that leads to the unbound continuum in the final state ...
Definition: ExitChannel.hh:249
Abstract base class for ExitChannel objects that lead to discrete nuclear levels in the final state...
Definition: ExitChannel.hh:68
virtual bool is_continuum() const finaloverride
Returns true if this channel accesses the particle-unbound continuum of nuclear levels or false other...
Definition: ExitChannel.hh:163
const marley::Fragment & fragment_
Fragment emitted by this exit channel.
Definition: ExitChannel.hh:120
const marley::Fragment & get_fragment() const
Get a reference to the emitted Fragment.
Definition: ExitChannel.hh:218
virtual void do_decay(double &Ex, int &two_J, marley::Parity &Pi, marley::Particle &emitted_particle, marley::Particle &residual_nucleus, marley::Generator &gen) override
Simulates a nuclear decay into this channel.
Definition: ExitChannel.cc:29
virtual bool is_continuum() const =0
Returns true if this channel accesses the particle-unbound continuum of nuclear levels or false other...
A spin-parity value with its corresponding partial decay width.
Definition: ExitChannel.hh:170
virtual void do_decay(double &Ex, int &two_J, marley::Parity &Pi, marley::Particle &emitted_particle, marley::Particle &residual_nucleus, marley::Generator &) override
Simulates a nuclear decay into this channel.
Definition: ExitChannel.cc:6
marley::Parity Pf
Final nuclear parity.
Definition: ExitChannel.hh:179
ExitChannel(double width)
Definition: ExitChannel.hh:19
std::function< double(double)> Epdf_
Probability density function describing the distribution of final-state nuclear excitation energies w...
Definition: ExitChannel.hh:295
Template class that creates an iterator to a class member based on an iterator to a pointer (either b...
Definition: IteratorToPointerMember.hh:20
const marley::Level & get_final_level() const
Get a const reference to the final-state nuclear level.
Definition: ExitChannel.hh:81
void sample_spin_parity(int Z, int A, int &twoJ, marley::Parity &Pi, double Exi, double Exf, marley::Generator &gen)
Sample a final-state spin and parity for the residual nucleus.
Definition: ExitChannel.cc:140
marley::Level & final_level_
Reference to the final-state nuclear level.
Definition: ExitChannel.hh:88
Abstract base class for ExitChannel objects that lead to the unbound continuum in the final state...
Definition: ExitChannel.hh:147
double width_
Partial decay width (MeV)
Definition: ExitChannel.hh:63
marley::Particle residue_
Residual nucleus Particle object.
Definition: ExitChannel.hh:90