|
MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
|
Description of a macroscopic target for scattering reactions. More...
#include <Target.hh>
Public Member Functions | |
| Target (const std::vector< TargetAtom > &nuclides, const std::vector< double > &atom_fracs) | |
| Create a composite Target. | |
| Target (int pdg) | |
| Create a Target composed of a single nuclide. | |
| Target (int Z, int A) | |
| Create a Target composed of a single nuclide. | |
| double | atom_fraction (const marley::TargetAtom &atom) const |
| Returns the atom fraction for the requested nuclide. | |
| const std::map< marley::TargetAtom, double > & | atom_fraction_map () const |
| Get read-only access to the map of atom fractions. | |
| bool | contains (const marley::TargetAtom &atom) const |
| Return true if the target contains the requested atom, or false otherwise. | |
| bool | has_single_nuclide () const |
| Returns true if the target consists of a single kind of target atom, or false otherwise. | |
| void | print (std::ostream &out) const |
| Print a textual representation of the Target to a std::ostream. | |
Protected Member Functions | |
| void | initialize (const std::vector< TargetAtom > &nuclides, const std::vector< double > &atom_fracs) |
| General helper function for the constructors. | |
| void | initialize_single_nuclide (int pdg) |
| Helper function for the constructors that use a single nuclide. | |
Protected Attributes | |
| std::map< marley::TargetAtom, double > | atom_fractions_ |
| Map storing the atom fraction for each nuclide in the target material. | |
Description of a macroscopic target for scattering reactions.
The target is composed of one or more nuclides and stores their relative abundances as atom fractions
|
explicit |
Create a Target composed of a single nuclide.
| pdg | Particle Data Group code for the atomic species |
Definition at line 24 of file Target.cc.
References initialize_single_nuclide().
|
explicit |
Create a Target composed of a single nuclide.
| Z | The proton number of the target atom |
| A | The mass number of the target atom |
Definition at line 28 of file Target.cc.
References initialize_single_nuclide().
| marley::Target::Target | ( | const std::vector< TargetAtom > & | nuclides, |
| const std::vector< double > & | atom_fracs ) |
Create a composite Target.
Atom fractions that do not sum to unity will automatically be renormalized to do so
| nuclides | TargetAtom objects specifying each atomic species |
| atom_fracs | Atom fraction for each TargetAtom |
Definition at line 47 of file Target.cc.
References initialize().
| double marley::Target::atom_fraction | ( | const marley::TargetAtom & | atom | ) | const |
Returns the atom fraction for the requested nuclide.
Definition at line 99 of file Target.cc.
References atom_fractions_.
Referenced by contains().
|
inline |
Get read-only access to the map of atom fractions.
Definition at line 73 of file Target.hh.
References atom_fractions_.
| bool marley::Target::contains | ( | const marley::TargetAtom & | atom | ) | const |
Return true if the target contains the requested atom, or false otherwise.
Even if the target atom appears in the map, this function will return false if its atom fraction is exactly zero
Definition at line 108 of file Target.cc.
References atom_fraction().
|
inline |
Returns true if the target consists of a single kind of target atom, or false otherwise.
Definition at line 66 of file Target.hh.
References atom_fractions_.
|
protected |
General helper function for the constructors.
Definition at line 53 of file Target.cc.
References atom_fractions_.
Referenced by Target(), and initialize_single_nuclide().
|
protected |
Helper function for the constructors that use a single nuclide.
Definition at line 36 of file Target.cc.
References initialize().
| void marley::Target::print | ( | std::ostream & | out | ) | const |
Print a textual representation of the Target to a std::ostream.
Definition at line 112 of file Target.cc.
References atom_fractions_.
|
protected |
Map storing the atom fraction for each nuclide in the target material.
Keys are TargetAtom objects representing each nuclide, values are atom fractions. The Target class ensures that the atom fractions always sum to unity.
Definition at line 91 of file Target.hh.
Referenced by atom_fraction(), atom_fraction_map(), has_single_nuclide(), initialize(), and print().