REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Data Fields | Private Member Functions | Private Attributes
TRestDataSetGainMap::Module Class Reference

Detailed Description

Definition at line 124 of file TRestDataSetGainMap.h.

Public Member Functions

void AddPeak (const double &energyPeak, const TVector2 &rangePeak=TVector2(0, 0))
 
void DrawFullSpectrum (const bool drawFits=true, const int color=-1, TCanvas *c=nullptr)
 
void DrawGainMap (const int peakNumber=0, const bool fullModuleAsRef=true)
 Function to draw the relative gain map for a given energy peak of the module. More...
 
void DrawLinearFit (const int index_x, const int index_y, TCanvas *c=nullptr)
 
void DrawLinearFit (const TVector2 &position, TCanvas *c=nullptr)
 
void DrawLinearFit (TCanvas *c=nullptr)
 
void DrawSpectrum (const bool drawFits=true, const int color=-1, TCanvas *c=nullptr)
 Function to draw the spectrum for each segment of the module on the same canvas. The canvas is divided in fNumberOfSegmentsX x fNumberOfSegmentsY pads. The segments are drawn with the bottom left corner corresponding to the minimun x and y values of the readout range and top right corner corresponding to the maximum x and y values of the readout range. Tip: define a canvas and use this same canvas along different calls to this function to draw the spectra of different modules on the same canvas. Example: TCanvas *myCanvas = new TCanvas(); module1->DrawSpectrum(false, kBlue, myCanvas); module2->DrawSpectrum(false, kRed, myCanvas);. More...
 
void DrawSpectrum (const int index_x, const int index_y, bool drawFits=true, int color=-1, TCanvas *c=nullptr)
 
void DrawSpectrum (const TVector2 &position, bool drawFits=true, int color=-1, TCanvas *c=nullptr)
 
void GenerateGainMap ()
 Function that calculates the calibration parameters for each segment defined at fSplitX and fSplitY ang generate their spectra and gain map. More...
 
std::string GetDataSetFileName () const
 
std::pair< int, int > GetIndexMatrix (const double x, const double y) const
 Function to get the index of the matrix of calibration parameters for a given x and y position on the detector plane. More...
 
double GetIntercept (const double x, const double y) const
 Function to get the calibration parameter intercept for a given x and y position on the detector plane. More...
 
double GetInterceptFullSpc () const
 
std::string GetModuleDefinitionCut () const
 
Int_t GetModuleId () const
 
Int_t GetNumberOfSegmentsX () const
 
Int_t GetNumberOfSegmentsY () const
 
std::string GetObservable () const
 
TRestDataSetGainMapGetParent () const
 
Int_t GetPlaneId () const
 
TVector2 GetReadoutRange () const
 
double GetSlope (const double x, const double y) const
 Function to get the calibration parameter slope for a given x and y position on the detector plane. More...
 
double GetSlopeFullSpc () const
 
std::string GetSpatialObservableX () const
 
std::string GetSpatialObservableY () const
 
std::set< double > GetSplitX () const
 
std::set< double > GetSplitY () const
 
void Initialize ()
 
void LoadConfigFromTiXmlElement (const TiXmlElement *module)
 Function to read the parameters from the RML element (TiXmlElement) and set those class members. More...
 
 Module (const TRestDataSetGainMap &parent)
 
 Module (const TRestDataSetGainMap &parent, const Int_t planeId, const Int_t moduleId)
 
void Print () const
 Prints on screen the information about the members of Module. More...
 
void Refit (const size_t x, const size_t y, const size_t peakNumber, const TVector2 &range)
 Function to fit again manually a peak for a given segment of the module. The calibration curve is updated after the fit. More...
 
void Refit (const TVector2 &position, const double energy, const TVector2 &range)
 Function to fit again manually a peak for a given segment of the module. More...
 
void RefitFullSpc (const double energy, const TVector2 &range)
 Function to fit again manually a peak for the whole module spectrum. The calibration curve is updated after the fit. More...
 
