fisx
|
Class containing the composition of a layer. More...
#include <fisx_layer.h>
Inherited by fisx::Detector.
Public Member Functions | |
Layer (const std::string &name="", const double &density=0.0, const double &thickness=0.0, const double &funnyFactor=1.0) | |
void | setMaterial (const std::string &materialName) |
void | setMaterial (const Material &material) |
std::map< std::string, double > | getComposition (const Elements &elements) const |
const Material & | getMaterial () const |
double | getTransmission (const double &energy, const Elements &elements, const double &angle=90.0) const |
std::map< std::string, double > | getMassAttenuationCoefficients (const double &energy, const Elements &elements) const |
std::map< std::string, std::vector< double > > | getMassAttenuationCoefficients (const std::vector< double > &energies, const Elements &elements) const |
std::vector< double > | getTransmission (const std::vector< double > &energy, const Elements &elements, const double &angle=90.0) const |
bool | hasMaterialComposition () const |
std::vector< std::pair< std::string, double > > | getPeakFamilies (const double &energy, const Elements &elements) const |
const std::string & | getMaterialName () const |
void | setDensity (const double &density) |
void | setThickness (const double &thickness) |
const double & | getDensity () const |
const double & | getThickness () const |
const double & | getFunnyFactor () const |
std::map< std::string, double > | getComposition (const Elements &elements) |
Public Attributes | |
std::string | name |
Friends | |
std::ostream & | operator<< (std::ostream &o, Layer const &layer) |
Class containing the composition of a layer.
std::map< std::string, double > fisx::Layer::getComposition | ( | const Elements & | elements | ) | const |
Get the layer composition either from internal material or from name. In the later case the elements instance is not used.
std::map< std::string, double > fisx::Layer::getMassAttenuationCoefficients | ( | const double & | energy, |
const Elements & | elements | ||
) | const |
Get the layer mass attenuation coefficients transmission at the given energy using the elements library supplied. If the material is not defined or cannot be handled, it will throw the relevant error.
std::map< std::string, std::vector< double > > fisx::Layer::getMassAttenuationCoefficients | ( | const std::vector< double > & | energies, |
const Elements & | elements | ||
) | const |
Get the layer mass attenuation coefficients transmission at the given energies using the elements library supplied. If the material is not defined or cannot be handled, it will throw the relevant error.
|
inline |
Eventually get a handle to underlying material
std::vector< std::pair< std::string, double > > fisx::Layer::getPeakFamilies | ( | const double & | energy, |
const Elements & | elements | ||
) | const |
Given an energy and a reference to an elements library return an ordered vector of pairs. The first element is the peak family ("Si K", "Pb L1", ...) and the second the binding energy.
double fisx::Layer::getTransmission | ( | const double & | energy, |
const Elements & | elements, | ||
const double & | angle = 90.0 |
||
) | const |
Get the layer transmission at the given energy using the elements library supplied. If the material is not defined or cannot be handled, it will throw the relevant error.
std::vector< double > fisx::Layer::getTransmission | ( | const std::vector< double > & | energy, |
const Elements & | elements, | ||
const double & | angle = 90.0 |
||
) | const |
Get the layer transmissions at the given energies using the elements library supplied. If the material is not defined or cannot be handled, it will throw the relevant error.
bool fisx::Layer::hasMaterialComposition | ( | ) | const |
Return true if material composition was specified. Returns false if only the name or formula of the material was given.