PSIBIN-changes...

This commit is contained in:
Bastian M. Wojek
2009-09-20 11:35:01 +00:00
parent c907db6273
commit e3ac790371
11 changed files with 123 additions and 23 deletions

View File

@ -1 +1 @@
SUBDIRS = TLemRunHeader
SUBDIRS = TLemRunHeader MuSR_software

View File

@ -0,0 +1,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: Class_MuSR_PSI
Description: C++ shared library providing the MuSR_td_PSI_bin class
Version: @PSIBIN_VERSION@
Libs: -L${libdir} -l@PSIBIN_LIBRARY_NAME@
Cflags: -I${includedir}

View File

@ -0,0 +1,22 @@
## Process this file with automake to create Makefile.in
h_sources = MuSR_td_PSI_bin.h tydefs.h
cpp_sources = MuSR_td_PSI_bin.cpp
include_HEADERS = MuSR_td_PSI_bin.h
noinst_HEADERS = tydefs.h
INCLUDES = -I.
AM_CXXFLAGS = $(LOCAL_PSIBIN_LIB_CXXFLAGS)
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS)
CLEANFILES = *~ core
lib_LTLIBRARIES = libClass_MuSR_PSI.la
libClass_MuSR_PSI_la_SOURCES = $(h_sources) $(cpp_sources)
libClass_MuSR_PSI_la_LDFLAGS = $(AM_LDFLAGS)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = Class_MuSR_PSI.pc

View File

@ -0,0 +1 @@
SUBDIRS = Class_MuSR_PSI

View File

@ -199,12 +199,13 @@ TLondon1DHS::TLondon1DHS() : fCalcNeeded(true), fFirstCall(true) {
double TLondon1DHS::operator()(double t, const vector<double> &par) const {
assert(par.size() == 5);
assert(par.size() == 5 || par.size() == 6);
if(t<0.0)
return cos(par[0]*0.017453293);
bool dead_layer_changed(false);
bool width_changed(false);
// check if the function is called the first time and if yes, read in parameters
@ -221,7 +222,8 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
}
fFirstCall = false;
dead_layer_changed = true;
// cout << this << endl;
if(par.size() == 6)
width_changed = true;
}
// check if any parameter has changed
@ -239,6 +241,8 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
only_phase_changed = false;
if (i == 3) {
dead_layer_changed = true;
} else if (i == 5) {
width_changed = true;
}
}
}
@ -260,6 +264,10 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
for (unsigned int i(2); i<fPar.size(); i++)
fParForBofZ[i-2] = par[i];
if(width_changed) { // Convolution of the implantation profile with Gaussian
fImpProfile->ConvolveGss(par[5], par[1]);
}
fParForPofB[2] = par[1]; // energy
fParForPofB[3] = par[2]; // Bkg-Field
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)

View File

@ -93,12 +93,16 @@ GLIBS = $(ROOTGLIBS)
GSLLIB = -lgslcblas -lgsl
# Cuba lib
CUBALIB = -L/usr/local/lib -lcuba -lm
# PMusr lib
PMUSRLIB = -L$(ROOTSYS)/lib -lPMusr
ifeq ($(OS),WIN32GCC)
# GSL lib
GSLLIB = -L/usr/lib -lgslcblas -lgsl
# Cuba lib
CUBALIB = -L/usr/local/lib -lcuba -lm
# PMusr lib
PMUSRLIB = -L$(ROOTSYS)/lib -lPMusr -lMathMore
endif
ifeq ($(OS),DARWIN)
@ -106,6 +110,8 @@ ifeq ($(OS),DARWIN)
GSLLIB = -L/sw/lib -lgslcblas -lgsl
# Cuba lib
CUBALIB = -L/sw/lib -lcuba -lm
# PMusr lib
PMUSRLIB = -L$(ROOTSYS)/lib -lPMusr -lMathMore
endif
# some definitions: headers (used to generate *Dict* stuff), sources, objects,...
@ -120,7 +126,7 @@ all: $(SHLIB)
$(SHLIB): $(OBJS)
@echo "---> Building shared library $(SHLIB) ..."
/bin/rm -f $(SHLIB)
$(LD) $(SOFLAGS) -o $(SHLIB) $(OBJS) $(LDFLAGS) $(LIBS) $(GSLLIB) $(CUBALIB)
$(LD) $(SOFLAGS) $(LDFLAGS) -o $(SHLIB) $(OBJS) $(LIBS) $(PMUSRLIB) $(GSLLIB) $(CUBALIB)
@echo "done"
# clean up: remove all object file (and core files)
@ -138,7 +144,7 @@ $(OBJS): %.o: %.cpp
TGapIntegralsDict.cpp: ./TIntegrator.h ./TGapIntegrals.h ./TGapIntegralsLinkDef.h
@echo "Generating dictionary $@..."
rootcint -f $@ -c -p -I$(PMUSRPATH) $^
rootcint -f $@ -c -p $^
install: all
@echo "Installing shared lib: $(SHLIB)"

