added DKS asymmetry fit support
This commit is contained in:
@@ -36,6 +36,11 @@
|
||||
#include "DKSBaseMuSR.h"
|
||||
#include "PRunListCollection.h"
|
||||
|
||||
#define FITTYPE_UNDEFINED 0
|
||||
#define FITTYPE_SINGLE_HISTO 1
|
||||
#define FITTYPE_ASYMMETRY 2
|
||||
#define FITTYPE_MU_MINUS 3
|
||||
|
||||
typedef struct {
|
||||
UInt_t fN0; ///< N0 parameter index
|
||||
UInt_t fNbkg; ///< Nbkg parameter index
|
||||
@@ -68,7 +73,9 @@ class PFitterFcnDKS : public ROOT::Minuit2::FCNBase
|
||||
|
||||
mutable DKSBaseMuSR fDKS;
|
||||
|
||||
vector<void *> fMemData; ///< vector holding the initial addresses of the data sets on the GPU
|
||||
vector<void *> fMemDataSingleHisto; ///< vector holding the initial addresses of the single histo data sets on the GPU
|
||||
vector<void *> fMemDataAsymmetry; ///< vector holding the initial addresses of the asymmetry data sets on the GPU
|
||||
vector<void *> fMemDataAsymmetryErr; ///< vector holding the initial addresses of the asymmetry error sets on the GPU
|
||||
vector<PNidx> fNidx; ///< N0 / Nbkg parameter index vector
|
||||
|
||||
virtual void InitDKS(const UInt_t dksTag);
|
||||
|
||||
@@ -52,6 +52,10 @@ class PRunAsymmetry : public PRunBase
|
||||
|
||||
virtual void SetFitRangeBin(const TString fitRange);
|
||||
|
||||
virtual Int_t GetStartTimeBin() { return fStartTimeBin; }
|
||||
virtual Int_t GetEndTimeBin() { return fEndTimeBin; }
|
||||
virtual Int_t GetPacking() { return fPacking; }
|
||||
|
||||
protected:
|
||||
virtual void CalcNoOfFitBins();
|
||||
virtual Bool_t PrepareData();
|
||||
@@ -71,6 +75,9 @@ class PRunAsymmetry : public PRunBase
|
||||
|
||||
Int_t fGoodBins[4]; ///< keep first/last good bins. 0=fgb, 1=lgb (forward); 2=fgb, 3=lgb (backward)
|
||||
|
||||
Int_t fStartTimeBin; ///< bin at which the fit starts
|
||||
Int_t fEndTimeBin; ///< bin at which the fit ends
|
||||
|
||||
Bool_t SubtractFixBkg();
|
||||
Bool_t SubtractEstimatedBkg();
|
||||
|
||||
|
||||
@@ -52,12 +52,14 @@ typedef struct {
|
||||
Double_t fN0;
|
||||
Double_t fNbkg;
|
||||
Double_t fTau;
|
||||
Double_t fAlpha;
|
||||
Double_t fBeta;
|
||||
Double_t fPackedTimeResolution;
|
||||
Double_t fStartTime;
|
||||
Int_t fNoOfFitBins;
|
||||
PDoubleVector fFun;
|
||||
PIntVector fMap;
|
||||
} PSingleHistoParams;
|
||||
} PDKSParams;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
@@ -120,9 +122,10 @@ class PRunListCollection
|
||||
virtual Int_t GetNoOfParameters() { return fMsrInfo->GetNoOfParams(); }
|
||||
virtual Int_t GetNoOfFunctions() { return fMsrInfo->GetNoOfFuncs(); }
|
||||
virtual Int_t GetNoOfMaps() { return fMsrInfo->GetNoOfMaps(); }
|
||||
virtual Int_t GetStartTimeBin(UInt_t idx);
|
||||
virtual Int_t GetEndTimeBin(UInt_t idx);
|
||||
virtual Int_t GetSingleHistoParams(UInt_t idx, const std::vector<Double_t>& par, PSingleHistoParams &shp);
|
||||
virtual Int_t GetStartTimeBin(Int_t fitType, UInt_t idx);
|
||||
virtual Int_t GetEndTimeBin(Int_t fitType, UInt_t idx);
|
||||
virtual Int_t GetSingleHistoParams(UInt_t idx, const std::vector<Double_t>& par, PDKSParams &dksp);
|
||||
virtual Int_t GetAsymmetryParams(UInt_t idx, const std::vector<Double_t>& par, PDKSParams &dksp);
|
||||
|
||||
private:
|
||||
PMsrHandler *fMsrInfo; ///< pointer to the msr-file handler
|
||||
@@ -135,7 +138,7 @@ class PRunListCollection
|
||||
vector<PRunMuMinus*> fRunMuMinusList; ///< stores all processed mu-minus data
|
||||
vector<PRunNonMusr*> fRunNonMusrList; ///< stores all processed non-muSR data
|
||||
|
||||
virtual void InitSingleHistoParams(PSingleHistoParams ¶m);
|
||||
virtual void InitDKSParams(PDKSParams ¶m);
|
||||
virtual Double_t GetBackground(Int_t idx);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user