diff --git a/src/classes/PMsr2Data.cpp b/src/classes/PMsr2Data.cpp index 9679114c..00797ea7 100644 --- a/src/classes/PMsr2Data.cpp +++ b/src/classes/PMsr2Data.cpp @@ -1959,7 +1959,7 @@ int PMsr2Data::WriteOutput(const string &outfile, bool db, unsigned int withHead outFile.seekg(-i, ios::end); getline(outFile, s); trim(s); // remove whitespace - if (s.empty() || (s == "\n")) { // (s == "\n") check is for M$-systems using "\r\n" linebreaks + if (s.empty()) { // trim cuts off also characters like '\n', therefore this should work also with M$-DOS linebreaks if (i == size) { outFile.seekp(0); fHeaderWritten = false; // if the file contained only empty lines, default to writing the header diff --git a/src/external/BMWIntegrator/BMWIntegrator.cpp b/src/external/BMWIntegrator/BMWIntegrator.cpp index 63d6d4fb..60ea8712 100644 --- a/src/external/BMWIntegrator/BMWIntegrator.cpp +++ b/src/external/BMWIntegrator/BMWIntegrator.cpp @@ -5,7 +5,7 @@ Author: Bastian M. Wojek e-mail: bastian.wojek@psi.ch - $Id$ + $Id ***************************************************************************/ @@ -38,6 +38,12 @@ std::vector TDWaveGapIntegralCuhre::fPar; +/** + *

Integrate the function using the Cuhre interface + * + *

return: + * - value of the integral + */ double TDWaveGapIntegralCuhre::IntegrateFunc() { const unsigned int NCOMP(1); @@ -61,6 +67,18 @@ double TDWaveGapIntegralCuhre::IntegrateFunc() return integral[0]; } +/** + *

Calculate the function value for the use with Cuhre---actual implementation of the function + * + *

return: + * - 0 + * + * \param ndim number of dimensions of the integral (2 here) + * \param x point where the function should be evaluated + * \param ncomp number of components of the integrand (1 here) + * \param f function value + * \param userdata additional user parameters (required by the interface, NULL here) + */ int TDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[], const int *ncomp, double f[], void *userdata) // x = {E, phi}, fPar = {twokBT, Delta(T), Ec, phic} { @@ -71,6 +89,12 @@ int TDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[], std::vector TCosSqDWaveGapIntegralCuhre::fPar; +/** + *

Integrate the function using the Cuhre interface + * + *

return: + * - value of the integral + */ double TCosSqDWaveGapIntegralCuhre::IntegrateFunc() { const unsigned int NCOMP(1); @@ -94,6 +118,18 @@ double TCosSqDWaveGapIntegralCuhre::IntegrateFunc() return integral[0]; } +/** + *

Calculate the function value for the use with Cuhre---actual implementation of the function + * + *

return: + * - 0 + * + * \param ndim number of dimensions of the integral (2 here) + * \param x point where the function should be evaluated + * \param ncomp number of components of the integrand (1 here) + * \param f function value + * \param userdata additional user parameters (required by the interface, NULL here) + */ int TCosSqDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[], const int *ncomp, double f[], void *userdata) // x = {E, phi}, fPar = {twokBT, DeltaD(T), Ec, phic, DeltaS(T)} { @@ -104,6 +140,12 @@ int TCosSqDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[], std::vector TSinSqDWaveGapIntegralCuhre::fPar; +/** + *

Integrate the function using the Cuhre interface + * + *

return: + * - value of the integral + */ double TSinSqDWaveGapIntegralCuhre::IntegrateFunc() { const unsigned int NCOMP(1); @@ -127,6 +169,18 @@ double TSinSqDWaveGapIntegralCuhre::IntegrateFunc() return integral[0]; } +/** + *

Calculate the function value for the use with Cuhre---actual implementation of the function + * + *

return: + * - 0 + * + * \param ndim number of dimensions of the integral (2 here) + * \param x point where the function should be evaluated + * \param ncomp number of components of the integrand (1 here) + * \param f function value + * \param userdata additional user parameters (required by the interface, NULL here) + */ int TSinSqDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[], const int *ncomp, double f[], void *userdata) // x = {E, phi}, fPar = {twokBT, DeltaD(T), Ec, phic, DeltaS(T)} { @@ -135,9 +189,14 @@ int TSinSqDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[], return 0; } - std::vector TAnSWaveGapIntegralCuhre::fPar; +/** + *

Integrate the function using the Cuhre interface + * + *

return: + * - value of the integral + */ double TAnSWaveGapIntegralCuhre::IntegrateFunc() { const unsigned int NCOMP(1); @@ -161,6 +220,18 @@ double TAnSWaveGapIntegralCuhre::IntegrateFunc() return integral[0]; } +/** + *

Calculate the function value for the use with Cuhre---actual implementation of the function + * + *

return: + * - 0 + * + * \param ndim number of dimensions of the integral (2 here) + * \param x point where the function should be evaluated + * \param ncomp number of components of the integrand (1 here) + * \param f function value + * \param userdata additional user parameters (required by the interface, NULL here) + */ int TAnSWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[], const int *ncomp, double f[], void *userdata) // x = {E, phi}, fPar = {twokBT, Delta(T),a, Ec, phic} { @@ -171,6 +242,12 @@ int TAnSWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[], std::vector TAnSWaveGapIntegralDivonne::fPar; +/** + *

Integrate the function using the Divonne interface + * + *

return: + * - value of the integral + */ double TAnSWaveGapIntegralDivonne::IntegrateFunc() { const unsigned int NCOMP(1); @@ -202,6 +279,18 @@ double TAnSWaveGapIntegralDivonne::IntegrateFunc() return integral[0]; } +/** + *

Calculate the function value for the use with Divonne---actual implementation of the function + * + *

return: + * - 0 + * + * \param ndim number of dimensions of the integral (2 here) + * \param x point where the function should be evaluated + * \param ncomp number of components of the integrand (1 here) + * \param f function value + * \param userdata additional user parameters (required by the interface, NULL here) + */ int TAnSWaveGapIntegralDivonne::Integrand(const int *ndim, const double x[], const int *ncomp, double f[], void *userdata) // x = {E, phi}, fPar = {twokBT, Delta(T),a, Ec, phic} { @@ -212,6 +301,12 @@ int TAnSWaveGapIntegralDivonne::Integrand(const int *ndim, const double x[], std::vector TAnSWaveGapIntegralSuave::fPar; +/** + *

Integrate the function using the Suave interface + * + *

return: + * - value of the integral + */ double TAnSWaveGapIntegralSuave::IntegrateFunc() { const unsigned int NCOMP(1); @@ -236,6 +331,18 @@ double TAnSWaveGapIntegralSuave::IntegrateFunc() return integral[0]; } +/** + *

Calculate the function value for the use with Suave---actual implementation of the function + * + *

return: + * - 0 + * + * \param ndim number of dimensions of the integral (2 here) + * \param x point where the function should be evaluated + * \param ncomp number of components of the integrand (1 here) + * \param f function value + * \param userdata additional user parameters (required by the interface, NULL here) + */ int TAnSWaveGapIntegralSuave::Integrand(const int *ndim, const double x[], const int *ncomp, double f[], void *userdata) // x = {E, phi}, fPar = {twokBT, Delta(T),a, Ec, phic} { @@ -246,6 +353,12 @@ int TAnSWaveGapIntegralSuave::Integrand(const int *ndim, const double x[], std::vector TNonMonDWave1GapIntegralCuhre::fPar; +/** + *

Integrate the function using the Cuhre interface + * + *

