Class Documentation

The C++ version of the Muon Range Library includes several classes; the Muon class defines the kinetic energy, total energy and momentum of a muon, the Material, Element, Compound, Mixture and Biomat classes define the absorber material, the Dedx Class the stopping power calculations, and the Range class the range and energy loss calculations.

Table of Contents

1. The Muon Class
2. The Material Class
3. The Element Class
4. The Compound Class
5. The Mixture Class
6. The Biomat Class
7. The Dedx Class
8. The Range Class

The Muon Class

A Muon Class object is instantiated by,

Muon *m = new Muon();
Muon *m = new Muon(double T);

where T is the kinetic energy in MeV. If no argument is given, T=0. The instantiation of a Muon object automatically defines its total energy [MeV] and momentum [MeV/c].

The methods,

void Muon::SetKEnergy(double T);
void Muon::SetEnergy(double E);
void Muon::SetMomentum(double p);

modify the kinetic energy T, the total energy E or the momentum p, respectively. If any of these methods is used to set a quantity, the related quantities are automatically changed.

The methods,

double Muon::GetKEnergy();
double Muon::GetEnergy();
double Muon::GetMomentum();

return the kinetic energy T [MeV], the total energy E [MeV] or the momentum p [MeV/c], respectively.

← Return to Muon Range Library

The Material Class

The Material Class is the base class of the Element Class, Compound Class, Mixture Class and Biomat Class classes. The following methods are inherited by the derived classes,

string * Material::GetSymbol();

returns the element symbol.

string * Material::GetState();

returns the element or compound physical state. The physical state can be "G" for a gas, "L" for a liquid or "S" for a solid.

string * Material::GetName();

returns the material name.

string * Material::GetFormula();

returns the compound chemical formula.

int Material::GetMatIndex();

returns a material index. Compound, mixture and biological materials have index.

double Material::GetZ();
double Material::GetA();

return the element atomic number Z and the atomic weight A [g/mol], respectively.

void Material::SetA(double A);

modifies the atomic weight A [g/mol] in case the element has a different isotopic composition than the natural abundance.

double Material::GetM();

return the compound molecular weight M [g/mol].

double Material::GetDensity();

return the material density [g/cm3].

void Material::SetDensity(double rho);
void Material::SetDensity(double P, string Unit);

modifies the material density rho [g/cm3]. The default density for gases is the density at 1 atmosphere and 20° C. The SetDensity() method is only meant to set the density of materials in gaseous state. The second method modifies the density given the gas pressure P and the units of "Pa", "atm" or "Torr", respectively. It uses the ideal gas law to calculate the density at 20° C. A change in density changes the density effect parameters in the Bethe-Bloch equation, and should be set before instantiating a stopping power or range object to take effect. See Example 6.

void Material::SetThickness(double sho);

sets the material (absorber) thickness in g/cm2.

double Material::GetThickness();

return the material (absorber) thickness density in g/cm2.

← Return to Muon Range Library

The Element Class

An Element Class object is instantiated by,

Element *e = new Element(int Z);
Element *e = new Element(string Symbol);
Element *e = new Element(string Symbol, string State);

where Z is the element atomic number, Symbol is the symbol, e.g. Al for Aluminum, and State is the physical state (see List of Elements.)

The physical state can be "G" for a gas, "L" for a liquid or "S" for a solid. If a state is not given, the element is assumed to be in the physical state at 1 atmosphere and 20° C. For example, Hydrogen gas and liquid Hydrogen Element objects could be instantiated as follows,

Element *H_gas = new Element("H");
Element *H_liquid = new Element("H","L");

The methods,

string * Element::GetSymbol();
string * Element::GetState();
string * Element::GetName();
double Element::GetZ();
double Element::GetA();
double Element::GetDensity();

return the element symbol, physical state, name, atomic number Z, atomic weight A [g/mol] and the density rho [g/cm3], respectively.

The method,

void Element::SetA(double A);

modifies the atomic weight [g/mol], and is useful when defining materials composed of isotopes. See the Material Class for more on modifying the atomic weight of element.

The method,

void Element::SetDensity(double rho);

modifies the density [g/cm3]. The default density for solids, liquids and gases is the natural abundance density at 1 atmosphere and 20° C. The SetDensity() method is only meant to set the density of elements in gaseous state. See the Material Class for more on modifying the density.

← Return to Muon Range Library

The Compound Class

A Compound Class object is instantiated by,

Compound *c = new Compound(string Name);
Compound *c = new Compound(string Formula);
Compound *c = new Compound(int Index);

where Name is the compound name, e.g. Cadmium Telluride, Formula the compound chemical formula, e.g. CdTe, or Index is the material index number (see List of Compounds.)

The methods,

string * Compound::GetState();
string * Compound::GetName();
string * Compound::GetFormula();
double Compound::GetM();
double Compound::GetDensity();
int Compound::GetMatIndex();

return the compound physical state, name, formula, molecular weight [g/mol], density [g/cm3] and the material index number, respectively.

The method,

void Compound::SetDensity(double rho);

