gVirtualXRay  2.0.10
VirtualX-RayImagingLibraryonGPU
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
gVirtualXRay::Scintillator Class Reference

Scintillator is a class to generate the energy response due to the scintillator of the X-Ray detector. More...

#include <Scintillator.h>

Collaboration diagram for gVirtualXRay::Scintillator:
Collaboration graph

Public Member Functions

 Scintillator ()
 Default constructor. More...
 
 ~Scintillator ()
 Destructor. More...
 
void release ()
 Release the data. More...
 
void setMaterial (const std::string &aMaterial)
 
void setThickness (const RATIONAL_NUMBER &aThickness)
 
const std::string & getMaterial () const
 
RATIONAL_NUMBER getThickness ()
 
std::vector< std::pair< RATIONAL_NUMBER, RATIONAL_NUMBER > > getEnergyResponse () const
 
void loadEnergyResponse (const std::string &aFileName, const RATIONAL_NUMBER &aUnitOfEnergy)
 Load the energy response of the detector from a TSV file. More...
 
void setEnergyResponse (const std::vector< std::pair< float, float > > &anEnergyResponse)
 
void setEnergyResponse (const std::vector< std::pair< double, double > > &anEnergyResponse)
 
RATIONAL_NUMBER applyEnergyResponse (const RATIONAL_NUMBER &anEnergy) const
 Apply the energy response if any. More...
 

Static Public Member Functions

static std::vector< std::string > getSupportedScintillatorMaterials ()
 Accessor on the list of scintillator materials currently supported. More...
 
static std::vector< std::pair< RATIONAL_NUMBER, RATIONAL_NUMBER > > getEnergyResponse (const std::string &aMaterial, const RATIONAL_NUMBER &aThickness)
 
static RATIONAL_NUMBER getDensity (const std::string &aMaterial)
 
static std::string getCompound (const std::string &aMaterial)
 

Protected Member Functions

int findNearestEnergyIdx (const RATIONAL_NUMBER &anEnergy) const
 Find the index of the closest input energy in the energy response. More...
 

Protected Attributes

std::string m_material
 
RATIONAL_NUMBER m_density
 
RATIONAL_NUMBER m_thickness
 
std::vector< std::pair< RATIONAL_NUMBER, RATIONAL_NUMBER > > m_p_energy_response
 Energy response. The keys of the map are the input energies. More...
 

Detailed Description

Scintillator is a class to generate the energy response due to the scintillator of the X-Ray detector.

Definition at line 101 of file Scintillator.h.

Constructor & Destructor Documentation

◆ Scintillator()

gVirtualXRay::Scintillator::Scintillator ( )
inline

Default constructor.

Definition at line 113 of file Scintillator.inl.

◆ ~Scintillator()

gVirtualXRay::Scintillator::~Scintillator ( )
inline

Destructor.

Definition at line 122 of file Scintillator.inl.

Member Function Documentation

◆ applyEnergyResponse()

RATIONAL_NUMBER gVirtualXRay::Scintillator::applyEnergyResponse ( const RATIONAL_NUMBER anEnergy) const
inline

Apply the energy response if any.

Parameters
anEnergythe input energy
Returns
the output energy

Definition at line 476 of file Scintillator.inl.

◆ findNearestEnergyIdx()

int gVirtualXRay::Scintillator::findNearestEnergyIdx ( const RATIONAL_NUMBER anEnergy) const
inlineprotected

Find the index of the closest input energy in the energy response.

Returns
the index of the closest input energy

Definition at line 504 of file Scintillator.inl.

◆ getCompound()

std::string gVirtualXRay::Scintillator::getCompound ( const std::string &  aMaterial)
inlinestatic

Definition at line 340 of file Scintillator.inl.

◆ getDensity()

RATIONAL_NUMBER gVirtualXRay::Scintillator::getDensity ( const std::string &  aMaterial)
inlinestatic

Definition at line 273 of file Scintillator.inl.

◆ getEnergyResponse() [1/2]

std::vector< std::pair< RATIONAL_NUMBER, RATIONAL_NUMBER > > gVirtualXRay::Scintillator::getEnergyResponse ( ) const
inline

Definition at line 206 of file Scintillator.inl.

◆ getEnergyResponse() [2/2]

std::vector< std::pair< RATIONAL_NUMBER, RATIONAL_NUMBER > > gVirtualXRay::Scintillator::getEnergyResponse ( const std::string &  aMaterial,
const RATIONAL_NUMBER aThickness 
)
inlinestatic

Definition at line 214 of file Scintillator.inl.

◆ getMaterial()

const std::string & gVirtualXRay::Scintillator::getMaterial ( ) const
inline

Definition at line 191 of file Scintillator.inl.

◆ getSupportedScintillatorMaterials()

std::vector< std::string > gVirtualXRay::Scintillator::getSupportedScintillatorMaterials ( )
inlinestatic

Accessor on the list of scintillator materials currently supported.

Returns
the list of supported scintillator materials

Definition at line 155 of file Scintillator.inl.

◆ getThickness()

RATIONAL_NUMBER gVirtualXRay::Scintillator::getThickness ( )
inline

Definition at line 198 of file Scintillator.inl.

◆ loadEnergyResponse()

void gVirtualXRay::Scintillator::loadEnergyResponse ( const std::string &  aFileName,
const RATIONAL_NUMBER aUnitOfEnergy 
)
inline

Load the energy response of the detector from a TSV file.

Parameters
aFileNamename of the file. Each line of the file is formatted as follows: input_energy output_energy
aUnitOfEnergythe unit of energy corresponding to the data in the file

Definition at line 407 of file Scintillator.inl.

◆ release()

void gVirtualXRay::Scintillator::release ( )
inline

Release the data.

Definition at line 130 of file Scintillator.inl.

◆ setEnergyResponse() [1/2]

void gVirtualXRay::Scintillator::setEnergyResponse ( const std::vector< std::pair< float, float > > &  anEnergyResponse)
inline

Definition at line 444 of file Scintillator.inl.

◆ setEnergyResponse() [2/2]

void gVirtualXRay::Scintillator::setEnergyResponse ( const std::vector< std::pair< double, double > > &  anEnergyResponse)
inline

Definition at line 460 of file Scintillator.inl.

◆ setMaterial()

void gVirtualXRay::Scintillator::setMaterial ( const std::string &  aMaterial)
inline

Definition at line 141 of file Scintillator.inl.

◆ setThickness()

void gVirtualXRay::Scintillator::setThickness ( const RATIONAL_NUMBER aThickness)
inline

Definition at line 178 of file Scintillator.inl.

Field Documentation

◆ m_density

RATIONAL_NUMBER gVirtualXRay::Scintillator::m_density
protected

Definition at line 198 of file Scintillator.h.

◆ m_material

std::string gVirtualXRay::Scintillator::m_material
protected

Definition at line 197 of file Scintillator.h.

◆ m_p_energy_response

std::vector<std::pair<RATIONAL_NUMBER, RATIONAL_NUMBER> > gVirtualXRay::Scintillator::m_p_energy_response
protected

Energy response. The keys of the map are the input energies.

Definition at line 203 of file Scintillator.h.

◆ m_thickness

RATIONAL_NUMBER gVirtualXRay::Scintillator::m_thickness
protected

Definition at line 200 of file Scintillator.h.


The documentation for this class was generated from the following files: