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