void RefitFullSpc (const size_t peakNumber, const TVector2 &range)
 Function to fit again manually a peak for the whole module spectrum. The calibration curve is updated after the fit. More...
 
void SetAutoRangePeaks (const bool &autoRangePeaks)
 
void SetCalibrationRange (const TVector2 &calibrationRange)
 
void SetDataSetFileName (const std::string &dataSetFileName)
 
void SetModuleDefinitionCut (const std::string &moduleDefinitionCut)
 
void SetModuleId (const Int_t &moduleId)
 
void SetNBins (const Int_t &nBins)
 
void SetNumberOfSegmentsX (const Int_t &numberOfSegmentsX)
 
void SetNumberOfSegmentsY (const Int_t &numberOfSegmentsY)
 
void SetPlaneId (const Int_t &planeId)
 
void SetReadoutRange (const TVector2 &readoutRange)
 
void SetSplits ()
 Function to set the class members for segmentation of the detector plane along the X and Y axis. More...
 
void SetSplits (const std::set< double > &splitXandY)
 
void SetSplitX ()
 Function to set the class members for segmentation of the detector plane along the X axis. More...
 
void SetSplitX (const std::set< double > &splitX)
 
void SetSplitY ()
 Function to set the class members for segmentation of the detector plane along the Y axis. More...
 
void SetSplitY (const std::set< double > &splitY)
 
void SetZeroPoint (const bool &ZeroPoint)
 
void UpdateCalibrationFits (const size_t x, const size_t y)
 Function to update the calibration curve for a given segment of the module. The calibration curve is cleared and then the means of the gaussian fits for each energy peak are added. If there are less than 2 fits, zero points are added. Then, the calibration curve is refitted (linearFit). More...
 
void UpdateCalibrationFitsFullSpc ()
 Function to update the calibration curve for the whole module. The calibration curve is cleared and then the means of the gaussian fits for each energy peak are added. If there are less than 2 fits, zero points are added. Then, the calibration curve is refitted (linearFit). More...
 

Data Fields

bool fAutoRangePeaks = true
 Automatic range for the peaks fitting. See GenerateGainMap() for more information of the logic. More...
 
TVector2 fCalibRange = TVector2(0, 0)
 Calibration range. If fCalibRange.X()>=fCalibRange.Y() the range will be automatically calculated. More...
 
std::string fDataSetFileName = ""
 
std::string fDefinitionCut = ""
 Cut that defines which events are from this module. More...
 
std::vector< double > fEnergyPeaks = {}
 Energy of the peaks to be used for the calibration. More...
 
double fFullIntercept = 0
 Intercept of the calibration linear fit of whole module. More...
 
TGraph * fFullLinearFit = nullptr
 Calibration linear fit for the whole module. More...
 
double fFullSlope = 0
 Slope of the calibration linear fit of whole module. More...
 
TH1F * fFullSpectrum = nullptr
 Spectrum of the observable for the whole module. More...
 
std::vector< std::vector< double > > fIntercept = {}
 Array containing the intercept of the linear fit for each segment. More...
 
Int_t fModuleId = -1
 
Int_t fNBins = 100
 Number of bins for the spectrum histograms. More...
 
Int_t fNumberOfSegmentsX = 1
 Number of segments in the x direction. More...
 
Int_t fNumberOfSegmentsY = 1
 Number of segments in the y direction. More...
 
Int_t fPlaneId = -1
 
std::vector< TVector2 > fRangePeaks = {}
 Range of the peaks to be used for the calibration. If empty it will be automatically calculated. More...
 
TVector2 fReadoutRange = TVector2(-1, 246.24)
 Readout dimensions. More...
 
std::vector< std::vector< TGraph * > > fSegLinearFit = {}
 Array containing the calibration linear fit for each segment. More...
 
std::vector< std::vector< TH1F * > > fSegSpectra = {}
 Array containing the observable spectrum for each segment. More...
 
