|
MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
|
Abstract base class that represents a 2 → 2 scattering reaction. More...
#include <Reaction.hh>
Public Types | |
| enum | DataFormat { DiscreteStrengths = 0 , MultipoleResponses = 1 } |
| Enumerated type describing the file format for reaction data. More... | |
| enum | ProcessType { Unknown = -1 , NeutrinoCC_Discrete = 0 , AntiNeutrinoCC_Discrete = 1 , NC_Discrete = 2 , NuElectronElastic = 3 , NeutrinoCC_Continuum = 4 , AntiNeutrinoCC_Continuum = 5 , NC_Continuum = 6 , StandaloneDecay = 7 } |
| Enumerated type describing the kind of scattering process represented by a Reaction. More... | |
Public Member Functions | |
| Reaction (const std::string &source_file) | |
| Construct a Reaction with the resolved path of the data file. | |
| virtual marley::TargetAtom | atomic_target () const =0 |
| Returns the target atom involved in this reaction. | |
| virtual std::shared_ptr< HepMC3::GenEvent > | create_event (int pdg_a, double KEa, marley::Generator &gen) const =0 |
| Create an event object for this reaction. | |
| const std::string & | get_description () const |
| Get a string that contains the formula for this reaction. | |
| int | pdg_a () const |
| Get the projectile PDG code. | |
| int | pdg_b () const |
| Get the target PDG code. | |
| ProcessType | process_type () const |
| Get the process type for this reaction. | |
| const std::string & | source_file () const |
| Get the resolved path of the reaction data file used to construct this Reaction. | |
| virtual double | threshold_kinetic_energy () const =0 |
| Get the minimum lab-frame kinetic energy (MeV) of the projectile that allows this reaction to proceed via a transition to the residue's ground state. | |
| virtual double | total_xs (int pdg_a, double KEa) const =0 |
| Compute the reaction's total cross section (MeV -2) | |
Static Public Member Functions | |
| static int | get_ejectile_pdg (int pdg_a, ProcessType proc_type) |
| static void | get_residue_pdg_and_charge (ProcessType proc_type, int pdg_b, int &pdg_d, int &q_d) |
| static std::vector< std::unique_ptr< Reaction > > | load_from_file (const std::string &filename, StructureDatabase &db, CoulombCorrector::CoulombMode coulomb_mode, const JSON &ff_config) |
| static std::string | proc_type_to_string (const ProcessType &pt) |
Protected Member Functions | |
| virtual std::shared_ptr< HepMC3::GenEvent > | make_event_object (double KEa, const std::shared_ptr< HepMC3::GenParticle > &ejectile, const std::shared_ptr< HepMC3::GenParticle > &residue) const |
| Helper function that makes an event object. | |
| virtual std::shared_ptr< HepMC3::GenEvent > | make_event_object (double KEa, double pc_cm, double cos_theta_c_cm, double phi_c_cm, double Ec_cm, double Ed_cm, int residue_status) const |
| Helper function that makes an event object. | |
| void | two_two_scatter (double KEa, double &s, double &Ec_cm, double &pc_cm, double &Ed_cm) const |
| Helper function that handles CM frame kinematics for the reaction. | |
Static Protected Member Functions | |
| static const std::vector< int > & | get_projectiles (ProcessType proc_type) |
Protected Attributes | |
| std::string | description_ |
| String that contains a formula describing the reaction. | |
| double | ma_ |
| Projectile mass (MeV) | |
| double | mb_ |
| Target mass (MeV) | |
| double | mc_ |
| Ejectile mass (MeV) | |
| double | md_ |
| Residue mass (MeV) | |
| int | pdg_a_ |
| PDG code for the projectile. | |
| int | pdg_b_ |
| PDG code for the target. | |
| int | pdg_c_ |
| PDG code for the ejectile. | |
| int | pdg_d_ |
| PDG code for the residue. | |
| ProcessType | process_type_ |
| Type of scattering process (CC, NC) represented by this reaction. | |
| const std::string | source_file_ |
| Resolved path of the reaction data file. | |
Abstract base class that represents a 2 → 2 scattering reaction.
This class models a reaction of the form a + b → c + d. The projectile (particle a) is taken to have lab-frame kinetic energy KEa and to be traveling toward the target along the positive z direction. The target (particle b) is taken to be at rest in the lab frame.
Definition at line 46 of file Reaction.hh.
Enumerated type describing the file format for reaction data.
| Enumerator | |
|---|---|
| DiscreteStrengths | Fermi and Gamow-Teller matrix elements are tabulated for discrete nuclear levels |
| MultipoleResponses | Continuum nuclear responses are given for one or more multipoles. |
Definition at line 71 of file Reaction.hh.
Enumerated type describing the kind of scattering process represented by a Reaction.
Definition at line 58 of file Reaction.hh.
| marley::Reaction::Reaction | ( | const std::string & | source_file | ) |
Construct a Reaction with the resolved path of the data file.
| source_file | Resolved path of the reaction data file |
Definition at line 362 of file Reaction.cc.
References source_file(), and source_file_.
Referenced by marley::NuclearReaction::NuclearReaction().
|
pure virtual |
Returns the target atom involved in this reaction.
For nuclear reactions, this is identical to the pdg_b_ member variable. For electron reactions, it is distinct (since particle b is the initial struck electron).
Implemented in marley::ElectronReaction, and marley::NuclearReaction.
References pdg_a(), and pdg_b().
Referenced by marley::Generator::create_event().
|
pure virtual |
Create an event object for this reaction.
| pdg_a | PDG code for the incident projectile |
| KEa | Lab-frame kinetic energy of the projectile |
| gen | Reference to the Generator to use for random sampling |
Implemented in marley::ContinuumNuclearReaction, marley::DiscreteNuclearReaction, and marley::ElectronReaction.
References pdg_a().
Referenced by marley::Generator::create_event().
|
inline |
Get a string that contains the formula for this reaction.
Definition at line 97 of file Reaction.hh.
References description_.
|
static |
Function that returns the ejectile PDG code given the projectile PDG code and the ProcessType
Definition at line 329 of file Reaction.cc.
References pdg_a().
Referenced by marley::TabulatedXSec::compute_integral(), and load_from_file().
|
staticprotected |
Returns a vector of PDG codes for projectiles that participate in a particular ProcessType
Definition at line 358 of file Reaction.cc.
Referenced by load_from_file().
|
static |
Determines the PDG code and net charge of the residue given the target PDG code and the process type
Definition at line 573 of file Reaction.cc.
References AntiNeutrinoCC_Continuum, AntiNeutrinoCC_Discrete, NC_Continuum, NC_Discrete, NeutrinoCC_Continuum, NeutrinoCC_Discrete, and pdg_b().
Referenced by load_from_file().
|
static |
Factory method called by JSONConfig to build Reaction objects given a file with matrix element data
Definition at line 366 of file Reaction.cc.
References DiscreteStrengths, get_ejectile_pdg(), get_projectiles(), get_residue_pdg_and_charge(), MultipoleResponses, NuElectronElastic, pdg_a(), and pdg_b().
|
protectedvirtual |
Helper function that makes an event object.
This function expects pre-made HepMC3::GenParticle objects as input that have four-momenta expressed in the lab frame.
| KEa | Lab-frame kinetic energy (MeV) of the projectile |
| ejectile | GenParticle object for the ejectile |
| residue | GenParticle object for the residue |
Definition at line 283 of file Reaction.cc.
References ma_, mb_, pdg_a_, pdg_b_, and process_type_.
|
protectedvirtual |
Helper function that makes an event object.
This function should be called by marley::Reaction::create_event() after CM frame scattering angles have been sampled for the ejectile. The two outgoing particles are treated as generic final-state particles. Subclasses that need to attach particle-specific metadata to the residue (e.g., nuclear excitation information) should wrap this function (or the overload below) and add the desired attributes afterwards.
| KEa | Lab-frame kinetic energy (MeV) of the projectile |
| pc_cm | Ejectile 3-momentum magnitude (MeV) in the CM frame |
| cos_theta_c_cm | Cosine of ejectile's CM frame polar angle |
| phi_c_cm | Ejectile's CM frame azimuthal angle (radians) |
| Ec_cm | Ejectile total energy (MeV) in the CM frame |
| Ed_cm | Residue total energy (MeV) in the CM frame |
| residue_status | NuHepMC status code to assign to the residue particle (the final-state particle that recoils against the ejectile) |
Definition at line 247 of file Reaction.cc.
References ma_, make_event_object(), mb_, mc_, md_, pdg_c_, and pdg_d_.
Referenced by marley::ElectronReaction::create_event(), make_event_object(), marley::NuclearReaction::make_nuclear_event_object(), and marley::NuclearReaction::make_nuclear_event_object().
|
inline |
Get the projectile PDG code.
Definition at line 109 of file Reaction.hh.
References pdg_a_.
Referenced by marley::DiscreteNuclearReaction::DiscreteNuclearReaction(), marley::NuclearReaction::NuclearReaction(), atomic_target(), marley::ContinuumNuclearReaction::create_event(), marley::DiscreteNuclearReaction::create_event(), marley::ElectronReaction::create_event(), marley::Generator::create_event(), create_event(), marley::DiscreteNuclearReaction::diff_xs(), marley::ElectronReaction::diff_xs(), get_ejectile_pdg(), load_from_file(), marley::DiscreteNuclearReaction::set_decay_scheme(), marley::DiscreteNuclearReaction::summed_xs_helper(), marley::ContinuumNuclearReaction::total_xs(), marley::DiscreteNuclearReaction::total_xs(), marley::DiscreteNuclearReaction::total_xs(), marley::ElectronReaction::total_xs(), and total_xs().
|
inline |
Get the target PDG code.
Definition at line 112 of file Reaction.hh.
References pdg_b_.
Referenced by marley::DiscreteNuclearReaction::DiscreteNuclearReaction(), marley::NuclearReaction::NuclearReaction(), atomic_target(), get_residue_pdg_and_charge(), and load_from_file().
|
static |
Definition at line 354 of file Reaction.cc.
|
inline |
Get the process type for this reaction.
Definition at line 100 of file Reaction.hh.
References process_type_.
|
inline |
Get the resolved path of the reaction data file used to construct this Reaction.
Definition at line 104 of file Reaction.hh.
References source_file_.
Referenced by marley::DiscreteNuclearReaction::DiscreteNuclearReaction(), marley::NuclearReaction::NuclearReaction(), and Reaction().
|
pure virtual |
Get the minimum lab-frame kinetic energy (MeV) of the projectile that allows this reaction to proceed via a transition to the residue's ground state.
Implemented in marley::ElectronReaction, and marley::NuclearReaction.
|
pure virtual |
Compute the reaction's total cross section (MeV -2)
| pdg_a | Projectile's PDG code |
| KEa | Lab-frame kinetic energy of the incident projectile |
Implemented in marley::ContinuumNuclearReaction, marley::DiscreteNuclearReaction, and marley::ElectronReaction.
References pdg_a().
Referenced by marley::Generator::create_event().
|
protected |
Helper function that handles CM frame kinematics for the reaction.
| KEa | Lab-frame kinetic energy (MeV) of the projectile | |
| [out] | s | Mandelstam s (MeV2) |
| [out] | Ec_cm | Ejectile total energy (MeV) in the CM frame |
| [out] | pc_cm | Ejectile 3-momentum magnitude (MeV) in the CM frame |
| [out] | Ed_cm | Residue total energy (MeV) in the CM frame |
Definition at line 226 of file Reaction.cc.
References ma_, mb_, mc_, and md_.
Referenced by marley::DiscreteNuclearReaction::create_event(), and marley::ElectronReaction::create_event().
|
protected |
String that contains a formula describing the reaction.
Definition at line 157 of file Reaction.hh.
Referenced by get_description(), marley::ContinuumNuclearReaction::set_description(), marley::DiscreteNuclearReaction::set_description(), marley::NuclearReaction::set_description(), marley::DiscreteNuclearReaction::summed_xs_helper(), and marley::DiscreteNuclearReaction::total_xs().
|
protected |
Projectile mass (MeV)
Definition at line 147 of file Reaction.hh.
Referenced by marley::NuclearReaction::NuclearReaction(), marley::ContinuumNuclearReaction::create_event(), marley::DiscreteNuclearReaction::diff_xs(), marley::ElectronReaction::diff_xs(), marley::ContinuumNuclearReaction::get_Ec_from_Ex(), make_event_object(), make_event_object(), marley::NuclearReaction::max_level_energy(), marley::ContinuumNuclearReaction::reassign_sub_continuum(), marley::ElectronReaction::total_xs(), and two_two_scatter().
|
protected |
Target mass (MeV)
Definition at line 148 of file Reaction.hh.
Referenced by marley::NuclearReaction::NuclearReaction(), marley::ContinuumNuclearReaction::create_event(), marley::DiscreteNuclearReaction::diff_xs(), marley::ElectronReaction::diff_xs(), marley::ContinuumNuclearReaction::get_Ec_from_Ex(), make_event_object(), make_event_object(), marley::NuclearReaction::max_level_energy(), marley::ContinuumNuclearReaction::reassign_sub_continuum(), marley::ElectronReaction::total_xs(), and two_two_scatter().
|
protected |
Ejectile mass (MeV)
Definition at line 149 of file Reaction.hh.
Referenced by marley::NuclearReaction::NuclearReaction(), marley::ContinuumNuclearReaction::create_event(), marley::DiscreteNuclearReaction::diff_xs(), marley::ElectronReaction::diff_xs(), marley::ContinuumNuclearReaction::get_Ec_from_Ex(), make_event_object(), marley::NuclearReaction::max_level_energy(), marley::ContinuumNuclearReaction::reassign_sub_continuum(), marley::ElectronReaction::total_xs(), and two_two_scatter().
|
mutableprotected |
Residue mass (MeV)
Definition at line 154 of file Reaction.hh.
Referenced by marley::ContinuumNuclearReaction::create_event(), marley::DiscreteNuclearReaction::create_event(), marley::ElectronReaction::create_event(), marley::ElectronReaction::diff_xs(), make_event_object(), marley::ElectronReaction::total_xs(), and two_two_scatter().
|
protected |
PDG code for the projectile.
Definition at line 142 of file Reaction.hh.
Referenced by marley::NuclearReaction::NuclearReaction(), marley::ContinuumNuclearReaction::create_event(), marley::DiscreteNuclearReaction::create_event(), marley::ElectronReaction::create_event(), marley::DiscreteNuclearReaction::diff_xs(), marley::ElectronReaction::diff_xs(), make_event_object(), pdg_a(), marley::NuclearReaction::set_description(), marley::DiscreteNuclearReaction::summed_xs_helper(), marley::ContinuumNuclearReaction::total_xs(), and marley::ElectronReaction::total_xs().
|
protected |
PDG code for the target.
Definition at line 143 of file Reaction.hh.
Referenced by marley::DiscreteNuclearReaction::DiscreteNuclearReaction(), marley::NuclearReaction::NuclearReaction(), marley::NuclearReaction::atomic_target(), marley::DiscreteNuclearReaction::create_event(), make_event_object(), and pdg_b().
|
protected |
PDG code for the ejectile.
Definition at line 144 of file Reaction.hh.
Referenced by marley::NuclearReaction::NuclearReaction(), marley::ContinuumNuclearReaction::create_event(), make_event_object(), and marley::NuclearReaction::set_description().
|
protected |
PDG code for the residue.
Definition at line 145 of file Reaction.hh.
Referenced by marley::NuclearReaction::NuclearReaction(), marley::ContinuumNuclearReaction::create_event(), marley::DiscreteNuclearReaction::create_event(), make_event_object(), and marley::ContinuumNuclearReaction::reassign_sub_continuum().
|
protected |
Type of scattering process (CC, NC) represented by this reaction.
Definition at line 161 of file Reaction.hh.
Referenced by marley::NuclearReaction::NuclearReaction(), marley::DiscreteNuclearReaction::diff_xs(), make_event_object(), and process_type().
|
protected |
Resolved path of the reaction data file.
Definition at line 210 of file Reaction.hh.
Referenced by Reaction(), and source_file().