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
marley::NuclearReaction Class Reference

A neutrino-nucleus reaction. More...

#include <NuclearReaction.hh>

Inheritance diagram for marley::NuclearReaction:
marley::Reaction marley::ContinuumNuclearReaction marley::DiscreteNuclearReaction

Public Member Functions

 NuclearReaction (ProcessType pt, int pdg_a, int pdg_b, int pdg_c, int pdg_d, int q_d, const std::string &source_file)
 
virtual marley::TargetAtom atomic_target () const override final
 Returns the target atom involved in this reaction.
 
double max_level_energy (double KEa) const
 Get the maximum possible excitation energy (MeV) of the final-state residue that is kinematically allowed.
 
double threshold_kinetic_energy () const override
 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.
 
double weak_nuclear_charge () const
 
- Public Member Functions inherited from marley::Reaction
 Reaction (const std::string &source_file)
 Construct a Reaction with the resolved path of the data file.
 
virtual std::shared_ptr< HepMC3::GenEventcreate_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 total_xs (int pdg_a, double KEa) const =0
 Compute the reaction's total cross section (MeV -2)
 

Protected Member Functions

virtual std::shared_ptr< HepMC3::GenEventmake_nuclear_event_object (double KEa, const std::shared_ptr< HepMC3::GenParticle > &ejectile, const std::shared_ptr< HepMC3::GenParticle > &residue, double E_level, int twoJ, const marley::Parity &P) const
 Helper function that makes a complete event object for a nuclear reaction.
 
virtual std::shared_ptr< HepMC3::GenEventmake_nuclear_event_object (double KEa, double pc_cm, double cos_theta_c_cm, double phi_c_cm, double Ec_cm, double Ed_cm, double E_level, int twoJ, const marley::Parity &P) const
 Helper function that makes a complete event object for a nuclear reaction.
 
void set_charge_attributes (std::shared_ptr< HepMC3::GenEvent > &event) const
 Helper function that sets the charges of the target and residue in an otherwise complete event record.
 
virtual void set_description ()
 Creates the description string based on the PDG code values for the initial and final particles.
 
void set_nuclear_residue_attributes (const std::shared_ptr< HepMC3::GenParticle > &residue, double E_level, int twoJ, const marley::Parity &P) const
 Helper function that adds the nuclear level attributes ( \( E_x \), \( 2J \), and parity) needed to keep track of the residue's de-excitation state to an otherwise complete event record.
 
- Protected Member Functions inherited from marley::Reaction
virtual std::shared_ptr< HepMC3::GenEventmake_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::GenEventmake_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.
 

Protected Attributes

int Af_
 Residue mass number.
 
int Ai_
 Target mass number.
 
double KEa_threshold_
 Lab-frame kinetic energy of the projectile at threshold for this reaction (i.e., the residue is produced in its ground state, and all final-state particles are at rest in the CM frame)
 
double md_gs_
 Ground state mass (MeV) of the residue.
 
int q_d_
 Net charge of the residue (in units of the proton charge) following this reaction.
 
int Zf_
 Residue atomic number.
 
int Zi_
 Target atomic number.
 
- Protected Attributes inherited from marley::Reaction
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.
 

Additional Inherited Members

- Public Types inherited from marley::Reaction
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...
 
- Static Public Member Functions inherited from marley::Reaction
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)
 
- Static Protected Member Functions inherited from marley::Reaction
static const std::vector< int > & get_projectiles (ProcessType proc_type)
 

Detailed Description

A neutrino-nucleus reaction.

Definition at line 40 of file NuclearReaction.hh.

Constructor & Destructor Documentation

◆ NuclearReaction()

marley::NuclearReaction::NuclearReaction ( ProcessType pt,
int pdg_a,
int pdg_b,
int pdg_c,
int pdg_d,
int q_d,
const std::string & source_file )
Parameters
ptType of scattering process represented by this Reaction
pdg_aProjectile PDG code
pdg_bTarget PDG code
pdg_cEjectile PDG code
pdg_dResidue PDG code
q_dCharge of the residue after the prompt 2->2 scatter represented by this NuclearReaction object