return: + * - value of the integral + */ double TNonMonDWave1GapIntegralCuhre::IntegrateFunc() { const unsigned int NCOMP(1); @@ -269,6 +382,18 @@ double TNonMonDWave1GapIntegralCuhre::IntegrateFunc() return integral[0]; } +/** + *

Calculate the function value for the use with Cuhre---actual implementation of the function + * + *

return: + * - 0 + * + * \param ndim number of dimensions of the integral (2 here) + * \param x point where the function should be evaluated + * \param ncomp number of components of the integrand (1 here) + * \param f function value + * \param userdata additional user parameters (required by the interface, NULL here) + */ int TNonMonDWave1GapIntegralCuhre::Integrand(const int *ndim, const double x[], const int *ncomp, double f[], void *userdata) // x = {E, phi}, fPar = {twokBT, Delta(T),a, Ec, phic} { @@ -279,6 +404,12 @@ int TNonMonDWave1GapIntegralCuhre::Integrand(const int *ndim, const double x[], std::vector TNonMonDWave2GapIntegralCuhre::fPar; +/** + *

Integrate the function using the Cuhre interface + * + *

return: + * - value of the integral + */ double TNonMonDWave2GapIntegralCuhre::IntegrateFunc() { const unsigned int NCOMP(1); @@ -302,6 +433,18 @@ double TNonMonDWave2GapIntegralCuhre::IntegrateFunc() return integral[0]; } +/** + *

Calculate the function value for the use with Cuhre---actual implementation of the function + * + *

return: + * - 0 + * + * \param ndim number of dimensions of the integral (2 here) + * \param x point where the function should be evaluated + * \param ncomp number of components of the integrand (1 here) + * \param f function value + * \param userdata additional user parameters (required by the interface, NULL here) + */ int TNonMonDWave2GapIntegralCuhre::Integrand(const int *ndim, const double x[], const int *ncomp, double f[], void *userdata) // x = {E, phi}, fPar = {twokBT, Delta(T),a, Ec, phic} { diff --git a/src/external/BMWIntegrator/BMWIntegrator.h b/src/external/BMWIntegrator/BMWIntegrator.h index 694337c8..bbdd7d74 100644 --- a/src/external/BMWIntegrator/BMWIntegrator.h +++ b/src/external/BMWIntegrator/BMWIntegrator.h @@ -5,7 +5,7 @@ Author: Bastian M. Wojek e-mail: bastian.wojek@psi.ch - $Id: + $Id ***************************************************************************/ @@ -41,8 +41,11 @@ using namespace std; -// 1D Integrator base class - the function to be integrated have to be implemented in a derived class - +/** + *

