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
Reaction.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 <memory>
19#include <string>
20#include <vector>
21
22#include "marley/CoulombCorrector.hh"
23#include "marley/MassTable.hh"
24#include "marley/TargetAtom.hh"
25
26namespace HepMC3 {
27 class GenEvent;
28 class GenParticle;
29}
30
31namespace marley {
32
33 class Generator;
34 class JSON;
35 class Parity;
37
46 class Reaction {
47
48 public:
49
50 virtual ~Reaction() = default;
51
54 Reaction( const std::string& source_file );
55
69
78
85 virtual double total_xs( int pdg_a, double KEa ) const = 0;
86
93 virtual std::shared_ptr< HepMC3::GenEvent > create_event( int pdg_a,
94 double KEa, marley::Generator& gen ) const = 0;
95
97 inline const std::string& get_description() const { return description_; }
98
100 inline ProcessType process_type() const { return process_type_; }
101
104 inline const std::string& source_file() const { return source_file_; }
105
106 static std::string proc_type_to_string( const ProcessType& pt );
107
109 inline int pdg_a() const { return pdg_a_; }
110
112 inline int pdg_b() const { return pdg_b_; }
113
117 virtual double threshold_kinetic_energy() const = 0;
118
124
127 static std::vector< std::unique_ptr< Reaction > >
128 load_from_file( const std::string& filename, StructureDatabase& db,
129 CoulombCorrector::CoulombMode coulomb_mode, const JSON& ff_config );
130
133 static int get_ejectile_pdg( int pdg_a, ProcessType proc_type );
134
137 static void get_residue_pdg_and_charge( ProcessType proc_type,
138 int pdg_b, int& pdg_d, int& q_d );
139
140 protected:
141
142 int pdg_a_;
143 int pdg_b_;
144 int pdg_c_;
145 int pdg_d_;
146
147 double ma_;
148 double mb_;
149 double mc_;
150
151 // Mutable because, for the nuclear reaction case, we
152 // may modify the final nuclear mass based on a sampled
153 // excitation energy
154 mutable double md_;
155
157 std::string description_;
158
162
172 void two_two_scatter( double KEa, double& s, double& Ec_cm,
173 double& pc_cm, double& Ed_cm ) const;
174
191 virtual std::shared_ptr< HepMC3::GenEvent > make_event_object(
192 double KEa, double pc_cm, double cos_theta_c_cm, double phi_c_cm,
193 double Ec_cm, double Ed_cm, int residue_status ) const;
194
201 virtual std::shared_ptr< HepMC3::GenEvent > make_event_object(
202 double KEa, const std::shared_ptr< HepMC3::GenParticle >& ejectile,
203 const std::shared_ptr< HepMC3::GenParticle >& residue ) const;
204
207 static const std::vector<int>& get_projectiles( ProcessType proc_type );
208
210 const std::string source_file_;
211 };
212
213}
Stores event-related information.
Definition GenEvent.h:47
Stores particle-related information.
Definition GenParticle.h:34
CoulombMode
Enumerated type used to set the method for handling Coulomb corrections for CC nuclear reactions.
The MARLEY Event generator.
Definition Generator.hh:54
Type-safe representation of a parity value (either +1 or -1)
Definition Parity.hh:25
const std::string & get_description() const
Get a string that contains the formula for this reaction.
Definition Reaction.hh:97
virtual double total_xs(int pdg_a, double KEa) const =0
Compute the reaction's total cross section (MeV -2)
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
double md_
Residue mass (MeV)
Definition Reaction.hh:154
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
static int get_ejectile_pdg(int pdg_a, ProcessType proc_type)
Definition Reaction.cc:329
virtual marley::TargetAtom atomic_target() const =0
Returns the target atom involved in this reaction.
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.
Definition Reaction.cc:226
ProcessType
Enumerated type describing the kind of scattering process represented by a Reaction.
Definition Reaction.hh:58
@ NC_Continuum
Nuclear matrix elements contain for a transition to a continuum of nuclear levels.
Definition Reaction.hh:66
@ NC_Discrete
Nuclear matrix elements contain for a transition to a discrete nuclear level.
Definition Reaction.hh:62
@ Unknown
Dummy value used for error handling.
Definition Reaction.hh:59
@ StandaloneDecay
Standalone nuclear de-excitation with no simulated primary reaction (used by "marley decay")
Definition Reaction.hh:67
@ AntiNeutrinoCC_Discrete
Nuclear matrix elements contain for a transition to a discrete nuclear level.
Definition Reaction.hh:61
@ NuElectronElastic
Neutrino-electron elastic scattering.
Definition Reaction.hh:63
@ NeutrinoCC_Discrete
Nuclear matrix elements contain for a transition to a discrete nuclear level.
Definition Reaction.hh:60
@ AntiNeutrinoCC_Continuum
Nuclear matrix elements contain for a transition to a continuum of nuclear levels.
Definition Reaction.hh:65
@ NeutrinoCC_Continuum
Nuclear matrix elements contain for a transition to a continuum of nuclear levels.
Definition Reaction.hh:64
DataFormat
Enumerated type describing the file format for reaction data.
Definition Reaction.hh:71
@ MultipoleResponses
Continuum nuclear responses are given for one or more multipoles.
Definition Reaction.hh:76
static const std::vector< int > & get_projectiles(ProcessType proc_type)
Definition Reaction.cc:358
const std::string & source_file() const
Get the resolved path of the reaction data file used to construct this Reaction.
Definition Reaction.hh:104
static void get_residue_pdg_and_charge(ProcessType proc_type, int pdg_b, int &pdg_d, int &q_d)
Definition Reaction.cc:573
std::string description_
String that contains a formula describing the reaction.
Definition Reaction.hh:157
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
static std::vector< std::unique_ptr< Reaction > > load_from_file(const std::string &filename, StructureDatabase &db, CoulombCorrector::CoulombMode coulomb_mode, const JSON &ff_config)
Definition Reaction.cc:366
int pdg_c_
PDG code for the ejectile.
Definition Reaction.hh:144
const std::string source_file_
Resolved path of the reaction data file.
Definition Reaction.hh:210
ProcessType process_type() const
Get the process type for this reaction.
Definition Reaction.hh:100
int pdg_d_
PDG code for the residue.
Definition Reaction.hh:145
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.
virtual double threshold_kinetic_energy() const =0
Get the minimum lab-frame kinetic energy (MeV) of the projectile that allows this reaction to proceed...
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
Container for nuclear structure information organized by nuclide.
An atomic target for a lepton scattering reaction.
Definition TargetAtom.hh:26