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
DiscreteNuclearReaction.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 <functional>
19#include <map>
20#include <memory>
21#include <regex>
22#include <string>
23#include <vector>
24
25#include "marley/CoulombCorrector.hh"
26#include "marley/DecayScheme.hh"
27#include "marley/Level.hh"
28#include "marley/MassTable.hh"
29#include "marley/MatrixElement.hh"
30#include "marley/NuclearReaction.hh"
31#include "marley/NuclearFormFactor.hh"
32#include "marley/NucleonFormFactors.hh"
33#include "marley/StructureDatabase.hh"
34
35namespace marley {
36
37 class Generator;
38 class JSON;
39
43
44 public:
45
60 int pdg_c, int pdg_d, int q_d,
61 const std::shared_ptr<std::vector<marley::MatrixElement> >& mat_els,
62 CoulombCorrector::CoulombMode mode, const JSON& ff_config,
63 const std::string& source_file );
64
65 virtual std::shared_ptr< HepMC3::GenEvent > create_event(
66 int particle_id_a, double KEa, marley::Generator& gen ) const override;
67
71
78 virtual double total_xs( int pdg_a, double KEa ) const override;
79
88 virtual double total_xs( int pdg_a, double KEa,
89 marley::MatrixElement::TransitionType mat_el_type ) const;
90
100 double diff_xs( const marley::MatrixElement& mat_el, double KEa,
101 double cos_theta_c_cm, double& beta_c_cm,
102 bool check_max_E_level ) const;
103
112 virtual double diff_xs( int pdg_a, double KEa,
113 double cos_theta_c_cm ) const;
114
126 virtual double total_xs( const marley::MatrixElement& me, double KEa,
127 double& beta_c_cm, bool check_max_E_level = true ) const;
128
130 inline const std::vector< marley::MatrixElement >& matrix_elements() const
131 { return *matrix_elements_; }
132
133 protected:
134
135 virtual void set_description() override;
136
145 double sample_cos_theta_c_cm( const marley::MatrixElement& matrix_el,
146 double KEa, double beta_c_cm, marley::Generator& gen ) const;
147
163 double summed_xs_helper( int pdg_a, double KEa, double cos_theta_c_cm,
164 std::vector<double>* level_xsecs, bool differential ) const;
165
168 std::shared_ptr< std::vector<marley::MatrixElement> > matrix_elements_;
169
172 std::pair< std::vector<int>, std::vector<double> > nucleon_radii_;
173
176
179
181 std::shared_ptr< NuclearFormFactor > nuclear_ff_;
182
185 bool allowed_approx_ = false;
186 };
187
188}
Computes Coulomb correction factors for neutrino-nucleus differential cross sections.
CoulombMode
Enumerated type used to set the method for handling Coulomb corrections for CC nuclear reactions.
Discrete level and γ-ray data for a specific nuclide.
double summed_xs_helper(int pdg_a, double KEa, double cos_theta_c_cm, std::vector< double > *level_xsecs, bool differential) const
NucleonFormFactors nucleon_form_factors_
Object that handles calculations of nucleon form factors.
bool allowed_approx_
Flag that indicates whether to include aditional terms beyond the q->0 limit.
std::shared_ptr< NuclearFormFactor > nuclear_ff_
Object that handles calculations of the nuclear form factor.
void set_decay_scheme(marley::DecayScheme *scheme)
Sets the DecayScheme object to use for sampling excited levels in the residue.
virtual double total_xs(int pdg_a, double KEa) const override
Total reaction cross section (MeV -2) including all kinematically-allowed final nuclear levels.
double diff_xs(const marley::MatrixElement &mat_el, double KEa, double cos_theta_c_cm, double &beta_c_cm, bool check_max_E_level) const
Differential cross section (MeV -2) evaluated in the center-of-momentum frame for a transition to a ...
CoulombCorrector coulomb_corrector_
Object that handles calculations of Coulomb correction factors.
DiscreteNuclearReaction(ProcessType pt, int pdg_a, int pdg_b, int pdg_c, int pdg_d, int q_d, const std::shared_ptr< std::vector< marley::MatrixElement > > &mat_els, CoulombCorrector::CoulombMode mode, const JSON &ff_config, const std::string &source_file)
std::shared_ptr< std::vector< marley::MatrixElement > > matrix_elements_
Matrix elements representing all of the possible nuclear transitions that may be caused by this react...
std::pair< std::vector< int >, std::vector< double > > nucleon_radii_
Pair of vectors containg the mean radius of the nucleon wavefunctions and the degeneracies for each n...
virtual void set_description() override
Creates the description string based on the PDG code values for the initial and final particles.
double sample_cos_theta_c_cm(const marley::MatrixElement &matrix_el, double KEa, double beta_c_cm, marley::Generator &gen) const
Samples a polar angle cosine for the ejectile using the relevant portion of the reaction nuclear matr...
const std::vector< marley::MatrixElement > & matrix_elements() const
Allows access to the owned vector of MatrixElement objects.
virtual std::shared_ptr< HepMC3::GenEvent > create_event(int particle_id_a, double KEa, marley::Generator &gen) const override
Create an event object for this reaction.
The MARLEY Event generator.
Definition Generator.hh:54
A reduced nuclear matrix element that represents a transition caused by a neutrino-nucleus reaction.
TransitionType
Enumerated type that represents the possible kinds of nuclear transitions recognized by MARLEY.
NuclearReaction(ProcessType pt, int pdg_a, int pdg_b, int pdg_c, int pdg_d, int q_d, const std::string &source_file)
Calculates nucleon form factors for both vector and axial currents.
ProcessType
Enumerated type describing the kind of scattering process represented by a Reaction.
Definition Reaction.hh:58
const std::string & source_file() const
Get the resolved path of the reaction data file used to construct this Reaction.
Definition Reaction.hh:104
int pdg_a() const
Get the projectile PDG code.
Definition Reaction.hh:109
int pdg_b() const
Get the target PDG code.
Definition Reaction.hh:112