First successful compilation of AsymmetryBNMR
This commit is contained in:
parent
4ad524216f
commit
8346e8debb
@ -71,6 +71,7 @@ add_library(PMusr SHARED
|
|||||||
PMusrT0Dict.cxx
|
PMusrT0Dict.cxx
|
||||||
PPrepFourier.cpp
|
PPrepFourier.cpp
|
||||||
PRunAsymmetry.cpp
|
PRunAsymmetry.cpp
|
||||||
|
PRunAsymmetryBNMR.cpp
|
||||||
PRunAsymmetryRRF.cpp
|
PRunAsymmetryRRF.cpp
|
||||||
PRunBase.cpp
|
PRunBase.cpp
|
||||||
PRunDataHandler.cpp
|
PRunDataHandler.cpp
|
||||||
|
122
src/classes/Makefile.am
Normal file
122
src/classes/Makefile.am
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
## Process this file with automake to create Makefile.in
|
||||||
|
|
||||||
|
h_sources = \
|
||||||
|
../include/PFitterFcn.h \
|
||||||
|
../include/PFitter.h \
|
||||||
|
../include/PFourier.h \
|
||||||
|
../include/PFourierCanvas.h \
|
||||||
|
../include/PFunctionGrammar.h \
|
||||||
|
../include/PFunction.h \
|
||||||
|
../include/PFunctionHandler.h \
|
||||||
|
../include/PMsr2Data.h \
|
||||||
|
../include/PMsrHandler.h \
|
||||||
|
../include/PMusrCanvas.h \
|
||||||
|
../include/PMusr.h \
|
||||||
|
../include/PMusrT0.h \
|
||||||
|
../include/PPrepFourier.h \
|
||||||
|
../include/PRunAsymmetry.h \
|
||||||
|
../include/PRunAsymmetryBNMR.h \
|
||||||
|
../include/PRunAsymmetryRRF.h \
|
||||||
|
../include/PRunBase.h \
|
||||||
|
../include/PRunDataHandler.h \
|
||||||
|
../include/PRunListCollection.h \
|
||||||
|
../include/PRunNonMusr.h \
|
||||||
|
../include/PRunMuMinus.h \
|
||||||
|
../include/PRunSingleHisto.h \
|
||||||
|
../include/PRunSingleHistoRRF.h \
|
||||||
|
../include/PStartupHandler.h \
|
||||||
|
../include/PTheory.h
|
||||||
|
|
||||||
|
h_sources_userFcn = \
|
||||||
|
../include/PUserFcnBase.h
|
||||||
|
|
||||||
|
h_linkdef = \
|
||||||
|
../include/PFourierCanvasLinkDef.h \
|
||||||
|
../include/PMusrCanvasLinkDef.h \
|
||||||
|
../include/PMusrT0LinkDef.h \
|
||||||
|
../include/PStartupHandlerLinkDef.h
|
||||||
|
|
||||||
|
h_linkdef_userFcn = \
|
||||||
|
../include/PUserFcnBaseLinkDef.h
|
||||||
|
|
||||||
|
dict_h_sources = \
|
||||||
|
PFourierCanvasDict.h \
|
||||||
|
PMusrCanvasDict.h \
|
||||||
|
PMusrT0Dict.h \
|
||||||
|
PStartupHandlerDict.h
|
||||||
|
|
||||||
|
dict_h_sources_userFcn = \
|
||||||
|
PUserFcnBaseDict.h
|
||||||
|
|
||||||
|
cpp_sources = \
|
||||||
|
PFitter.cpp \
|
||||||
|
PFitterFcn.cpp \
|
||||||
|
PFourier.cpp \
|
||||||
|
PFourierCanvas.cpp \
|
||||||
|
PFunction.cpp \
|
||||||
|
PFunctionHandler.cpp \
|
||||||
|
PMsr2Data.cpp \
|
||||||
|
PMsrHandler.cpp \
|
||||||
|
PMusrCanvas.cpp \
|
||||||
|
PMusr.cpp \
|
||||||
|
PMusrT0.cpp \
|
||||||
|
PPrepFourier.cpp \
|
||||||
|
PRunAsymmetry.cpp \
|
||||||
|
PRunAsymmetryBNMR.cpp \
|
||||||
|
PRunAsymmetryRRF.cpp \
|
||||||
|
PRunBase.cpp \
|
||||||
|
PRunDataHandler.cpp \
|
||||||
|
PRunListCollection.cpp \
|
||||||
|
PRunNonMusr.cpp \
|
||||||
|
PRunMuMinus.cpp \
|
||||||
|
PRunSingleHisto.cpp \
|
||||||
|
PRunSingleHistoRRF.cpp \
|
||||||
|
PStartupHandler.cpp \
|
||||||
|
PTheory.cpp
|
||||||
|
|
||||||
|
cpp_sources_userFcn = \
|
||||||
|
PUserFcnBase.cpp
|
||||||
|
|
||||||
|
dict_cpp_sources = \
|
||||||
|
PFourierCanvasDict.cpp \
|
||||||
|
PMusrCanvasDict.cpp \
|
||||||
|
PMusrT0Dict.cpp \
|
||||||
|
PStartupHandlerDict.cpp
|
||||||
|
|
||||||
|
dict_cpp_sources_userFcn = \
|
||||||
|
PUserFcnBaseDict.cpp
|
||||||
|
|
||||||
|
pcmdir = $(libdir)
|
||||||
|
pcm_DATA = \
|
||||||
|
PFourierCanvasDict_rdict.pcm \
|
||||||
|
PMusrCanvasDict_rdict.pcm \
|
||||||
|
PMusrT0Dict_rdict.pcm \
|
||||||
|
PStartupHandlerDict_rdict.pcm \
|
||||||
|
PUserFcnBaseDict_rdict.pcm
|
||||||
|
|
||||||
|
include_HEADERS = $(h_sources) $(h_sources_userFcn)
|
||||||
|
noinst_HEADERS = $(h_linkdef) $(dict_h_sources) $(h_linkdef_userFcn) $(dict_h_sources_userFcn)
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -I$(top_srcdir)/src/include $(MUSR_ROOT_CFLAGS) $(PSIBIN_CFLAGS) $(MUD_CFLAGS) $(LEM_CFLAGS) $(FFTW3_CFLAGS) $(GSL_CFLAGS) $(BOOST_CFLAGS) -I$(ROOTINCDIR) $(PNEXUS_CXXFLAGS) $(NEXUS_CFLAGS)
|
||||||
|
AM_CXXFLAGS = $(LOCAL_LIB_CXXFLAGS)
|
||||||
|
|
||||||
|
BUILT_SOURCES = $(dict_cpp_sources) $(dict_h_sources) $(dict_cpp_sources_userFcn) $(dict_h_sources_userFcn)
|
||||||
|
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS) -L@ROOTLIBDIR@
|
||||||
|
CLEANFILES = *Dict.cpp *Dict.h *Dict* *~ core
|
||||||
|
|
||||||
|
%Dict.cpp %Dict.h: ../include/%.h ../include/%LinkDef.h
|
||||||
|
@ROOTCLING@ -v -f $*Dict.cpp -c -p $(AM_CPPFLAGS) $^
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = libPUserFcnBase.la libPMusr.la
|
||||||
|
|
||||||
|
libPUserFcnBase_la_SOURCES = $(h_sources_userFcn) $(cpp_sources_userFcn) $(dict_h_sources_userFcn) $(dict_cpp_sources_userFcn)
|
||||||
|
libPUserFcnBase_la_LIBADD = $(ROOT_LIBS)
|
||||||
|
libPUserFcnBase_la_LDFLAGS = -version-info $(MUSR_LIBRARY_VERSION) -release $(MUSR_RELEASE) $(AM_LDFLAGS)
|
||||||
|
|
||||||
|
libPMusr_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
|
||||||
|
libPMusr_la_LIBADD = libPUserFcnBase.la $(MUSR_ROOT_LIBS) $(LEM_LIBS) $(PSIBIN_LIBS) $(MUD_LIBS) $(PNEXUS_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS)
|
||||||
|
libPMusr_la_LDFLAGS = -version-info $(MUSR_LIBRARY_VERSION) -release $(MUSR_RELEASE) $(AM_LDFLAGS)
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = PUserFcnBase.pc PMusr.pc
|
||||||
|
|
1869
src/classes/PRunAsymmetryBNMR.cpp
Normal file
1869
src/classes/PRunAsymmetryBNMR.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -1054,49 +1054,6 @@ PRunData* PRunListCollection::GetAsymmetryRRF(UInt_t index, EDataSwitch tag)
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
// GetAsymmetryBNMR (public)
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>Get a processed asymmetry BNMR data set.
|
|
||||||
*
|
|
||||||
* <b>return:</b>
|
|
||||||
* - pointer to the run data set (processed data) if data set is found
|
|
||||||
* - null pointer otherwise
|
|
||||||
*
|
|
||||||
* \param index msr-file run index
|
|
||||||
* \param tag kIndex -> data at index, kRunNo -> data of given run no
|
|
||||||
*/
|
|
||||||
PRunData* PRunListCollection::GetAsymmetryBNMR(UInt_t index, EDataSwitch tag)
|
|
||||||
{
|
|
||||||
PRunData *data = 0;
|
|
||||||
|
|
||||||
switch (tag) {
|
|
||||||
case kIndex: // called from musrfit when dumping the data
|
|
||||||
if (index > fRunAsymmetryBNMRList.size()) {
|
|
||||||
cerr << endl << ">> PRunListCollection::GetAsymmetryBNMR(): **ERROR** index = " << index << " out of bounds";
|
|
||||||
cerr << endl;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
fRunAsymmetryBNMRList[index]->CalcTheory();
|
|
||||||
data = fRunAsymmetryBNMRList[index]->GetData();
|
|
||||||
break;
|
|
||||||
case kRunNo: // called from PMusrCanvas
|
|
||||||
for (UInt_t i=0; i<fRunAsymmetryBNMRList.size(); i++) {
|
|
||||||
if (fRunAsymmetryBNMRList[i]->GetRunNo() == index) {
|
|
||||||
data = fRunAsymmetryBNMRList[i]->GetData();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default: // error
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// GetMuMinus (public)
|
// GetMuMinus (public)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
89
src/include/PRunAsymmetryBNMR.h
Normal file
89
src/include/PRunAsymmetryBNMR.h
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
|
||||||
|
PRunAsymmetry.h
|
||||||
|
|
||||||
|
Author: Andreas Suter
|
||||||
|
e-mail: andreas.suter@psi.ch
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2007-2016 by Andreas Suter *
|
||||||
|
* andreas.suter@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]);
|
||||||
|
virtual Bool_t PrepareRRFViewData(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 fForward; ///< forward histo data
|
||||||
|
PDoubleVector fForwardErr; ///< forward histo errors
|
||||||
|
PDoubleVector fBackward; ///< backward histo data
|
||||||
|
PDoubleVector fBackwardErr; ///< 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);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _PRUNASYMMETRYBNMR_H_
|
Loading…
x
Reference in New Issue
Block a user