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(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 Material Class
The Material Class is the base class of the Element, Compound, Mixture and Biomat classes. The following methods are inherited by the derived classes,
returns the element symbol.
returns the element physical state. The physical state can be "G" for a gas, "L" for a liquid or "S" for a solid.
returns the material name.
returns the compound chemical formula.
returns a material index. Compound, mixture and biological materials have index.
double Material::GetA();
return the element atomic number Z and the atomic weight A [g/mol], respectively.
modifies the atomic weight A [g/mol] in case the element has a different isotopic composition than the natural abundance.
return the compound molecular weight M [g/mol].
return the material density [g/cm3].
modifies the material density [g/cm3]. The default density for solids and gases is the density at 1 atmosphere and 20° C. The SetDensity() method is primarily meant to set the density of materials in gaseous state. 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 4.
prints a stopping power and range table of the material to standard output.
← 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 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_liquid = new Element("H","L");
The methods,
string * Element::GetState();
string * Element::GetName();
double Element::GetZ();
double Element::GetA();
double Element::GetDensity();
return the element symbol, the element physical state, the element name, the atomic number Z, the atomic weight A [g/mol] and the density rho [g/cm3], respectively.
The methods,
void Element::SetDensity(double rho);
modify the atomic weight [g/mol], and the density [g/cm3], respectively. The default density for solids and gases is the natural abundance density at 1 atmosphere and 20° C. The SetDensity() method is primarily meant to set the density of elements in gaseous state. See the Material Class for more on modifing the atomic weight and the density.
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 *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, and Index is the material index number (see List of Compounds.)
The methods,
string * Compound::GetFormula();
double Compound::GetM();
double Compound::GetDensity();
int Compound::GetMatIndex();
return the compound name, the formula, the molecular weight [g/mol], the density [g/cm3] and the material index number, respectively.
The method,
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 primarily meant to set the density of compounds in gaseous state. A Compound object does not have a physical state variable as Element objects do. However, the physical state can be inferred from the density column in the List of Compounds. Acetylene, Ammonia, Butane, Carbon Dioxide, Carbon Tetrafluoride, Dimethyl Ether, Ethane, Methane, Nitrous Oxide, Propane, and Water Vapor are gases at 1 atmosphere and 20° C. See the Material Class for more on modifing the density.
The method,
prints a stopping power and range table to standard output.
← Return to Muon Range Library
The Mixture Class
A Mixture Class object is instantiated by,
Mixture *x = new Mixture(int Index);
where Name is the mixture material name, e.g. Photographic Emulsion, and Index is the mixture material index number (see List of Mixture Materials.)
The methods,
double Mixture::GetDensity();
int Mixture::GetMatIndex();
return the mixture material name, the density rho [g/cm3] and the material index number, respectively.
The methods,
modify the density rho [g/cm3]. The default density for solids and gases is the density at 1 atmosphere and 20° C. The SetDensity() function is primarily meant to set the density of mixture materials in gaseous state, e.g. Dry Air at 1 atm. See the Material Class for more on modifing the density.
The method,
prints a stopping power and range table to standard output.
← Return to Muon Range Library
The Biomat Class
A Biomat Class object is instantiated by,
Biomat *e = new Biomat(int Index);
where Name is the biological material name, e.g. Cortical Bone (ICRP), and Index is the biological material index number (see List of Biological Materials.)
The methods,
double Biomat::GetDensity();
int Biomat::GetMatIndex();
return the biological material name, the density rho [g/cm3] and the material index number, respectively.
The methods,
modify the density rho [g/cm3]. The default density for solids and gases is the density at 1 atmosphere and 20°. The SetDensity() function is primarily meant to set the density of biological materials in gaseous state, e.g. Tissue-Equivalent Gas. See the Material Class for more on modifing the density.
The method,
prints a stopping power and range table to standard output.
← Return to Muon Range Library
The Dedx Class
A Dedx Class object is instantiated by,
where the argument is a previously instantiated Material (Element, Compound, Mixture or Biomat) object.
The Dedx Class is the base class of the Range Class. The following methods are inherited by the derived class,
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.
The method,
returns the total stopping power in MeV cm2/g.
The methods,
double Dedx::GetEC(Material *m, double *d);
return the mimimum 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
The Range Class
A Range Class object is instantiated by,
where the argument is a previously instantiated Material (Element, Compound, Mixture or Biomat) 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, not associated with any Muon object.
← Return to Muon Range Library