modifies the density [g/cm3]. The default density for solids and gases is the density at 1 atmosphere and 20° C. The SetDensity() method is only meant to set the density of compounds in gaseous state, e.g. Acetylene. See the Material Class for more on modifying the density.

← Return to Muon Range Library

The Mixture Class

A Mixture Class object is instantiated by,

Mixture *x = new Mixture(string Name);
Mixture *x = new Mixture(int Index);

where Name is the mixture material name, e.g. Granite, or Index is the mixture material index number (see List of Mixture Materials.)

The methods,

string * Mixture::GetState();
string * Mixture::GetName();
double Mixture::GetDensity();
int Mixture::GetMatIndex();

return the mixture material physical state, name, density rho [g/cm3] and the material index number, respectively.

The method,

void Mixture::SetDensity(double rho);

modifies the density rho [g/cm3]. The default density for solids and gases is the density at 1 atmosphere and 20° C. The SetDensity() method is only meant to set the density of mixture on materials in gaseous state, e.g. Dry Air at 1 atm. See the Material Class for more on modifying the density.

← Return to Muon Range Library

The Biomat Class

A Biomat Class object is instantiated by,

Biomat *b = new Biomat(string Name);
Biomat *b = new Biomat(int Index);

where Name is the biological material name, e.g. Cortical Bone (ICRP), or Index is the biological material index number (see List of Biological Materials.)

The methods,

string * Biomat::GetState();
string * Biomat::GetName();
double Biomat::GetDensity();
int Biomat::GetMatIndex();

return the biological material physical state, name, the density rho [g/cm3] and the material index number, respectively.

The method,

void Biomat::SetDensity(double rho);

modifies the density rho [g/cm3]. The default density for solids and gases is the density at 1 atmosphere and 20°. The SetDensity() method is only meant to set the density of biological materials in gaseous state, e.g. Tissue-Equivalent Gas. See the Material Class for more on modifying the density.

← Return to Muon Range Library

The Dedx Class

The Dedx Class is the base class of the Range Class. The following methods are inherited by the derived class,

double Dedx::GetEdedx(double E, Material *m);
double Dedx::GetBdedx(double E, Material *m);
double Dedx::GetPPdedx(double E, Material *m);
double Dedx::GetPNdedx(double E, Material *m);

where E is the muon total energy in MeV, and m is a previously instantiated Material object, return the electronic, bremsstrahlung, pair production and photo nuclear stopping powers in MeV cm2/g, respectively.

← Return to Muon Range Library

The Range Class

A Range Class object is instantiated by,

Range *r = new Range(Material *m);

where the argument is a previously instantiated Material (Element, Compound, Mixture or Biomat) object.

The methods,

double Range::GetRange(Muon *u);
double Range::GetRange(double T);

where m is a previously instantiated Muon object or T is the muon kinetic energy in MeV, returns the range in g/cm2. The former function uses the energy of the muon object m and leaves the energy unchanged, whereas the latter functions accepts an argument of energy not associated with any Muon object. See Example 1.

The method,

void Range::printRangeTable();

prints a stopping power and range table of the material to standard output. See Example 2.

The methods,

double Range::GetOutgoingEnergy(Muon *u);
double Range::GetOutgoingEnergy(Muon *u, double s);
double Range::GetOutgoingEnergy(double T, double s);

where u is a previously instantiated Muon object, s is the absorber thickness in g/cm2, or T is the kinetic energy in MeV, return the energy loss after passage through the absorber. The ingoing kinetic energy of the muon is set with the Muon object method SetKE() and is updated to the outgoing energy after energy loss in the absorber. If not given, the absorber thickness is set with the Material object method SetThickness(). See Example 3.

The methods,

double Range::GetIngoingEnergy(Muon *u);
double Range::GetIngoingEnergy(Muon *u, double s);
double Range::GetIngoingEnergy(double T, double s);

where u is a previously instantiated Muon object, s is the absorber thickness in g/cm2, or T is the kinetic energy in MeV, return the energy loss after passage through the absorber. The outgoing kinetic energy of the muon is set with the Muon object method SetKE() and is updated to the ingoing energy before energy loss in the absorber. If not given, the absorber thickness is set with the Material object method SetThickness(). See Example 4.

The methods,

double Range::GetMaterialThickness(Muon *u, double dE);
double Range::GetMaterialThickness(double T, double dE);

where u is a previously instantiated Muon object, or T is the kinetic energy in MeV, and dE is the desired energy increment or decrement in MeV, return the material thickness needed to perform the energy change dE. If dE < 0, T is interpreted as being the ingoing energy and T+dB the outgoing energy after passage through the material. Conversely, If dE > 0, T is interpreted as being the outgoing energy and T+dB the ingoing energy before passage through the material. The kinetic energy of the muon is set with the Muon object method SetKE(). See Example 5.

The method,

double Range::GetDedx(double E, Material *m);

returns the total stopping power in MeV cm2/g.

The methods,

double Range::GetEI(double *d);
double Range::GetEC(double *d);

return the minimum ionization energy [MeV], and the critical energy [MeV], respectively. The pointer d holds the value of the total stopping power at these energies.

← Return to Muon Range Library