MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Loading...
Searching...
No Matches
HauserFeshbachDecay.hh
1
4//
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// HepMC3 includes
25#include "HepMC3/GenParticle.h"
26
27namespace marley {
28
29 // Forward-declare the StructureDatabase class
31
35
36 public:
37
44 HauserFeshbachDecay( const std::shared_ptr< HepMC3::GenParticle >&
45 compound_nucleus, double Exi, int twoJi, marley::Parity Pi,
47
61 const marley::ExitChannel& do_decay( double& Exf, int& twoJf,
62 marley::Parity& Pf, std::shared_ptr< HepMC3::GenParticle >&
63 emitted_particle, std::shared_ptr< HepMC3::GenParticle >&
64 residual_nucleus, int& qIon, marley::Generator& gen );
65
68 void print( std::ostream& out ) const;
69
72 inline std::vector< std::unique_ptr<marley::ExitChannel> >&
74
77 inline const std::vector< std::unique_ptr<marley::ExitChannel> >&
78 exit_channels() const;
79
82 const std::unique_ptr< marley::ExitChannel >& sample_exit_channel(
83 marley::Generator& gen ) const;
84
85 inline double total_width() const;
86
87 private:
88
92 void build_exit_channels( marley::StructureDatabase& sdb );
93
96 const std::shared_ptr< HepMC3::GenParticle > compound_nucleus_;
97 const double Exi_;
98 const int twoJi_;
99 const marley::Parity Pi_;
100
102 double total_width_ = 0.;
103
105 std::vector< std::unique_ptr<marley::ExitChannel> > exit_channels_;
106 };
107
108 // Inline function definitions
109 inline std::vector< std::unique_ptr<marley::ExitChannel> >&
110 HauserFeshbachDecay::exit_channels() { return exit_channels_; }
111
112 inline const std::vector< std::unique_ptr<marley::ExitChannel> >&
113 HauserFeshbachDecay::exit_channels() const { return exit_channels_; }
114
115 inline double HauserFeshbachDecay::total_width() const
116 { return total_width_; }
117}
118
120inline std::ostream& operator<<( std::ostream& out,
121 const marley::HauserFeshbachDecay& hfd )
122{
123 hfd.print(out);
124 return out;
125}
Abstract base class for compound nucleus de-excitation channels.
The MARLEY Event generator.
Definition Generator.hh:54
Monte Carlo implementation of the Hauser-Feshbach statistical model for decays of highly-excited nucl...
std::vector< std::unique_ptr< marley::ExitChannel > > & exit_channels()
Get a non-const reference to the owned vector of ExitChannel pointers.
const marley::ExitChannel & do_decay(double &Exf, int &twoJf, marley::Parity &Pf, std::shared_ptr< HepMC3::GenParticle > &emitted_particle, std::shared_ptr< HepMC3::GenParticle > &residual_nucleus, int &qIon, marley::Generator &gen)
Simulates a decay of the compound nucleus.
void print(std::ostream &out) const
Print information about the possible decay channels to a std::ostream.
HauserFeshbachDecay(const std::shared_ptr< HepMC3::GenParticle > &compound_nucleus, double Exi, int twoJi, marley::Parity Pi, marley::StructureDatabase &sdb)
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.
Type-safe representation of a parity value (either +1 or -1)
Definition Parity.hh:25
Container for nuclear structure information organized by nuclide.