MARLEY (Model of Argon Reaction Low Energy Yields)  v1.2.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
marley::Reaction Class Referenceabstract

Abstract base class that represents a two-two scattering reaction. More...

#include <Reaction.hh>

Inheritance diagram for marley::Reaction:
marley::ElectronReaction marley::NuclearReaction

Public Types

enum  ProcessType { NeutrinoCC = 0 , AntiNeutrinoCC = 1 , NC = 2 , NuElectronElastic = 3 }
 Enumerated type describing the kind of scattering process represented by a Reaction. More...
 

Public Member Functions

virtual marley::TargetAtom atomic_target () const =0
 Returns the target atom involved in this reaction. More...
 
virtual marley::Event create_event (int pdg_a, double KEa, marley::Generator &gen) const =0
 Create an event object for this reaction. More...
 
virtual double diff_xs (int pdg_a, double KEa, double cos_theta_c_cm) const =0
 Differential cross section \(d\sigma/d\cos\theta_{c}^{\mathrm{CM}}\) (MeV -2) More...
 
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.
 
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) More...
 

Static Public Member Functions

static int get_ejectile_pdg (int pdg_a, ProcessType proc_type)
 
static std::vector< std::unique_ptr< Reaction > > load_from_file (const std::string &filename, marley::StructureDatabase &db)
 
static std::string proc_type_to_string (const ProcessType &pt)
 

Protected Member Functions

virtual marley::Event make_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 an event object. More...
 
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. More...
 

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.
 

Detailed Description

Abstract base class that represents a two-two 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.

Todo:
Add check that projectile kinetic energy KEa >= 0. for all relevant member functions of Reaction and NuclearReaction

Member Enumeration Documentation

◆ ProcessType

Enumerated type describing the kind of scattering process represented by a Reaction.

Enumerator
NeutrinoCC 

Nuclear matrix elements contain \( t_{-} \).

AntiNeutrinoCC 

Nuclear matrix elements contain \( t_{+} \).

NC 

Nuclear matrix elements contain \( t_{3} \).

NuElectronElastic 

Neutrino-electron elastic scattering.

Member Function Documentation

◆ atomic_target()

virtual marley::TargetAtom marley::Reaction::atomic_target ( ) const
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::NuclearReaction, and marley::ElectronReaction.

◆ create_event()

virtual marley::Event marley::Reaction::create_event ( int  pdg_a,
double  KEa,
marley::Generator gen 
) const
pure virtual

Create an event object for this reaction.

Parameters
pdg_aPDG code for the incident projectile
KEaLab-frame kinetic energy of the projectile
genReference to the Generator to use for random sampling
Note
Functions that override create_event() should throw an Error if pdg_a != pdg_a_.

Implemented in marley::NuclearReaction, and marley::ElectronReaction.

◆ diff_xs()

virtual double marley::Reaction::diff_xs ( int  pdg_a,
double  KEa,
double  cos_theta_c_cm 
) const
pure virtual

Differential cross section \(d\sigma/d\cos\theta_{c}^{\mathrm{CM}}\) (MeV -2)

Parameters
pdg_aPDG code for the projectile
KEaLab-frame kinetic energy (MeV) of the projectile
cos_theta_c_cmCM frame scattering cosine of the ejectile
Note
Functions that override diff_xs() should always return zero if pdg_a != pdg_a_.

Implemented in marley::NuclearReaction, and marley::ElectronReaction.

◆ get_ejectile_pdg()

int marley::Reaction::get_ejectile_pdg ( int  pdg_a,
ProcessType  proc_type 
)
static

Function that returns the ejectile PDG code given the projectile PDG code and the ProcessType

◆ get_projectiles()

const std::vector< int > & marley::Reaction::get_projectiles ( ProcessType  proc_type)
staticprotected

Returns a vector of PDG codes for projectiles that participate in a particular ProcessType

◆ load_from_file()

std::vector< std::unique_ptr< marley::Reaction > > marley::Reaction::load_from_file ( const std::string &  filename,
marley::StructureDatabase db 
)
static

Factory method called by JSONConfig to build Reaction objects given a file with matrix element data

Todo:
Add error handling for parsing problems
Todo:
This can be done more cleanly via iss = std::istringstream( line ); However, GCC 4 does not include the move constructor for string streams. This was fixed for GCC 5. Change this line after MARLEY drops support for GCC < 5. See https://stackoverflow.com/a/27152585 and https://stackoverflow.com/q/7623650 for more details.
Todo:
Consider implementing a sorting procedure rather than strictly enforcing that energies must be given in ascending order.

◆ make_event_object()

marley::Event marley::Reaction::make_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 an event object.

This function should be called by marley::Reaction::create_event() after CM frame scattering angles have been sampled for the ejectile. For reactions where the residue may be left in an excited state, the excitation energy should be recorded by supplying it as the final argument.

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

Reimplemented in marley::NuclearReaction.

◆ total_xs()

virtual double marley::Reaction::total_xs ( int  pdg_a,
double  KEa 
) const
pure virtual

Compute the reaction's total cross section (MeV -2)

Parameters
pdg_aProjectile's PDG code
KEaLab-frame kinetic energy of the incident projectile
Returns
Reaction total cross section (MeV -2)
Note
Functions that override total_xs() should always return zero if pdg_a != pdg_a_.

Implemented in marley::NuclearReaction, and marley::ElectronReaction.

◆ two_two_scatter()

void marley::Reaction::two_two_scatter ( double  KEa,
double &  s,
double &  Ec_cm,
double &  pc_cm,
double &  Ed_cm 
) const
protected

Helper function that handles CM frame kinematics for the reaction.

Parameters
KEaLab-frame kinetic energy (MeV) of the projectile
[out]sMandelstam s (MeV2)
[out]Ec_cmEjectile total energy (MeV) in the CM frame
[out]pc_cmEjectile 3-momentum magnitude (MeV) in the CM frame
[out]Ed_cmResidue total energy (MeV) in the CM frame

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