Definition at line 35 of file NuclearReaction.cc.

37 : Reaction( source_file ), q_d_( q_d )
38{
39 // Initialize the process type (NC, neutrino/antineutrino CC)
40 process_type_ = pt;
41
42 // Initialize the PDG codes for the 2->2 scatter particles
43 pdg_a_ = pdg_a;
44 pdg_b_ = pdg_b;
45 pdg_c_ = pdg_c;
46 pdg_d_ = pdg_d;
47
48 // Get initial and final values of the nuclear charge and mass number from
49 // the PDG codes
50 Zi_ = (pdg_b_ % 10000000) / 10000;
51 Ai_ = (pdg_b_ % 10000) / 10;
52 Zf_ = (pdg_d_ % 10000000) / 10000;
53 Af_ = (pdg_d_ % 10000) / 10;
54
55 const marley::MassTable& mt = marley::MassTable::Instance();
56
57 // Get the particle masses from the mass table
60
61 // If the target (particle b) or residue (particle d)
62 // has a particle ID greater than 10^9, assume that it
63 // is an atom rather than a bare nucleus
64 if ( pdg_b_ > 1000000000 ) mb_ = mt.get_atomic_mass( pdg_b_ );
65 else mb_ = mt.get_particle_mass( pdg_b_ );
66
67 if ( pdg_d_ > 1000000000 ) {
68 // If particle d is an atom and is ionized as a result of this reaction
69 // (e.g., q_d_ != 0), then approximate its ground-state ionized mass by
70 // subtracting the appropriate number of electron masses from its atomic
71 // (i.e., neutral) ground state mass.
73 - ( q_d_ * mt.get_particle_mass(marley_utils::ELECTRON) );
74 }
75 else {
77 }
78
79 KEa_threshold_ = ( std::pow(mc_ + md_gs_, 2)
80 - std::pow(ma_ + mb_, 2) ) / ( 2.*mb_ );
81
82 this->set_description();
83}
static const MassTable & Instance()
Get a const reference to the singleton instance of the MassTable.
Definition MassTable.cc:69
double get_atomic_mass(int pdg_code, bool theory_ok=true) const
Get the mass of an atom.
Definition MassTable.cc:95
double get_particle_mass(int pdg_code) const
Get the mass of a particle.
Definition MassTable.cc:84
int Ai_
Target mass number.
virtual void set_description()
Creates the description string based on the PDG code values for the initial and final particles.
int q_d_
Net charge of the residue (in units of the proton charge) following this reaction.
int Zi_
Target atomic number.
int Af_
Residue mass number.
double KEa_threshold_
Lab-frame kinetic energy of the projectile at threshold for this reaction (i.e., the residue is produ...
int Zf_
Residue atomic number.
double md_gs_
Ground state mass (MeV) of the residue.
Reaction(const std::string &source_file)
Construct a Reaction with the resolved path of the data file.
Definition Reaction.cc:362
int pdg_a_
PDG code for the projectile.
Definition Reaction.hh:142
ProcessType process_type_
Type of scattering process (CC, NC) represented by this reaction.
Definition Reaction.hh:161
double mc_
Ejectile mass (MeV)
Definition Reaction.hh:149
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_c_
PDG code for the ejectile.
Definition Reaction.hh:144
int pdg_d_
PDG code for the residue.
Definition Reaction.hh:145
int pdg_a() const
Get the projectile PDG code.
Definition Reaction.hh:109
int pdg_b_
PDG code for the target.
Definition Reaction.hh:143
double ma_
Projectile mass (MeV)
Definition Reaction.hh:147
int pdg_b() const
Get the target PDG code.
Definition Reaction.hh:112
double mb_
Target mass (MeV)
Definition Reaction.hh:148

References marley::Reaction::Reaction(), Af_, Ai_, marley::MassTable::get_atomic_mass(), marley::MassTable::get_particle_mass(), marley::MassTable::Instance(), KEa_threshold_, marley::Reaction::ma_, marley::Reaction::mb_, marley::Reaction::mc_, md_gs_, marley::Reaction::pdg_a(), marley::Reaction::pdg_a_, marley::Reaction::pdg_b(), marley::Reaction::pdg_b_, marley::Reaction::pdg_c_, marley::Reaction::pdg_d_, marley::Reaction::process_type_, q_d_, set_description(), marley::Reaction::source_file(), Zf_, and Zi_.

Referenced by marley::DiscreteNuclearReaction::DiscreteNuclearReaction().

Member Function Documentation

◆ atomic_target()

virtual marley::TargetAtom marley::NuclearReaction::atomic_target ( ) const
inlinefinaloverridevirtual

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).

