MARLEY (Model of Argon Reaction Low Energy Yields)  v1.2.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
HauserFeshbachDecay.hh
1 //
5 // This file is part of MARLEY (Model of Argon Reaction Low Energy Yields)
6 //
7 // MARLEY is free software: you can redistribute it and/or modify it under the
8 // terms of version 3 of the GNU General Public License as published by the
9 // Free Software Foundation.
10 //
11 // For the full text of the license please see COPYING or
12 // visit http://opensource.org/licenses/GPL-3.0
13 //
14 // Please respect the MCnet academic usage guidelines. See GUIDELINES
15 // or visit https://www.montecarlonet.org/GUIDELINES for details.
16 
17 #pragma once
18 #include <memory>
19 #include <ostream>
20 
21 #include "marley/ExitChannel.hh"
22 #include "marley/Parity.hh"
23 
24 namespace marley {
25 
26  // Forward-declare the StructureDatabase class
27  class StructureDatabase;
28 
32 
33  public:
34 
41  HauserFeshbachDecay( const marley::Particle& compound_nucleus,
42  double Exi, int twoJi, marley::Parity Pi,
44 
54  bool do_decay( double& Exf, int& twoJf, marley::Parity& Pf,
55  marley::Particle& emitted_particle, marley::Particle& residual_nucleus,
56  marley::Generator& gen );
57 
60  void print( std::ostream& out ) const;
61 
64  inline std::vector< std::unique_ptr<marley::ExitChannel> >&
65  exit_channels();
66 
69  inline const std::vector< std::unique_ptr<marley::ExitChannel> >&
70  exit_channels() const;
71 
74  const std::unique_ptr<marley::ExitChannel>& sample_exit_channel(
75  marley::Generator& gen) const;
76 
77  private:
78 
82  void build_exit_channels( marley::StructureDatabase& sdb );
83 
86  const marley::Particle compound_nucleus_;
87  const double Exi_;
88  const int twoJi_;
89  const marley::Parity Pi_;
90 
92  double total_width_ = 0.;
93 
95  std::vector< std::unique_ptr<marley::ExitChannel> > exit_channels_;
96  };
97 
98  // Inline function definitions
99  inline std::vector<std::unique_ptr<marley::ExitChannel> >&
100  HauserFeshbachDecay::exit_channels() { return exit_channels_; }
101 
102  inline const std::vector<std::unique_ptr<marley::ExitChannel> >&
103  HauserFeshbachDecay::exit_channels() const { return exit_channels_; }
104 }
105 
107 inline std::ostream& operator<<( std::ostream& out,
108  const marley::HauserFeshbachDecay& hfd )
109 {
110  hfd.print(out);
111  return out;
112 }
The MARLEY Event generator.
Definition: Generator.hh:42
Monte Carlo implementation of the Hauser-Feshbach statistical model for decays of highly-excited nucl...
Definition: HauserFeshbachDecay.hh:31
HauserFeshbachDecay(const marley::Particle &compound_nucleus, double Exi, int twoJi, marley::Parity Pi, marley::StructureDatabase &sdb)
Definition: HauserFeshbachDecay.cc:25
bool do_decay(double &Exf, int &twoJf, marley::Parity &Pf, marley::Particle &emitted_particle, marley::Particle &residual_nucleus, marley::Generator &gen)
Simulates a decay of the compound nucleus.
Definition: HauserFeshbachDecay.cc:193
std::vector< std::unique_ptr< marley::ExitChannel > > & exit_channels()
Get a non-const reference to the owned vector of ExitChannel pointers.
Definition: HauserFeshbachDecay.hh:100
void print(std::ostream &out) const
Print information about the possible decay channels to a std::ostream.
Definition: HauserFeshbachDecay.cc:206
const std::unique_ptr< marley::ExitChannel > & sample_exit_channel(marley::Generator &gen) const
Helper function for do_decay(). Samples an ExitChannel using the partial decay widths as weights.
Definition: HauserFeshbachDecay.cc:239
Type-safe representation of a parity value (either +1 or -1)
Definition: Parity.hh:25
Momentum four-vector for a simulated particle.
Definition: Particle.hh:32
Container for nuclear structure information organized by nuclide.
Definition: StructureDatabase.hh:39