|
musrfit 1.10.0
|
Manager for TrimSP range distribution data. More...
#include <PRgeHandler.h>


Public Member Functions | |
| PRgeHandler (std::string fln="") | |
| Constructor that loads TrimSP data from XML configuration. | |
| virtual | ~PRgeHandler () |
| Destructor. | |
| virtual bool | IsValid () |
| Returns validity status. | |
| virtual UInt_t | GetNoOfRgeDataSets () |
| Returns number of loaded RGE data sets. | |
| virtual PRgeDataList | GetRgeData () |
| Returns all RGE data sets. | |
| virtual Double_t | GetZmax (const Double_t energy) |
| Returns maximum penetration depth for a given energy. | |
| virtual Double_t | GetZmax (const Int_t idx) |
| Returns maximum penetration depth for a data set index. | |
| virtual Double_t | Get_n (const Double_t energy, const Double_t z) |
| Returns normalized particle distribution at given energy and depth. | |
| virtual Double_t | Get_n (const Int_t idx, const Double_t z) |
| Returns normalized particle distribution at given index and depth. | |
| virtual Int_t | GetEnergyIndex (const Double_t energy) |
| Finds the data set index for a given energy. | |
Private Member Functions | |
| virtual bool | ReadRgeFile (const std::string fln, PRgeData &data) |
| Reads a single RGE file and populates a PRgeData structure. | |
Private Attributes | |
| bool | fValid {false} |
| Validity flag (true if all RGE files loaded successfully) | |
| PRgeDataList | fData |
| Collection of RGE data sets (one per energy) | |
Manager for TrimSP range distribution data.
PRgeHandler reads and manages muon/particle implantation depth profiles calculated by TrimSP (Transport of Ions in Matter - Stopping and Range). It provides access to:
The class loads RGE files specified in an XML configuration file, which can contain data for multiple implantation energies. RGE files contain depth (in Ångström) vs. particle count data from TrimSP simulations.
Definition at line 218 of file PRgeHandler.h.
| PRgeHandler::PRgeHandler | ( | std::string | fln = "" | ) |
Constructor that loads TrimSP data from XML configuration.
| fln | Path to XML configuration file (empty string for manual setup) |
Parses the XML file to get RGE file locations and energies, then loads all specified RGE files. Sets fValid to false if any errors occur.
|
inlinevirtual |
Destructor.
Definition at line 231 of file PRgeHandler.h.
|
virtual |
Returns normalized particle distribution at given energy and depth.
| energy | Implantation energy in eV |
| z | Depth in nm |
Uses linear interpolation between data points. The normalization ensures that ∫nn(z)dz = 1 over the entire depth range.
Searches for a data set matching the specified energy (within 0.9 keV tolerance) and returns the normalized distribution value at depth z.
| energy | Implantation energy in eV |
| z | Depth in nm |
Definition at line 671 of file PRgeHandler.cpp.
References fData, and Get_n().
Referenced by Get_n().
|
virtual |
Returns normalized particle distribution at given index and depth.
| idx | Data set index (0 to GetNoOfRgeDataSets()-1) |
| z | Depth in nm |
Uses linear interpolation between data points. The normalization ensures that ∫nn(z)dz = 1 over the entire depth range.
Uses linear interpolation between adjacent data points to compute the distribution value at the requested depth. The normalization ensures that ∫nn(z)dz = 1 over the entire depth range.
Special handling for z near zero: extrapolates linearly from first data point.
| idx | Data set index (0 to GetNoOfRgeDataSets()-1) |
| z | Depth in nm |
Definition at line 702 of file PRgeHandler.cpp.
|
virtual |
Finds the data set index for a given energy.
Finds the data set index corresponding to a given implantation energy.
| energy | Implantation energy in eV |
Uses tolerance of 0.9 keV for matching energies.
Searches through loaded data sets for a matching energy value using a tolerance of 0.9 keV (i.e., |E_data - E_query| < 0.9 keV).
| energy | Implantation energy in eV |
Definition at line 742 of file PRgeHandler.cpp.
References fData.
|
inlinevirtual |
Returns number of loaded RGE data sets.
Definition at line 243 of file PRgeHandler.h.
References fData.
|
inlinevirtual |
Returns all RGE data sets.
Definition at line 249 of file PRgeHandler.h.
References fData.
|
virtual |
Returns maximum penetration depth for a given energy.
Returns maximum penetration depth for a given implantation energy.
| energy | Implantation energy in eV |
Searches for a data set matching the specified energy (within 0.9 keV tolerance) and returns its maximum depth value.
| energy | Implantation energy in eV |
Definition at line 622 of file PRgeHandler.cpp.
|
virtual |
Returns maximum penetration depth for a data set index.
Returns maximum penetration depth for a given data set index.
| idx | Data set index (0 to GetNoOfRgeDataSets()-1) |
Returns the last depth value from the depth vector, which represents the maximum penetration depth for this energy.
| idx | Data set index (0 to GetNoOfRgeDataSets()-1) |
Definition at line 650 of file PRgeHandler.cpp.
References fData.
|
inlinevirtual |
Returns validity status.
Definition at line 237 of file PRgeHandler.h.
References fValid.
|
privatevirtual |
Reads a single RGE file and populates a PRgeData structure.
Reads a single TrimSP .rge file and populates a PRgeData structure.
| fln | Path to the .rge file |
| data | PRgeData structure to populate |
Parses the two-column format (depth amplitude) from TrimSP output. Converts depth from Ångström to nanometers.
Parses the two-column format from TrimSP output:
Skips empty lines and non-numeric lines. Performs extensive validation on numeric values with detailed error messages.
| fln | Path to the .rge file |
| data | PRgeData structure to populate with depth and amplitude vectors |
Definition at line 506 of file PRgeHandler.cpp.
References PRgeData::amplitude, PRgeData::depth, and fValid.
Referenced by ClassImp().
|
private |
Collection of RGE data sets (one per energy)
Definition at line 298 of file PRgeHandler.h.
Referenced by ClassImp(), Get_n(), Get_n(), GetEnergyIndex(), GetNoOfRgeDataSets(), GetRgeData(), GetZmax(), and GetZmax().
|
private |
Validity flag (true if all RGE files loaded successfully)
Definition at line 297 of file PRgeHandler.h.
Referenced by ClassImp(), IsValid(), and ReadRgeFile().