41 inline explicit constexpr operator int()
const {
return pdg_; }
An atomic target for a lepton scattering reaction.
int A() const
Returns the mass number of the target atom.
int pdg() const
Returns the nuclear PDG code of the target atom.
int pdg_
PDG code for the nucleus of the target atom.
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.
std::string to_string() const
Converts the PDG code to a string representation (e.g., "40Ar")
void check_pdg_validity() const
Helper function for the constructors. Checks the atom's PDG code for validity.
bool operator==(const marley::TargetAtom &ta) const
Two TargetAtom objects are considered equal if their nuclear PDG codes match.
TargetAtom(int pdg)
Create a TargetAtom object from an integer PDG code.
int Z() const
Returns the proton number of the target atom.