merged root6
This commit is contained in:
@@ -30,9 +30,7 @@
|
||||
#ifndef _PFOURIER_H_
|
||||
#define _PFOURIER_H_
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
#include <vector>
|
||||
|
||||
#ifndef HAVE_DKS
|
||||
#include <vector>
|
||||
@@ -45,6 +43,8 @@
|
||||
|
||||
#include <TH1F.h>
|
||||
|
||||
#include <TH1F.h>
|
||||
|
||||
#include "Minuit2/FCNBase.h"
|
||||
|
||||
#include "PMusr.h"
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
#define PRUN_ASYMMETRY 2
|
||||
#define PRUN_ASYMMETRY_RRF 3
|
||||
#define PRUN_MU_MINUS 4
|
||||
#define PRUN_ASYMMETRY_BNMR 5
|
||||
#define PRUN_NON_MUSR 8
|
||||
|
||||
// muon life time in (us), see PRL99, 032001 (2007)
|
||||
@@ -100,6 +101,7 @@
|
||||
#define MSR_FITTYPE_ASYM 2
|
||||
#define MSR_FITTYPE_ASYM_RRF 3
|
||||
#define MSR_FITTYPE_MU_MINUS 4
|
||||
#define MSR_FITTYPE_BNMR 5
|
||||
#define MSR_FITTYPE_NON_MUSR 8
|
||||
|
||||
//-------------------------------------------------------------
|
||||
@@ -109,6 +111,7 @@
|
||||
#define MSR_PLOT_ASYM 2
|
||||
#define MSR_PLOT_ASYM_RRF 3
|
||||
#define MSR_PLOT_MU_MINUS 4
|
||||
#define MSR_PLOT_BNMR 5
|
||||
#define MSR_PLOT_NON_MUSR 8
|
||||
|
||||
//-------------------------------------------------------------
|
||||
@@ -575,6 +578,7 @@ class PMsrGlobalBlock {
|
||||
virtual Double_t GetFitRange(UInt_t idx);
|
||||
virtual Int_t GetFitRangeOffset(UInt_t idx);
|
||||
virtual Int_t GetPacking() { return fPacking; }
|
||||
virtual Double_t GetEstimatedAlpha() { return fAlpha; }
|
||||
|
||||
virtual void SetGlobalPresent(Bool_t bval) { fGlobalPresent = bval; }
|
||||
virtual void SetRRFFreq(Double_t freq, const char *unit);
|
||||
@@ -603,6 +607,7 @@ class PMsrGlobalBlock {
|
||||
Double_t fFitRange[2]; ///< fit range in (us)
|
||||
Int_t fFitRangeOffset[2]; ///< if fit range is given in bins it can have the form fit fgb+n0 lgb-n1. This variable holds the n0 and n1.
|
||||
Int_t fPacking; ///< packing/rebinning
|
||||
Double_t fAlpha; ///< estimated alpha value from F/B counts
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------
|
||||
@@ -650,6 +655,7 @@ class PMsrRunBlock {
|
||||
virtual Double_t GetFitRange(UInt_t idx);
|
||||
virtual Int_t GetFitRangeOffset(UInt_t idx);
|
||||
virtual Int_t GetPacking() { return fPacking; }
|
||||
virtual Double_t GetEstimatedAlpha() { return fAlpha; }
|
||||
virtual Int_t GetXDataIndex() { return fXYDataIndex[0]; }
|
||||
virtual Int_t GetYDataIndex() { return fXYDataIndex[1]; }
|
||||
virtual TString* GetXDataLabel() { return &fXYDataLabel[0]; }
|
||||
@@ -672,6 +678,7 @@ class PMsrRunBlock {
|
||||
virtual void SetForwardHistoNo(Int_t histoNo, Int_t idx=-1);
|
||||
virtual void SetBackwardHistoNo(Int_t histoNo, Int_t idx=-1);
|
||||
virtual void SetBkgEstimated(Double_t dval, Int_t idx);
|
||||
virtual void SetEstimatedAlpha(Double_t dval);
|
||||
virtual void SetBkgFix(Double_t dval, Int_t idx);
|
||||
virtual void SetBkgRange(Int_t ival, Int_t idx);
|
||||
virtual void SetDataRange(Int_t ival, Int_t idx);
|
||||
@@ -712,6 +719,7 @@ class PMsrRunBlock {
|
||||
Bool_t fFitRangeInBins; ///< flag telling if fit range is given in time or in bins
|
||||
Double_t fFitRange[2]; ///< fit range in (us)
|
||||
Int_t fFitRangeOffset[2]; ///< if fit range is given in bins it can have the form fit fgb+n0 lgb-n1. This variable holds the n0 and n1.
|
||||
Double_t fAlpha; ///< estimated alpha value from F/B counts
|
||||
Int_t fPacking; ///< packing/rebinning
|
||||
Int_t fXYDataIndex[2]; ///< used to get the data indices when using db-files (fit type 8)
|
||||
TString fXYDataLabel[2]; ///< used to get the indices via labels when using db-files (fit type 8)
|
||||
|
||||
@@ -247,7 +247,7 @@ class PMusrCanvas : public TObject, public TQObject
|
||||
Bool_t fDifferenceView; ///< tag showing that the shown data, fourier, are the difference between data and theory
|
||||
Int_t fCurrentPlotView; ///< tag showing what the current plot view is: data, fourier, ...
|
||||
Int_t fPreviousPlotView; ///< tag showing the previous plot view
|
||||
Int_t fPlotType; ///< plot type tag: -1 == undefined, MSR_PLOT_SINGLE_HISTO == single histogram, MSR_PLOT_ASYM == asymmetry, MSR_PLOT_MU_MINUS == mu minus (not yet implemented), MSR_PLOT_NON_MUSR == non-muSR
|
||||
Int_t fPlotType; ///< plot type tag: -1 == undefined, MSR_PLOT_SINGLE_HISTO == single histogram, MSR_PLOT_ASYM == asymmetry, MSR_PLOT_BNMR == beta-NMR asymmetry, MSR_PLOT_MU_MINUS == mu minus (not yet implemented), MSR_PLOT_NON_MUSR == non-muSR
|
||||
Int_t fPlotNumber; ///< plot number
|
||||
|
||||
Bool_t fXRangePresent, fYRangePresent; ///< flag indicating if x-/y-range is present
|
||||
|
||||
94
src/include/PRunAsymmetryBNMR.h
Normal file
94
src/include/PRunAsymmetryBNMR.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/***************************************************************************
|
||||
|
||||
PRunAsymmetryBNMR.h
|
||||
|
||||
Author: Zaher Salman
|
||||
Based on PRunAsymmetry.h by Andreas Suter
|
||||
e-mail: zaher.salman@psi.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2018-2019 by Zaher Salman *
|
||||
* zaher.salman@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _PRUNASYMMETRYBNMR_H_
|
||||
#define _PRUNASYMMETRYBNMR_H_
|
||||
|
||||
#include "PRunBase.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class handling the asymmetry fit.
|
||||
*/
|
||||
class PRunAsymmetryBNMR : public PRunBase
|
||||
{
|
||||
public:
|
||||
PRunAsymmetryBNMR();
|
||||
PRunAsymmetryBNMR(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag);
|
||||
virtual ~PRunAsymmetryBNMR();
|
||||
|
||||
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 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();
|
||||
virtual Bool_t PrepareFitData();
|
||||
virtual Bool_t PrepareViewData(PRawRunData* runData, UInt_t histoNo[2]);
|
||||
|
||||
private:
|
||||
UInt_t fAlphaBetaTag; ///< \f$ 1 \to \alpha = \beta = 1\f$; \f$ 2 \to \alpha \neq 1, \beta = 1\f$; \f$ 3 \to \alpha = 1, \beta \neq 1\f$; \f$ 4 \to \alpha \neq 1, \beta \neq 1\f$.
|
||||
UInt_t fNoOfFitBins; ///< number of bins to be be fitted
|
||||
Int_t fPacking; ///< packing for this particular run. Either given in the RUN- or GLOBAL-block.
|
||||
|
||||
PDoubleVector fForwardp; ///< pos hel forward histo data
|
||||
PDoubleVector fForwardpErr; ///< pos hel forward histo errors
|
||||
PDoubleVector fBackwardp; ///< pos hel backward histo data
|
||||
PDoubleVector fBackwardpErr; ///< pos hel backward histo errors
|
||||
PDoubleVector fForwardm; ///< neg hel forward histo data
|
||||
PDoubleVector fForwardmErr; ///< neg hel forward histo errors
|
||||
PDoubleVector fBackwardm; ///< neg hel backward histo data
|
||||
PDoubleVector fBackwardmErr; ///< neg hel backward histo errors
|
||||
|
||||
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();
|
||||
|
||||
virtual Bool_t GetProperT0(PRawRunData* runData, PMsrGlobalBlock *globalBlock, PUIntVector &forwardHisto, PUIntVector &backwardHistoNo);
|
||||
virtual Bool_t GetProperDataRange(PRawRunData* runData, UInt_t histoNo[2]);
|
||||
virtual void GetProperFitRange(PMsrGlobalBlock *globalBlock);
|
||||
virtual Double_t EstimateAlpha();
|
||||
};
|
||||
|
||||
#endif // _PRUNASYMMETRYBNMR_H_
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "PRunSingleHistoRRF.h"
|
||||
#include "PRunAsymmetry.h"
|
||||
#include "PRunAsymmetryRRF.h"
|
||||
#include "PRunAsymmetryBNMR.h"
|
||||
#include "PRunMuMinus.h"
|
||||
#include "PRunNonMusr.h"
|
||||
|
||||
@@ -81,6 +82,7 @@ class PRunListCollection
|
||||
virtual Double_t GetSingleHistoRRFChisq(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryChisq(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryRRFChisq(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryBNMRChisq(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetMuMinusChisq(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetNonMusrChisq(const std::vector<Double_t>& par) const;
|
||||
|
||||
@@ -91,6 +93,7 @@ class PRunListCollection
|
||||
virtual Double_t GetSingleHistoRRFMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryRRFMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetAsymmetryBNMRMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetMuMinusMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
virtual Double_t GetNonMusrMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||
|
||||
@@ -104,6 +107,7 @@ class PRunListCollection
|
||||
virtual UInt_t GetNoOfSingleHistoRRF() const { return fRunSingleHistoRRFList.size(); } ///< returns the number of single histogram RRF data sets present in the msr-file
|
||||
virtual UInt_t GetNoOfAsymmetry() const { return fRunAsymmetryList.size(); } ///< returns the number of asymmetry data sets present in the msr-file
|
||||
virtual UInt_t GetNoOfAsymmetryRRF() const { return fRunAsymmetryRRFList.size(); } ///< returns the number of asymmetry RRF data sets present in the msr-file
|
||||
virtual UInt_t GetNoOfAsymmetryBNMR() const { return fRunAsymmetryBNMRList.size(); } ///< returns the number of asymmetry BNMR data sets present in the msr-file
|
||||
virtual UInt_t GetNoOfMuMinus() const { return fRunMuMinusList.size(); } ///< returns the number of mu minus data sets present in the msr-file
|
||||
virtual UInt_t GetNoOfNonMusr() const { return fRunNonMusrList.size(); } ///< returns the number of non-muSR data sets present in the msr-file
|
||||
|
||||
@@ -111,6 +115,7 @@ class PRunListCollection
|
||||
virtual PRunData* GetSingleHistoRRF(UInt_t index, EDataSwitch tag=kIndex);
|
||||
virtual PRunData* GetAsymmetry(UInt_t index, EDataSwitch tag=kIndex);
|
||||
virtual PRunData* GetAsymmetryRRF(UInt_t index, EDataSwitch tag=kIndex);
|
||||
virtual PRunData* GetAsymmetryBNMR(UInt_t index, EDataSwitch tag=kIndex);
|
||||
virtual PRunData* GetMuMinus(UInt_t index, EDataSwitch tag=kIndex);
|
||||
virtual PRunData* GetNonMusr(UInt_t index, EDataSwitch tag=kIndex);
|
||||
|
||||
@@ -138,6 +143,7 @@ class PRunListCollection
|
||||
std::vector<PRunSingleHistoRRF*> fRunSingleHistoRRFList; ///< stores all processed single histogram RRF data
|
||||
std::vector<PRunAsymmetry*> fRunAsymmetryList; ///< stores all processed asymmetry data
|
||||
std::vector<PRunAsymmetryRRF*> fRunAsymmetryRRFList; ///< stores all processed asymmetry RRF data
|
||||
std::vector<PRunAsymmetryBNMR*> fRunAsymmetryBNMRList; ///< stores all processed asymmetry BNMR data
|
||||
std::vector<PRunMuMinus*> fRunMuMinusList; ///< stores all processed mu-minus data
|
||||
std::vector<PRunNonMusr*> fRunNonMusrList; ///< stores all processed non-muSR data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user