std::vector< std::vector< double > > fSlope = {}
 Array containing the slope of the linear fit for each segment. More...
 
std::set< double > fSplitX = {}
 Split points in the x direction. More...
 
std::set< double > fSplitY = {}
 Split points in the y direction. More...
 
bool fZeroPoint = false
 

Private Member Functions

std::pair< double, double > FitPeaks (TH1F *hSeg, TGraph *gr)
 
std::pair< double, double > UpdateCalibrationFits (TH1F *hSeg, TGraph *gr)
 

Private Attributes

const TRestDataSetGainMapp = nullptr
 Pointer to the parent class. More...
 

Constructor & Destructor Documentation

◆ Module() [1/3]

TRestDataSetGainMap::Module::Module ( )
inline

Definition at line 285 of file TRestDataSetGainMap.h.

◆ Module() [2/3]

TRestDataSetGainMap::Module::Module ( const TRestDataSetGainMap parent)
inline

Definition at line 286 of file TRestDataSetGainMap.h.

◆ Module() [3/3]

TRestDataSetGainMap::Module::Module ( const TRestDataSetGainMap parent,
const Int_t  planeId,
const Int_t  moduleId 
)
inline

Definition at line 287 of file TRestDataSetGainMap.h.

◆ ~Module()

TRestDataSetGainMap::Module::~Module ( )
inline

Definition at line 291 of file TRestDataSetGainMap.h.

Member Function Documentation

◆ AddPeak()

void TRestDataSetGainMap::Module::AddPeak ( const double &  energyPeak,
const TVector2 &  rangePeak = TVector2(0, 0) 
)
inline

Definition at line 207 of file TRestDataSetGainMap.h.

◆ DrawFullSpectrum()

void TRestDataSetGainMap::Module::DrawFullSpectrum ( const bool  drawFits = true,
const int  color = -1,
TCanvas *  c = nullptr 
)

Definition at line 1305 of file TRestDataSetGainMap.cxx.

◆ DrawGainMap()

void TRestDataSetGainMap::Module::DrawGainMap ( const int  peakNumber = 0,
const bool  fullModuleAsRef = true 
)

Function to draw the relative gain map for a given energy peak of the module.

Parameters
peakNumberThe index of the peak to be drawn (remember they are in descending order).
fullModuleAsRefIf true, it will use the peak position at the full module spectrum as reference for the gain map. If false, it will use the centered segment of the module as reference.

Definition at line 1409 of file TRestDataSetGainMap.cxx.

◆ DrawLinearFit() [1/3]

void TRestDataSetGainMap::Module::DrawLinearFit ( const int  index_x,
const int  index_y,
TCanvas *  c = nullptr 
)

Definition at line 1341 of file TRestDataSetGainMap.cxx.

◆ DrawLinearFit() [2/3]

void TRestDataSetGainMap::Module::DrawLinearFit ( const TVector2 &  position,
TCanvas *  c = nullptr 
)

Definition at line 1336 of file TRestDataSetGainMap.cxx.

◆ DrawLinearFit() [3/3]

void TRestDataSetGainMap::Module::DrawLinearFit ( TCanvas *  c = nullptr)

Definition at line 1372 of file TRestDataSetGainMap.cxx.

◆ DrawSpectrum() [1/3]

void TRestDataSetGainMap::Module::DrawSpectrum ( const bool  drawFits = true,
const int  color = -1,
TCanvas *  c = nullptr 
)

Function to draw the spectrum for each segment of the module on the same canvas. The canvas is divided in fNumberOfSegmentsX x fNumberOfSegmentsY pads. The segments are drawn with the bottom left corner corresponding to the minimun x and y values of the readout range and top right corner corresponding to the maximum x and y values of the readout range. Tip: define a canvas and use this same canvas along different calls to this function to draw the spectra of different modules on the same canvas. Example: TCanvas *myCanvas = new TCanvas(); module1->DrawSpectrum(false, kBlue, myCanvas); module2->DrawSpectrum(false, kRed, myCanvas);.

