musrfit  1.9.2
PRunBase Class Referenceabstract

#include <PRunBase.h>

Inheritance diagram for PRunBase:
Collaboration diagram for PRunBase:

Public Member Functions

 PRunBase ()
 
 PRunBase (PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag)
 
virtual ~PRunBase ()
 
virtual Double_t CalcChiSquare (const std::vector< Double_t > &par)=0
 pure virtual, i.e. needs to be implemented by the deriving class!! More...
 
virtual Double_t CalcMaxLikelihood (const std::vector< Double_t > &par)=0
 pure virtual, i.e. needs to be implemented by the deriving class!! More...
 
virtual void SetFitRange (PDoublePairVector fitRange)
 
virtual void CalcTheory ()=0
 pure virtual, i.e. needs to be implemented by the deriving class!! More...
 
virtual UInt_t GetRunNo ()
 returns the number of runs of the msr-file More...
 
virtual PRunDataGetData ()
 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 ()=0
 pure virtual, i.e. needs to be implemented by the deriving class!! More...
 
virtual void CalculateKaiserFilterCoeff (Double_t wc, Double_t A, Double_t dw)
 
virtual void FilterTheo ()
 

Protected Attributes

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...
 
PMsrHandlerfMsrInfo
 msr-file handler More...
 
PMsrRunBlockfRunInfo
 run info used to filter out needed infos of a run More...
 
PRunDataHandlerfRawData
 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< PDoubleVectorfAddT0s
 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< PTheoryfTheory
 theory needed to calculate chi-square More...
 
PDoubleVector fKaiserFilter
 stores the Kaiser filter vector (needed for the RRF). More...
 

Detailed Description

The run base class is enforcing a common interface to all supported fit-types.

Definition at line 47 of file PRunBase.h.

Constructor & Destructor Documentation

◆ PRunBase() [1/2]

PRunBase::PRunBase ( )

Constructor. Needed otherwise vector's cannot be generated ;-)

Definition at line 47 of file PRunBase.cpp.

References PMetaData::fEnergy, PMetaData::fField, fFitEndTime, fFitStartTime, fHandleTag, fMetaData, fRawData, fRunInfo, fRunNo, fTimeResolution, fValid, kEmpty, and PMUSR_UNDEFINED.

◆ PRunBase() [2/2]

PRunBase::PRunBase ( PMsrHandler msrInfo,
PRunDataHandler rawData,
UInt_t  runNo,
EPMusrHandleTag  tag 
)

Constructor.

Parameters
msrInfopointer to the msr-file handler
rawDatapointer to the raw-data handler
runNomsr-file run number
tagtag telling if fit, view, or rrf representation is whished.

Definition at line 74 of file PRunBase.cpp.

References PMsrHandler::CheckMapAndParamRange(), PMetaData::fEnergy, PMetaData::fField, fFitEndTime, fFitStartTime, fFuncValues, fMetaData, fMsrInfo, fRunInfo, fRunNo, fTheory, fTimeResolution, fValid, PMsrRunBlock::GetMap(), PMsrHandler::GetMsrRunList(), PMsrHandler::GetNoOfFuncs(), PMsrHandler::GetNoOfParams(), and PMUSR_UNDEFINED.

◆ ~PRunBase()

PRunBase::~PRunBase ( )
virtual

Destructor.

Definition at line 123 of file PRunBase.cpp.

References fAddT0s, fFuncValues, and fT0s.

Member Function Documentation

◆ CalcChiSquare()

virtual Double_t PRunBase::CalcChiSquare ( const std::vector< Double_t > &  par)
pure virtual

pure virtual, i.e. needs to be implemented by the deriving class!!

Implemented in PRunAsymmetry, PRunAsymmetryRRF, PRunNonMusr, PRunMuMinus, PRunSingleHisto, and PRunSingleHistoRRF.

◆ CalcMaxLikelihood()

virtual Double_t PRunBase::CalcMaxLikelihood ( const std::vector< Double_t > &  par)
pure virtual

pure virtual, i.e. needs to be implemented by the deriving class!!

