added DKS asymmetry fit support

This commit is contained in:
2016-04-15 16:47:40 +02:00
parent 27eb664686
commit aedacbcd34
7 changed files with 249 additions and 82 deletions

View File

@@ -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);

View File

@@ -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();

View File

@@ -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 &param);
virtual void InitDKSParams(PDKSParams &param);
virtual Double_t GetBackground(Int_t idx);
};