Parameters
drawFitsA bool to also draw the fits or not.
colorAn int to set the color of the spectra. If negative, the color of the spectra is not changed.
cA TCanvas pointer to draw the spectra. If none (nullptr) is given, a new one is created.

Definition at line 1277 of file TRestDataSetGainMap.cxx.

◆ DrawSpectrum() [2/3]

void TRestDataSetGainMap::Module::DrawSpectrum ( const int  index_x,
const int  index_y,
bool  drawFits = true,
int  color = -1,
TCanvas *  c = nullptr 
)

Definition at line 1209 of file TRestDataSetGainMap.cxx.

◆ DrawSpectrum() [3/3]

void TRestDataSetGainMap::Module::DrawSpectrum ( const TVector2 &  position,
bool  drawFits = true,
int  color = -1,
TCanvas *  c = nullptr 
)

Definition at line 1203 of file TRestDataSetGainMap.cxx.

◆ FitPeaks()

std::pair< double, double > TRestDataSetGainMap::Module::FitPeaks ( TH1F *  hSeg,
TGraph *  gr 
)
private

Definition at line 840 of file TRestDataSetGainMap.cxx.

◆ GenerateGainMap()

void TRestDataSetGainMap::Module::GenerateGainMap ( )

Function that calculates the calibration parameters for each segment defined at fSplitX and fSplitY ang generate their spectra and gain map.

It uses the data of the observable fObservable from the TRestDataSet at fDataSetFileName (or fCalibFileName if first is empty). The segmentation is given by the splits.

Ranges for peak fitting follows this logic:

  1. If fRangePeaks is defined and fAutoRangePeaks is false: fRangePeaks is used.
  2. If fRangePeaks is defined and fAutoRangePeaks is true: the fitting range is calculated by the peak position found by TSpectrum inside fRangePeaks.
  3. If fRangePeaks is not defined and fAutoRangePeaks is false: use the peak position found by TSpectrum and the peak position of the next peak to define the range.
  4. If fRangePeaks is not defined and fAutoRangePeaks is true: same as 3.

Definition at line 707 of file TRestDataSetGainMap.cxx.

◆ GetDataSetFileName()

std::string TRestDataSetGainMap::Module::GetDataSetFileName ( ) const
inline

Definition at line 232 of file TRestDataSetGainMap.h.

◆ GetIndexMatrix()

std::pair< int, int > TRestDataSetGainMap::Module::GetIndexMatrix ( const double  x,
const double  y 
) const

Function to get the index of the matrix of calibration parameters for a given x and y position on the detector plane.

Parameters
xA const double that defines the x position on the detector plane.
yA const double that defines the y position on the detector plane.

Definition at line 544 of file TRestDataSetGainMap.cxx.

◆ GetIntercept()

double TRestDataSetGainMap::Module::GetIntercept ( const double  x,
const double  y 
) const

Function to get the calibration parameter intercept for a given x and y position on the detector plane.

Parameters
xA const double that defines the x position on the detector plane.
yA const double that defines the y position on the detector plane.

Definition at line 602 of file TRestDataSetGainMap.cxx.

◆ GetInterceptFullSpc()

double TRestDataSetGainMap::Module::GetInterceptFullSpc ( ) const
inline

Definition at line 219 of file TRestDataSetGainMap.h.

◆ GetModuleDefinitionCut()

std::string TRestDataSetGainMap::Module::GetModuleDefinitionCut ( ) const
inline

Definition at line 226 of file TRestDataSetGainMap.h.

◆ GetModuleId()

Int_t TRestDataSetGainMap::Module::GetModuleId ( ) const
inline

Definition at line 222 of file TRestDataSetGainMap.h.

◆ GetNumberOfSegmentsX()

Int_t TRestDataSetGainMap::Module::GetNumberOfSegmentsX ( ) const
inline

