|
MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
|
A table of nuclear responses for computing inclusive cross sections. More...
#include <ResponseTable.hh>
Public Member Functions | |
| ResponseTable (std::shared_ptr< std::vector< double > > &wvec, std::shared_ptr< std::vector< double > > &qvec, std::shared_ptr< std::vector< NuclearResponses > > &resp) | |
| const std::vector< NuclearResponses > & | get_responses () const |
| Access the nuclear responses. | |
| NuclearResponses | interpolate (double w, double q) const |
| const std::vector< double > & | q_grid () const |
| Access the 3-momentum transfer grid points. | |
| double | q_max () const |
| Retrieve the maximum q value. | |
| double | q_min () const |
| Retrieve the minimum q value. | |
| size_t | response_index (size_t iw, size_t iq) const |
| const std::vector< double > & | w_grid () const |
| Access the energy transfer grid points. | |
| double | w_max () const |
| Retrieve the maximum ω value. | |
| double | w_min () const |
| Retrieve the minimum ω value. | |
Protected Member Functions | |
| bool | get_neighbor_indices (const std::vector< double > &vec, double val, size_t &lower_index, size_t &upper_index) const |
Protected Attributes | |
| std::shared_ptr< std::vector< double > > | qvec_ |
| Grid points along the q-axis. | |
| std::shared_ptr< std::vector< NuclearResponses > > | responses_ |
| Sets of nuclear responses evaluated at each grid point. | |
| std::shared_ptr< std::vector< double > > | wvec_ |
| Grid points along the w-axis. | |
A table of nuclear responses for computing inclusive cross sections.
Definition at line 32 of file ResponseTable.hh.
|
inline |
Definition at line 35 of file ResponseTable.hh.
|
inline |
Definition at line 37 of file ResponseTable.hh.
|
protected |
Determines the indices for the two gridpoints surrounding a requested one-dimensional coordinate. If the coordinate is outside of the grid, then this function returns the two closest grid points.
| [in] | vec | A vector of grid point coordinates |
| [in] | val | The requested x or y coordinate |
| [out] | lower_index | The index of the closest grid point less than or equal to the requested value, or the lower of the two nearest grid points if the value falls outside of the grid |
| [out] | upper_index | The index of the closest grid point greater than the requested value, or the higher of the two nearest grid points if the value falls outside of the grid |
Definition at line 61 of file ResponseTable.cc.
Referenced by interpolate().
|
inline |
Access the nuclear responses.
Definition at line 61 of file ResponseTable.hh.
References responses_.
| marley::NuclearResponses marley::ResponseTable::interpolate | ( | double | w, |
| double | q ) const |
Use simple bilinear interpolation to compute a set of nuclear responses
Definition at line 20 of file ResponseTable.cc.
References get_neighbor_indices(), q_max(), q_min(), qvec_, response_index(), responses_, w_max(), w_min(), and wvec_.
|
inline |
Access the 3-momentum transfer grid points.
Definition at line 58 of file ResponseTable.hh.
References qvec_.
|
inline |
Retrieve the maximum q value.
Definition at line 52 of file ResponseTable.hh.
References qvec_.
Referenced by interpolate().
|
inline |
Retrieve the minimum q value.
Definition at line 49 of file ResponseTable.hh.
References qvec_.
Referenced by interpolate().
|
inline |
Calculates the index in the vector of responses that corresponds to a given set of ω and q indices
| [in] | iw | Index of the desired grid point on the ω axis |
| [in] | iq | Index of the desired grid point on the q axis |
Definition at line 68 of file ResponseTable.hh.
References qvec_.
Referenced by interpolate().
|
inline |
Access the energy transfer grid points.
Definition at line 55 of file ResponseTable.hh.
References wvec_.
|
inline |
Retrieve the maximum ω value.
Definition at line 46 of file ResponseTable.hh.
References wvec_.
Referenced by interpolate().
|
inline |
Retrieve the minimum ω value.
Definition at line 43 of file ResponseTable.hh.
References wvec_.
Referenced by interpolate().
|
protected |
Grid points along the q-axis.
Definition at line 84 of file ResponseTable.hh.
Referenced by interpolate(), q_grid(), q_max(), q_min(), and response_index().
|
protected |
Sets of nuclear responses evaluated at each grid point.
Definition at line 87 of file ResponseTable.hh.
Referenced by get_responses(), and interpolate().
|
protected |
Grid points along the w-axis.
Definition at line 81 of file ResponseTable.hh.
Referenced by interpolate(), w_grid(), w_max(), and w_min().