23 #ifndef REST_TRestDataSetCalibration
24 #define REST_TRestDataSetCalibration
26 #include "TRestMetadata.h"
72 inline void SetDataSetName(
const std::string& dSName) {
fDataSetName = dSName; }
73 inline void SetOutputFileName(
const std::string& outName) {
fOutputFileName = outName; }
74 inline void SetCalibrationFile(
const std::string& calibFile) {
fCalibFile = calibFile; }
76 inline auto GetCalibPeaks()
const {
return fCalibPeaks; }
77 inline auto GetCalibFWHM()
const {
return fCalibFWHM; }
79 inline double GetSlope()
const {
return fSlope; }
80 inline double GetIntercept()
const {
return fIntercept; }
81 inline std::string GetCalObservable()
const {
return fCalObservable; }
This class is meant to perform the calibration of different runs.
void Calibrate()
Performs the calibration of a given dataSet. If no calibration file is provided, it performs the gaus...
TVector2 fCalibRange
Range to be calibrated.
Double_t fIntercept
Intercept of the calibration fit.
TRestDataSetCalibration()
Default constructor.
Int_t fNBins
Number of bins used in the calibration.
std::string fCalibFile
Name of the calibration file to be used.
void Initialize() override
Function to initialize input/output event members and define the section name.
~TRestDataSetCalibration()
Default destructor.
std::string fDataSetName
Name of the dataSet inside the config file.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestDataSetCalibration.
Double_t fSlope
Slope from the calibration fit.
std::vector< double > fCalibPeaks
Vector containing calibrated peaks in ADCs.
std::vector< double > fEnergyPeaks
Vector containing expected energy peaks in keV must be sorted.
std::string fOutputFileName
Name of the output file.
std::vector< double > fCalibFWHM
Vector containing calibrated sigma in ADCs.
void InitFromConfigFile() override
Function to initialize some variables from configfile, in case that the variable is not found in the ...
std::string fCalObservable
Calibration variable to be used.