View File

@ -1,6 +1,6 @@
/***************************************************************************
TIntegrator.h
TIntegrator.cpp
Author: Bastian M. Wojek
e-mail: bastian.wojek@psi.ch

View File

@ -7,16 +7,16 @@ ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags)
#---------------------------------------------------
OS = LINUX
CXX = g++
CXXFLAGS = -g -Wall -Wno-trigraphs -fPIC
CXX = g++-4.4.0
CXXFLAGS = -O3 -Wall -Wno-trigraphs -fPIC
MUSRFITINCLUDE = ../../include
#MUSRFITINCLUDE = /home/l_wojek/rep/analysis/musrfit/src/include
LOCALINCLUDE = .
ROOTINCLUDE = $(ROOTSYS)/include/root
ROOTINCLUDE = $(ROOTSYS)/include
INCLUDES = -I$(LOCALINCLUDE) -I$(MUSRFITINCLUDE) -I$(ROOTINCLUDE)
LD = g++
LDFLAGS = -g
SOFLAGS = -O -shared
LD = g++-4.4.0
LDFLAGS = -O3
SOFLAGS = -shared
# the output from the root-config script:
CXXFLAGS += $(ROOTCFLAGS)

View File

@ -90,4 +90,21 @@ inline double TIntSinGss::FuncAtX(double x) const
return TMath::Sin(TMath::TwoPi()*fPar[0]*x) * TMath::Exp(-0.5*fPar[1]*fPar[1]*x*x);
}
// To be integrated: df/dE * E / sqrt(E^2+ Delta^2)
class TGapIntegral : public TIntegrator {
public:
TGapIntegral() {}
~TGapIntegral() {}
double FuncAtX(double) const; // parameter: E
};
inline double TGapIntegral::FuncAtX(double e) const
{
double kt(0.08617384436*fPar[0]); // kB in meV/K
double expekt(TMath::Exp(e/kt));
return -expekt*e/(kt*(1.0+expekt)*TMath::Sqrt(e*e+fPar[1]*fPar[1]));
}
#endif //_TIntegrator_H_

View File

@ -18,11 +18,18 @@
using namespace std;
#include <gsl/gsl_math.h>
#include <gsl/gsl_sf_exp.h>
#include <gsl/gsl_sf_log.h>
#include <gsl/gsl_sf_trig.h>
#include <gsl/gsl_sf_bessel.h>
//#include <gsl/gsl_math.h>
//#include <gsl/gsl_sf_exp.h>
//#include <gsl/gsl_sf_log.h>
//#include <gsl/gsl_sf_trig.h>
//#include <gsl/gsl_sf_bessel.h>
#include "/usr/include/gsl/gsl_math.h"
#include "/usr/include/gsl/gsl_sf_exp.h"
#include "/usr/include/gsl/gsl_sf_log.h"
#include "/usr/include/gsl/gsl_sf_trig.h"
#include "/usr/include/gsl/gsl_sf_bessel.h"
//#include "TMath.h"
#include "PUserFcnBase.h"