some more work towards DKS/GPU support of musrfit
This commit is contained in:
@@ -31,9 +31,9 @@
|
||||
#define _PFITTERFCNDKS_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <string>
|
||||
#include "Minuit2/FCNBase.h"
|
||||
|
||||
#include "DKSBaseMuSR.h"
|
||||
#include "PRunListCollection.h"
|
||||
|
||||
/**
|
||||
@@ -42,20 +42,29 @@
|
||||
class PFitterFcnDKS : public ROOT::Minuit2::FCNBase
|
||||
{
|
||||
public:
|
||||
PFitterFcnDKS(PRunListCollection *runList, Bool_t useChi2);
|
||||
~PFitterFcnDKS();
|
||||
PFitterFcnDKS(PRunListCollection *runList, const Bool_t useChi2, const UInt_t dksTag, const std::string theo);
|
||||
virtual ~PFitterFcnDKS();
|
||||
|
||||
Double_t Up() const { return fUp; }
|
||||
Double_t operator()(const std::vector<Double_t> &par) const;
|
||||
virtual Bool_t IsValid() { return fValid; }
|
||||
|
||||
UInt_t GetTotalNoOfFittedBins() { return fRunListCollection->GetTotalNoOfBinsFitted(); }
|
||||
UInt_t GetNoOfFittedBins(const UInt_t idx) { return fRunListCollection->GetNoOfBinsFitted(idx); }
|
||||
void CalcExpectedChiSquare(const std::vector<Double_t> &par, Double_t &totalExpectedChisq, std::vector<Double_t> &expectedChisqPerRun);
|
||||
virtual Double_t Up() const { return fUp; }
|
||||
virtual Double_t operator()(const std::vector<Double_t> &par) const;
|
||||
|
||||
virtual UInt_t GetTotalNoOfFittedBins() { return fRunListCollection->GetTotalNoOfBinsFitted(); }
|
||||
virtual UInt_t GetNoOfFittedBins(const UInt_t idx) { return fRunListCollection->GetNoOfBinsFitted(idx); }
|
||||
virtual void CalcExpectedChiSquare(const std::vector<Double_t> &par, Double_t &totalExpectedChisq, std::vector<Double_t> &expectedChisqPerRun);
|
||||
|
||||
private:
|
||||
Bool_t fValid; ///< flag needed to ensure a valid state
|
||||
std::string fTheoStr; ///< theory string for DKS compilation
|
||||
Double_t fUp; ///< for chisq == 1.0, i.e. errors are 1 std. deviation errors. for log max-likelihood == 0.5, i.e. errors are 1 std. deviation errors (for details see the minuit2 user manual).
|
||||
Bool_t fUseChi2; ///< true = chisq fit, false = log max-likelihood fit
|
||||
PRunListCollection *fRunListCollection; ///< pre-processed data to be fitted
|
||||
|
||||
mutable DKSBaseMuSR fDKS;
|
||||
|
||||
virtual void InitDKS(const UInt_t dksTag);
|
||||
virtual void FreeDKS();
|
||||
};
|
||||
|
||||
#endif // _PFITTERFCNDKS_H_
|
||||
|
||||
@@ -112,6 +112,7 @@ class PMsrHandler
|
||||
virtual Double_t GetAlphaEstimateN0();
|
||||
|
||||
virtual std::string GetDKSTheoryString();
|
||||
virtual UInt_t GetDKSTag();
|
||||
|
||||
private:
|
||||
Bool_t fFourierOnly; ///< flag indicating if Fourier transform only is wished. If yes, some part of the msr-file blocks are not needed.
|
||||
|
||||
@@ -148,6 +148,13 @@ typedef struct { char a[7]; } __float128; // needed since cint doesn't know it
|
||||
|
||||
#define RRF_FREQ_UNDEF 1.0e10
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// DKS related tags
|
||||
#define DKS_CPU_OPENMP 0
|
||||
#define DKS_CPU_OPENCL 1
|
||||
#define DKS_GPU_OPENCL 2
|
||||
#define DKS_GPU_CUDA 3
|
||||
|
||||
//-------------------------------------------------------------
|
||||
/**
|
||||
* <p>typedef to make to code more readable. Definition of a bool vector.
|
||||
|
||||
Reference in New Issue
Block a user