Implements marley::Reaction.

Definition at line 54 of file NuclearReaction.hh.

55 { return marley::TargetAtom( pdg_b_ ); }

References marley::Reaction::pdg_b_.

◆ make_nuclear_event_object() [1/2]

std::shared_ptr< HepMC3::GenEvent > marley::NuclearReaction::make_nuclear_event_object ( double KEa,
const std::shared_ptr< HepMC3::GenParticle > & ejectile,
const std::shared_ptr< HepMC3::GenParticle > & residue,
double E_level,
int twoJ,
const marley::Parity & P ) const
protectedvirtual

Helper function that makes a complete event object for a nuclear reaction.

This function expects pre-made HepMC3::GenParticle objects as input that have four-momenta expressed in the lab frame.

Parameters
KEaLab-frame kinetic energy (MeV) of the projectile
ejectileGenParticle object for the ejectile
residueGenParticle object for the residue
E_levelResidue excitation energy (MeV)
twoJTwo times the residue spin
PIntrinsic parity of the residue

Definition at line 176 of file NuclearReaction.cc.

180{
181 // Create the event skeleton from the pre-made final-state particles
182 auto event = marley::Reaction::make_event_object( KEa, ejectile, residue );
183
184 // Attach the charge attributes for the target and residue
185 this->set_charge_attributes( event );
186
187 // Add the nuclear level attributes needed to keep track of the residue's
188 // de-excitation state
189 this->set_nuclear_residue_attributes( residue, E_level, twoJ, P );
190
191 return event;
192}
void set_nuclear_residue_attributes(const std::shared_ptr< HepMC3::GenParticle > &residue, double E_level, int twoJ, const marley::Parity &P) const
Helper function that adds the nuclear level attributes ( , , and parity) needed to keep track of the ...
void set_charge_attributes(std::shared_ptr< HepMC3::GenEvent > &event) const
Helper function that sets the charges of the target and residue in an otherwise complete event record...
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.
Definition Reaction.cc:247

References marley::Reaction::make_event_object(), set_charge_attributes(), and set_nuclear_residue_attributes().

◆ make_nuclear_event_object() [2/2]

std::shared_ptr< HepMC3::GenEvent > marley::NuclearReaction::make_nuclear_event_object ( double KEa,
double pc_cm,
double cos_theta_c_cm,
double phi_c_cm,
double Ec_cm,
double Ed_cm,
double E_level,
int twoJ,
const marley::Parity & P ) const
protectedvirtual

Helper function that makes a complete event object for a nuclear reaction.

This function should be called by marley::NuclearReaction::create_event() after CM frame scattering angles have been sampled for the ejectile. In addition to creating the event skeleton (by delegating to marley::Reaction::make_event_object()), it attaches the charge and nuclear level attributes needed to keep track of the residue's de-excitation state.

Parameters
KEaLab-frame kinetic energy (MeV) of the projectile
pc_cmEjectile 3-momentum magnitude (MeV) in the CM frame
cos_theta_c_cmCosine of ejectile's CM frame polar angle
phi_c_cmEjectile's CM frame azimuthal angle (radians)
Ec_cmEjectile total energy (MeV) in the CM frame
Ed_cmResidue total energy (MeV) in the CM frame
E_levelResidue excitation energy (MeV)
twoJTwo times the residue spin
PIntrinsic parity of the residue

Definition at line 152 of file NuclearReaction.cc.