Definition at line 227 of file TRestDataSetGainMap.h.

◆ GetNumberOfSegmentsY()

Int_t TRestDataSetGainMap::Module::GetNumberOfSegmentsY ( ) const
inline

Definition at line 228 of file TRestDataSetGainMap.h.

◆ GetObservable()

std::string TRestDataSetGainMap::Module::GetObservable ( ) const
inline

Definition at line 223 of file TRestDataSetGainMap.h.

◆ GetParent()

TRestDataSetGainMap * TRestDataSetGainMap::Module::GetParent ( ) const
inline

Definition at line 214 of file TRestDataSetGainMap.h.

◆ GetPlaneId()

Int_t TRestDataSetGainMap::Module::GetPlaneId ( ) const
inline

Definition at line 221 of file TRestDataSetGainMap.h.

◆ GetReadoutRange()

TVector2 TRestDataSetGainMap::Module::GetReadoutRange ( ) const
inline

Definition at line 233 of file TRestDataSetGainMap.h.

◆ GetSlope()

double TRestDataSetGainMap::Module::GetSlope ( const double  x,
const double  y 
) const

Function to get the calibration parameter slope for a given x and y position on the detector plane.

Parameters
xA const double that defines the x position on the detector plane.
yA const double that defines the y position on the detector plane.

Definition at line 580 of file TRestDataSetGainMap.cxx.

◆ GetSlopeFullSpc()

double TRestDataSetGainMap::Module::GetSlopeFullSpc ( ) const
inline

Definition at line 218 of file TRestDataSetGainMap.h.

◆ GetSpatialObservableX()

std::string TRestDataSetGainMap::Module::GetSpatialObservableX ( ) const
inline

Definition at line 224 of file TRestDataSetGainMap.h.

◆ GetSpatialObservableY()

std::string TRestDataSetGainMap::Module::GetSpatialObservableY ( ) const
inline

Definition at line 225 of file TRestDataSetGainMap.h.

◆ GetSplitX()

std::set< double > TRestDataSetGainMap::Module::GetSplitX ( ) const
inline

Definition at line 230 of file TRestDataSetGainMap.h.

◆ GetSplitY()

std::set< double > TRestDataSetGainMap::Module::GetSplitY ( ) const
inline

Definition at line 231 of file TRestDataSetGainMap.h.

◆ LoadConfigFromTiXmlElement()

void TRestDataSetGainMap::Module::LoadConfigFromTiXmlElement ( const TiXmlElement *  module)

Function to read the parameters from the RML element (TiXmlElement) and set those class members.

Parameters
moduleA const TiXmlElement pointer that contains the information. Example of this RML element: <module planeId="0" moduleId="0" moduleDefinitionCut="TREXsides_tagId==1" numberOfSegmentsX="5" numberOfSegmentsY="5" <peak energy="22.5" range="(250000,370000)"> <peak energy="8.0" range=""> </module>

Definition at line 1146 of file TRestDataSetGainMap.cxx.

◆ Print()

void TRestDataSetGainMap::Module::Print ( ) const

Prints on screen the information about the members of Module.

Definition at line 1468 of file TRestDataSetGainMap.cxx.

◆ Refit() [1/2]

void TRestDataSetGainMap::Module::Refit ( const size_t  x,
const size_t  y,
const size_t  peakNumber,
const TVector2 &  range 
)

Function to fit again manually a peak for a given segment of the module. The calibration curve is updated after the fit.

Parameters
xindex along X-axis of the corresponding segment.
yindex along Y-axis of the corresponding segment.
peakNumberThe index of the peak to be fitted.
rangeThe range for the fitting of the peak (in the observables corresponding units).

Definition at line 974 of file TRestDataSetGainMap.cxx.

◆ Refit() [2/2]

void TRestDataSetGainMap::Module::Refit ( const TVector2 &  position,
const double  energyPeak,
const TVector2 &  range 
)