Implemented in PRunAsymmetry, PRunAsymmetryRRF, PRunNonMusr, PRunMuMinus, PRunSingleHisto, and PRunSingleHistoRRF.

◆ CalcTheory()

virtual void PRunBase::CalcTheory ( )
pure virtual

pure virtual, i.e. needs to be implemented by the deriving class!!

Implemented in PRunAsymmetry, PRunAsymmetryRRF, PRunNonMusr, PRunSingleHisto, PRunMuMinus, and PRunSingleHistoRRF.

◆ CalculateKaiserFilterCoeff()

void PRunBase::CalculateKaiserFilterCoeff ( Double_t  wc,
Double_t  A,
Double_t  dw 
)
protectedvirtual

Calculates the Kaiser filter coefficients for a low pass filter with a cut off frequency wc. For details see "Zeitdiskrete Signalverarbeitung", A.V. Oppenheim, R.W. Schafer, J.R. Buck. Pearson 2004.

Parameters
wccut off frequency
Adefined as $ A = -\log_{10}(\delta) $, where $\delta$ is the tolerance band.
dwdefined as $ \Delta\omega = \omega_{\rm S} - \omega_{\rm P} $, where $ \omega_{\rm S} $ is the stop band frequency, and $ \omega_{\rm P} $ is the pass band frequency.

Definition at line 200 of file PRunBase.cpp.

References fData, fKaiserFilter, and PRunData::GetTheoryTimeStep().

Referenced by PRunAsymmetry::PrepareRRFViewData(), and PRunSingleHisto::PrepareViewData().

◆ CleanUp()

void PRunBase::CleanUp ( )
virtual

Clean up all locally allocate memory

Definition at line 182 of file PRunBase.cpp.

References fTheory.

◆ FilterTheo()

void PRunBase::FilterTheo ( )
protectedvirtual

◆ GetData()

virtual PRunData* PRunBase::GetData ( )
inlinevirtual

returns the data to be fitted

Definition at line 61 of file PRunBase.h.

References fData.

◆ GetRunNo()

virtual UInt_t PRunBase::GetRunNo ( )
inlinevirtual

returns the number of runs of the msr-file

Definition at line 60 of file PRunBase.h.

References fRunNo.

◆ IsValid()

virtual Bool_t PRunBase::IsValid ( )
inlinevirtual

returns if the state is valid

Definition at line 63 of file PRunBase.h.

References fValid.

◆ PrepareData()

virtual Bool_t PRunBase::PrepareData ( )
protectedpure virtual

pure virtual, i.e. needs to be implemented by the deriving class!!

Implemented in PRunSingleHisto, PRunAsymmetry, PRunAsymmetryRRF, PRunMuMinus, PRunSingleHistoRRF, and PRunNonMusr.

◆ SetFitRange()

void PRunBase::SetFitRange ( PDoublePairVector  fitRange)
virtual

Sets the current fit range, and recalculated the number of fitted bins

Parameters
fitRangevector with fit ranges

Definition at line 142 of file PRunBase.cpp.

References fFitEndTime, fFitStartTime, and fRunNo.

Member Data Documentation

◆ fAddT0s

◆ fData

◆ fFitEndTime

◆ fFitStartTime

◆ fFuncValues

◆ fHandleTag

◆ fKaiserFilter

PDoubleVector PRunBase::fKaiserFilter
protected

stores the Kaiser filter vector (needed for the RRF).

Definition at line 87 of file PRunBase.h.

Referenced by CalculateKaiserFilterCoeff(), and FilterTheo().

◆ fMetaData

◆ fMsrInfo

PMsrHandler* PRunBase::fMsrInfo
protected

msr-file handler

Definition at line 71 of file PRunBase.h.