156{
157 // Create the event skeleton, marking the residue as an undecayed
158 // intermediate state (it will be allowed to decay later if nuclear
159 // de-excitation is enabled)
160 auto event = marley::Reaction::make_event_object( KEa, pc_cm,
161 cos_theta_c_cm, phi_c_cm, Ec_cm, Ed_cm,
162 marley_hepmc3::NUHEPMC_UNDECAYED_RESIDUE_STATUS );
163
164 // Attach the charge attributes for the target and residue
165 this->set_charge_attributes( event );
166
167 // Add the nuclear level attributes needed to keep track of the residue's
168 // de-excitation state
169 auto residue = marley_hepmc3::get_residue( *event );
170 this->set_nuclear_residue_attributes( residue, E_level, twoJ, P );
171
172 return event;
173}

References marley::Reaction::make_event_object(), set_charge_attributes(), and set_nuclear_residue_attributes().

Referenced by marley::ContinuumNuclearReaction::create_event(), and marley::DiscreteNuclearReaction::create_event().

◆ max_level_energy()

double marley::NuclearReaction::max_level_energy ( double KEa) const

Get the maximum possible excitation energy (MeV) of the final-state residue that is kinematically allowed.

Parameters
KEaProjectile lab-frame kinetic energy (MeV)

Definition at line 90 of file NuclearReaction.cc.

90 {
91 // Calculate the total CM frame energy using known quantities
92 // from the lab frame
93 double E_CM = std::sqrt( std::pow(ma_ + mb_, 2) + 2*mb_*KEa );
94 // The maximum level energy is achieved when the final state
95 // particles are produced at rest in the CM frame. Subtracting
96 // the ground-state rest masses of particles c and d from the
97 // total CM energy leaves us with the energy available to create
98 // an excited level in the residue (particle d).
99 return E_CM - mc_ - md_gs_;
100}

References marley::Reaction::ma_, marley::Reaction::mb_, marley::Reaction::mc_, and md_gs_.

Referenced by marley::DiscreteNuclearReaction::create_event(), marley::DiscreteNuclearReaction::diff_xs(), and marley::DiscreteNuclearReaction::summed_xs_helper().

◆ set_charge_attributes()

void marley::NuclearReaction::set_charge_attributes ( std::shared_ptr< HepMC3::GenEvent > & event) const
protected

Helper function that sets the charges of the target and residue in an otherwise complete event record.

Definition at line 126 of file NuclearReaction.cc.

128{
129 // Assume that the target is a neutral atom (q_b = 0)
130 auto target = marley_hepmc3::get_target( *event );
131 marley_hepmc3::set_particle_charge( *target, 0 );
132
133 // Assign the correct charge to the residue
134 auto residue = marley_hepmc3::get_residue( *event );
135 marley_hepmc3::set_particle_charge( *residue, q_d_ );
136}

References q_d_.

Referenced by make_nuclear_event_object(), and make_nuclear_event_object().

◆ set_description()

void marley::NuclearReaction::set_description ( )
protectedvirtual

Creates the description string based on the PDG code values for the initial and final particles.

Reimplemented in marley::ContinuumNuclearReaction, and marley::DiscreteNuclearReaction.

Definition at line 117 of file NuclearReaction.cc.

117 {
118 description_ = marley_utils::get_particle_symbol( pdg_a_ ) + " + ";
119 description_ += std::to_string( Ai_ );
120 description_ += marley_utils::element_symbols.at( Zi_ ) + " --> ";
121 description_ += marley_utils::get_particle_symbol( pdg_c_ ) + " + ";
122 description_ += std::to_string( Af_ );
123 description_ += marley_utils::element_symbols.at( Zf_ );
124}
std::string description_
String that contains a formula describing the reaction.
Definition Reaction.hh:157

References Af_, Ai_, marley::Reaction::description_, marley::Reaction::pdg_a_, marley::Reaction::pdg_c_, Zf_, and Zi_.

Referenced by NuclearReaction(), marley::ContinuumNuclearReaction::set_description(), and marley::DiscreteNuclearReaction::set_description().