Function to fit again manually a peak for a given segment of the module.

Parameters
positionposition along X and Y axes at the detector module (in physical units).
energyPeakThe energy of the peak to be fitted (in physical units).
rangeThe range for the fitting of the peak (in the observables corresponding units).

Definition at line 949 of file TRestDataSetGainMap.cxx.

◆ RefitFullSpc() [1/2]

void TRestDataSetGainMap::Module::RefitFullSpc ( const double  energyPeak,
const TVector2 &  range 
)

Function to fit again manually a peak for the whole module spectrum. The calibration curve is updated after the fit.

Parameters
energyPeakThe energy of the peak to be fitted (in physical units).
rangeThe range for the fitting of the peak (in the observables corresponding units).

Definition at line 1008 of file TRestDataSetGainMap.cxx.

◆ RefitFullSpc() [2/2]

void TRestDataSetGainMap::Module::RefitFullSpc ( const size_t  peakNumber,
const TVector2 &  range 
)

Function to fit again manually a peak for the whole module spectrum. The calibration curve is updated after the fit.

Parameters
peakNumberThe index of the peak to be fitted.
rangeThe range for the fitting of the peak (in the observables corresponding units).

Definition at line 1029 of file TRestDataSetGainMap.cxx.

◆ SetAutoRangePeaks()

void TRestDataSetGainMap::Module::SetAutoRangePeaks ( const bool &  autoRangePeaks)
inline

Definition at line 278 of file TRestDataSetGainMap.h.

◆ SetCalibrationRange()

void TRestDataSetGainMap::Module::SetCalibrationRange ( const TVector2 &  calibrationRange)
inline

Definition at line 260 of file TRestDataSetGainMap.h.

◆ SetDataSetFileName()

void TRestDataSetGainMap::Module::SetDataSetFileName ( const std::string &  dataSetFileName)
inline

Definition at line 275 of file TRestDataSetGainMap.h.

◆ SetModuleDefinitionCut()

void TRestDataSetGainMap::Module::SetModuleDefinitionCut ( const std::string &  moduleDefinitionCut)
inline

Definition at line 257 of file TRestDataSetGainMap.h.

◆ SetModuleId()

void TRestDataSetGainMap::Module::SetModuleId ( const Int_t &  moduleId)
inline

Definition at line 256 of file TRestDataSetGainMap.h.

◆ SetNBins()

void TRestDataSetGainMap::Module::SetNBins ( const Int_t &  nBins)
inline

Definition at line 261 of file TRestDataSetGainMap.h.

◆ SetNumberOfSegmentsX()

void TRestDataSetGainMap::Module::SetNumberOfSegmentsX ( const Int_t &  numberOfSegmentsX)
inline

Definition at line 272 of file TRestDataSetGainMap.h.

◆ SetNumberOfSegmentsY()

void TRestDataSetGainMap::Module::SetNumberOfSegmentsY ( const Int_t &  numberOfSegmentsY)
inline

Definition at line 273 of file TRestDataSetGainMap.h.

◆ SetPlaneId()

void TRestDataSetGainMap::Module::SetPlaneId ( const Int_t &  planeId)
inline

Definition at line 255 of file TRestDataSetGainMap.h.

◆ SetReadoutRange()

void TRestDataSetGainMap::Module::SetReadoutRange ( const TVector2 &  readoutRange)
inline

Definition at line 276 of file TRestDataSetGainMap.h.

◆ SetSplits() [1/2]

void TRestDataSetGainMap::Module::SetSplits ( )

Function to set the class members for segmentation of the detector plane along the X and Y axis.

Definition at line 620 of file TRestDataSetGainMap.cxx.

◆ SetSplits() [2/2]

void TRestDataSetGainMap::Module::SetSplits ( const std::set< double > &  splitXandY)
inline

Definition at line 267 of file TRestDataSetGainMap.h.

◆ SetSplitX() [1/2]