Referenced by PRunMuMinus::CalcChiSquare(), PRunSingleHistoRRF::CalcChiSquare(), PRunSingleHisto::CalcChiSquare(), PRunAsymmetryRRF::CalcChiSquare(), PRunAsymmetry::CalcChiSquare(), PRunNonMusr::CalcChiSquare(), PRunMuMinus::CalcChiSquareExpected(), PRunSingleHistoRRF::CalcChiSquareExpected(), PRunSingleHisto::CalcChiSquareExpected(), PRunMuMinus::CalcMaxLikelihood(), PRunSingleHisto::CalcMaxLikelihood(), PRunSingleHisto::CalcMaxLikelihoodExpected(), PRunMuMinus::CalcTheory(), PRunSingleHistoRRF::CalcTheory(), PRunSingleHisto::CalcTheory(), PRunAsymmetryRRF::CalcTheory(), PRunAsymmetry::CalcTheory(), PRunSingleHisto::EstimateN0(), PRunMuMinus::GetProperDataRange(), PRunSingleHisto::GetProperDataRange(), PRunSingleHistoRRF::GetProperDataRange(), PRunAsymmetryRRF::GetProperDataRange(), PRunAsymmetry::GetProperDataRange(), PRunSingleHisto::IsScaleN0AndBkg(), PRunNonMusr::PrepareData(), PRunSingleHistoRRF::PrepareData(), PRunAsymmetryRRF::PrepareData(), PRunMuMinus::PrepareData(), PRunAsymmetry::PrepareData(), PRunSingleHisto::PrepareData(), PRunSingleHistoRRF::PrepareFitData(), PRunAsymmetryRRF::PrepareFitData(), PRunSingleHisto::PrepareFitData(), PRunMuMinus::PrepareRawViewData(), PRunSingleHisto::PrepareRawViewData(), PRunAsymmetry::PrepareRRFViewData(), PRunNonMusr::PrepareViewData(), PRunSingleHistoRRF::PrepareViewData(), PRunAsymmetryRRF::PrepareViewData(), PRunAsymmetry::PrepareViewData(), PRunSingleHisto::PrepareViewData(), PRunAsymmetry::PRunAsymmetry(), PRunAsymmetryRRF::PRunAsymmetryRRF(), PRunBase(), PRunMuMinus::PRunMuMinus(), and PRunSingleHisto::PRunSingleHisto().

◆ fRawData

◆ fRunInfo

PMsrRunBlock* PRunBase::fRunInfo
protected

run info used to filter out needed infos of a run

Definition at line 72 of file PRunBase.h.

Referenced by PRunMuMinus::CalcChiSquare(), PRunSingleHisto::CalcChiSquare(), PRunSingleHistoRRF::CalcChiSquare(), PRunNonMusr::CalcChiSquare(), PRunAsymmetry::CalcChiSquare(), PRunAsymmetryRRF::CalcChiSquare(), PRunSingleHisto::CalcChiSquareExpected(), PRunMuMinus::CalcChiSquareExpected(), PRunSingleHistoRRF::CalcChiSquareExpected(), PRunSingleHisto::CalcMaxLikelihood(), PRunMuMinus::CalcMaxLikelihood(), PRunSingleHisto::CalcMaxLikelihoodExpected(), PRunMuMinus::CalcTheory(), PRunSingleHistoRRF::CalcTheory(), PRunSingleHisto::CalcTheory(), PRunAsymmetry::CalcTheory(), PRunAsymmetryRRF::CalcTheory(), PRunSingleHisto::EstimateBkg(), PRunSingleHistoRRF::EstimateBkg(), PRunSingleHisto::EstimateN0(), PRunMuMinus::GetProperDataRange(), PRunAsymmetryRRF::GetProperDataRange(), PRunSingleHisto::GetProperDataRange(), PRunSingleHistoRRF::GetProperDataRange(), PRunAsymmetry::GetProperDataRange(), PRunMuMinus::GetProperFitRange(), PRunAsymmetryRRF::GetProperFitRange(), PRunSingleHistoRRF::GetProperFitRange(), PRunSingleHisto::GetProperFitRange(), PRunAsymmetry::GetProperFitRange(), PRunMuMinus::GetProperT0(), PRunAsymmetryRRF::GetProperT0(), PRunSingleHisto::GetProperT0(), PRunSingleHistoRRF::GetProperT0(), PRunAsymmetry::GetProperT0(), PRunNonMusr::GetXIndex(), PRunNonMusr::GetYIndex(), PRunNonMusr::PrepareData(), PRunSingleHistoRRF::PrepareData(), PRunAsymmetryRRF::PrepareData(), PRunMuMinus::PrepareData(), PRunAsymmetry::PrepareData(), PRunSingleHisto::PrepareData(), PRunSingleHistoRRF::PrepareFitData(), PRunSingleHisto::PrepareFitData(), PRunMuMinus::PrepareRawViewData(), PRunSingleHisto::PrepareRawViewData(), PRunAsymmetry::PrepareRRFViewData(), PRunNonMusr::PrepareViewData(), PRunSingleHistoRRF::PrepareViewData(), PRunAsymmetryRRF::PrepareViewData(), PRunAsymmetry::PrepareViewData(), PRunSingleHisto::PrepareViewData(), PRunAsymmetry::PRunAsymmetry(), PRunAsymmetryRRF::PRunAsymmetryRRF(), PRunBase(), PRunMuMinus::PRunMuMinus(), PRunNonMusr::PRunNonMusr(), PRunSingleHisto::PRunSingleHisto(), PRunAsymmetryRRF::SubtractEstimatedBkg(), PRunAsymmetry::SubtractEstimatedBkg(), PRunAsymmetryRRF::SubtractFixBkg(), and PRunAsymmetry::SubtractFixBkg().