Base class for 1D integrations using the GNU Scientific Library integrator. + * The function which should be integrated has to be implemented in a derived class. + * Note: The purpose of this is to offer an easy-to-use interface---not the most efficient integration routine. + */ class TIntegrator { public: TIntegrator(); @@ -52,37 +55,67 @@ class TIntegrator { double IntegrateFunc(double, double); protected: - mutable vector fPar; + mutable vector fPar; ///< parameters of the integrand private: static double FuncAtXgsl(double, void *); - ROOT::Math::GSLIntegrator *fIntegrator; - mutable double (*fFunc)(double, void *); + ROOT::Math::GSLIntegrator *fIntegrator; ///< pointer to the GSL integrator + mutable double (*fFunc)(double, void *); ///< pointer to the integrand function }; +/** + *

Constructor of the base class for 1D integrations + * Allocation of memory for an integration using the adaptive 31 point Gauss-Kronrod rule + */ inline TIntegrator::TIntegrator() : fFunc(0) { fIntegrator = new ROOT::Math::GSLIntegrator(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31); } +/** + *

Destructor of the base class for 1D integrations + * Clean up. + */ inline TIntegrator::~TIntegrator(){ + fPar.clear(); delete fIntegrator; fIntegrator=0; fFunc=0; } +/** + *

Method for passing the integrand function value to the integrator. + * + *

return: + * - function value of the integrand + * + * \param x point at which the function value is calculated + * \param obj pointer to the integrator + */ inline double TIntegrator::FuncAtXgsl(double x, void *obj) { return ((TIntegrator*)obj)->FuncAtX(x); } +/** + *

Calculate the integral of the function between the given boundaries + * + *

return: + * - value of the integral + * + * \param x1 lower boundary + * \param x2 upper boundary + */ inline double TIntegrator::IntegrateFunc(double x1, double x2) { fFunc = &TIntegrator::FuncAtXgsl; return fIntegrator->Integral(fFunc, (this), x1, x2); } -// Multi dimensional GSL Monte Carlo Integrations - +/** + *

Base class for multidimensional Monte-Carlo integrations using the GNU Scientific Library integrator. + * The function which should be integrated has to be implemented in a derived class. + * Note: The purpose of this is to offer an easy-to-use interface---not the most efficient integration routine. + */ class TMCIntegrator { public: TMCIntegrator(); @@ -92,37 +125,69 @@ class TMCIntegrator { double IntegrateFunc(size_t, double *, double *); protected: - mutable vector fPar; + mutable vector fPar; ///< parameters of the integrand private: static double FuncAtXgsl(double *, size_t, void *); - ROOT::Math::GSLMCIntegrator *fMCIntegrator; - mutable double (*fFunc)(double *, size_t, void *); + ROOT::Math::GSLMCIntegrator *fMCIntegrator; ///< pointer to the GSL integrator + mutable double (*fFunc)(double *, size_t, void *); ///< pointer to the integrand function }; +/** + *

Constructor of the base class for multidimensional Monte-Carlo integrations + * Allocation of memory for an integration using the MISER algorithm of Press and Farrar + */ inline TMCIntegrator::TMCIntegrator() : fFunc(0) { fMCIntegrator = new ROOT::Math::GSLMCIntegrator(ROOT::Math::MCIntegration::kMISER, 1.E-6, 1.E-4, 500000); } +/** + *

Destructor of the base class for 1D integrations + * Clean up. + */ inline TMCIntegrator::~TMCIntegrator(){ + fPar.clear(); delete fMCIntegrator; fMCIntegrator=0; fFunc=0; } +/** + *

Method for passing the integrand function value to the integrator. + * + *

return: + * - function value of the integrand + * + * \param x point at which the function value is calculated + * \param dim number of dimensions + * \param obj pointer to the integrator + */ inline double TMCIntegrator::FuncAtXgsl(double *x, size_t dim, void *obj) { return ((TMCIntegrator*)obj)->FuncAtX(x); } +/** + *

Calculate the integral of the function between the given boundaries + * + *

return: + * - value of the integral + * + * \param dim number of dimensions + * \param x1 lower boundary array + * \param x2 upper boundary array + */ inline double TMCIntegrator::IntegrateFunc(size_t dim, double *x1, double *x2) { fFunc = &TMCIntegrator::FuncAtXgsl; return fMCIntegrator->Integral(fFunc, dim, x1, x2, (this)); } -// Multidimensional Integrator class for a d-wave gap integral using the Cuhre algorithm - +/** + *

Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model + * assuming a cylindrical Fermi surface and a d_{x^2-y^2} symmetry of the superconducting order parameter. + * The integration uses the Cuhre algorithm of the Cuba library. + */ class TDWaveGapIntegralCuhre { public: TDWaveGapIntegralCuhre() : fNDim(2) {} @@ -132,11 +197,16 @@ class TDWaveGapIntegralCuhre { double IntegrateFunc(); protected: - static vector fPar; - unsigned int fNDim; - + static vector fPar; ///< parameters of the integrand + unsigned int fNDim; ///< dimension of the integral }; +/** + *

Two-dimensional integrator class for the efficient calculation of the superfluid density along the a-axis + * within the semi-classical model assuming a cylindrical Fermi surface and a mixed d_{x^2-y^2} + s symmetry of the + * superconducting order parameter (effectively: d_{x^2-y^2} with shifted nodes and a-b-anisotropy). + * The integration uses the Cuhre algorithm of the Cuba library. + */ class TCosSqDWaveGapIntegralCuhre { public: TCosSqDWaveGapIntegralCuhre() : fNDim(2) {} @@ -146,11 +216,16 @@ class TCosSqDWaveGapIntegralCuhre { double IntegrateFunc(); protected: - static vector fPar; - unsigned int fNDim; - + static vector fPar; ///< parameters of the integrand + unsigned int fNDim; ///< dimension of the integral }; +/** + *

Two-dimensional integrator class for the efficient calculation of the superfluid density along the b-axis + * within the semi-classical model assuming a cylindrical Fermi surface and a mixed d_{x^2-y^2} + s symmetry of the + * superconducting order parameter (effectively: d_{x^2-y^2} with shifted nodes and a-b-anisotropy). + * The integration uses the Cuhre algorithm of the Cuba library. + */ class TSinSqDWaveGapIntegralCuhre { public: TSinSqDWaveGapIntegralCuhre() : fNDim(2) {} @@ -160,11 +235,15 @@ class TSinSqDWaveGapIntegralCuhre { double IntegrateFunc(); protected: - static vector fPar; - unsigned int fNDim; - + static vector fPar; ///< parameters of the integrand + unsigned int fNDim; ///< dimension of the integral }; +/** + *

Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model + * assuming a cylindrical Fermi surface and an "anisotropic s-wave" symmetry of the superconducting order parameter. + * The integration uses the Cuhre algorithm of the Cuba library. + */ class TAnSWaveGapIntegralCuhre { public: TAnSWaveGapIntegralCuhre() : fNDim(2) {} @@ -174,11 +253,15 @@ class TAnSWaveGapIntegralCuhre { double IntegrateFunc(); protected: - static vector fPar; - unsigned int fNDim; - + static vector fPar; ///< parameters of the integrand + unsigned int fNDim; ///< dimension of the integral }; +/** + *

Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model + * assuming a cylindrical Fermi surface and an "anisotropic s-wave" symmetry of the superconducting order parameter. + * The integration uses the Divonne algorithm of the Cuba library. + */ class TAnSWaveGapIntegralDivonne { public: TAnSWaveGapIntegralDivonne() : fNDim(2) {} @@ -188,11 +271,15 @@ class TAnSWaveGapIntegralDivonne { double IntegrateFunc(); protected: - static vector fPar; - unsigned int fNDim; - + static vector fPar; ///< parameters of the integrand + unsigned int fNDim; ///< dimension of the integral }; +/** + *

Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model + * assuming a cylindrical Fermi surface and an "anisotropic s-wave" symmetry of the superconducting order parameter. + * The integration uses the Suave algorithm of the Cuba library. + */ class TAnSWaveGapIntegralSuave { public: TAnSWaveGapIntegralSuave() : fNDim(2) {} @@ -202,11 +289,15 @@ class TAnSWaveGapIntegralSuave { double IntegrateFunc(); protected: - static vector fPar; - unsigned int fNDim; - + static vector fPar; ///< parameters of the integrand + unsigned int fNDim; ///< dimension of the integral }; +/** + *

Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model + * assuming a cylindrical Fermi surface and an "non-monotonic d-wave" symmetry of the superconducting order parameter. + * The integration uses the Cuhre algorithm of the Cuba library. + */ class TNonMonDWave1GapIntegralCuhre { public: TNonMonDWave1GapIntegralCuhre() : fNDim(2) {} @@ -216,11 +307,15 @@ class TNonMonDWave1GapIntegralCuhre { double IntegrateFunc(); protected: - static vector fPar; - unsigned int fNDim; - + static vector fPar; ///< parameters of the integrand + unsigned int fNDim; ///< dimension of the integral }; +/** + *

Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model + * assuming a cylindrical Fermi surface and an "non-monotonic d-wave" symmetry of the superconducting order parameter. + * The integration uses the Cuhre algorithm of the Cuba library. + */ class TNonMonDWave2GapIntegralCuhre { public: TNonMonDWave2GapIntegralCuhre() : fNDim(2) {} @@ -230,13 +325,14 @@ class TNonMonDWave2GapIntegralCuhre { double IntegrateFunc(); protected: - static vector fPar; - unsigned int fNDim; - + static vector fPar; ///< parameters of the integrand + unsigned int fNDim; ///< dimension of the integral }; -// To be integrated: x*y dx dy - +/** + *

Test class for the 2D MC integration + * Integral: x*y dx dy + */ class T2DTest : public TMCIntegrator { public: T2DTest() {} @@ -244,13 +340,24 @@ class T2DTest : public TMCIntegrator { double FuncAtX(double *) const; }; +/** + *

Calculate the function value---actual implementation of the function x*y + * + *

return: + * - function value + * + * \param x point where the function should be evaluated + */ inline double T2DTest::FuncAtX(double *x) const { return x[0]*x[1]; } -// To be integrated: d wave gap integral - +/** + *

Class for the 2D Monte-Carlo integration for the calculation of the superfluid density within the semi-classical model + * assuming a cylindrical Fermi surface and a d_{x^2-y^2} symmetry of the superconducting order parameter. + * The integration uses the GSL integration routines. + */ class TDWaveGapIntegral : public TMCIntegrator { public: TDWaveGapIntegral() {} @@ -258,6 +365,14 @@ class TDWaveGapIntegral : public TMCIntegrator { double FuncAtX(double *) const; }; +/** + *

Calculate the function value---actual implementation of the function + * + *

return: + * - function value + * + * \param x point where the function should be evaluated + */ inline double TDWaveGapIntegral::FuncAtX(double *x) const // x = {E, phi}, fPar = {T, Delta(T)} { double twokt(2.0*0.08617384436*fPar[0]); // kB in meV/K @@ -265,8 +380,11 @@ inline double TDWaveGapIntegral::FuncAtX(double *x) const // x = {E, phi}, fPar return -1.0/(2.0*twokt*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt)*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt)); } -// To be integrated: anisotropic s wave gap integral - +/** + *

Class for the 2D Monte-Carlo integration for the calculation of the superfluid density within the semi-classical model + * assuming a cylindrical Fermi surface and an "anisotropic s-wave" symmetry of the superconducting order parameter. + * The integration uses the GSL integration routines. + */ class TAnSWaveGapIntegral : public TMCIntegrator { public: TAnSWaveGapIntegral() {} @@ -274,6 +392,14 @@ class TAnSWaveGapIntegral : public TMCIntegrator { double FuncAtX(double *) const; }; +/** + *

Calculate the function value---actual implementation of the function + * + *

return: + * - function value + * + * \param x point where the function should be evaluated + */ inline double TAnSWaveGapIntegral::FuncAtX(double *x) const // x = {E, phi}, fPar = {T, Delta(T), a} { double twokt(2.0*0.08617384436*fPar[0]); // kB in meV/K @@ -281,8 +407,10 @@ inline double TAnSWaveGapIntegral::FuncAtX(double *x) const // x = {E, phi}, fPa return -1.0/(2.0*twokt*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt)*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt)); } -// To be integrated: Bessel function times Exponential - +/** + *

Class for the 1D integration of j0(a*x)*exp(-b*x) + * The integration uses the GSL integration routines. + */ class TIntBesselJ0Exp : public TIntegrator { public: TIntBesselJ0Exp() {} @@ -290,6 +418,14 @@ class TIntBesselJ0Exp : public TIntegrator { double FuncAtX(double) const; }; +/** + *

Calculate the function value---actual implementation of the function j0(a*x)*exp(-b*x) + * + *

return: + * - function value + * + * \param x point where the function should be evaluated + */ inline double TIntBesselJ0Exp::FuncAtX(double x) const { double w0t(TMath::TwoPi()*fPar[0]*x); @@ -302,8 +438,10 @@ inline double TIntBesselJ0Exp::FuncAtX(double x) const return j0 * TMath::Exp(-fPar[1]*x); } -// To be integrated: Sine times Gaussian - +/** + *

Class for the 1D integration of sin(a*x)*exp(-b*x*x) + * The integration uses the GSL integration routines. + */ class TIntSinGss : public TIntegrator { public: TIntSinGss() {} @@ -311,13 +449,25 @@ class TIntSinGss : public TIntegrator { double FuncAtX(double) const; }; +/** + *

Calculate the function value---actual implementation of the function sin(a*x)*exp(-b*x*x) + * + *

return: + * - function value + * + * \param x point where the function should be evaluated + */ 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: DeRenzi Spin Glass Interpolation Integrand - +/** + *

Class for the 1D integration of the "DeRenzi Spin Glass Interpolation Integrand" + * See Eq. (5) of R. De Renzi and S. Fanesi, Physica B 289-290, 209-212 (2000). + * doi:10.1016/S0921-4526(00)00368-9 + * The integration uses the GSL integration routines. + */ class TIntSGInterpolation : public TIntegrator { public: TIntSGInterpolation() {} @@ -325,6 +475,14 @@ class TIntSGInterpolation : public TIntegrator { double FuncAtX(double) const; }; +/** + *

Calculate the function value---actual implementation of the function + * + *

return: + * - function value + * + * \param x point where the function should be evaluated + */ inline double TIntSGInterpolation::FuncAtX(double x) const { // Parameters: nu_L [MHz], a [1/us], lambda [1/us], beta [1], t [us] @@ -333,17 +491,26 @@ inline double TIntSGInterpolation::FuncAtX(double x) const return (wt*TMath::Cos(wt)-TMath::Sin(wt))/(wt*wt)*TMath::Exp(-TMath::Power(expo,fPar[3]))/TMath::Power(expo,(1.0-fPar[3])); } - -// To be integrated: df/dE * E / sqrt(E^2 - Delta^2) - +/** + *

Class for the 1D integration for the calculation of the superfluid density within the semi-classical model + * assuming a cylindrical Fermi surface and an isotropic s-wave symmetry of the superconducting order parameter. + * The integration uses the GSL integration routines. + */ class TGapIntegral : public TIntegrator { public: TGapIntegral() {} ~TGapIntegral() {} double FuncAtX(double) const; // variable: E - }; +/** + *

Calculate the function value---actual implementation of the function df/dE * E / sqrt(E^2 - Delta^2) + * + *

return: + * - function value + * + * \param x point where the function should be evaluated + */ inline double TGapIntegral::FuncAtX(double e) const { return 1.0/(TMath::Power(TMath::CosH(TMath::Sqrt(e*e+fPar[1]*fPar[1])/fPar[0]),2.0)); diff --git a/src/msr2data.cpp b/src/msr2data.cpp index cc881c92..c7dc3a5e 100644 --- a/src/msr2data.cpp +++ b/src/msr2data.cpp @@ -90,7 +90,7 @@ void msr2data_syntax() cout << endl; cout << endl << " , , , ... : run numbers"; cout << endl << " : msr-file extension, e.g. _tf_h13 for the file name 8472_tf_h13.msr"; - cout << endl << " -o : specify the name of the DB or column data output file; default: out.db/out.dat"; + cout << endl << " -o : specify the name of the DB or column-data output file; default: out.db/out.dat"; cout << endl << " if the option '-o none' is used, no output file will be written."; cout << endl << " new : before writing a new output file, delete the contents of any existing file with the same name"; cout << endl << " data : instead of to a DB file the data are written to a simple column structure"; @@ -101,25 +101,25 @@ void msr2data_syntax() cout << endl << " nosummary : no additional data from the run data file is written to the output file"; cout << endl << " fit : invoke musrfit to fit the specified runs"; cout << endl << " All msr input files are assumed to be present, none is newly generated!"; - cout << endl << " fit-