|
musrfit 1.10.0
|
Dead time correction calculator for muon detector data. More...
#include <PNeXus.h>


Public Member Functions | |
| PNeXusDeadTime (const PNeXus *nxs, bool debug=false) | |
| Constructor - initializes dead time calculator from NeXus data. | |
| bool | IsValid () |
| Check if the dead time calculator was initialized successfully. | |
| double | Up () const |
| Get the error definition for the minimizer (FCNBase requirement) | |
| double | operator() (const std::vector< double > &par) const |
| Function call operator - calculates chi-square for given parameters. | |
| void | Minimize (const int i) |
| Minimize dead time for a specific detector spectrum. | |
| const std::vector< hsize_t > & | GetDimensions () const |
| Get the dimensions of the count dataset. | |
| std::vector< float > | GetDeadTimeEstimated () |
| Get the estimated dead time values from minimization. | |
Private Attributes | |
| bool | fDebug {false} |
| Debug flag - if true, print additional diagnostic information. | |
| bool | fValid |
| Validity flag - true if required data was loaded successfully. | |
| int | fGoodFrames {-1} |
| Number of good time frames for analysis. | |
| float | fTimeResolution {0.0} |
| Time resolution in picoseconds. | |
| std::vector< hsize_t > | fDims = {0, 0, 0} |
| Dimensions of count data [periods, spectra, bins]. | |
| int | fT0Bin {-1} |
| T0 bin number (time zero reference) | |
| int | fFgbBin {-1} |
| First good bin for analysis. | |
| int | fLgbBin {-1} |
| Last good bin for analysis. | |
| std::vector< float > | fDeadTime |
| Dead time values per detector (microseconds) from the file. | |
| std::vector< float > | fDeadTimeEstimated |
| Dead time values per detector (microseconds) as estimated from the data. | |
| std::vector< int > | fCounts |
| Count data for minimization. | |
| double | fUp {0.5} |
| UP parameter for Minuit2 (0.5 for chi-square) | |
| unsigned int | fIdx {0} |
| Current spectrum index being minimized. | |
Dead time correction calculator for muon detector data.
The PNeXusDeadTime class calculates dead time corrections for muon detector count data using ROOT Minuit2 minimization. It inherits from ROOT::Minuit2::FCNBase to implement a chi-square minimization function.
Dead time is the period after detecting an event during which the detector cannot register another event. This class estimates the dead time parameter for each detector spectrum by minimizing the deviation from expected count rates.
Typical Usage:
| nxH5::PNeXusDeadTime::PNeXusDeadTime | ( | const PNeXus * | nxs, |
| bool | debug = false ) |
Constructor - initializes dead time calculator from NeXus data.
| nxs | Pointer to PNeXus object containing the detector data |
| debug | If true, print additional debug information during calculations |
Definition at line 2793 of file PNeXus.cpp.
References fCounts, fDeadTime, fDeadTimeEstimated, fDebug, fDims, fFgbBin, fGoodFrames, fLgbBin, fT0Bin, fTimeResolution, and fValid.
|
inline |
Get the estimated dead time values from minimization.
Returns the dead time values calculated by the minimize() function for each spectrum. These values represent the dead time parameter that best fits the observed count data when accounting for dead time losses.
Definition at line 1268 of file PNeXus.h.
References fDeadTimeEstimated.
|
inline |
|
inline |
| void nxH5::PNeXusDeadTime::Minimize | ( | const int | i | ) |
Minimize dead time for a specific detector spectrum.
| i | Spectrum index to minimize (0-based index into second dimension) |
Minimization Parameters:
| i | Spectrum index to minimize (0-based, must be < dims[1]) |
< Minuit2 function minimum result
Definition at line 2960 of file PNeXus.cpp.
References fCounts, fDeadTime, fDeadTimeEstimated, fDebug, fDims, fFgbBin, and fIdx.
| double nxH5::PNeXusDeadTime::operator() | ( | const std::vector< double > & | par | ) | const |
Function call operator - calculates chi-square for given parameters.
Calculate the negative log-likelihood for dead time correction.
| par | Vector of parameters (dead time values in microseconds) |
Model: The expected count rate includes:
Parameters:
| par | Vector of parameters [dtc, N0, N_bkg] |
Definition at line 2920 of file PNeXus.cpp.
References fCounts, fDims, fFgbBin, fGoodFrames, fIdx, fLgbBin, fT0Bin, and fTimeResolution.
|
inline |
Get the error definition for the minimizer (FCNBase requirement)
Definition at line 1223 of file PNeXus.h.
References fUp.
|
private |
Count data for minimization.
Definition at line 1281 of file PNeXus.h.
Referenced by Minimize(), operator()(), and PNeXusDeadTime().
|
private |
Dead time values per detector (microseconds) from the file.
Definition at line 1279 of file PNeXus.h.
Referenced by Minimize(), and PNeXusDeadTime().
|
private |
Dead time values per detector (microseconds) as estimated from the data.
Definition at line 1280 of file PNeXus.h.
Referenced by GetDeadTimeEstimated(), Minimize(), and PNeXusDeadTime().
|
private |
Debug flag - if true, print additional diagnostic information.
Definition at line 1271 of file PNeXus.h.
Referenced by Minimize(), and PNeXusDeadTime().
|
private |
Dimensions of count data [periods, spectra, bins].
Definition at line 1275 of file PNeXus.h.
Referenced by GetDimensions(), Minimize(), operator()(), and PNeXusDeadTime().
|
private |
First good bin for analysis.
Definition at line 1277 of file PNeXus.h.
Referenced by Minimize(), operator()(), and PNeXusDeadTime().
|
private |
Number of good time frames for analysis.
Definition at line 1273 of file PNeXus.h.
Referenced by operator()(), and PNeXusDeadTime().
|
private |
Current spectrum index being minimized.
Definition at line 1283 of file PNeXus.h.
Referenced by Minimize(), and operator()().
|
private |
Last good bin for analysis.
Definition at line 1278 of file PNeXus.h.
Referenced by operator()(), and PNeXusDeadTime().
|
private |
T0 bin number (time zero reference)
Definition at line 1276 of file PNeXus.h.
Referenced by operator()(), and PNeXusDeadTime().
|
private |
Time resolution in picoseconds.
Definition at line 1274 of file PNeXus.h.
Referenced by operator()(), and PNeXusDeadTime().
|
private |
|
private |
Validity flag - true if required data was loaded successfully.
Definition at line 1272 of file PNeXus.h.
Referenced by IsValid(), and PNeXusDeadTime().