23#include "marley/CoulombCorrector.hh"
24#include "marley/ChebyshevInterpolatingFunction.hh"
25#include "marley/LeptonFactors.hh"
26#include "marley/Parity.hh"
27#include "marley/Reaction.hh"
28#include "marley/ResponseTable.hh"
40 explicit TabulatedXSec(
int target_pdg,
44 void add_table(
const std::string& file_name );
53 ||
proc_type_ == ProcType::AntiNeutrinoCC_Discrete
54 ||
proc_type_ == ProcType::NeutrinoCC_Continuum
55 ||
proc_type_ == ProcType::AntiNeutrinoCC_Continuum );
60 struct MultipoleLabel {
61 MultipoleLabel(
unsigned J,
marley::Parity Pi ) : J_( J ), Pi_( Pi ) {}
67 inline bool operator<(
const MultipoleLabel& ml )
const {
68 if ( this->J_ != ml.J_ ) {
69 return ( this->J_ < ml.J_ );
71 int p1 =
static_cast<int>( this->Pi_ );
72 int p2 =
static_cast<int>( ml.Pi_ );
77 double diff_xsec(
int pdg_a,
double KE_a,
double omega,
double cos_theta,
78 const MultipoleLabel& ml )
const;
81 const std::string& file_name );
83 inline const ResponseTable& get_table(
const MultipoleLabel& ml )
const
86 inline const std::map< MultipoleLabel, ResponseTable >& get_table_map()
90 double& diff_max )
const;
92 double integral(
int pdg_a,
double KEa )
const;
94 void optimize(
int pdg_a,
double max_KEa );
102 struct IntegralTerm {
103 IntegralTerm(
double w,
double ctl,
double val ) : omega_( w ),
121 std::vector< IntegralTerm >* integral_terms =
nullptr )
const;
125 struct OptimizationMapKey {
127 : pdg_a_( pdg_a ), ml_( ml ) {}
131 inline bool operator<(
const OptimizationMapKey& omk )
const {
132 if ( this->pdg_a_ != omk.pdg_a_ ) {
133 return ( this->pdg_a_ < omk.pdg_a_ );
135 return this->ml_ < omk.ml_;
142 struct OptimizationMapValue {
145 : tot_xsec_( tot_xsec ), max_diff_xsec_( max_diff_xsec ) {}
Approximates a 1D function using Chebyshev points.
CoulombMode
Enumerated type used to set the method for handling Coulomb corrections for CC nuclear reactions.
Type-safe representation of a parity value (either +1 or -1)
ProcessType
Enumerated type describing the kind of scattering process represented by a Reaction.
A table of nuclear responses for computing inclusive cross sections.
marley::Reaction::ProcessType proc_type_
Kind of process for which the cross section will be computed.
marley::CoulombCorrector::CoulombMode coulomb_mode_
Method to use for computing Coulomb corrections to the cross section.
TargetAtom ta_
Nuclide represented by this table of nuclear responses.
double delta_ias() const
Get the shift used to compute the effective energy transfer.
std::map< OptimizationMapKey, OptimizationMapValue > optimization_map_
std::map< MultipoleLabel, ResponseTable > responses_
Tables of nuclear responses organized by multipole.
double compute_integral(int pdg_a, double KEa, const MultipoleLabel &ml, double &diff_max, std::vector< IntegralTerm > *integral_terms=nullptr) const
Helper function for integral that does the actual integration.
bool is_cc() const
Returns true if this cross section represents a CC process or false otherwise.
An atomic target for a lepton scattering reaction.
double cos_theta_
Energy transfer (MeV)
Simple struct representing a given multipole order, e.g., 2+.
bool operator<(const MultipoleLabel &ml) const
bool operator<(const OptimizationMapKey &omk) const