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
ContinuumNuclearReaction.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
19// Standard library includes
20#include <memory>
21
22// MARLEY includes
23#include "marley/NuclearReaction.hh"
24#include "marley/TabulatedXSec.hh"
25
26namespace marley {
27
30 class ContinuumNuclearReaction : public NuclearReaction {
31
32 public:
33
37 enum class SubContinuumMode { IGNORE, MIRROR, ACCUMULATE };
38
39 ContinuumNuclearReaction( Reaction::ProcessType pt, int pdg_a,
40 int pdg_b, int pdg_c, int pdg_d, int q_d,
41 const std::shared_ptr<TabulatedXSec>& txsec,
42 const std::string& source_file );
43
44 virtual std::shared_ptr< HepMC3::GenEvent > create_event(
45 int particle_id_a, double KEa, marley::Generator& gen ) const override;
46
47 virtual double total_xs( int pdg_a, double KEa ) const override;
48
49 inline const TabulatedXSec& get_tabulated_xsec() const
50 { return *xsec_; }
51
53 static inline SubContinuumMode sub_continuum_mode() { return sc_mode_; }
54
56 static inline void set_sub_continuum_mode( SubContinuumMode scm )
57 { sc_mode_ = scm; }
58
59 static SubContinuumMode sub_continuum_mode_from_string(
60 const std::string& sc_mode_str );
61
62 static std::string string_from_sub_continuum_mode(
63 const SubContinuumMode sc_mode );
64
65 protected:
66
67 virtual void set_description() override;
68
82 bool reassign_sub_continuum( double& w, const double ctl,
83 const double KEa ) const;
84
94 double get_Ec_from_Ex( const double Ex, const double cos_theta,
95 const double KEa, double* jacobian = nullptr) const;
96
98 std::shared_ptr< TabulatedXSec > xsec_;
99
103
106 static const std::map< SubContinuumMode, std::string > sc_mode_string_map_;
107 };
108
109}
virtual void set_description() override
Creates the description string based on the PDG code values for the initial and final particles.
static SubContinuumMode sc_mode_
Indicates the desired method for handling events with excitation energies originally sampled below th...
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.
virtual double total_xs(int pdg_a, double KEa) const override
Compute the reaction's total cross section (MeV -2)
static SubContinuumMode sub_continuum_mode()
Gets the approach to handling sub-continuum cross-section strength.
bool reassign_sub_continuum(double &w, const double ctl, const double KEa) const
Helper function for create_event() that potentially reassigns the value of the energy transfer.
std::shared_ptr< TabulatedXSec > xsec_
Helper object that handles cross section calculations.
static const std::map< SubContinuumMode, std::string > sc_mode_string_map_
Helper map used for conversions between a SubContinuumMode value and a std::string.
static void set_sub_continuum_mode(SubContinuumMode scm)
Sets the approach to handling sub-continuum cross-section strength.
double get_Ec_from_Ex(const double Ex, const double cos_theta, const double KEa, double *jacobian=nullptr) const
Helper function for reassign_sub_continuum() that solves for the outgoing lepton total energy that co...
The MARLEY Event generator.
Definition Generator.hh:54
NuclearReaction(ProcessType pt, int pdg_a, int pdg_b, int pdg_c, int pdg_d, int q_d, const std::string &source_file)
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
Computes inclusive lepton-nucleus cross sections using tabulated nuclear response functions.