void TRestDataSetGainMap::Module::SetSplitX ( )

Function to set the class members for segmentation of the detector plane along the X axis.

It uses the number of segments and the readout range to define the edges of the segments.

Definition at line 630 of file TRestDataSetGainMap.cxx.

◆ SetSplitX() [2/2]

void TRestDataSetGainMap::Module::SetSplitX ( const std::set< double > &  splitX)

Definition at line 644 of file TRestDataSetGainMap.cxx.

◆ SetSplitY() [1/2]

void TRestDataSetGainMap::Module::SetSplitY ( )

Function to set the class members for segmentation of the detector plane along the Y axis.

It uses the number of segments and the readout range to define the edges of the segments.

Definition at line 663 of file TRestDataSetGainMap.cxx.

◆ SetSplitY() [2/2]

void TRestDataSetGainMap::Module::SetSplitY ( const std::set< double > &  splitY)

Definition at line 677 of file TRestDataSetGainMap.cxx.

◆ SetZeroPoint()

void TRestDataSetGainMap::Module::SetZeroPoint ( const bool &  ZeroPoint)
inline

Definition at line 277 of file TRestDataSetGainMap.h.

◆ UpdateCalibrationFits() [1/2]

void TRestDataSetGainMap::Module::UpdateCalibrationFits ( const size_t  x,
const size_t  y 
)

Function to update the calibration curve for a given segment of the module. The calibration curve is cleared and then the means of the gaussian fits for each energy peak are added. If there are less than 2 fits, zero points are added. Then, the calibration curve is refitted (linearFit).

Parameters
xindex along X-axis of the corresponding segment.
yindex along Y-axis of the corresponding segment.

Definition at line 1058 of file TRestDataSetGainMap.cxx.

◆ UpdateCalibrationFits() [2/2]

std::pair< double, double > TRestDataSetGainMap::Module::UpdateCalibrationFits ( TH1F *  hSeg,
TGraph *  gr 
)
private

Definition at line 1076 of file TRestDataSetGainMap.cxx.

◆ UpdateCalibrationFitsFullSpc()

void TRestDataSetGainMap::Module::UpdateCalibrationFitsFullSpc ( )

Function to update the calibration curve for the whole module. The calibration curve is cleared and then the means of the gaussian fits for each energy peak are added. If there are less than 2 fits, zero points are added. Then, the calibration curve is refitted (linearFit).

Definition at line 1126 of file TRestDataSetGainMap.cxx.

Field Documentation

◆ fAutoRangePeaks

bool TRestDataSetGainMap::Module::fAutoRangePeaks = true

Automatic range for the peaks fitting. See GenerateGainMap() for more information of the logic.

Definition at line 192 of file TRestDataSetGainMap.h.

◆ fCalibRange

TVector2 TRestDataSetGainMap::Module::fCalibRange = TVector2(0, 0)

Calibration range. If fCalibRange.X()>=fCalibRange.Y() the range will be automatically calculated.

Definition at line 148 of file TRestDataSetGainMap.h.

◆ fDataSetFileName

std::string TRestDataSetGainMap::Module::fDataSetFileName = ""

Name of the file that contains the calibration data. If empty, it will use its parent TRestDataSetGainMap::fCalibFileName.

Definition at line 173 of file TRestDataSetGainMap.h.

◆ fDefinitionCut

std::string TRestDataSetGainMap::Module::fDefinitionCut = ""

Cut that defines which events are from this module.

Definition at line 154 of file TRestDataSetGainMap.h.

◆ fEnergyPeaks

std::vector<double> TRestDataSetGainMap::Module::fEnergyPeaks = {}

Energy of the peaks to be used for the calibration.

Definition at line 142 of file TRestDataSetGainMap.h.

◆ fFullIntercept

double TRestDataSetGainMap::Module::fFullIntercept = 0

Intercept of the calibration linear fit of whole module.

Definition at line 182 of file TRestDataSetGainMap.h.

◆ fFullLinearFit