◆ set_nuclear_residue_attributes()

void marley::NuclearReaction::set_nuclear_residue_attributes ( const std::shared_ptr< HepMC3::GenParticle > & residue,
double E_level,
int twoJ,
const marley::Parity & P ) const
protected

Helper function that adds the nuclear level attributes ( \( E_x \), \( 2J \), and parity) needed to keep track of the residue's de-excitation state to an otherwise complete event record.

Parameters
residueGenParticle object for the residue
E_levelResidue excitation energy (MeV)
twoJTwo times the residue spin
PIntrinsic parity of the residue

Definition at line 138 of file NuclearReaction.cc.

141{
142 // Add attributes needed to keep track of the nuclear de-excitation state
143 residue->add_attribute( "Ex",
144 std::make_shared< HepMC3::DoubleAttribute >(E_level) );
145 residue->add_attribute( "twoJ",
146 std::make_shared< HepMC3::IntAttribute >(twoJ) );
147 residue->add_attribute( "parity",
148 std::make_shared< HepMC3::IntAttribute >(static_cast<int>( P )) );
149}
bool add_attribute(const std::string &name, std::shared_ptr< Attribute > att)
Add an attribute to this particle.

References HepMC3::GenParticle::add_attribute().

Referenced by make_nuclear_event_object(), and make_nuclear_event_object().

◆ threshold_kinetic_energy()

double marley::NuclearReaction::threshold_kinetic_energy ( ) const
overridevirtual

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.

Implements marley::Reaction.

Definition at line 102 of file NuclearReaction.cc.

102 {
103 return KEa_threshold_;
104}

References KEa_threshold_.

◆ weak_nuclear_charge()

double marley::NuclearReaction::weak_nuclear_charge ( ) const

Computes the weak nuclear charge \( Q_W = N - (1 - 4\sin^2\theta_W)Z \) for the target nucleus

In the expression above, \( N \) ( \(Z\)) is the neutron (proton) number of the target nucleus and \( \theta_W \) is the weak mixing angle.

Definition at line 109 of file NuclearReaction.cc.

110{
111 int Ni = Ai_ - Zi_;
112 double Qw = Ni - ( 1. - 4.*marley_utils::sin2thetaw )*Zi_;
113 return Qw;
114}

References Ai_, and Zi_.

Referenced by marley::DiscreteNuclearReaction::diff_xs().

Member Data Documentation

◆ Af_

int marley::NuclearReaction::Af_
protected

Residue mass number.

Definition at line 139 of file NuclearReaction.hh.

Referenced by NuclearReaction(), and set_description().

◆ Ai_

int marley::NuclearReaction::Ai_
protected

Target mass number.

Definition at line 137 of file NuclearReaction.hh.

Referenced by NuclearReaction(), set_description(), and weak_nuclear_charge().

◆ KEa_threshold_

double marley::NuclearReaction::KEa_threshold_
protected

Lab-frame kinetic energy of the projectile at threshold for this reaction (i.e., the residue is produced in its ground state, and all final-state particles are at rest in the CM frame)

Definition at line 148 of file NuclearReaction.hh.

Referenced by NuclearReaction(), marley::ContinuumNuclearReaction::create_event(), marley::DiscreteNuclearReaction::create_event(), and threshold_kinetic_energy().

◆ md_gs_

◆ q_d_

int marley::NuclearReaction::q_d_
protected

Net charge of the residue (in units of the proton charge) following this reaction.

Definition at line 143 of file NuclearReaction.hh.

Referenced by NuclearReaction(), and set_charge_attributes().

◆ Zf_

int marley::NuclearReaction::Zf_
protected

Residue atomic number.

Definition at line 138 of file NuclearReaction.hh.

Referenced by NuclearReaction(), and set_description().

◆ Zi_

int marley::NuclearReaction::Zi_
protected

Target atomic number.

Definition at line 136 of file NuclearReaction.hh.

Referenced by NuclearReaction(), set_description(), and weak_nuclear_charge().


The documentation for this class was generated from the following files: