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 Element, Compound, and Mixture classes define the absorber material, and the Range class the calculations.
Table of Contents
The Muon Class
A Muon class object is instantiated by,
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::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::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 Element Class
An Element class object is instantiated by,
Element *e = new Element(string Symbol);
Element *e = new Element(string Symbol, string State);
where Symbol is the element symbol, e.g. Al for Aluminium, and State is the physical state.
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_liquid = new Element("H","L");
The methods,
void Element::SetDensity(double rho);
modify the atomic weight A, and the density rho (g/cm3), respectively. The default density for solids is the naturally occurring density, and for gases the density at 1 atmosphere and 20°. The SetDensity() function is meant to set the density of elements in a gaseaous state.
The methods,
string Element::GetState();
double Element::GetZ();
double Element::GetA();
double Element::GetDensity();
return the element symbol, the element physical state, the atomic number Z, the atomic weight A and the density rho, respectively.
The 🔗List of Elements show some element physical properties of the Element Class.
The method,
prints a stopping power and range table to standard output.
← Return to Muon Range Library
The Compound Class
A Compound class object is instantiated by,
Compound *e = new Compound(string Symbol);
Compound *e = new Compound(string Symbol, string State);
where Symbol is the compound symbol, e.g. CdTe for Cadmium Telluride, and State is the physical state.
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 compound is assumed to be in the physical state at 1 atmosphere and 20° C.
The methods,
modify the density rho (g/cm3). The default density for solids is the naturally occurring density, and for gases the density at 1 atmosphere and 20°. The SetDensity() function is meant to set the density of compounds in gaseous state.
The methods,
string Compound::GetState();
double Compound::GetDensity();
return the compound symbol, the compound physical state, and the density rho, respectively.
The 🔗List of Compounds show some compound physical properties of the Compound Class.
The method,
prints a stopping power and range table to standard output.
← Return to Muon Range Library
The Range Class
A Range class object is instantiated by,
Range *r = new Range(Compound *c);
Range *r = new Range(Mixture *x);
where the argument can be a previously instantiated Element, Compound or Mixture object.
The method,
where m is a previously instantiated Muon object and s is the absorber thickness in g/cm2, returns the energy loss after passage through the absorber. The kinetic energy of the muon object is updated to the outgoing energy after energy loss.
The method,
where m is a previously instantiated Muon object and s is the absorber thickness in g/cm2, returns the energy loss after passage through the absorber. The kinetic energy of the muon object is updated to the ingoing energy before energy loss.
The methods,
double Range::getRange(double E);
where m is a previously instantiated Muon object or E is the muon total 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 any energy.
← Return to Muon Range Library