35 #ifndef __Scintillator_h 36 #define __Scintillator_h 71 #ifndef __gVirtualXRayConfig_h 79 #ifndef __PhotonCrossSection_h 145 std::vector<std::pair<RATIONAL_NUMBER, RATIONAL_NUMBER> >
getEnergyResponse()
const;
148 static std::vector<std::pair<RATIONAL_NUMBER, RATIONAL_NUMBER> >
getEnergyResponse(
const std::string& aMaterial,
155 static std::string
getCompound(
const std::string& aMaterial);
170 void setEnergyResponse(
const std::vector<std::pair<float, float> >& anEnergyResponse);
173 void setEnergyResponse(
const std::vector<std::pair<double, double> >& anEnergyResponse);
217 #endif // __Scintillator_h RATIONAL_NUMBER m_thickness
Scintillator is a class to generate the energy response due to the scintillator of the X-Ray detector...
static RATIONAL_NUMBER getDensity(const std::string &aMaterial)
int findNearestEnergyIdx(const RATIONAL_NUMBER &anEnergy) const
Find the index of the closest input energy in the energy response.
static std::vector< std::string > getSupportedScintillatorMaterials()
Accessor on the list of scintillator materials currently supported.
void setMaterial(const std::string &aMaterial)
RATIONAL_NUMBER getThickness()
const std::string & getMaterial() const
~Scintillator()
Destructor.
float RATIONAL_NUMBER
Type of data used to store real numbers.
Class to manage photon cross sections of elements, compounds and mixtures.
RATIONAL_NUMBER m_density
std::vector< std::pair< RATIONAL_NUMBER, RATIONAL_NUMBER > > m_p_energy_response
Energy response. The keys of the map are the input energies.
static std::string getCompound(const std::string &aMaterial)
std::vector< std::pair< RATIONAL_NUMBER, RATIONAL_NUMBER > > getEnergyResponse() const
void setEnergyResponse(const std::vector< std::pair< float, float > > &anEnergyResponse)
void release()
Release the data.
void loadEnergyResponse(const std::string &aFileName, const RATIONAL_NUMBER &aUnitOfEnergy)
Load the energy response of the detector from a TSV file.
Scintillator()
Default constructor.
void setThickness(const RATIONAL_NUMBER &aThickness)
Class to generate the energy response due to the scintillator of the X-Ray detector.
RATIONAL_NUMBER applyEnergyResponse(const RATIONAL_NUMBER &anEnergy) const
Apply the energy response if any.