◆ fRunNo

◆ fT0s

PDoubleVector PRunBase::fT0s
protected

◆ fTheory

◆ fTimeResolution

Double_t PRunBase::fTimeResolution
protected

time resolution in (us)

Definition at line 76 of file PRunBase.h.

Referenced by PRunSingleHisto::CalcChiSquare(), PRunSingleHisto::CalcChiSquareExpected(), PRunSingleHisto::CalcMaxLikelihood(), PRunSingleHisto::CalcMaxLikelihoodExpected(), PRunSingleHisto::EstimateBkg(), PRunSingleHistoRRF::EstimateBkg(), PRunSingleHisto::EstimateN0(), PRunSingleHistoRRF::EstimateN0(), PRunSingleHistoRRF::GetMainFrequency(), PRunMuMinus::GetProperDataRange(), PRunSingleHisto::GetProperDataRange(), PRunSingleHistoRRF::GetProperDataRange(), PRunAsymmetryRRF::GetProperDataRange(), PRunAsymmetry::GetProperDataRange(), PRunMuMinus::GetProperFitRange(), PRunSingleHisto::GetProperFitRange(), PRunSingleHistoRRF::GetProperFitRange(), PRunAsymmetryRRF::GetProperFitRange(), PRunAsymmetry::GetProperFitRange(), PRunSingleHistoRRF::PrepareData(), PRunMuMinus::PrepareData(), PRunAsymmetryRRF::PrepareData(), PRunAsymmetry::PrepareData(), PRunSingleHisto::PrepareData(), PRunSingleHistoRRF::PrepareFitData(), PRunMuMinus::PrepareFitData(), PRunAsymmetryRRF::PrepareFitData(), PRunAsymmetry::PrepareFitData(), PRunSingleHisto::PrepareFitData(), PRunMuMinus::PrepareRawViewData(), PRunSingleHisto::PrepareRawViewData(), PRunAsymmetry::PrepareRRFViewData(), PRunAsymmetryRRF::PrepareViewData(), PRunAsymmetry::PrepareViewData(), PRunSingleHisto::PrepareViewData(), PRunBase(), PRunMuMinus::SetFitRangeBin(), PRunSingleHistoRRF::SetFitRangeBin(), PRunSingleHisto::SetFitRangeBin(), PRunAsymmetry::SetFitRangeBin(), PRunAsymmetryRRF::SetFitRangeBin(), PRunAsymmetryRRF::SubtractEstimatedBkg(), and PRunAsymmetry::SubtractEstimatedBkg().

◆ fValid


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