TGraph* TRestDataSetGainMap::Module::fFullLinearFit = nullptr

Calibration linear fit for the whole module.

Definition at line 204 of file TRestDataSetGainMap.h.

◆ fFullSlope

double TRestDataSetGainMap::Module::fFullSlope = 0

Slope of the calibration linear fit of whole module.

Definition at line 179 of file TRestDataSetGainMap.h.

◆ fFullSpectrum

TH1F* TRestDataSetGainMap::Module::fFullSpectrum = nullptr

Spectrum of the observable for the whole module.

Definition at line 201 of file TRestDataSetGainMap.h.

◆ fIntercept

std::vector<std::vector<double> > TRestDataSetGainMap::Module::fIntercept = {}

Array containing the intercept of the linear fit for each segment.

Definition at line 185 of file TRestDataSetGainMap.h.

◆ fModuleId

Int_t TRestDataSetGainMap::Module::fModuleId = -1

Definition at line 139 of file TRestDataSetGainMap.h.

◆ fNBins

Int_t TRestDataSetGainMap::Module::fNBins = 100

Number of bins for the spectrum histograms.

Definition at line 151 of file TRestDataSetGainMap.h.

◆ fNumberOfSegmentsX

Int_t TRestDataSetGainMap::Module::fNumberOfSegmentsX = 1

Number of segments in the x direction.

Definition at line 157 of file TRestDataSetGainMap.h.

◆ fNumberOfSegmentsY

Int_t TRestDataSetGainMap::Module::fNumberOfSegmentsY = 1

Number of segments in the y direction.

Definition at line 160 of file TRestDataSetGainMap.h.

◆ fPlaneId

Int_t TRestDataSetGainMap::Module::fPlaneId = -1

Plane ID (unique identifier). Although it is not linked to any TRestDetectorReadout it is recommended to use the same.

Definition at line 135 of file TRestDataSetGainMap.h.

◆ fRangePeaks

std::vector<TVector2> TRestDataSetGainMap::Module::fRangePeaks = {}

Range of the peaks to be used for the calibration. If empty it will be automatically calculated.

Definition at line 145 of file TRestDataSetGainMap.h.

◆ fReadoutRange

TVector2 TRestDataSetGainMap::Module::fReadoutRange = TVector2(-1, 246.24)

Readout dimensions.

Definition at line 163 of file TRestDataSetGainMap.h.

◆ fSegLinearFit

std::vector<std::vector<TGraph*> > TRestDataSetGainMap::Module::fSegLinearFit = {}

Array containing the calibration linear fit for each segment.

Definition at line 198 of file TRestDataSetGainMap.h.

◆ fSegSpectra

std::vector<std::vector<TH1F*> > TRestDataSetGainMap::Module::fSegSpectra = {}

Array containing the observable spectrum for each segment.

Definition at line 195 of file TRestDataSetGainMap.h.

◆ fSlope

std::vector<std::vector<double> > TRestDataSetGainMap::Module::fSlope = {}

Array containing the slope of the linear fit for each segment.

Definition at line 176 of file TRestDataSetGainMap.h.

◆ fSplitX

std::set<double> TRestDataSetGainMap::Module::fSplitX = {}

Split points in the x direction.

Definition at line 166 of file TRestDataSetGainMap.h.

◆ fSplitY

std::set<double> TRestDataSetGainMap::Module::fSplitY = {}

Split points in the y direction.

Definition at line 169 of file TRestDataSetGainMap.h.

◆ fZeroPoint

bool TRestDataSetGainMap::Module::fZeroPoint = false

Add zero point to the calibration linear fit. Zero point will be automatically added if there are less than 2 points.

Definition at line 189 of file TRestDataSetGainMap.h.

◆ p

const TRestDataSetGainMap* TRestDataSetGainMap::Module::p = nullptr
private

Pointer to the parent class.

Definition at line 127 of file TRestDataSetGainMap.h.


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