MARLEY (Model of Argon Reaction Low Energy Yields)  v1.2.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
Fragment.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 "marley/marley_utils.hh"
19 #include "marley/MassTable.hh"
20 #include "marley/Parity.hh"
21 
22 namespace marley {
23 
27  class Fragment {
28 
29  public:
30 
34  inline Fragment(int pid, int twoS, marley::Parity pi);
35 
37  inline int get_pid() const;
38 
40  inline int get_two_s() const;
41 
43  inline marley::Parity get_parity() const;
44 
46  inline int get_Z() const;
47 
49  inline int get_A() const;
50 
52  inline double get_mass() const;
53 
54  private:
55  int pid_;
56 
58  int two_s_;
59 
60  marley::Parity parity_;
61  int Z_;
62  int A_;
63  };
64 
65 // Inline function definitions
66 inline Fragment::Fragment(int pid, int twoS, marley::Parity pi)
67  : pid_(pid), two_s_(twoS), parity_(pi)
68 {
69  Z_ = marley_utils::get_particle_Z(pid);
70  A_ = marley_utils::get_particle_A(pid);
71 }
72 
73 inline int Fragment::get_pid() const
74  { return pid_; }
75 
76 inline int Fragment::get_two_s() const
77  { return two_s_; }
78 
80  { return parity_; }
81 
82 inline int Fragment::get_Z() const
83  { return Z_; }
84 
85 inline int Fragment::get_A() const
86  { return A_; }
87 
88 inline double Fragment::get_mass() const
90 
91 }
Simple container for storing reference data about each of the nuclear fragments considered by MARLEY'...
Definition: Fragment.hh:27
int get_Z() const
Get the atomic number of this fragment.
Definition: Fragment.hh:82
double get_mass() const
Get the mass (in MeV) of this fragment.
Definition: Fragment.hh:88
int get_two_s() const
Get two times the spin of this fragment.
Definition: Fragment.hh:76
Fragment(int pid, int twoS, marley::Parity pi)
Definition: Fragment.hh:66
int get_A() const
Get the mass number of this fragment.
Definition: Fragment.hh:85
int get_pid() const
Get the PDG particle ID for this fragment.
Definition: Fragment.hh:73
marley::Parity get_parity() const
Get the parity of this fragment.
Definition: Fragment.hh:79
static const MassTable & Instance()
Get a const reference to the singleton instance of the MassTable.
Definition: MassTable.cc:68
double get_particle_mass(int pdg_code) const
Get the mass of a particle.
Definition: MassTable.cc:83
Type-safe representation of a parity value (either +1 or -1)
Definition: Parity.hh:25