|
musrfit 1.10.0
|
#include <PFitter.h>
Public Member Functions | |
| PSectorChisq (UInt_t noOfRuns) | |
| void | SetRunFirstTime (Double_t first, UInt_t idx) |
| void | SetSectorTime (Double_t last) |
| void | SetChisq (Double_t chisq) |
| void | SetChisq (Double_t chisq, UInt_t idx) |
| void | SetExpectedChisq (Double_t expChisq) |
| void | SetExpectedChisq (Double_t chisq, UInt_t idx) |
| void | SetNDF (UInt_t ndf) |
| void | SetNDF (UInt_t ndf, UInt_t idx) |
| Double_t | GetTimeRangeFirst (UInt_t idx) |
| Double_t | GetTimeRangeLast () |
| Double_t | GetChisq () |
| Double_t | GetChisq (UInt_t idx) |
| Double_t | GetExpectedChisq () |
| Double_t | GetExpectedChisq (UInt_t idx) |
| UInt_t | GetNDF () |
| UInt_t | GetNDF (UInt_t idx) |
| UInt_t | GetNoRuns () |
Private Attributes | |
| UInt_t | fNoOfRuns |
| number of runs presesent | |
| Double_t | fLast |
| requested time stamp | |
| Double_t | fChisq |
| chisq or maxLH for the sector | |
| Double_t | fExpectedChisq |
| keep the expected chisq or maxLH for the sector | |
| UInt_t | fNDF |
| NDF for the sector. | |
| PDoubleVector | fFirst |
| time stamp for fgb for a given run | |
| PDoubleVector | fChisqRun |
| chisq or maxLH for the sector and run | |
| PDoubleVector | fExpectedChisqRun |
| expected chisq or maxLH for the sector and run | |
| PUIntVector | fNDFRun |
| NDF for the sector and run. | |
Container for sector χ² (or max likelihood) analysis results.
The SECTOR command analyzes how χ² changes as the fit range is extended from the first good bin (fgb) to progressively later times. This helps identify:
A "sector" is a time window [fgb, fLast] where fLast < lgb. The class stores χ²/maxLH and NDF for each sector, both for the total fit and for individual runs.
Use case: If early-time data shows poor χ², the sector analysis reveals whether to adjust t0, fgb, or background estimation.
| PSectorChisq::PSectorChisq | ( | UInt_t | noOfRuns | ) |
Constructor.
| noOfRuns | Number of runs in the fit (allocates storage for per-run statistics) |
Constructor.
Definition at line 81 of file PFitter.cpp.
References fChisq, fChisqRun, fExpectedChisq, fExpectedChisqRun, fFirst, fLast, fNDF, fNDFRun, and fNoOfRuns.
|
inline |
| Double_t PSectorChisq::GetChisq | ( | UInt_t | idx | ) |
Returns the χ² for a specific run
| idx | Run index |
Get chisq/maxLH of the run with index idx
| idx | index of the run |
return: chisq/maxLH of the requested run or -1.0 if the idx is out-of-range.
Definition at line 213 of file PFitter.cpp.
|
inline |
Returns the expected total χ²
Definition at line 189 of file PFitter.h.
References fExpectedChisq.
| Double_t PSectorChisq::GetExpectedChisq | ( | UInt_t | idx | ) |
Returns the expected χ² for a specific run
| idx | Run index |
Get expected chisq/maxLH of the run with index idx
| idx | index of the run |
return: chisq/maxLH of the requested run or -1.0 if the idx is out-of-range.
Definition at line 231 of file PFitter.cpp.
References fExpectedChisqRun, and fNoOfRuns.
|
inline |
| UInt_t PSectorChisq::GetNDF | ( | UInt_t | idx | ) |
Returns the NDF for a specific run
| idx | Run index |
Get NDF of the run with index idx
| idx | index of the run |
return: NDF of the requested run or 0.0 if the idx is out-of-range.
Definition at line 249 of file PFitter.cpp.
|
inline |
| Double_t PSectorChisq::GetTimeRangeFirst | ( | UInt_t | idx | ) |
Gets the first good bin time for a specific run
| idx | Run index |
Get the fgb time of RUN with index idx. If idx is out-of-range PMUSR_UNDEFINED is returned.
| idx | index of the RUN |
return: return the fgb time of RUN with index idx.
Definition at line 195 of file PFitter.cpp.
References fFirst, fNoOfRuns, and PMUSR_UNDEFINED.
|
inline |
|
inline |
| void PSectorChisq::SetChisq | ( | Double_t | chisq, |
| UInt_t | idx ) |
Sets the χ² for a specific run in this sector
| chisq | Chi-squared value for run |
| idx | Run index |
Set the chisq/maxLH for a given detector with index idx.
| chisq | chisq/maxLH to be set |
| idx | index of the run to be set |
Definition at line 130 of file PFitter.cpp.
| void PSectorChisq::SetExpectedChisq | ( | Double_t | chisq, |
| UInt_t | idx ) |
Sets the expected χ² for a specific run
| chisq | Expected chi-squared value |
| idx | Run index |
Set the expected chisq/maxLH for a given detector with index idx.
| chisq | expected chisq/maxLH to be set |
| idx | index of the run to be set |
Definition at line 151 of file PFitter.cpp.
References fExpectedChisqRun, and fNoOfRuns.
|
inline |
Sets the expected total χ² for this sector
| expChisq | Expected chi-squared value |
Definition at line 153 of file PFitter.h.
References fExpectedChisq.
|
inline |
| void PSectorChisq::SetNDF | ( | UInt_t | ndf, |
| UInt_t | idx ) |
Sets the NDF for a specific run
| ndf | Degrees of freedom for run |
| idx | Run index |
Set the NDF for a given detector with index idx.
| ndf | to be set |
| idx | index of the run to be set |
Definition at line 172 of file PFitter.cpp.
| void PSectorChisq::SetRunFirstTime | ( | Double_t | first, |
| UInt_t | idx ) |
Sets the first good bin time for a specific run
| first | First good bin time in microseconds |
| idx | Run index |
Set the time of the fgb of a given RUN
| first | time stamp of the fgb |
| idx | index of the RUN |
Definition at line 109 of file PFitter.cpp.
References fFirst, and fNoOfRuns.
Referenced by PFitter::CheckCommands().
|
inline |
Sets the sector end time (last bin included in this sector)
| last | Sector end time in microseconds |
Definition at line 140 of file PFitter.h.
References fLast.
Referenced by PFitter::CheckCommands().
|
private |
chisq or maxLH for the sector
Definition at line 212 of file PFitter.h.
Referenced by GetChisq(), PSectorChisq(), and SetChisq().
|
private |
chisq or maxLH for the sector and run
Definition at line 216 of file PFitter.h.
Referenced by GetChisq(), PSectorChisq(), and SetChisq().
|
private |
keep the expected chisq or maxLH for the sector
Definition at line 213 of file PFitter.h.
Referenced by GetExpectedChisq(), PSectorChisq(), and SetExpectedChisq().
|
private |
expected chisq or maxLH for the sector and run
Definition at line 217 of file PFitter.h.
Referenced by GetExpectedChisq(), PSectorChisq(), and SetExpectedChisq().
|
private |
time stamp for fgb for a given run
Definition at line 215 of file PFitter.h.
Referenced by GetTimeRangeFirst(), PSectorChisq(), and SetRunFirstTime().
|
private |
requested time stamp
Definition at line 211 of file PFitter.h.
Referenced by GetTimeRangeLast(), PSectorChisq(), and SetSectorTime().
|
private |
NDF for the sector.
Definition at line 214 of file PFitter.h.
Referenced by GetNDF(), PSectorChisq(), and SetNDF().
|
private |
NDF for the sector and run.
Definition at line 218 of file PFitter.h.
Referenced by GetNDF(), PSectorChisq(), and SetNDF().
|
private |
number of runs presesent
Definition at line 210 of file PFitter.h.
Referenced by GetChisq(), GetExpectedChisq(), GetNDF(), GetNoRuns(), GetTimeRangeFirst(), PSectorChisq(), SetChisq(), SetExpectedChisq(), SetNDF(), and SetRunFirstTime().