TLondon1D now derives from PUserFcnBase
This commit is contained in:
parent
cc8d9981c3
commit
660cf9e014
@ -8,9 +8,11 @@ ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags)
|
|||||||
|
|
||||||
CXX = g++
|
CXX = g++
|
||||||
CXXFLAGS = -g -Wall -Wno-trigraphs -fPIC
|
CXXFLAGS = -g -Wall -Wno-trigraphs -fPIC
|
||||||
|
MUSRFITINCLUDE = ../../../include
|
||||||
|
#MUSRFITINCLUDE = /home/l_wojek/rep/analysis/musrfit/src/include
|
||||||
LOCALINCLUDE = ../include
|
LOCALINCLUDE = ../include
|
||||||
ROOTINCLUDE = $(ROOTSYS)/include
|
ROOTINCLUDE = $(ROOTSYS)/include
|
||||||
INCLUDES = -I$(LOCALINCLUDE) -I$(ROOTINCLUDE)
|
INCLUDES = -I$(LOCALINCLUDE) -I$(MUSRFITINCLUDE) -I$(ROOTINCLUDE)
|
||||||
LD = g++
|
LD = g++
|
||||||
LDFLAGS = -g
|
LDFLAGS = -g
|
||||||
SOFLAGS = -O -shared
|
SOFLAGS = -O -shared
|
||||||
@ -55,7 +57,7 @@ $(OBJS): %.o: %.cpp
|
|||||||
|
|
||||||
TLondon1DDict.cpp: ../include/TLondon1D.h ../include/TLondon1DLinkDef.h
|
TLondon1DDict.cpp: ../include/TLondon1D.h ../include/TLondon1DLinkDef.h
|
||||||
@echo "Generating dictionary $@..."
|
@echo "Generating dictionary $@..."
|
||||||
rootcint -f $@ -c -p $^
|
rootcint -f $@ -c -p -I$(MUSRFITINCLUDE) $^
|
||||||
|
|
||||||
TFitPofBStartupHandlerDict.cpp: ../include/TFitPofBStartupHandler.h ../include/TFitPofBStartupHandlerLinkDef.h
|
TFitPofBStartupHandlerDict.cpp: ../include/TFitPofBStartupHandler.h ../include/TFitPofBStartupHandlerLinkDef.h
|
||||||
@echo "Generating dictionary $@..."
|
@echo "Generating dictionary $@..."
|
||||||
|
50
src/external/TFitPofB-lib/classes/TLondon1D.cpp
vendored
50
src/external/TFitPofB-lib/classes/TLondon1D.cpp
vendored
@ -5,7 +5,7 @@
|
|||||||
Author: Bastian M. Wojek
|
Author: Bastian M. Wojek
|
||||||
e-mail: bastian.wojek@psi.ch
|
e-mail: bastian.wojek@psi.ch
|
||||||
|
|
||||||
2008/06/03
|
2008/06/06
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
@ -41,12 +41,14 @@ TLondon1D::~TLondon1D() {
|
|||||||
// creates (a pointer to) the TPofTCalc object (with the FFT plan)
|
// creates (a pointer to) the TPofTCalc object (with the FFT plan)
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
TLondon1D1L::TLondon1D1L(const vector<unsigned int> &parNo, const vector<double> &par) {
|
TLondon1D1L::TLondon1D1L(const vector<double> &par) {
|
||||||
|
|
||||||
// extract function parameters
|
// extract function parameters
|
||||||
for(unsigned int i(0); i<parNo.size(); i++) {
|
// for(unsigned int i(0); i<parNo.size(); i++) {
|
||||||
fPar.push_back(par[parNo[i]-1]);
|
// fPar.push_back(par[parNo[i]-1]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
fPar = par;
|
||||||
|
|
||||||
// read startup file
|
// read startup file
|
||||||
string startup_path_name("TFitPofB_startup.xml");
|
string startup_path_name("TFitPofB_startup.xml");
|
||||||
@ -104,7 +106,7 @@ TLondon1D1L::TLondon1D1L(const vector<unsigned int> &parNo, const vector<double>
|
|||||||
// Parameters: all the parameters for the function to be fitted through TLondon1D1L
|
// Parameters: all the parameters for the function to be fitted through TLondon1D1L
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
double TLondon1D1L::Eval(double t, const vector<double> &par) const {
|
double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
||||||
|
|
||||||
// check if any parameter has changed
|
// check if any parameter has changed
|
||||||
|
|
||||||
@ -163,12 +165,14 @@ double TLondon1D1L::Eval(double t, const vector<double> &par) const {
|
|||||||
// creates (a pointer to) the TPofTCalc object (with the FFT plan)
|
// creates (a pointer to) the TPofTCalc object (with the FFT plan)
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
TLondon1D2L::TLondon1D2L(const vector<unsigned int> &parNo, const vector<double> &par) : fLastTwoChanged(true) {
|
TLondon1D2L::TLondon1D2L(const vector<double> &par) : fLastTwoChanged(true) {
|
||||||
|
|
||||||
// extract function parameters
|
// extract function parameters
|
||||||
for(unsigned int i(0); i<parNo.size(); i++) {
|
// for(unsigned int i(0); i<parNo.size(); i++) {
|
||||||
fPar.push_back(par[parNo[i]-1]);
|
// fPar.push_back(par[parNo[i]-1]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
fPar = par;
|
||||||
|
|
||||||
// read startup file
|
// read startup file
|
||||||
string startup_path_name("TFitPofB_startup.xml");
|
string startup_path_name("TFitPofB_startup.xml");
|
||||||
@ -225,7 +229,7 @@ TLondon1D2L::TLondon1D2L(const vector<unsigned int> &parNo, const vector<double>
|
|||||||
// Parameters: all the parameters for the function to be fitted through TLondon1D2L
|
// Parameters: all the parameters for the function to be fitted through TLondon1D2L
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
double TLondon1D2L::Eval(double t, const vector<double> &par) const {
|
double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
||||||
|
|
||||||
// check if any parameter has changed
|
// check if any parameter has changed
|
||||||
|
|
||||||
@ -299,12 +303,14 @@ double TLondon1D2L::Eval(double t, const vector<double> &par) const {
|
|||||||
// creates (a pointer to) the TPofTCalc object (with the FFT plan)
|
// creates (a pointer to) the TPofTCalc object (with the FFT plan)
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
TLondon1D3L::TLondon1D3L(const vector<unsigned int> &parNo, const vector<double> &par) : fLastThreeChanged(true) {
|
TLondon1D3L::TLondon1D3L(const vector<double> &par) : fLastThreeChanged(true) {
|
||||||
|
|
||||||
// extract function parameters
|
// extract function parameters
|
||||||
for(unsigned int i(0); i<parNo.size(); i++) {
|
// for(unsigned int i(0); i<parNo.size(); i++) {
|
||||||
fPar.push_back(par[parNo[i]-1]);
|
// fPar.push_back(par[parNo[i]-1]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
fPar = par;
|
||||||
|
|
||||||
// read startup file
|
// read startup file
|
||||||
string startup_path_name("TFitPofB_startup.xml");
|
string startup_path_name("TFitPofB_startup.xml");
|
||||||
@ -362,7 +368,7 @@ TLondon1D3L::TLondon1D3L(const vector<unsigned int> &parNo, const vector<double>
|
|||||||
// Parameters: all the parameters for the function to be fitted through TLondon1D3L
|
// Parameters: all the parameters for the function to be fitted through TLondon1D3L
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
double TLondon1D3L::Eval(double t, const vector<double> &par) const {
|
double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
||||||
|
|
||||||
// check if any parameter has changed
|
// check if any parameter has changed
|
||||||
|
|
||||||
@ -451,12 +457,14 @@ double TLondon1D3L::Eval(double t, const vector<double> &par) const {
|
|||||||
// creates (a pointer to) the TPofTCalc object (with the FFT plan)
|
// creates (a pointer to) the TPofTCalc object (with the FFT plan)
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
TLondon1D3LS::TLondon1D3LS(const vector<unsigned int> &parNo, const vector<double> &par) : fLastThreeChanged(true) {
|
TLondon1D3LS::TLondon1D3LS(const vector<double> &par) : fLastThreeChanged(true) {
|
||||||
|
|
||||||
// extract function parameters
|
// extract function parameters
|
||||||
for(unsigned int i(0); i<parNo.size(); i++) {
|
// for(unsigned int i(0); i<parNo.size(); i++) {
|
||||||
fPar.push_back(par[parNo[i]-1]);
|
// fPar.push_back(par[parNo[i]-1]);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
fPar = par;
|
||||||
|
|
||||||
// read startup file
|
// read startup file
|
||||||
string startup_path_name("TFitPofB_startup.xml");
|
string startup_path_name("TFitPofB_startup.xml");
|
||||||
@ -514,7 +522,7 @@ TLondon1D3LS::TLondon1D3LS(const vector<unsigned int> &parNo, const vector<doubl
|
|||||||
// Parameters: all the parameters for the function to be fitted through TLondon1D3LS
|
// Parameters: all the parameters for the function to be fitted through TLondon1D3LS
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
double TLondon1D3LS::Eval(double t, const vector<double> &par) const {
|
double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
||||||
|
|
||||||
// check if any parameter has changed
|
// check if any parameter has changed
|
||||||
|
|
||||||
|
24
src/external/TFitPofB-lib/include/TLondon1D.h
vendored
24
src/external/TFitPofB-lib/include/TLondon1D.h
vendored
@ -5,24 +5,24 @@
|
|||||||
Author: Bastian M. Wojek
|
Author: Bastian M. Wojek
|
||||||
e-mail: bastian.wojek@psi.ch
|
e-mail: bastian.wojek@psi.ch
|
||||||
|
|
||||||
2008/06/03
|
2008/06/06
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef _TLondon1D_H_
|
#ifndef _TLondon1D_H_
|
||||||
#define _TLondon1D_H_
|
#define _TLondon1D_H_
|
||||||
|
|
||||||
#include "TObject.h"
|
#include "PUserFcnBase.h"
|
||||||
#include "TPofTCalc.h"
|
#include "TPofTCalc.h"
|
||||||
|
|
||||||
class TLondon1D : public TObject {
|
class TLondon1D : public PUserFcnBase {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE!
|
// default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE!
|
||||||
TLondon1D() : fCalcNeeded(true) {}
|
TLondon1D() : fCalcNeeded(true) {}
|
||||||
virtual ~TLondon1D();
|
virtual ~TLondon1D();
|
||||||
|
|
||||||
virtual double Eval(double, const vector<double>&) const = 0;
|
virtual double operator()(double, const vector<double>&) const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
mutable vector<double> fPar;
|
mutable vector<double> fPar;
|
||||||
@ -43,10 +43,10 @@ class TLondon1D1L : public TLondon1D {
|
|||||||
public:
|
public:
|
||||||
// default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE!
|
// default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE!
|
||||||
TLondon1D1L() {}
|
TLondon1D1L() {}
|
||||||
TLondon1D1L(const vector<unsigned int>& , const vector<double>&);
|
TLondon1D1L(const vector<double>&);
|
||||||
~TLondon1D1L() {}
|
~TLondon1D1L() {}
|
||||||
|
|
||||||
double Eval(double, const vector<double>&) const;
|
double operator()(double, const vector<double>&) const;
|
||||||
|
|
||||||
ClassDef(TLondon1D1L,1)
|
ClassDef(TLondon1D1L,1)
|
||||||
};
|
};
|
||||||
@ -56,10 +56,10 @@ class TLondon1D2L : public TLondon1D {
|
|||||||
public:
|
public:
|
||||||
// default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE!
|
// default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE!
|
||||||
TLondon1D2L() : fLastTwoChanged(true) {}
|
TLondon1D2L() : fLastTwoChanged(true) {}
|
||||||
TLondon1D2L(const vector<unsigned int>& , const vector<double>&);
|
TLondon1D2L(const vector<double>&);
|
||||||
~TLondon1D2L() {}
|
~TLondon1D2L() {}
|
||||||
|
|
||||||
double Eval(double, const vector<double>&) const;
|
double operator()(double, const vector<double>&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable bool fLastTwoChanged;
|
mutable bool fLastTwoChanged;
|
||||||
@ -72,10 +72,10 @@ class TLondon1D3L : public TLondon1D {
|
|||||||
public:
|
public:
|
||||||
// default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE!
|
// default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE!
|
||||||
TLondon1D3L() : fLastThreeChanged(true) {}
|
TLondon1D3L() : fLastThreeChanged(true) {}
|
||||||
TLondon1D3L(const vector<unsigned int>& , const vector<double>&);
|
TLondon1D3L(const vector<double>&);
|
||||||
~TLondon1D3L() {}
|
~TLondon1D3L() {}
|
||||||
|
|
||||||
double Eval(double, const vector<double>&) const;
|
double operator()(double, const vector<double>&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable bool fLastThreeChanged;
|
mutable bool fLastThreeChanged;
|
||||||
@ -89,10 +89,10 @@ class TLondon1D3LS : public TLondon1D {
|
|||||||
public:
|
public:
|
||||||
// default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE!
|
// default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE!
|
||||||
TLondon1D3LS() : fLastThreeChanged(true) {}
|
TLondon1D3LS() : fLastThreeChanged(true) {}
|
||||||
TLondon1D3LS(const vector<unsigned int>& , const vector<double>&);
|
TLondon1D3LS(const vector<double>&);
|
||||||
~TLondon1D3LS() {}
|
~TLondon1D3LS() {}
|
||||||
|
|
||||||
double Eval(double, const vector<double>&) const;
|
double operator()(double, const vector<double>&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable bool fLastThreeChanged;
|
mutable bool fLastThreeChanged;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user