musrfit
1.9.2
|
#include <PRunNonMusr.h>
Public Member Functions | |
PRunNonMusr () | |
PRunNonMusr (PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData) | |
virtual | ~PRunNonMusr () |
virtual Double_t | CalcChiSquare (const std::vector< Double_t > &par) |
virtual Double_t | CalcChiSquareExpected (const std::vector< Double_t > &par) |
virtual Double_t | CalcMaxLikelihood (const std::vector< Double_t > &par) |
virtual void | CalcTheory () |
virtual UInt_t | GetNoOfFitBins () |
virtual void | SetFitRangeBin (const TString fitRange) |
virtual UInt_t | GetXIndex () |
virtual UInt_t | GetYIndex () |
![]() | |
PRunBase () | |
PRunBase (PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag) | |
virtual | ~PRunBase () |
virtual void | SetFitRange (PDoublePairVector fitRange) |
virtual UInt_t | GetRunNo () |
returns the number of runs of the msr-file More... | |
virtual PRunData * | GetData () |
returns the data to be fitted More... | |
virtual void | CleanUp () |
virtual Bool_t | IsValid () |
returns if the state is valid More... | |
Protected Member Functions | |
virtual Bool_t | PrepareData () |
virtual Bool_t | PrepareFitData () |
virtual Bool_t | PrepareViewData () |
![]() | |
virtual void | CalculateKaiserFilterCoeff (Double_t wc, Double_t A, Double_t dw) |
virtual void | FilterTheo () |
Private Attributes | |
PRawRunData * | fRawRunData |
raw run data handler More... | |
UInt_t | fNoOfFitBins |
number of bins to be be fitted More... | |
Int_t | fPacking |
packing for this particular run. Either given in the RUN- or GLOBAL-block. More... | |
Bool_t | fTheoAsData |
true=only calculate the theory points at the data points, false=calculate more points for the theory as compared to data are calculated which lead to 'nicer' Fouriers More... | |
Int_t | fStartTimeBin |
bin at which the fit starts More... | |
Int_t | fEndTimeBin |
bin at which the fit ends More... | |
Additional Inherited Members | |
![]() | |
Bool_t | fValid |
flag showing if the state of the class is valid More... | |
EPMusrHandleTag | fHandleTag |
tag telling whether this is used for fit, view, ... More... | |
Int_t | fRunNo |
number of the run within the msr-file More... | |
PMsrHandler * | fMsrInfo |
msr-file handler More... | |
PMsrRunBlock * | fRunInfo |
run info used to filter out needed infos of a run More... | |
PRunDataHandler * | fRawData |
holds the raw run data More... | |
PRunData | fData |
data to be fitted, viewed, i.e. binned data More... | |
Double_t | fTimeResolution |
time resolution in (us) More... | |
PMetaData | fMetaData |
keeps the meta data from the data file like field, temperature, energy, ... More... | |
PDoubleVector | fT0s |
all t0 bins of a run! The derived classes will handle it. More... | |
std::vector< PDoubleVector > | fAddT0s |
all t0 bins of all addrun's of a run! The derived classes will handle it. More... | |
Double_t | fFitStartTime |
fit start time More... | |
Double_t | fFitEndTime |
fit end time More... | |
PDoubleVector | fFuncValues |
is keeping the values of the functions from the FUNCTIONS block More... | |
std::unique_ptr< PTheory > | fTheory |
theory needed to calculate chi-square More... | |
PDoubleVector | fKaiserFilter |
stores the Kaiser filter vector (needed for the RRF). More... | |
Class handling the non-muSR fit type
Definition at line 39 of file PRunNonMusr.h.
PRunNonMusr::PRunNonMusr | ( | ) |
Constructor.
Definition at line 40 of file PRunNonMusr.cpp.
References fEndTimeBin, PRunBase::fHandleTag, fNoOfFitBins, fPacking, fRawRunData, fStartTimeBin, and kEmpty.
PRunNonMusr::PRunNonMusr | ( | PMsrHandler * | msrInfo, |
PRunDataHandler * | rawData, | ||
UInt_t | runNo, | ||
EPMusrHandleTag | tag, | ||
Bool_t | theoAsData | ||
) |
Constructor
msrInfo | pointer to the msr-file handler |
rawData | raw run data |
runNo | number of the run within the msr-file |
tag | tag showing what shall be done: kFit == fitting, kView == viewing |
Definition at line 63 of file PRunNonMusr.cpp.
References PRunBase::fRawData, fRawRunData, PRunBase::fRunInfo, PRunBase::fValid, PRunDataHandler::GetRunData(), PMsrRunBlock::GetRunName(), and PrepareData().
|
virtual |
Destructor
Definition at line 85 of file PRunNonMusr.cpp.
|
virtual |
Calculate chi-square.
return:
par | parameter vector iterated by minuit2 |
Implements PRunBase.
Definition at line 100 of file PRunNonMusr.cpp.
References PMsrHandler::EvalFunc(), PRunBase::fData, fEndTimeBin, PRunBase::fFuncValues, PRunBase::fMetaData, PRunBase::fMsrInfo, PRunBase::fRunInfo, fStartTimeBin, PRunBase::fTheory, PRunData::GetError(), PMsrHandler::GetFuncNo(), PMsrRunBlock::GetMap(), PMsrHandler::GetNoOfFuncs(), PRunData::GetValue(), and PRunData::GetX().
|
virtual |
Calculate expected chi-square. Currently not implemented since not clear what to be done.
return:
par | parameter vector iterated by minuit2 |
Definition at line 132 of file PRunNonMusr.cpp.
|
virtual |
Calculate log maximum-likelihood. Currently not implemented since not clear what to be done.
return:
par | parameter vector iterated by minuit2 |
Implements PRunBase.
Definition at line 150 of file PRunNonMusr.cpp.
|
virtual |
Calculate theory for a given set of fit-parameters.
Implements PRunBase.
Definition at line 163 of file PRunNonMusr.cpp.
|
virtual |
Calculate the number of fitted bins for the current fit range.
return: number of fitted bins.
Definition at line 175 of file PRunNonMusr.cpp.
References PRunBase::fData, PRunBase::fFitEndTime, PRunBase::fFitStartTime, fNoOfFitBins, PRunData::GetValue(), and PRunData::GetX().
|
virtual |
Returns the x-axis data index.
return:
Definition at line 485 of file PRunNonMusr.cpp.
References PRawRunData::fDataNonMusr, fRawRunData, PNonMusrRawRunData::FromAscii(), PRunBase::fRunInfo, PNonMusrRawRunData::GetDataTags(), PMsrRunBlock::GetXDataIndex(), and PMsrRunBlock::GetXDataLabel().
Referenced by PrepareFitData(), and PrepareViewData().
|
virtual |
Returns the y-axis data index.
return:
Definition at line 526 of file PRunNonMusr.cpp.
References PRawRunData::fDataNonMusr, fRawRunData, PNonMusrRawRunData::FromAscii(), PRunBase::fRunInfo, PNonMusrRawRunData::GetDataTags(), PMsrRunBlock::GetYDataIndex(), and PMsrRunBlock::GetYDataLabel().
Referenced by PrepareFitData(), and PrepareViewData().
|
protectedvirtual |
Prepare data for fitting or viewing.
return:
Implements PRunBase.
Definition at line 198 of file PRunNonMusr.cpp.
References PRunBase::fFitEndTime, PRunBase::fFitStartTime, PRunBase::fHandleTag, PRunBase::fMsrInfo, fPacking, PRunBase::fRunInfo, PRunBase::fValid, PMsrGlobalBlock::GetFitRange(), PMsrRunBlock::GetFitRange(), PMsrHandler::GetMsrGlobal(), PMsrGlobalBlock::GetPacking(), PMsrRunBlock::GetPacking(), PMsrRunBlock::GetRunNameSize(), kFit, kView, PMUSR_UNDEFINED, PrepareFitData(), and PrepareViewData().
Referenced by PRunNonMusr().
|
protectedvirtual |
Prepare data for fitting.
return:
Definition at line 247 of file PRunNonMusr.cpp.
References PRunData::AppendErrorValue(), PRunData::AppendValue(), PRunData::AppendXValue(), PRunBase::fData, PRawRunData::fDataNonMusr, fEndTimeBin, PRunBase::fFitEndTime, PRunBase::fFitStartTime, fNoOfFitBins, fPacking, fRawRunData, fStartTimeBin, PNonMusrRawRunData::GetData(), PNonMusrRawRunData::GetErrData(), PRunData::GetValue(), PRunData::GetX(), GetXIndex(), and GetYIndex().
Referenced by PrepareData().
|
protectedvirtual |
Prepare data for viewing.
return:
Definition at line 310 of file PRunNonMusr.cpp.
References PRunData::AppendErrorValue(), PRunData::AppendTheoryValue(), PRunData::AppendValue(), PRunData::AppendXTheoryValue(), PRunData::AppendXValue(), PMsrHandler::EvalFunc(), PRunBase::fData, PRawRunData::fDataNonMusr, PRunBase::fFuncValues, PRunBase::fMetaData, PRunBase::fMsrInfo, fNoOfFitBins, fPacking, fRawRunData, PRunBase::fRunInfo, fTheoAsData, PRunBase::fTheory, PMsrPlotStructure::fTmax, PMsrPlotStructure::fTmin, PMsrPlotStructure::fUseFitRanges, PNonMusrRawRunData::GetData(), PNonMusrRawRunData::GetErrData(), PMsrHandler::GetFuncNo(), PMsrRunBlock::GetMap(), PMsrHandler::GetMsrParamList(), PMsrHandler::GetMsrPlotList(), PMsrHandler::GetMsrRunList(), PMsrHandler::GetNoOfFuncs(), PRunData::GetValue(), PRunData::GetX(), GetXIndex(), and GetYIndex().
Referenced by PrepareData().
|
inlinevirtual |
Definition at line 53 of file PRunNonMusr.h.
|
private |
bin at which the fit ends
Definition at line 71 of file PRunNonMusr.h.
Referenced by CalcChiSquare(), PrepareFitData(), and PRunNonMusr().
|
private |
number of bins to be be fitted
Definition at line 66 of file PRunNonMusr.h.
Referenced by GetNoOfFitBins(), PrepareFitData(), PrepareViewData(), and PRunNonMusr().
|
private |
packing for this particular run. Either given in the RUN- or GLOBAL-block.
Definition at line 67 of file PRunNonMusr.h.
Referenced by PrepareData(), PrepareFitData(), PrepareViewData(), and PRunNonMusr().
|
private |
raw run data handler
Definition at line 64 of file PRunNonMusr.h.
Referenced by GetXIndex(), GetYIndex(), PrepareFitData(), PrepareViewData(), and PRunNonMusr().
|
private |
bin at which the fit starts
Definition at line 70 of file PRunNonMusr.h.
Referenced by CalcChiSquare(), PrepareFitData(), and PRunNonMusr().
|
private |
true=only calculate the theory points at the data points, false=calculate more points for the theory as compared to data are calculated which lead to 'nicer' Fouriers
Definition at line 68 of file PRunNonMusr.h.
Referenced by PrepareViewData().