25 #include "TargetAtom.hh"
38 explicit Target(
int pdg );
43 explicit Target(
int Z,
int A );
52 Target(
const std::vector<TargetAtom>& nuclides,
53 const std::vector<double>& atom_fracs );
70 void print( std::ostream& out )
const;
83 void initialize(
const std::vector<TargetAtom>& nuclides,
84 const std::vector<double>& atom_fracs );
96 inline std::ostream& operator<<(std::ostream& out,
const marley::Target& t) {
An atomic target for a lepton scattering reaction.
Definition: TargetAtom.hh:26
Description of a macroscopic target for scattering reactions.
Definition: Target.hh:32
std::map< marley::TargetAtom, double > atom_fractions_
Map storing the atom fraction for each nuclide in the target material.
Definition: Target.hh:91
const std::map< marley::TargetAtom, double > & atom_fraction_map() const
Get read-only access to the map of atom fractions.
Definition: Target.hh:73
Target(int pdg)
Create a Target composed of a single nuclide.
Definition: Target.cc:23
void initialize_single_nuclide(int pdg)
Helper function for the constructors that use a single nuclide.
Definition: Target.cc:35
bool has_single_nuclide() const
Returns true if the target consists of a single kind of target atom, or false otherwise.
Definition: Target.hh:66
bool contains(const marley::TargetAtom &atom) const
Return true if the target contains the requested atom, or false otherwise.
Definition: Target.cc:107
void initialize(const std::vector< TargetAtom > &nuclides, const std::vector< double > &atom_fracs)
General helper function for the constructors.
Definition: Target.cc:52
void print(std::ostream &out) const
Print a textual representation of the Target to a std::ostream.
Definition: Target.cc:111
double atom_fraction(const marley::TargetAtom &atom) const
Returns the atom fraction for the requested nuclide.
Definition: Target.cc:98