|
MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
|
An atomic target for a lepton scattering reaction. More...
#include <TargetAtom.hh>
Public Member Functions | |
| TargetAtom (int pdg) | |
| Create a TargetAtom object from an integer PDG code. | |
| TargetAtom (int Z, int A) | |
| Create a TargetAtom object from a proton number (Z) and mass number (A) | |
| int | A () const |
| Returns the mass number of the target atom. | |
| constexpr | operator int () const |
| Convert the TargetAtom object to an integer PDG code. | |
| bool | operator!= (const marley::TargetAtom &ta) const |
| bool | operator< (const marley::TargetAtom &ta) const |
| Define the less-than operator so that TargetAtom objects can be used as the keys of a std::map. | |
| bool | operator== (const marley::TargetAtom &ta) const |
| Two TargetAtom objects are considered equal if their nuclear PDG codes match. | |
| int | pdg () const |
| Returns the nuclear PDG code of the target atom. | |
| std::string | to_string () const |
| Converts the PDG code to a string representation (e.g., "40Ar") | |
| int | Z () const |
| Returns the proton number of the target atom. | |
Protected Member Functions | |
| void | check_pdg_validity () const |
| Helper function for the constructors. Checks the atom's PDG code for validity. | |
Protected Attributes | |
| int | pdg_ |
| PDG code for the nucleus of the target atom. | |
An atomic target for a lepton scattering reaction.
Definition at line 26 of file TargetAtom.hh.
|
explicit |
Create a TargetAtom object from an integer PDG code.
| pdg | Particle Data Group code for the atomic species |
Definition at line 21 of file TargetAtom.cc.
References check_pdg_validity(), pdg(), and pdg_.
|
explicit |
Create a TargetAtom object from a proton number (Z) and mass number (A)
| Z | The proton number of the target atom |
| A | The mass number of the target atom |
Definition at line 25 of file TargetAtom.cc.
References A(), check_pdg_validity(), pdg_, and Z().
| int marley::TargetAtom::A | ( | ) | const |
Returns the mass number of the target atom.
Definition at line 34 of file TargetAtom.cc.
References pdg_.
Referenced by TargetAtom(), and check_pdg_validity().
|
protected |
Helper function for the constructors. Checks the atom's PDG code for validity.
If the pdg_ member variable does not correspond to an atom (or a free neutron) when this function is called, then a marley::Error will be thrown.
Definition at line 42 of file TargetAtom.cc.
Referenced by TargetAtom(), and TargetAtom().
|
inlineexplicitconstexpr |
Convert the TargetAtom object to an integer PDG code.
Definition at line 41 of file TargetAtom.hh.
References pdg_.
|
inline |
Definition at line 50 of file TargetAtom.hh.
|
inline |
Define the less-than operator so that TargetAtom objects can be used as the keys of a std::map.
Definition at line 57 of file TargetAtom.hh.
References pdg_.
|
inline |
Two TargetAtom objects are considered equal if their nuclear PDG codes match.
Definition at line 45 of file TargetAtom.hh.
References pdg_.
|
inline |
Returns the nuclear PDG code of the target atom.
Definition at line 73 of file TargetAtom.hh.
References pdg_.
Referenced by TargetAtom(), and marley::Generator::create_event().
| std::string marley::TargetAtom::to_string | ( | ) | const |
Converts the PDG code to a string representation (e.g., "40Ar")
Definition at line 38 of file TargetAtom.cc.
References pdg_.
| int marley::TargetAtom::Z | ( | ) | const |
Returns the proton number of the target atom.
Definition at line 30 of file TargetAtom.cc.
References pdg_.
Referenced by TargetAtom().
|
protected |
PDG code for the nucleus of the target atom.
Definition at line 85 of file TargetAtom.hh.
Referenced by TargetAtom(), TargetAtom(), A(), check_pdg_validity(), operator int(), operator<(), operator==(), pdg(), to_string(), and Z().