MARLEY (Model of Argon Reaction Low Energy Yields)  v1.2.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Reaction.hh
1 //
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/Event.hh"
23 #include "marley/MassTable.hh"
24 #include "marley/TargetAtom.hh"
25 
26 namespace marley {
27 
28  class Generator;
29  class StructureDatabase;
30 
38  class Reaction {
39 
40  public:
41 
42  virtual ~Reaction() = default;
43 
46  enum ProcessType {
47  NeutrinoCC = 0,
49  NC = 2,
51  };
52 
59  virtual double total_xs(int pdg_a, double KEa) const = 0;
60 
69  virtual double diff_xs(int pdg_a, double KEa,
70  double cos_theta_c_cm) const = 0;
71 
78  virtual marley::Event create_event(int pdg_a, double KEa,
79  marley::Generator& gen) const = 0;
80 
82  inline const std::string& get_description() const { return description_; }
83 
85  inline ProcessType process_type() const { return process_type_; }
86 
87  static std::string proc_type_to_string(const ProcessType& pt);
88 
90  inline int pdg_a() const { return pdg_a_; }
91 
93  inline int pdg_b() const { return pdg_b_; }
94 
98  virtual double threshold_kinetic_energy() const = 0;
99 
104  virtual marley::TargetAtom atomic_target() const = 0;
105 
108  static std::vector< std::unique_ptr<Reaction> >
109  load_from_file(const std::string& filename,
111 
114  static int get_ejectile_pdg(int pdg_a, ProcessType proc_type);
115 
116  protected:
117 
118  int pdg_a_;
119  int pdg_b_;
120  int pdg_c_;
121  int pdg_d_;
122 
123  double ma_;
124  double mb_;
125  double mc_;
126 
127  // Mutable because, for the nuclear reaction case, we
128  // may modify the final nuclear mass based on a sampled
129  // excitation energy
130  mutable double md_;
131 
133  std::string description_;
134 
138 
148  void two_two_scatter(double KEa, double& s, double& Ec_cm,
149  double& pc_cm, double& Ed_cm) const;
150 
166  virtual marley::Event make_event_object(double KEa,
167  double pc_cm, double cos_theta_c_cm, double phi_c_cm,
168  double Ec_cm, double Ed_cm, double E_level, int twoJ,
169  const marley::Parity& P) const;
170 
173  static const std::vector<int>& get_projectiles(ProcessType proc_type);
174  };
175 
176 }
Container for ingoing and outgoing momentum 4-vectors from a reaction.
Definition: Event.hh:66
The MARLEY Event generator.
Definition: Generator.hh:42
Type-safe representation of a parity value (either +1 or -1)
Definition: Parity.hh:25
Abstract base class that represents a two-two scattering reaction.
Definition: Reaction.hh:38
virtual double total_xs(int pdg_a, double KEa) const =0
Compute the reaction's total cross section (MeV -2)
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.
Definition: Reaction.cc:218
int pdg_a_
PDG code for the projectile.
Definition: Reaction.hh:118
virtual double diff_xs(int pdg_a, double KEa, double cos_theta_c_cm) const =0
Differential cross section (MeV -2)
double md_
Residue mass (MeV)
Definition: Reaction.hh:130
ProcessType process_type_
Type of scattering process (CC, NC) represented by this reaction.
Definition: Reaction.hh:137
double mc_
Ejectile mass (MeV)
Definition: Reaction.hh:125
static int get_ejectile_pdg(int pdg_a, ProcessType proc_type)
Definition: Reaction.cc:258
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:197
ProcessType
Enumerated type describing the kind of scattering process represented by a Reaction.
Definition: Reaction.hh:46
@ AntiNeutrinoCC
Nuclear matrix elements contain .
Definition: Reaction.hh:48
@ NuElectronElastic
Neutrino-electron elastic scattering.
Definition: Reaction.hh:50
@ NC
Nuclear matrix elements contain .
Definition: Reaction.hh:49
@ NeutrinoCC
Nuclear matrix elements contain .
Definition: Reaction.hh:47
static std::vector< std::unique_ptr< Reaction > > load_from_file(const std::string &filename, marley::StructureDatabase &db)
Definition: Reaction.cc:288
static const std::vector< int > & get_projectiles(ProcessType proc_type)
Definition: Reaction.cc:283
std::string description_
String that contains a formula describing the reaction.
Definition: Reaction.hh:133
const std::string & get_description() const
Get a string that contains the formula for this reaction.
Definition: Reaction.hh:82
int pdg_c_
PDG code for the ejectile.
Definition: Reaction.hh:120
ProcessType process_type() const
Get the process type for this reaction.
Definition: Reaction.hh:85
int pdg_d_
PDG code for the residue.
Definition: Reaction.hh:121
virtual double threshold_kinetic_energy() const =0
Get the minimum lab-frame kinetic energy (MeV) of the projectile that allows this reaction to proceed...
virtual marley::Event create_event(int pdg_a, double KEa, marley::Generator &gen) const =0
Create an event object for this reaction.
int pdg_a() const
Get the projectile PDG code.
Definition: Reaction.hh:90
int pdg_b_
PDG code for the target.
Definition: Reaction.hh:119
double ma_
Projectile mass (MeV)
Definition: Reaction.hh:123
int pdg_b() const
Get the target PDG code.
Definition: Reaction.hh:93
double mb_
Target mass (MeV)
Definition: Reaction.hh:124
Container for nuclear structure information organized by nuclide.
Definition: StructureDatabase.hh:39
An atomic target for a lepton scattering reaction.
Definition: TargetAtom.hh:26