modernized code to C++11 and newer.
This allows to analyze the code by external code analyzers. Since a lot is adopted, the version is changed to 1.4.3
This commit is contained in:
52
src/external/libFitPofB/classes/TBofZCalc.cpp
vendored
52
src/external/libFitPofB/classes/TBofZCalc.cpp
vendored
@ -37,8 +37,6 @@
|
||||
#endif
|
||||
|
||||
#include <cmath>
|
||||
//#include <iostream>
|
||||
//#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
//------------------
|
||||
@ -122,7 +120,7 @@ void TBofZCalc::Calculate()
|
||||
// Parameters: Bext[G], deadlayer[nm], lambda[nm]
|
||||
//------------------
|
||||
|
||||
TLondon1D_HS::TLondon1D_HS(const vector<double> ¶m, unsigned int steps)
|
||||
TLondon1D_HS::TLondon1D_HS(const std::vector<double> ¶m, unsigned int steps)
|
||||
{
|
||||
fSteps = steps;
|
||||
fDZ = 200.0/double(steps);
|
||||
@ -149,14 +147,14 @@ double TLondon1D_HS::GetBmin() const
|
||||
return fParam[0]*exp((fParam[1]-200.0)/fParam[2]);
|
||||
}
|
||||
|
||||
vector< pair<double, double> > TLondon1D_HS::GetInverseAndDerivative(double BB) const
|
||||
std::vector< std::pair<double, double> > TLondon1D_HS::GetInverseAndDerivative(double BB) const
|
||||
{
|
||||
vector< pair<double, double> > inv;
|
||||
std::vector< std::pair<double, double> > inv;
|
||||
|
||||
if(BB <= 0.0 || BB > fParam[0])
|
||||
return inv;
|
||||
|
||||
pair<double, double> invAndDerivative;
|
||||
std::pair<double, double> invAndDerivative;
|
||||
|
||||
invAndDerivative.first = fParam[1] - fParam[2]*log(BB/fParam[0]);
|
||||
invAndDerivative.second = -fParam[2]/BB;
|
||||
@ -173,7 +171,7 @@ vector< pair<double, double> > TLondon1D_HS::GetInverseAndDerivative(double BB)
|
||||
// Parameters: Bext[G], deadlayer[nm], thickness[nm], lambda[nm]
|
||||
//------------------
|
||||
|
||||
TLondon1D_1L::TLondon1D_1L(const vector<double> ¶m, unsigned int steps)
|
||||
TLondon1D_1L::TLondon1D_1L(const std::vector<double> ¶m, unsigned int steps)
|
||||
{
|
||||
fSteps = steps;
|
||||
fDZ = param[2]/double(steps);
|
||||
@ -254,15 +252,15 @@ void TLondon1D_1L::SetBmin()
|
||||
return;
|
||||
}
|
||||
|
||||
vector< pair<double, double> > TLondon1D_1L::GetInverseAndDerivative(double BB) const
|
||||
std::vector< std::pair<double, double> > TLondon1D_1L::GetInverseAndDerivative(double BB) const
|
||||
{
|
||||
vector< pair<double, double> > inv;
|
||||
std::vector< std::pair<double, double> > inv;
|
||||
|
||||
if(BB <= fMinB || BB > fParam[0])
|
||||
return inv;
|
||||
|
||||
double inverse[2];
|
||||
pair<double, double> invAndDerivative;
|
||||
std::pair<double, double> invAndDerivative;
|
||||
|
||||
inverse[0]=fParam[3]*log((BB-sqrt(BB*BB-4.0*fCoeff[0]*fCoeff[1]))/(2.0*fCoeff[1]));
|
||||
inverse[1]=fParam[3]*log((BB+sqrt(BB*BB-4.0*fCoeff[0]*fCoeff[1]))/(2.0*fCoeff[1]));
|
||||
@ -288,7 +286,7 @@ vector< pair<double, double> > TLondon1D_1L::GetInverseAndDerivative(double BB)
|
||||
// Parameters: Bext[G], deadlayer[nm], thickness1[nm], thickness2[nm], lambda1[nm], lambda2[nm]
|
||||
//------------------
|
||||
|
||||
TLondon1D_2L::TLondon1D_2L(const vector<double> ¶m, unsigned int steps)
|
||||
TLondon1D_2L::TLondon1D_2L(const std::vector<double> ¶m, unsigned int steps)
|
||||
{
|
||||
fSteps = steps;
|
||||
fDZ = (param[2]+param[3])/double(steps);
|
||||
@ -389,15 +387,15 @@ void TLondon1D_2L::SetBmin()
|
||||
return;
|
||||
}
|
||||
|
||||
vector< pair<double, double> > TLondon1D_2L::GetInverseAndDerivative(double BB) const
|
||||
std::vector< std::pair<double, double> > TLondon1D_2L::GetInverseAndDerivative(double BB) const
|
||||
{
|
||||
vector< pair<double, double> > inv;
|
||||
std::vector< std::pair<double, double> > inv;
|
||||
|
||||
if(BB <= fMinB || BB >= fParam[0])
|
||||
return inv;
|
||||
|
||||
double inverse[3];
|
||||
pair<double, double> invAndDerivative;
|
||||
std::pair<double, double> invAndDerivative;
|
||||
|
||||
switch(fMinTag)
|
||||
{
|
||||
@ -457,7 +455,7 @@ vector< pair<double, double> > TLondon1D_2L::GetInverseAndDerivative(double BB)
|
||||
// Parameters: Bext[G], B1[G], deadlayer[nm], thickness1[nm], lambda[nm]
|
||||
//------------------
|
||||
|
||||
TProximity1D_1LHS::TProximity1D_1LHS(const vector<double> ¶m, unsigned int steps)
|
||||
TProximity1D_1LHS::TProximity1D_1LHS(const std::vector<double> ¶m, unsigned int steps)
|
||||
{
|
||||
fSteps = steps;
|
||||
fDZ = 200./double(steps);
|
||||
@ -512,15 +510,15 @@ void TProximity1D_1LHS::SetBmin()
|
||||
return;
|
||||
}
|
||||
|
||||
vector< pair<double, double> > TProximity1D_1LHS::GetInverseAndDerivative(double BB) const
|
||||
std::vector< std::pair<double, double> > TProximity1D_1LHS::GetInverseAndDerivative(double BB) const
|
||||
{
|
||||
vector< pair<double, double> > inv;
|
||||
std::vector< std::pair<double, double> > inv;
|
||||
|
||||
if(BB <= fMinB || BB > fParam[0])
|
||||
return inv;
|
||||
|
||||
double inverse[2];
|
||||
pair<double, double> invAndDerivative;
|
||||
std::pair<double, double> invAndDerivative;
|
||||
|
||||
inverse[0]=(fParam[0]*(fParam[2]+fParam[3])-fParam[1]*fParam[2]-BB*fParam[3])/(fParam[0]-fParam[1]);
|
||||
inverse[1]=fParam[2]+fParam[3]-fParam[4]*log(BB/fParam[1]);
|
||||
@ -545,7 +543,7 @@ vector< pair<double, double> > TProximity1D_1LHS::GetInverseAndDerivative(double
|
||||
// Parameters: Bext[G], deadlayer[nm], thickness1[nm], thickness2[nm], thickness3[nm], lambda1[nm], lambda2[nm], lambda3[nm]
|
||||
//------------------
|
||||
|
||||
TLondon1D_3L::TLondon1D_3L(const vector<double> ¶m, unsigned int steps)
|
||||
TLondon1D_3L::TLondon1D_3L(const std::vector<double> ¶m, unsigned int steps)
|
||||
// : fSteps(steps), fDZ((param[2]+param[3]+param[4])/double(steps)), fParam(param), fMinTag(-1), fMinZ(-1.0), fMinB(-1.0)
|
||||
{
|
||||
// no members of TLondon1D_3L, therefore the initialization list cannot be used!!
|
||||
@ -681,15 +679,15 @@ void TLondon1D_3L::SetBmin()
|
||||
return;
|
||||
}
|
||||
|
||||
vector< pair<double, double> > TLondon1D_3L::GetInverseAndDerivative(double BB) const
|
||||
std::vector< std::pair<double, double> > TLondon1D_3L::GetInverseAndDerivative(double BB) const
|
||||
{
|
||||
vector< pair<double, double> > inv;
|
||||
std::vector< std::pair<double, double> > inv;
|
||||
|
||||
if(BB <= fMinB || BB > fParam[0])
|
||||
return inv;
|
||||
|
||||
double inverse[4];
|
||||
pair<double, double> invAndDerivative;
|
||||
std::pair<double, double> invAndDerivative;
|
||||
|
||||
switch(fMinTag)
|
||||
{
|
||||
@ -791,7 +789,7 @@ vector< pair<double, double> > TLondon1D_3L::GetInverseAndDerivative(double BB)
|
||||
// Parameters: Bext[G], deadlayer[nm], thickness1[nm], thickness2[nm], thickness3[nm], lambda1[nm], lambda2[nm]
|
||||
//------------------
|
||||
|
||||
TLondon1D_3LS::TLondon1D_3LS(const vector<double> ¶m, unsigned int steps)
|
||||
TLondon1D_3LS::TLondon1D_3LS(const std::vector<double> ¶m, unsigned int steps)
|
||||
{
|
||||
fSteps = steps;
|
||||
fDZ = (param[2]+param[3]+param[4])/double(steps);
|
||||
@ -915,15 +913,15 @@ void TLondon1D_3LS::SetBmin()
|
||||
return;
|
||||
}
|
||||
|
||||
vector< pair<double, double> > TLondon1D_3LS::GetInverseAndDerivative(double BB) const
|
||||
std::vector< std::pair<double, double> > TLondon1D_3LS::GetInverseAndDerivative(double BB) const
|
||||
{
|
||||
vector< pair<double, double> > inv;
|
||||
std::vector< std::pair<double, double> > inv;
|
||||
|
||||
if(BB <= fMinB || BB > fParam[0])
|
||||
return inv;
|
||||
|
||||
double inverse[4];
|
||||
pair<double, double> invAndDerivative;
|
||||
std::pair<double, double> invAndDerivative;
|
||||
|
||||
switch(fMinTag)
|
||||
{
|
||||
@ -1025,7 +1023,7 @@ vector< pair<double, double> > TLondon1D_3LS::GetInverseAndDerivative(double BB)
|
||||
// Parameters: Bext[G], deadlayer[nm], thickness1[nm], thickness2[nm], thickness3[nm], lambda1[nm], lambda2[nm]
|
||||
//------------------
|
||||
|
||||
TLondon1D_3LwInsulator::TLondon1D_3LwInsulator(const vector<double> ¶m, unsigned int steps)
|
||||
TLondon1D_3LwInsulator::TLondon1D_3LwInsulator(const std::vector<double> ¶m, unsigned int steps)
|
||||
{
|
||||
fSteps = steps;
|
||||
fDZ = (param[2]+param[3]+param[4])/static_cast<double>(steps);
|
||||
|
@ -40,7 +40,6 @@
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include "TMath.h"
|
||||
|
||||
@ -73,7 +72,7 @@ TBulkVortexFieldCalc::~TBulkVortexFieldCalc() {
|
||||
FILE *wordsOfWisdomW;
|
||||
wordsOfWisdomW = fopen(fWisdom.c_str(), "w");
|
||||
if (wordsOfWisdomW == NULL) {
|
||||
cout << "TBulkVortexFieldCalc::~TBulkVortexFieldCalc(): Could not open file ... No wisdom is exported..." << endl;
|
||||
std::cout << "TBulkVortexFieldCalc::~TBulkVortexFieldCalc(): Could not open file ... No wisdom is exported..." << std::endl;
|
||||
} else {
|
||||
fftw_export_wisdom_to_file(wordsOfWisdomW);
|
||||
fclose(wordsOfWisdomW);
|
||||
@ -123,7 +122,7 @@ double TBulkVortexFieldCalc::GetBmax() const {
|
||||
}
|
||||
}
|
||||
|
||||
TBulkTriVortexLondonFieldCalc::TBulkTriVortexLondonFieldCalc(const string& wisdom, const unsigned int steps) {
|
||||
TBulkTriVortexLondonFieldCalc::TBulkTriVortexLondonFieldCalc(const std::string& wisdom, const unsigned int steps) {
|
||||
fWisdom = wisdom;
|
||||
if (steps % 2) {
|
||||
fSteps = steps + 1;
|
||||
@ -143,7 +142,7 @@ TBulkTriVortexLondonFieldCalc::TBulkTriVortexLondonFieldCalc(const string& wisdo
|
||||
fFFTin = new fftw_complex[(fSteps/2 + 1) * fSteps];
|
||||
fFFTout = new double[fSteps*fSteps];
|
||||
|
||||
// cout << "Check for the FFT plan..." << endl;
|
||||
// std::cout << "Check for the FFT plan..." << std::endl;
|
||||
|
||||
// Load wisdom from file if it exists and should be used
|
||||
|
||||
@ -174,11 +173,11 @@ TBulkTriVortexLondonFieldCalc::TBulkTriVortexLondonFieldCalc(const string& wisdo
|
||||
void TBulkTriVortexLondonFieldCalc::CalculateGrid() const {
|
||||
// SetParameters - method has to be called from the user before the calculation!!
|
||||
if (fParam.size() < 3) {
|
||||
cout << endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << endl;
|
||||
std::cout << std::endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!fParam[0] || !fParam[1] || !fParam[2]) {
|
||||
cout << endl << "The field, penetration depth and coherence length have to have finite values in order to calculate B(x,y)!" << endl;
|
||||
std::cout << std::endl << "The field, penetration depth and coherence length have to have finite values in order to calculate B(x,y)!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -302,7 +301,7 @@ void TBulkTriVortexLondonFieldCalc::CalculateGrid() const {
|
||||
|
||||
}
|
||||
|
||||
TBulkSqVortexLondonFieldCalc::TBulkSqVortexLondonFieldCalc(const string& wisdom, const unsigned int steps) {
|
||||
TBulkSqVortexLondonFieldCalc::TBulkSqVortexLondonFieldCalc(const std::string& wisdom, const unsigned int steps) {
|
||||
fWisdom = wisdom;
|
||||
if (steps % 2) {
|
||||
fSteps = steps + 1;
|
||||
@ -322,7 +321,7 @@ TBulkSqVortexLondonFieldCalc::TBulkSqVortexLondonFieldCalc(const string& wisdom,
|
||||
fFFTin = new fftw_complex[(fSteps/2 + 1) * fSteps];
|
||||
fFFTout = new double[fSteps*fSteps];
|
||||
|
||||
// cout << "Check for the FFT plan..." << endl;
|
||||
// std::cout << "Check for the FFT plan..." << std::endl;
|
||||
|
||||
// Load wisdom from file if it exists and should be used
|
||||
|
||||
@ -353,11 +352,11 @@ TBulkSqVortexLondonFieldCalc::TBulkSqVortexLondonFieldCalc(const string& wisdom,
|
||||
void TBulkSqVortexLondonFieldCalc::CalculateGrid() const {
|
||||
// SetParameters - method has to be called from the user before the calculation!!
|
||||
if (fParam.size() < 3) {
|
||||
cout << endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << endl;
|
||||
std::cout << std::endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!fParam[0] || !fParam[1] || !fParam[2]) {
|
||||
cout << endl << "The field, penetration depth and coherence length have to have finite values in order to calculate B(x,y)!" << endl;
|
||||
std::cout << std::endl << "The field, penetration depth and coherence length have to have finite values in order to calculate B(x,y)!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -449,7 +448,7 @@ void TBulkSqVortexLondonFieldCalc::CalculateGrid() const {
|
||||
|
||||
|
||||
|
||||
TBulkTriVortexMLFieldCalc::TBulkTriVortexMLFieldCalc(const string& wisdom, const unsigned int steps) {
|
||||
TBulkTriVortexMLFieldCalc::TBulkTriVortexMLFieldCalc(const std::string& wisdom, const unsigned int steps) {
|
||||
fWisdom = wisdom;
|
||||
if (steps % 2) {
|
||||
fSteps = steps + 1;
|
||||
@ -469,7 +468,7 @@ TBulkTriVortexMLFieldCalc::TBulkTriVortexMLFieldCalc(const string& wisdom, const
|
||||
fFFTin = new fftw_complex[(fSteps/2 + 1) * fSteps];
|
||||
fFFTout = new double[fSteps*fSteps];
|
||||
|
||||
// cout << "Check for the FFT plan..." << endl;
|
||||
// std::cout << "Check for the FFT plan..." << std::endl;
|
||||
|
||||
// Load wisdom from file if it exists and should be used
|
||||
|
||||
@ -500,11 +499,11 @@ TBulkTriVortexMLFieldCalc::TBulkTriVortexMLFieldCalc(const string& wisdom, const
|
||||
void TBulkTriVortexMLFieldCalc::CalculateGrid() const {
|
||||
// SetParameters - method has to be called from the user before the calculation!!
|
||||
if (fParam.size() < 3) {
|
||||
cout << endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << endl;
|
||||
std::cout << std::endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!fParam[0] || !fParam[1] || !fParam[2]) {
|
||||
cout << endl << "The field, penetration depth and coherence length have to have finite values in order to calculate B(x,y)!" << endl;
|
||||
std::cout << std::endl << "The field, penetration depth and coherence length have to have finite values in order to calculate B(x,y)!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -645,7 +644,7 @@ void TBulkTriVortexMLFieldCalc::CalculateGrid() const {
|
||||
}
|
||||
|
||||
|
||||
TBulkTriVortexAGLFieldCalc::TBulkTriVortexAGLFieldCalc(const string& wisdom, const unsigned int steps) {
|
||||
TBulkTriVortexAGLFieldCalc::TBulkTriVortexAGLFieldCalc(const std::string& wisdom, const unsigned int steps) {
|
||||
fWisdom = wisdom;
|
||||
if (steps % 2) {
|
||||
fSteps = steps + 1;
|
||||
@ -665,7 +664,7 @@ TBulkTriVortexAGLFieldCalc::TBulkTriVortexAGLFieldCalc(const string& wisdom, con
|
||||
fFFTin = new fftw_complex[(fSteps/2 + 1) * fSteps];
|
||||
fFFTout = new double[fSteps*fSteps];
|
||||
|
||||
// cout << "Check for the FFT plan..." << endl;
|
||||
// std::cout << "Check for the FFT plan..." << std::endl;
|
||||
|
||||
// Load wisdom from file if it exists and should be used
|
||||
|
||||
@ -696,11 +695,11 @@ TBulkTriVortexAGLFieldCalc::TBulkTriVortexAGLFieldCalc(const string& wisdom, con
|
||||
void TBulkTriVortexAGLFieldCalc::CalculateGrid() const {
|
||||
// SetParameters - method has to be called from the user before the calculation!!
|
||||
if (fParam.size() < 3) {
|
||||
cout << endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << endl;
|
||||
std::cout << std::endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!fParam[0] || !fParam[1] || !fParam[2]) {
|
||||
cout << endl << "The field, penetration depth and coherence length have to have finite values in order to calculate B(x,y)!" << endl;
|
||||
std::cout << std::endl << "The field, penetration depth and coherence length have to have finite values in order to calculate B(x,y)!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -850,7 +849,7 @@ void TBulkTriVortexAGLFieldCalc::CalculateGrid() const {
|
||||
|
||||
|
||||
|
||||
TBulkTriVortexAGLIIFieldCalc::TBulkTriVortexAGLIIFieldCalc(const string& wisdom, const unsigned int steps) {
|
||||
TBulkTriVortexAGLIIFieldCalc::TBulkTriVortexAGLIIFieldCalc(const std::string& wisdom, const unsigned int steps) {
|
||||
fWisdom = wisdom;
|
||||
if (steps % 2) {
|
||||
fSteps = steps + 1;
|
||||
@ -870,7 +869,7 @@ TBulkTriVortexAGLIIFieldCalc::TBulkTriVortexAGLIIFieldCalc(const string& wisdom,
|
||||
fFFTin = new fftw_complex[(fSteps/2 + 1) * fSteps];
|
||||
fFFTout = new double[fSteps*fSteps];
|
||||
|
||||
// cout << "Check for the FFT plan..." << endl;
|
||||
// std::cout << "Check for the FFT plan..." << std::endl;
|
||||
|
||||
// Load wisdom from file if it exists and should be used
|
||||
|
||||
@ -901,11 +900,11 @@ TBulkTriVortexAGLIIFieldCalc::TBulkTriVortexAGLIIFieldCalc(const string& wisdom,
|
||||
void TBulkTriVortexAGLIIFieldCalc::CalculateGrid() const {
|
||||
// SetParameters - method has to be called from the user before the calculation!!
|
||||
if (fParam.size() < 3) {
|
||||
cout << endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << endl;
|
||||
std::cout << std::endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!fParam[0] || !fParam[1] || !fParam[2]) {
|
||||
cout << endl << "The field, penetration depth and vortex-core radius have to have finite values in order to calculate B(x,y)!" << endl;
|
||||
std::cout << std::endl << "The field, penetration depth and vortex-core radius have to have finite values in order to calculate B(x,y)!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1054,7 +1053,7 @@ void TBulkTriVortexAGLIIFieldCalc::CalculateGrid() const {
|
||||
}
|
||||
|
||||
|
||||
TBulkTriVortexNGLFieldCalc::TBulkTriVortexNGLFieldCalc(const string& wisdom, const unsigned int steps)
|
||||
TBulkTriVortexNGLFieldCalc::TBulkTriVortexNGLFieldCalc(const std::string& wisdom, const unsigned int steps)
|
||||
: fLatticeConstant(0.0), fKappa(0.0), fSumAk(0.0), fSumOmegaSq(0.0), fSumSum(0.0)
|
||||
{
|
||||
fWisdom = wisdom;
|
||||
@ -1332,7 +1331,7 @@ void TBulkTriVortexNGLFieldCalc::CalculateGradient() const {
|
||||
// // #pragma omp parallel for default(shared) private(i) schedule(dynamic)
|
||||
// for (i = 0; i < NFFTsq; i += 1) {
|
||||
// if (fOmegaMatrix[i] < 0.0) {
|
||||
// cout << "Omega negative for index " << i << ", value: " << fOmegaMatrix[i] << endl;
|
||||
// std::cout << "Omega negative for index " << i << ", value: " << fOmegaMatrix[i] << std::endl;
|
||||
// fOmegaMatrix[i] = 0.0;
|
||||
// }
|
||||
// }
|
||||
@ -1909,11 +1908,11 @@ void TBulkTriVortexNGLFieldCalc::CalculateSumAk() const {
|
||||
void TBulkTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
// SetParameters - method has to be called from the user before the calculation!!
|
||||
if (fParam.size() < 3) {
|
||||
cout << endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << endl;
|
||||
std::cout << std::endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!fParam[0] || !fParam[1] || !fParam[2]) {
|
||||
cout << endl << "The field, penetration depth and coherence length have to have finite values in order to calculate B(x,y)!" << endl;
|
||||
std::cout << std::endl << "The field, penetration depth and coherence length have to have finite values in order to calculate B(x,y)!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1967,7 +1966,7 @@ void TBulkTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
|
||||
CalculateSumAk();
|
||||
|
||||
// cout << "fSumAk = " << fSumAk << endl;
|
||||
// std::cout << "fSumAk = " << fSumAk << std::endl;
|
||||
|
||||
// Do the Fourier transform to get omega(x,y) - Abrikosov
|
||||
|
||||
@ -2060,7 +2059,7 @@ void TBulkTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
|
||||
CalculateSumAk();
|
||||
|
||||
// cout << "fSumAk = " << fSumAk << endl;
|
||||
// std::cout << "fSumAk = " << fSumAk << std::endl;
|
||||
|
||||
// Need a copy of the aK-matrix since FFTW is manipulating the input in c2r and r2c transforms
|
||||
// Store it in the first half of the bK-matrix
|
||||
@ -2133,9 +2132,9 @@ void TBulkTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
if (fFFTin[l][0]){
|
||||
if (((fabs(fFFTin[l][0]) > 1.0E-6) && (fabs(fCheckAkConvergence[l] - fFFTin[l][0])/fFFTin[l][0] > 1.0E-3)) || \
|
||||
(fCheckAkConvergence[l]/fFFTin[l][0] < 0.0)) {
|
||||
//cout << "old: " << fCheckAkConvergence[l] << ", new: " << fFFTin[l][0] << endl;
|
||||
//std::cout << "old: " << fCheckAkConvergence[l] << ", new: " << fFFTin[l][0] << std::endl;
|
||||
akConverged = false;
|
||||
//cout << "index = " << l << endl;
|
||||
//std::cout << "index = " << l << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2156,13 +2155,13 @@ void TBulkTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
//break;
|
||||
}
|
||||
|
||||
// cout << "Ak Convergence: " << akConverged << endl;
|
||||
// std::cout << "Ak Convergence: " << akConverged << std::endl;
|
||||
|
||||
// Calculate omega again either for the bK-iteration step or again the aK-iteration
|
||||
|
||||
CalculateSumAk();
|
||||
|
||||
// cout << "fSumAk = " << fSumAk << " count = " << count << endl;
|
||||
// std::cout << "fSumAk = " << fSumAk << " count = " << count << std::endl;
|
||||
|
||||
// Do the Fourier transform to get omega(x,y)
|
||||
|
||||
@ -2222,14 +2221,14 @@ void TBulkTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
if (fBkMatrix[l][0]) {
|
||||
if (((fabs(fBkMatrix[l][0]) > 1.0E-6) && (fabs(fCheckBkConvergence[l] - fBkMatrix[l][0])/fabs(fBkMatrix[l][0]) > 1.0E-3)) || \
|
||||
(fCheckBkConvergence[l]/fBkMatrix[l][0] < 0.0)) {
|
||||
// cout << "old: " << fCheckBkConvergence[l] << ", new: " << fBkMatrix[l][0] << endl;
|
||||
// std::cout << "old: " << fCheckBkConvergence[l] << ", new: " << fBkMatrix[l][0] << std::endl;
|
||||
bkConverged = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// cout << "Bk Convergence: " << bkConverged << endl;
|
||||
// std::cout << "Bk Convergence: " << bkConverged << std::endl;
|
||||
|
||||
if (!bkConverged) {
|
||||
#ifdef HAVE_GOMP
|
||||
@ -2338,7 +2337,7 @@ void TBulkTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
|
||||
}
|
||||
|
||||
TBulkAnisotropicTriVortexLondonFieldCalc::TBulkAnisotropicTriVortexLondonFieldCalc(const string& wisdom, const unsigned int steps) {
|
||||
TBulkAnisotropicTriVortexLondonFieldCalc::TBulkAnisotropicTriVortexLondonFieldCalc(const std::string& wisdom, const unsigned int steps) {
|
||||
fWisdom = wisdom;
|
||||
if (steps % 2) {
|
||||
fSteps = steps + 1;
|
||||
@ -2358,7 +2357,7 @@ TBulkAnisotropicTriVortexLondonFieldCalc::TBulkAnisotropicTriVortexLondonFieldCa
|
||||
fFFTin = new fftw_complex[(fSteps/2 + 1) * fSteps];
|
||||
fFFTout = new double[fSteps*fSteps];
|
||||
|
||||
// cout << "Check for the FFT plan..." << endl;
|
||||
// std::cout << "Check for the FFT plan..." << std::endl;
|
||||
|
||||
// Load wisdom from file if it exists and should be used
|
||||
|
||||
@ -2389,12 +2388,12 @@ TBulkAnisotropicTriVortexLondonFieldCalc::TBulkAnisotropicTriVortexLondonFieldCa
|
||||
void TBulkAnisotropicTriVortexLondonFieldCalc::CalculateGrid() const {
|
||||
// SetParameters - method has to be called from the user before the calculation!!
|
||||
if (fParam.size() < 5) {
|
||||
cout << endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << endl;
|
||||
std::cout << std::endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!fParam[0] || !fParam[1] || !fParam[2] || !fParam[3] || !fParam[4]) {
|
||||
cout << endl << "The field, penetration depths and coherence lengths have to have finite values in order to calculate B(x,y)!" \
|
||||
<< endl;
|
||||
std::cout << std::endl << "The field, penetration depths and coherence lengths have to have finite values in order to calculate B(x,y)!" \
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2555,7 +2554,7 @@ void TBulkAnisotropicTriVortexLondonFieldCalc::CalculateGrid() const {
|
||||
|
||||
}
|
||||
|
||||
TBulkAnisotropicTriVortexMLFieldCalc::TBulkAnisotropicTriVortexMLFieldCalc(const string& wisdom, const unsigned int steps) {
|
||||
TBulkAnisotropicTriVortexMLFieldCalc::TBulkAnisotropicTriVortexMLFieldCalc(const std::string& wisdom, const unsigned int steps) {
|
||||
fWisdom = wisdom;
|
||||
if (steps % 2) {
|
||||
fSteps = steps + 1;
|
||||
@ -2575,7 +2574,7 @@ TBulkAnisotropicTriVortexMLFieldCalc::TBulkAnisotropicTriVortexMLFieldCalc(const
|
||||
fFFTin = new fftw_complex[(fSteps/2 + 1) * fSteps];
|
||||
fFFTout = new double[fSteps*fSteps];
|
||||
|
||||
// cout << "Check for the FFT plan..." << endl;
|
||||
// std::cout << "Check for the FFT plan..." << std::endl;
|
||||
|
||||
// Load wisdom from file if it exists and should be used
|
||||
|
||||
@ -2606,12 +2605,12 @@ TBulkAnisotropicTriVortexMLFieldCalc::TBulkAnisotropicTriVortexMLFieldCalc(const
|
||||
void TBulkAnisotropicTriVortexMLFieldCalc::CalculateGrid() const {
|
||||
// SetParameters - method has to be called from the user before the calculation!!
|
||||
if (fParam.size() < 5) {
|
||||
cout << endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << endl;
|
||||
std::cout << std::endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!fParam[0] || !fParam[1] || !fParam[2] || !fParam[3] || !fParam[4]) {
|
||||
cout << endl << "The field, penetration depths and coherence lengths have to have finite values in order to calculate B(x,y)!" \
|
||||
<< endl;
|
||||
std::cout << std::endl << "The field, penetration depths and coherence lengths have to have finite values in order to calculate B(x,y)!" \
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2754,7 +2753,7 @@ void TBulkAnisotropicTriVortexMLFieldCalc::CalculateGrid() const {
|
||||
|
||||
}
|
||||
|
||||
TBulkAnisotropicTriVortexAGLFieldCalc::TBulkAnisotropicTriVortexAGLFieldCalc(const string& wisdom, const unsigned int steps) {
|
||||
TBulkAnisotropicTriVortexAGLFieldCalc::TBulkAnisotropicTriVortexAGLFieldCalc(const std::string& wisdom, const unsigned int steps) {
|
||||
fWisdom = wisdom;
|
||||
if (steps % 2) {
|
||||
fSteps = steps + 1;
|
||||
@ -2774,7 +2773,7 @@ TBulkAnisotropicTriVortexAGLFieldCalc::TBulkAnisotropicTriVortexAGLFieldCalc(con
|
||||
fFFTin = new fftw_complex[(fSteps/2 + 1) * fSteps];
|
||||
fFFTout = new double[fSteps*fSteps];
|
||||
|
||||
// cout << "Check for the FFT plan..." << endl;
|
||||
// std::cout << "Check for the FFT plan..." << std::endl;
|
||||
|
||||
// Load wisdom from file if it exists and should be used
|
||||
|
||||
@ -2805,12 +2804,12 @@ TBulkAnisotropicTriVortexAGLFieldCalc::TBulkAnisotropicTriVortexAGLFieldCalc(con
|
||||
void TBulkAnisotropicTriVortexAGLFieldCalc::CalculateGrid() const {
|
||||
// SetParameters - method has to be called from the user before the calculation!!
|
||||
if (fParam.size() < 5) {
|
||||
cout << endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << endl;
|
||||
std::cout << std::endl << "The SetParameters-method has to be called before B(x,y) can be calculated!" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!fParam[0] || !fParam[1] || !fParam[2] || !fParam[3] || !fParam[4]) {
|
||||
cout << endl << "The field, penetration depths and coherence lengths have to have finite values in order to calculate B(x,y)!" \
|
||||
<< endl;
|
||||
std::cout << std::endl << "The field, penetration depths and coherence lengths have to have finite values in order to calculate B(x,y)!" \
|
||||
<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,6 @@
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include "TMath.h"
|
||||
|
||||
@ -60,7 +59,7 @@ TFilmVortexFieldCalc::~TFilmVortexFieldCalc() {
|
||||
FILE *wordsOfWisdomW;
|
||||
wordsOfWisdomW = fopen(fWisdom.c_str(), "w");
|
||||
if (wordsOfWisdomW == NULL) {
|
||||
cout << "TFilmVortexFieldCalc::~TFilmVortexFieldCalc(): Could not open file ... No wisdom is exported..." << endl;
|
||||
std::cout << "TFilmVortexFieldCalc::~TFilmVortexFieldCalc(): Could not open file ... No wisdom is exported..." << std::endl;
|
||||
} else {
|
||||
fftwf_export_wisdom_to_file(wordsOfWisdomW);
|
||||
fclose(wordsOfWisdomW);
|
||||
@ -71,7 +70,7 @@ TFilmVortexFieldCalc::~TFilmVortexFieldCalc() {
|
||||
|
||||
fftwf_destroy_plan(fFFTplan);
|
||||
|
||||
delete[] fFFTin; fFFTin = 0;
|
||||
delete[] fFFTin; fFFTin = nullptr;
|
||||
|
||||
for(unsigned int i(0); i<3; ++i){
|
||||
delete[] fBout[i]; fBout[i] = 0;
|
||||
@ -117,10 +116,10 @@ float TFilmVortexFieldCalc::GetBmax() const {
|
||||
}
|
||||
|
||||
|
||||
TFilmTriVortexNGLFieldCalc::TFilmTriVortexNGLFieldCalc(const string& wisdom, const unsigned int steps, const unsigned int stepsZ)
|
||||
TFilmTriVortexNGLFieldCalc::TFilmTriVortexNGLFieldCalc(const std::string& wisdom, const unsigned int steps, const unsigned int stepsZ)
|
||||
: fLatticeConstant(0.0), fKappa(0.0), fSumOmegaSq(0.0), fSumSum(0.0), fFind3dSolution(false)
|
||||
{
|
||||
// cout << "TFilmTriVortexNGLFieldCalc::TFilmTriVortexNGLFieldCalc... ";
|
||||
// std::cout << "TFilmTriVortexNGLFieldCalc::TFilmTriVortexNGLFieldCalc... ";
|
||||
|
||||
fWisdom = wisdom;
|
||||
switch (stepsZ % 2) {
|
||||
@ -171,7 +170,7 @@ TFilmTriVortexNGLFieldCalc::TFilmTriVortexNGLFieldCalc(const string& wisdom, con
|
||||
temp = new float[stepsSqStZ]; // (grad omega)_(x,y,z)
|
||||
fOmegaDiffMatrix.push_back(temp);
|
||||
}
|
||||
temp = 0;
|
||||
temp = nullptr;
|
||||
|
||||
fOmegaMatrix = new float[stepsSqStZ]; // |psi|^2
|
||||
|
||||
@ -201,7 +200,7 @@ TFilmTriVortexNGLFieldCalc::TFilmTriVortexNGLFieldCalc(const string& wisdom, con
|
||||
|
||||
FILE *wordsOfWisdomR;
|
||||
wordsOfWisdomR = fopen(fWisdom.c_str(), "r");
|
||||
if (wordsOfWisdomR == NULL) {
|
||||
if (wordsOfWisdomR == nullptr) {
|
||||
fUseWisdom = false;
|
||||
} else {
|
||||
wisdomLoaded = fftwf_import_wisdom_from_file(wordsOfWisdomR);
|
||||
@ -215,7 +214,7 @@ TFilmTriVortexNGLFieldCalc::TFilmTriVortexNGLFieldCalc(const string& wisdom, con
|
||||
// create the FFT plans
|
||||
|
||||
if (fUseWisdom) {
|
||||
// cout << "use wisdom ... ";
|
||||
// std::cout << "use wisdom ... ";
|
||||
// use the first plan from the base class here - it will be destroyed by the base class destructor
|
||||
fFFTplan = fftwf_plan_dft_3d(fSteps, fSteps, fStepsZ, fFFTin, fRealSpaceMatrix, FFTW_BACKWARD, FFTW_EXHAUSTIVE);
|
||||
fFFTplanBkToBandQ = fftwf_plan_dft_3d(fSteps, fSteps, fStepsZ, fBkMatrix, fBkMatrix, FFTW_BACKWARD, FFTW_EXHAUSTIVE);
|
||||
@ -226,7 +225,7 @@ TFilmTriVortexNGLFieldCalc::TFilmTriVortexNGLFieldCalc(const string& wisdom, con
|
||||
fFFTplanForBatSurf = fftwf_plan_dft_2d(fSteps, fSteps, fBkS, fBkS, FFTW_FORWARD, FFTW_EXHAUSTIVE);
|
||||
}
|
||||
else {
|
||||
// cout << "do not use wisdom ... ";
|
||||
// std::cout << "do not use wisdom ... ";
|
||||
// use the first plan from the base class here - it will be destroyed by the base class destructor
|
||||
fFFTplan = fftwf_plan_dft_3d(fSteps, fSteps, fStepsZ, fFFTin, fRealSpaceMatrix, FFTW_BACKWARD, FFTW_ESTIMATE);
|
||||
fFFTplanBkToBandQ = fftwf_plan_dft_3d(fSteps, fSteps, fStepsZ, fBkMatrix, fBkMatrix, FFTW_BACKWARD, FFTW_ESTIMATE);
|
||||
@ -236,7 +235,7 @@ TFilmTriVortexNGLFieldCalc::TFilmTriVortexNGLFieldCalc(const string& wisdom, con
|
||||
fFFTplanForPk2 = fftwf_plan_dft_3d(fSteps, fSteps, fStepsZ, fQMatrix, fQMatrix, FFTW_BACKWARD, FFTW_ESTIMATE);
|
||||
fFFTplanForBatSurf = fftwf_plan_dft_2d(fSteps, fSteps, fBkS, fBkS, FFTW_FORWARD, FFTW_ESTIMATE);
|
||||
}
|
||||
// cout << "done" << endl;
|
||||
// std::cout << "done" << endl;
|
||||
}
|
||||
|
||||
TFilmTriVortexNGLFieldCalc::~TFilmTriVortexNGLFieldCalc() {
|
||||
@ -254,19 +253,19 @@ TFilmTriVortexNGLFieldCalc::~TFilmTriVortexNGLFieldCalc() {
|
||||
}
|
||||
fOmegaDiffMatrix.clear();
|
||||
|
||||
delete[] fOmegaMatrix; fOmegaMatrix = 0;
|
||||
delete[] fBkMatrix; fBkMatrix = 0;
|
||||
delete[] fRealSpaceMatrix; fRealSpaceMatrix = 0;
|
||||
delete[] fPkMatrix; fPkMatrix = 0;
|
||||
delete[] fQMatrix; fQMatrix = 0;
|
||||
delete[] fQMatrixA; fQMatrixA = 0;
|
||||
delete[] fSumAkFFTin; fSumAkFFTin = 0;
|
||||
delete[] fSumAk; fSumAk = 0;
|
||||
delete[] fBkS; fBkS = 0;
|
||||
delete[] fGstorage; fGstorage = 0;
|
||||
delete[] fOmegaMatrix; fOmegaMatrix = nullptr;
|
||||
delete[] fBkMatrix; fBkMatrix = nullptr;
|
||||
delete[] fRealSpaceMatrix; fRealSpaceMatrix = nullptr;
|
||||
delete[] fPkMatrix; fPkMatrix = nullptr;
|
||||
delete[] fQMatrix; fQMatrix = nullptr;
|
||||
delete[] fQMatrixA; fQMatrixA = nullptr;
|
||||
delete[] fSumAkFFTin; fSumAkFFTin = nullptr;
|
||||
delete[] fSumAk; fSumAk = nullptr;
|
||||
delete[] fBkS; fBkS = nullptr;
|
||||
delete[] fGstorage; fGstorage = nullptr;
|
||||
|
||||
delete[] fCheckAkConvergence; fCheckAkConvergence = 0;
|
||||
delete[] fCheckBkConvergence; fCheckBkConvergence = 0;
|
||||
delete[] fCheckAkConvergence; fCheckAkConvergence = nullptr;
|
||||
delete[] fCheckBkConvergence; fCheckBkConvergence = nullptr;
|
||||
}
|
||||
|
||||
void TFilmTriVortexNGLFieldCalc::CalculateGatVortexCore() const {
|
||||
@ -2612,11 +2611,11 @@ void TFilmTriVortexNGLFieldCalc::CalculateSumAk() const {
|
||||
void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
// SetParameters - method has to be called from the user before the calculation!!
|
||||
if (fParam.size() < 4) {
|
||||
cout << endl << "The SetParameters-method has to be called before B(x,y,z) can be calculated!" << endl;
|
||||
std::cout << std::endl << "The SetParameters-method has to be called before B(x,y,z) can be calculated!" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!fParam[0] || !fParam[1] || !fParam[2] || !fParam[3]) {
|
||||
cout << endl << "The field, penetration depth, coherence length and layer thickness have to have finite values in order to calculate B(x,y,z)!" << endl;
|
||||
std::cout << std::endl << "The field, penetration depth, coherence length and layer thickness have to have finite values in order to calculate B(x,y,z)!" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2785,7 +2784,7 @@ void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
|
||||
// CalculateGatVortexCore();
|
||||
// for (k = 0; k < NFFTz; ++k) {
|
||||
// cout << "g[" << k << "] = " << fGstorage[k] << endl;
|
||||
// std::cout << "g[" << k << "] = " << fGstorage[k] << std::endl;
|
||||
// }
|
||||
|
||||
#ifdef HAVE_GOMP
|
||||
@ -2800,7 +2799,7 @@ void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
(fOmegaDiffMatrix[0][l]*fOmegaDiffMatrix[0][l] + fOmegaDiffMatrix[1][l]*fOmegaDiffMatrix[1][l] + \
|
||||
fOmegaDiffMatrix[2][l]*fOmegaDiffMatrix[2][l])/(fourKappaSq*fOmegaMatrix[l]);
|
||||
} else {
|
||||
// cout << "index where omega is zero: " << l << endl;
|
||||
// std::cout << "index where omega is zero: " << l << std::endl;
|
||||
fRealSpaceMatrix[l][0] = 0.0;
|
||||
}
|
||||
fRealSpaceMatrix[l][1] = 0.0;
|
||||
@ -2862,7 +2861,7 @@ void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
(fOmegaDiffMatrix[0][index]*fOmegaDiffMatrix[0][index] + fOmegaDiffMatrix[1][index]*fOmegaDiffMatrix[1][index] + \
|
||||
fOmegaDiffMatrix[2][index]*fOmegaDiffMatrix[2][index])/(fourKappaSq*fOmegaMatrix[index]);
|
||||
} else {
|
||||
// cout << "! fOmegaMatrix at index " << index << endl;
|
||||
// std::cout << "! fOmegaMatrix at index " << index << std::endl;
|
||||
// fSumSum -= fGstorage[k];
|
||||
index = k + fStepsZ*(j + fSteps*(i + 1));
|
||||
if (i < NFFT - 1 && fOmegaMatrix[index]) {
|
||||
@ -2898,9 +2897,9 @@ void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
if (fFFTin[index][0]) {
|
||||
if (((fabs(fFFTin[index][0]) > 1.0E-5f) && (fabs(fCheckAkConvergence[index] - fFFTin[index][0])/fFFTin[index][0] > 5.0E-3f)) \
|
||||
|| ((fabs(fFFTin[index][0]) > 1.0E-10f) && (fCheckAkConvergence[index]/fFFTin[index][0] < 0.0))) {
|
||||
//cout << "old: " << fCheckAkConvergence[index] << ", new: " << fFFTin[index][0] << endl;
|
||||
//std::cout << "old: " << fCheckAkConvergence[index] << ", new: " << fFFTin[index][0] << std::endl;
|
||||
akConverged = false;
|
||||
//cout << "count = " << count << ", Ak index = " << index << endl;
|
||||
//std::cout << "count = " << count << ", Ak index = " << index << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2926,17 +2925,17 @@ void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
}
|
||||
}
|
||||
|
||||
// cout << "Ak Convergence: " << akConverged << endl;
|
||||
// std::cout << "Ak Convergence: " << akConverged << std::endl;
|
||||
|
||||
// Calculate omega again either for the bK-iteration step or again the aK-iteration
|
||||
|
||||
CalculateSumAk();
|
||||
|
||||
// cout << "fSumAk = ";
|
||||
// std::cout << "fSumAk = ";
|
||||
// for (k = 0; k < NFFTz; ++k){
|
||||
// cout << fSumAk[k][0] << ", ";
|
||||
// std::cout << fSumAk[k][0] << ", ";
|
||||
// }
|
||||
// cout << endl;
|
||||
// std::cout << endl;
|
||||
|
||||
meanAk = 0.0f;
|
||||
for (k = 0; k < NFFTz; ++k) {
|
||||
@ -2995,7 +2994,7 @@ void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
fBkS[index][1] = 0.f;
|
||||
}
|
||||
|
||||
// cout << "fC = " << fC << ", meanAk = " << meanAk << endl;
|
||||
// std::cout << "fC = " << fC << ", meanAk = " << meanAk << endl;
|
||||
|
||||
fSumSum = fC*meanAk;
|
||||
|
||||
@ -3027,9 +3026,9 @@ void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
if (((fabs(fBkMatrix[index][0]) > 1.0E-5f) && \
|
||||
(fabs(fCheckBkConvergence[index] - fBkMatrix[index][0])/fBkMatrix[index][0] > 5.0E-3f)) \
|
||||
|| ((fabs(fBkMatrix[index][0]) > 1.0E-10f) && (fCheckBkConvergence[index]/fBkMatrix[index][0] < 0.0))) {
|
||||
//cout << "old: " << fCheckBkConvergence[index] << ", new: " << fBkMatrix[index][0] << endl;
|
||||
//std::cout << "old: " << fCheckBkConvergence[index] << ", new: " << fBkMatrix[index][0] << std::endl;
|
||||
bkConverged = false;
|
||||
//cout << "count = " << count << ", Bk index = " << index << endl;
|
||||
//std::cout << "count = " << count << ", Bk index = " << index << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -3038,7 +3037,7 @@ void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
break;
|
||||
}
|
||||
|
||||
// cout << "Bk Convergence: " << bkConverged << endl;
|
||||
// std::cout << "Bk Convergence: " << bkConverged << std::endl;
|
||||
|
||||
if (!bkConverged) {
|
||||
#ifdef HAVE_GOMP
|
||||
@ -3069,7 +3068,7 @@ void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
}
|
||||
|
||||
if (count == 50) {
|
||||
cout << "3D iterations aborted after " << count << " steps" << endl;
|
||||
std::cout << "3D iterations aborted after " << count << " steps" << std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3080,14 +3079,14 @@ void TFilmTriVortexNGLFieldCalc::CalculateGrid() const {
|
||||
|
||||
if (bkConverged && akConverged) {
|
||||
if (!fFind3dSolution) {
|
||||
//cout << "count = " << count << " 2D converged" << endl;
|
||||
//cout << "2D iterations converged after " << count << " steps" << endl;
|
||||
//std::cout << "count = " << count << " 2D converged" << std::endl;
|
||||
//std::cout << "2D iterations converged after " << count << " steps" << std::endl;
|
||||
//break;
|
||||
akConverged = false;
|
||||
bkConverged = false;
|
||||
fFind3dSolution = true;
|
||||
} else {
|
||||
cout << "3D iterations converged after " << count << " steps" << endl;
|
||||
std::cout << "3D iterations converged after " << count << " steps" << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
57
src/external/libFitPofB/classes/TLondon1D.cpp
vendored
57
src/external/libFitPofB/classes/TLondon1D.cpp
vendored
@ -32,7 +32,6 @@
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
using namespace std;
|
||||
|
||||
#include <TSAXParser.h>
|
||||
#include "BMWStartupHandler.h"
|
||||
@ -256,7 +255,7 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
|
||||
|
||||
if(!only_phase_changed) {
|
||||
|
||||
// cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << endl;
|
||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||
|
||||
for (unsigned int i(2); i<fPar.size(); i++)
|
||||
fParForBofZ[i-2] = par[i];
|
||||
@ -278,7 +277,7 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
|
||||
fPofT->DoFFT();
|
||||
|
||||
}/* else {
|
||||
cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << endl;
|
||||
std::cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << std::endl;
|
||||
}*/
|
||||
|
||||
fPofT->CalcPol(fParForPofT);
|
||||
@ -416,7 +415,7 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
||||
|
||||
if(!only_phase_changed) {
|
||||
|
||||
// cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << endl;
|
||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||
|
||||
for (unsigned int i(2); i<fPar.size(); i++)
|
||||
fParForBofZ[i-2] = par[i];
|
||||
@ -433,7 +432,7 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
||||
for(unsigned int i(6); i<8; i++)
|
||||
weights.push_back(par[i]);
|
||||
|
||||
// cout << "Weighting has changed, re-calculating n(z) now..." << endl;
|
||||
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
||||
fImpProfile->WeightLayers(par[1], interfaces, weights);
|
||||
|
||||
interfaces.clear();
|
||||
@ -456,7 +455,7 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
||||
fPofT->DoFFT();
|
||||
|
||||
}/* else {
|
||||
cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << endl;
|
||||
std::cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << std::endl;
|
||||
}*/
|
||||
|
||||
fPofT->CalcPol(fParForPofT);
|
||||
@ -466,11 +465,11 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
||||
|
||||
// // Debugging start
|
||||
// if (!(fCallCounter%10000)){
|
||||
// cout << fCallCounter-1 << "\t";
|
||||
// std::cout << fCallCounter-1 << "\t";
|
||||
// for (unsigned int i(0); i<fPar.size(); i++){
|
||||
// cout << fPar[i] << "\t";
|
||||
// std::cout << fPar[i] << "\t";
|
||||
// }
|
||||
// cout << endl;
|
||||
// std::cout << std::endl;
|
||||
// }
|
||||
// // Debugging end
|
||||
|
||||
@ -597,7 +596,7 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
||||
|
||||
if(!only_phase_changed) {
|
||||
|
||||
// cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << endl;
|
||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||
|
||||
for (unsigned int i(2); i<par.size(); i++)
|
||||
fParForBofZ[i-2] = par[i];
|
||||
@ -615,7 +614,7 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
||||
for(unsigned int i(8); i<11; i++)
|
||||
weights.push_back(par[i]);
|
||||
|
||||
// cout << "Weighting has changed, re-calculating n(z) now..." << endl;
|
||||
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
||||
fImpProfile->WeightLayers(par[1], interfaces, weights);
|
||||
|
||||
interfaces.clear();
|
||||
@ -638,7 +637,7 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
||||
|
||||
|
||||
}/* else {
|
||||
cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << endl;
|
||||
std::cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << std::endl;
|
||||
}*/
|
||||
|
||||
fPofT->CalcPol(fParForPofT);
|
||||
@ -766,7 +765,7 @@ double TProximity1D1LHS::operator()(double t, const vector<double> &par) const {
|
||||
|
||||
if(!only_phase_changed) {
|
||||
|
||||
// cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << endl;
|
||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||
|
||||
for (unsigned int i(2); i<fPar.size(); i++)
|
||||
fParForBofZ[i-2] = par[i];
|
||||
@ -789,7 +788,7 @@ double TProximity1D1LHS::operator()(double t, const vector<double> &par) const {
|
||||
|
||||
|
||||
}/* else {
|
||||
cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << endl;
|
||||
std::cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << std::endl;
|
||||
}*/
|
||||
|
||||
fPofT->CalcPol(fParForPofT);
|
||||
@ -920,7 +919,7 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
||||
|
||||
if(!only_phase_changed) {
|
||||
|
||||
// cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << endl;
|
||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||
|
||||
for (unsigned int i(2); i<par.size(); i++)
|
||||
fParForBofZ[i-2] = par[i];
|
||||
@ -939,7 +938,7 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
||||
for(unsigned int i(10); i<14; i++)
|
||||
weights.push_back(par[i]);
|
||||
|
||||
// cout << "Weighting has changed, re-calculating n(z) now..." << endl;
|
||||
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
||||
fImpProfile->WeightLayers(par[1], interfaces, weights);
|
||||
|
||||
interfaces.clear();
|
||||
@ -961,7 +960,7 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
||||
fPofT->DoFFT();
|
||||
|
||||
}/* else {
|
||||
cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << endl;
|
||||
std::cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << std::endl;
|
||||
}*/
|
||||
|
||||
fPofT->CalcPol(fParForPofT);
|
||||
@ -1092,7 +1091,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
||||
|
||||
if(!only_phase_changed) {
|
||||
|
||||
// cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << endl;
|
||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||
|
||||
for (unsigned int i(2); i<par.size(); i++)
|
||||
fParForBofZ[i-2] = par[i];
|
||||
@ -1111,7 +1110,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
||||
for(unsigned int i(9); i<13; i++)
|
||||
weights.push_back(par[i]);
|
||||
|
||||
// cout << "Weighting has changed, re-calculating n(z) now..." << endl;
|
||||
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
||||
fImpProfile->WeightLayers(par[1], interfaces, weights);
|
||||
|
||||
interfaces.clear();
|
||||
@ -1133,7 +1132,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
||||
fPofT->DoFFT();
|
||||
|
||||
}/* else {
|
||||
cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << endl;
|
||||
std::cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << std::endl;
|
||||
}*/
|
||||
|
||||
fPofT->CalcPol(fParForPofT);
|
||||
@ -1163,7 +1162,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
||||
// int status = parseXmlFile(saxParser, startup_path_name.c_str());
|
||||
// // check for parse errors
|
||||
// if (status) { // error
|
||||
// cout << endl << "**WARNING** Reading/parsing " << startup_path_name << " failed." << endl;
|
||||
// std::cout << endl << "**WARNING** Reading/parsing " << startup_path_name << " failed." << std::endl;
|
||||
// }
|
||||
//
|
||||
// fNSteps = startupHandler->GetNSteps();
|
||||
@ -1213,12 +1212,12 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
||||
// fPar = par;
|
||||
//
|
||||
// /* for (unsigned int i(0); i<fPar.size(); i++){
|
||||
// cout << "fPar[" << i << "] = " << fPar[i] << endl;
|
||||
// std::cout << "fPar[" << i << "] = " << fPar[i] << std::endl;
|
||||
// }
|
||||
// */
|
||||
// for (unsigned int i(2); i<fPar.size(); i++){
|
||||
// fParForBofZ.push_back(fPar[i]);
|
||||
// // cout << "fParForBofZ[" << i-2 << "] = " << fParForBofZ[i-2] << endl;
|
||||
// // std::cout << "fParForBofZ[" << i-2 << "] = " << fParForBofZ[i-2] << std::endl;
|
||||
// }
|
||||
// fFirstCall=false;
|
||||
// }
|
||||
@ -1253,7 +1252,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
||||
//
|
||||
// if(!only_phase_changed) {
|
||||
//
|
||||
// // cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << endl;
|
||||
// // std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||
//
|
||||
// for (unsigned int i(2); i<par.size(); i++)
|
||||
// fParForBofZ[i-2] = par[i];
|
||||
@ -1262,15 +1261,15 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
||||
//
|
||||
// /* DEBUG ---------------------------
|
||||
// for(unsigned int i(0); i<fParForBofZ.size(); i++) {
|
||||
// cout << "ParForBofZ[" << i << "] = " << fParForBofZ[i] << endl;
|
||||
// std::cout << "ParForBofZ[" << i << "] = " << fParForBofZ[i] << std::endl;
|
||||
// }
|
||||
//
|
||||
// for(unsigned int i(0); i<fParForPofB.size(); i++) {
|
||||
// cout << "ParForPofB[" << i << "] = " << fParForPofB[i] << endl;
|
||||
// std::cout << "ParForPofB[" << i << "] = " << fParForPofB[i] << std::endl;
|
||||
// }
|
||||
//
|
||||
// for(unsigned int i(0); i<fParForPofT.size(); i++) {
|
||||
// cout << "ParForPofT[" << i << "] = " << fParForPofT[i] << endl;
|
||||
// std::cout << "ParForPofT[" << i << "] = " << fParForPofT[i] << std::endl;
|
||||
// }
|
||||
// ------------------------------------*/
|
||||
//
|
||||
@ -1284,7 +1283,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
||||
// for(unsigned int i(par.size()-4); i<par.size(); i++)
|
||||
// weights.push_back(par[i]);
|
||||
//
|
||||
// // cout << "Weighting has changed, re-calculating n(z) now..." << endl;
|
||||
// // std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
||||
// fImpProfile->WeightLayers(par[1], interfaces, weights);
|
||||
// }
|
||||
//
|
||||
@ -1293,7 +1292,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
||||
// fPofT->DoFFT(PofB4);
|
||||
//
|
||||
// }/* else {
|
||||
// cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << endl;
|
||||
// std::cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << std::endl;
|
||||
// }*/
|
||||
//
|
||||
// fPofT->CalcPol(fParForPofT);
|
||||
|
24
src/external/libFitPofB/classes/TPofBCalc.cpp
vendored
24
src/external/libFitPofB/classes/TPofBCalc.cpp
vendored
@ -46,7 +46,7 @@
|
||||
#include <ctime>
|
||||
/-------------------------------------------------------*/
|
||||
|
||||
TPofBCalc::TPofBCalc(const vector<double> ¶) : fBmin(0.0), fBmax(0.0), fDT(para[0]), fDB(para[1]), fPBExists(false) {
|
||||
TPofBCalc::TPofBCalc(const std::vector<double> ¶) : fBmin(0.0), fBmax(0.0), fDT(para[0]), fDB(para[1]), fPBExists(false) {
|
||||
fPBSize = static_cast<int>(1.0/(gBar*fDT*fDB));
|
||||
if (fPBSize % 2) {
|
||||
fPBSize += 1;
|
||||
@ -74,7 +74,7 @@ TPofBCalc::TPofBCalc(const vector<double> ¶) : fBmin(0.0), fBmax(0.0), fDT(p
|
||||
|
||||
// Do not actually calculate P(B) but take it from a B and a P(B) vector of the same size
|
||||
|
||||
TPofBCalc::TPofBCalc(const vector<double>& b, const vector<double>& pb, double dt) {
|
||||
TPofBCalc::TPofBCalc(const std::vector<double>& b, const std::vector<double>& pb, double dt) {
|
||||
assert(b.size() == pb.size() && b.size() >= 2);
|
||||
fPBSize = pb.size();
|
||||
|
||||
@ -94,7 +94,7 @@ TPofBCalc::TPofBCalc(const vector<double>& b, const vector<double>& pb, double d
|
||||
fPB[i] = pb[i];
|
||||
}
|
||||
|
||||
vector<double>::const_iterator iter, iterB;
|
||||
std::vector<double>::const_iterator iter, iterB;
|
||||
iterB = b.begin();
|
||||
|
||||
for(iter = pb.begin(); iter != pb.end(); ++iter){
|
||||
@ -165,7 +165,7 @@ void TPofBCalc::Normalize(unsigned int minFilledIndex = 0, unsigned int maxFille
|
||||
|
||||
// Do not actually calculate P(B) but take it from a B and a P(B) vector of the same size
|
||||
|
||||
void TPofBCalc::SetPB(const vector<double> &pb) const {
|
||||
void TPofBCalc::SetPB(const std::vector<double> &pb) const {
|
||||
assert(fPBSize == pb.size());
|
||||
|
||||
int i;
|
||||
@ -183,7 +183,7 @@ void TPofBCalc::SetPB(const vector<double> &pb) const {
|
||||
return;
|
||||
}
|
||||
|
||||
void TPofBCalc::Calculate(const string &type, const vector<double> ¶) {
|
||||
void TPofBCalc::Calculate(const std::string &type, const std::vector<double> ¶) {
|
||||
|
||||
if (type == "skg"){ // skewed Gaussian
|
||||
|
||||
@ -235,7 +235,7 @@ void TPofBCalc::Calculate(const string &type, const vector<double> ¶) {
|
||||
// Parameters: dt[us], dB[G], Energy[keV], Bbg[G], width[us^{-1}], weight[1]
|
||||
//-----------
|
||||
|
||||
void TPofBCalc::Calculate(const TBofZCalcInverse *BofZ, const TTrimSPData *dataTrimSP, const vector<double> ¶) {
|
||||
void TPofBCalc::Calculate(const TBofZCalcInverse *BofZ, const TTrimSPData *dataTrimSP, const std::vector<double> ¶) {
|
||||
|
||||
if(fPBExists)
|
||||
return;
|
||||
@ -261,7 +261,7 @@ void TPofBCalc::Calculate(const TBofZCalcInverse *BofZ, const TTrimSPData *dataT
|
||||
|
||||
for (i = firstZerosEnd; i <= lastZerosStart; ++i) {
|
||||
|
||||
vector< pair<double, double> > inv;
|
||||
std::vector< std::pair<double, double> > inv;
|
||||
inv = BofZ->GetInverseAndDerivative(fB[i]);
|
||||
|
||||
for (unsigned int j(0); j < inv.size(); ++j) {
|
||||
@ -285,7 +285,7 @@ void TPofBCalc::Calculate(const TBofZCalcInverse *BofZ, const TTrimSPData *dataT
|
||||
// Parameters: dt[us], dB[G], Energy[keV]
|
||||
//-----------
|
||||
|
||||
void TPofBCalc::Calculate(const TBofZCalc *BofZ, const TTrimSPData *dataTrimSP, const vector<double> ¶, unsigned int zonk) {
|
||||
void TPofBCalc::Calculate(const TBofZCalc *BofZ, const TTrimSPData *dataTrimSP, const std::vector<double> ¶, unsigned int zonk) {
|
||||
|
||||
if(fPBExists)
|
||||
return;
|
||||
@ -306,8 +306,8 @@ void TPofBCalc::Calculate(const TBofZCalc *BofZ, const TTrimSPData *dataTrimSP,
|
||||
|
||||
// calculate p(B) from B(z)
|
||||
|
||||
vector<double> *bofzZ = BofZ->DataZ();
|
||||
vector<double> *bofzBZ = BofZ->DataBZ();
|
||||
std::vector<double> *bofzZ = BofZ->DataZ();
|
||||
std::vector<double> *bofzBZ = BofZ->DataBZ();
|
||||
double ddZ(BofZ->GetDZ());
|
||||
|
||||
/* USED FOR DEBUGGING-----------------------------------
|
||||
@ -439,7 +439,7 @@ void TPofBCalc::Calculate(const TBofZCalc *BofZ, const TTrimSPData *dataTrimSP,
|
||||
// Parameters: dt[us], dB[G] [, Bbg[G], width[us^{-1}], weight[1] ]
|
||||
//-----------
|
||||
|
||||
void TPofBCalc::Calculate(const TBulkVortexFieldCalc *vortexLattice, const vector<double> ¶) {
|
||||
void TPofBCalc::Calculate(const TBulkVortexFieldCalc *vortexLattice, const std::vector<double> ¶) {
|
||||
|
||||
if(fPBExists)
|
||||
return;
|
||||
@ -569,7 +569,7 @@ void TPofBCalc::Calculate(const TBulkVortexFieldCalc *vortexLattice, const vecto
|
||||
if (chunk < 10)
|
||||
chunk = 10;
|
||||
|
||||
vector< vector<unsigned int> > pBvec(n, vector<unsigned int>(fPBSize, 0));
|
||||
std::vector< std::vector<unsigned int> > pBvec(n, std::vector<unsigned int>(fPBSize, 0));
|
||||
|
||||
int indexStep(static_cast<int>(floor(static_cast<float>(numberOfSteps_2)/static_cast<float>(n))));
|
||||
|
||||
|
50
src/external/libFitPofB/classes/TPofTCalc.cpp
vendored
50
src/external/libFitPofB/classes/TPofTCalc.cpp
vendored
@ -66,12 +66,12 @@
|
||||
// Parameters: phase, dt, dB
|
||||
//------------------
|
||||
|
||||
TPofTCalc::TPofTCalc (const TPofBCalc *PofB, const string &wisdom, const vector<double> &par) : fWisdom(wisdom) {
|
||||
TPofTCalc::TPofTCalc (const TPofBCalc *PofB, const std::string &wisdom, const std::vector<double> &par) : fWisdom(wisdom) {
|
||||
|
||||
#if !defined(_WIN32GCC) && defined(HAVE_LIBFFTW3_THREADS) && defined(HAVE_GOMP)
|
||||
int init_threads(fftw_init_threads());
|
||||
if (!init_threads)
|
||||
cout << "TPofTCalc::TPofTCalc: Couldn't initialize multiple FFTW-threads ..." << endl;
|
||||
std::cout << "TPofTCalc::TPofTCalc: Couldn't initialize multiple FFTW-threads ..." << std::endl;
|
||||
else
|
||||
fftw_plan_with_nthreads(omp_get_num_procs());
|
||||
#endif
|
||||
@ -144,7 +144,7 @@ TPofTCalc::~TPofTCalc() {
|
||||
FILE *wordsOfWisdomW;
|
||||
wordsOfWisdomW = fopen(fWisdom.c_str(), "w");
|
||||
if (wordsOfWisdomW == NULL) {
|
||||
cout << "TPofTCalc::~TPofTCalc(): Could not open file ... No wisdom is exported..." << endl;
|
||||
std::cout << "TPofTCalc::~TPofTCalc(): Could not open file ... No wisdom is exported..." << std::endl;
|
||||
} else {
|
||||
fftw_export_wisdom_to_file(wordsOfWisdomW);
|
||||
fclose(wordsOfWisdomW);
|
||||
@ -180,7 +180,7 @@ void TPofTCalc::DoFFT() {
|
||||
// Parameters: phase, dt, dB
|
||||
//---------------------
|
||||
|
||||
void TPofTCalc::CalcPol(const vector<double> &par) {
|
||||
void TPofTCalc::CalcPol(const std::vector<double> &par) {
|
||||
|
||||
double sinph(sin(par[0]*PI/180.0)), cosph(cos(par[0]*PI/180.0));
|
||||
int i;
|
||||
@ -206,7 +206,7 @@ double TPofTCalc::Eval(double t) const {
|
||||
if (i < fNFFT/2){
|
||||
return fPT[i]+(fPT[i+1]-fPT[i])/(fT[i+1]-fT[i])*(t-fT[i]);
|
||||
}
|
||||
cout << "TPofTCalc::Eval: No data for the time " << t << " us available! Returning -999.0 ..." << endl;
|
||||
std::cout << "TPofTCalc::Eval: No data for the time " << t << " us available! Returning -999.0 ..." << std::endl;
|
||||
return -999.0;
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ double TPofTCalc::Eval(double t) const {
|
||||
// Parameters: output filename, par(dt, dB, timeres, channels, asyms, phases, t0s, N0s, bgs) optPar(field, energy)
|
||||
//---------------------
|
||||
|
||||
void TPofTCalc::FakeData(const string &rootOutputFileName, const vector<double> &par, const vector<double> *optPar = 0) {
|
||||
void TPofTCalc::FakeData(const string &rootOutputFileName, const std::vector<double> &par, const std::vector<double> *optPar = 0) {
|
||||
|
||||
//determine the number of histograms to be built
|
||||
unsigned int numHist(0);
|
||||
@ -225,18 +225,18 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const vector<double>
|
||||
numHist=(par.size()-4)/5;
|
||||
|
||||
if(!numHist){
|
||||
cout << "TPofTCalc::FakeData: The number of parameters for the histogram creation is not correct. Do nothing." << endl;
|
||||
std::cout << "TPofTCalc::FakeData: The number of parameters for the histogram creation is not correct. Do nothing." << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
cout << "TPofTCalc::FakeData: " << numHist << " histograms to be built" << endl;
|
||||
std::cout << "TPofTCalc::FakeData: " << numHist << " histograms to be built" << std::endl;
|
||||
|
||||
int nChannels = int(par[3]);
|
||||
vector<int> t0;
|
||||
vector<double> asy0;
|
||||
vector<double> phase0;
|
||||
vector<double> N0;
|
||||
vector<double> bg;
|
||||
std::vector<int> t0;
|
||||
std::vector<double> asy0;
|
||||
std::vector<double> phase0;
|
||||
std::vector<double> N0;
|
||||
std::vector<double> bg;
|
||||
|
||||
for(unsigned int i(0); i<numHist; ++i) {
|
||||
t0.push_back(int(par[i+4+numHist*2]));
|
||||
@ -246,13 +246,13 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const vector<double>
|
||||
bg.push_back(par[i+4+numHist*4]);
|
||||
}
|
||||
|
||||
vector<double> param; // Parameters for TPofTCalc::CalcPol
|
||||
std::vector<double> param; // Parameters for TPofTCalc::CalcPol
|
||||
param.push_back(0.0); // phase
|
||||
param.push_back(par[0]); // dt
|
||||
param.push_back(par[1]); // dB
|
||||
|
||||
vector< vector<double> > asy;
|
||||
vector<double> asydata(nChannels);
|
||||
std::vector< std::vector<double> > asy;
|
||||
std::vector<double> asydata(nChannels);
|
||||
double ttime;
|
||||
int j,k;
|
||||
|
||||
@ -286,12 +286,12 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const vector<double>
|
||||
// }
|
||||
asy.push_back(asydata);
|
||||
// asydata.clear();
|
||||
cout << "TPofTCalc::FakeData: " << i+1 << "/" << numHist << " calculated!" << endl;
|
||||
std::cout << "TPofTCalc::FakeData: " << i+1 << "/" << numHist << " calculated!" << std::endl;
|
||||
}
|
||||
|
||||
// calculate the histograms
|
||||
vector< vector<double> > histo;
|
||||
vector<double> data(nChannels);
|
||||
std::vector< std::vector<double> > histo;
|
||||
std::vector<double> data(nChannels);
|
||||
|
||||
for (unsigned int i(0); i<numHist; ++i) { // loop over all histos
|
||||
|
||||
@ -307,16 +307,16 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const vector<double>
|
||||
// end omp
|
||||
|
||||
histo.push_back(data);
|
||||
cout << "TPofTCalc::FakeData: " << i+1 << "/" << numHist << " done ..." << endl;
|
||||
std::cout << "TPofTCalc::FakeData: " << i+1 << "/" << numHist << " done ..." << std::endl;
|
||||
}
|
||||
|
||||
// add Poisson noise to the histograms
|
||||
|
||||
cout << "TPofTCalc::FakeData: Adding Poisson noise ..." << endl;
|
||||
std::cout << "TPofTCalc::FakeData: Adding Poisson noise ..." << std::endl;
|
||||
|
||||
TH1F* theoHisto;
|
||||
TH1F* fakeHisto;
|
||||
vector<TH1F*> histoData;
|
||||
std::vector<TH1F*> histoData;
|
||||
|
||||
TString name;
|
||||
for (unsigned int i(0); i<numHist; ++i) { // loop over all histos
|
||||
@ -351,7 +351,7 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const vector<double>
|
||||
}
|
||||
}
|
||||
|
||||
cout << "TPofTCalc::FakeData: Write histograms and header information to the file ..." << endl;
|
||||
std::cout << "TPofTCalc::FakeData: Write histograms and header information to the file ..." << std::endl;
|
||||
|
||||
// save the histograms as root files
|
||||
// create run info folder and content
|
||||
@ -385,7 +385,7 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const vector<double>
|
||||
for (unsigned int i(0); i<histoData.size(); i++)
|
||||
decayAnaModule->Add(histoData[i]);
|
||||
// post pileup corrected (PPC)
|
||||
vector<TH1F*> histoDataPPC;
|
||||
std::vector<TH1F*> histoDataPPC;
|
||||
for (unsigned int i(0); i<histoData.size(); i++) {
|
||||
histoDataPPC.push_back(dynamic_cast<TH1F*>(histoData[i]->Clone()));
|
||||
if (i < 10)
|
||||
@ -434,7 +434,7 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const vector<double>
|
||||
N0.clear();
|
||||
bg.clear();
|
||||
|
||||
cout << "TPofTCalc::FakeData: DONE." << endl << endl;
|
||||
std::cout << "TPofTCalc::FakeData: DONE." << std::endl << std::endl;
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "TSkewedGss.h"
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
using namespace std;
|
||||
|
||||
#include <TSAXParser.h>
|
||||
#include "BMWStartupHandler.h"
|
||||
@ -57,7 +56,7 @@ TSkewedGss::~TSkewedGss() {
|
||||
TSkewedGss::TSkewedGss() : fCalcNeeded(true), fFirstCall(true) {
|
||||
|
||||
// read startup file
|
||||
string startup_path_name("BMW_startup.xml");
|
||||
std::string startup_path_name("BMW_startup.xml");
|
||||
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
||||
@ -104,7 +103,7 @@ TSkewedGss::TSkewedGss() : fCalcNeeded(true), fFirstCall(true) {
|
||||
// Parameters: all the parameters for the function to be fitted through TSkewedGss (phase,freq0,sigma-,sigma+)
|
||||
//------------------
|
||||
|
||||
double TSkewedGss::operator()(double t, const vector<double> &par) const {
|
||||
double TSkewedGss::operator()(double t, const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size() == 4);
|
||||
|
||||
@ -146,7 +145,7 @@ double TSkewedGss::operator()(double t, const vector<double> &par) const {
|
||||
|
||||
if(!only_phase_changed) {
|
||||
|
||||
// cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << endl;
|
||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||
|
||||
fParForPofB[2] = par[1]; // nu0
|
||||
fParForPofB[3] = par[2]; // sigma-
|
||||
@ -156,7 +155,7 @@ double TSkewedGss::operator()(double t, const vector<double> &par) const {
|
||||
fPofT->DoFFT();
|
||||
|
||||
}/* else {
|
||||
cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << endl;
|
||||
std::cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << std::endl;
|
||||
}*/
|
||||
|
||||
fPofT->CalcPol(fParForPofT);
|
||||
|
43
src/external/libFitPofB/classes/TVortex.cpp
vendored
43
src/external/libFitPofB/classes/TVortex.cpp
vendored
@ -30,7 +30,6 @@
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
using namespace std;
|
||||
|
||||
#include <TSAXParser.h>
|
||||
#include "BMWStartupHandler.h"
|
||||
@ -158,7 +157,7 @@ TBulkTriVortexNGL::~TBulkTriVortexNGL() {
|
||||
TBulkTriVortexLondon::TBulkTriVortexLondon() : fCalcNeeded(true), fFirstCall(true) {
|
||||
|
||||
// read startup file
|
||||
string startup_path_name("BMW_startup.xml");
|
||||
std::string startup_path_name("BMW_startup.xml");
|
||||
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
||||
@ -218,7 +217,7 @@ TBulkTriVortexLondon::TBulkTriVortexLondon() : fCalcNeeded(true), fFirstCall(tru
|
||||
TBulkSqVortexLondon::TBulkSqVortexLondon() : fCalcNeeded(true), fFirstCall(true) {
|
||||
|
||||
// read startup file
|
||||
string startup_path_name("BMW_startup.xml");
|
||||
std::string startup_path_name("BMW_startup.xml");
|
||||
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
||||
@ -274,7 +273,7 @@ TBulkSqVortexLondon::TBulkSqVortexLondon() : fCalcNeeded(true), fFirstCall(true)
|
||||
// Parameters: all the parameters for the function to be fitted through TBulkTriVortexLondon (phase, av.field, lambda, xi, [not implemented: bkg weight])
|
||||
//------------------
|
||||
|
||||
double TBulkTriVortexLondon::operator()(double t, const vector<double> &par) const {
|
||||
double TBulkTriVortexLondon::operator()(double t, const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size() == 4 || par.size() == 5 || par.size() == 7 || par.size() == 8); // normal, +BkgWeight, +VortexWeighting, +AFfield
|
||||
|
||||
@ -365,7 +364,7 @@ double TBulkTriVortexLondon::operator()(double t, const vector<double> &par) con
|
||||
// Parameters: all the parameters for the function to be fitted through TBulkSqVortexLondon (phase, av.field, lambda, xi, [not implemented: bkg weight])
|
||||
//------------------
|
||||
|
||||
double TBulkSqVortexLondon::operator()(double t, const vector<double> &par) const {
|
||||
double TBulkSqVortexLondon::operator()(double t, const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size() == 4 || par.size() == 5);
|
||||
|
||||
@ -448,7 +447,7 @@ double TBulkSqVortexLondon::operator()(double t, const vector<double> &par) cons
|
||||
TBulkTriVortexML::TBulkTriVortexML() : fCalcNeeded(true), fFirstCall(true) {
|
||||
|
||||
// read startup file
|
||||
string startup_path_name("BMW_startup.xml");
|
||||
std::string startup_path_name("BMW_startup.xml");
|
||||
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
||||
@ -504,7 +503,7 @@ TBulkTriVortexML::TBulkTriVortexML() : fCalcNeeded(true), fFirstCall(true) {
|
||||
// Parameters: all the parameters for the function to be fitted through TBulkTriVortexML (phase, av.field, lambda, xi, [not implemented: bkg weight])
|
||||
//------------------
|
||||
|
||||
double TBulkTriVortexML::operator()(double t, const vector<double> &par) const {
|
||||
double TBulkTriVortexML::operator()(double t, const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size() == 4 || par.size() == 5);
|
||||
|
||||
@ -587,7 +586,7 @@ double TBulkTriVortexML::operator()(double t, const vector<double> &par) const {
|
||||
TBulkTriVortexAGL::TBulkTriVortexAGL() : fCalcNeeded(true), fFirstCall(true) {
|
||||
|
||||
// read startup file
|
||||
string startup_path_name("BMW_startup.xml");
|
||||
std::string startup_path_name("BMW_startup.xml");
|
||||
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
||||
@ -643,7 +642,7 @@ TBulkTriVortexAGL::TBulkTriVortexAGL() : fCalcNeeded(true), fFirstCall(true) {
|
||||
// Parameters: all the parameters for the function to be fitted through TBulkTriVortexAGL (phase, av.field, lambda, xi, [not implemented: bkg weight])
|
||||
//------------------
|
||||
|
||||
double TBulkTriVortexAGL::operator()(double t, const vector<double> &par) const {
|
||||
double TBulkTriVortexAGL::operator()(double t, const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size() == 4 || par.size() == 5);
|
||||
|
||||
@ -725,7 +724,7 @@ double TBulkTriVortexAGL::operator()(double t, const vector<double> &par) const
|
||||
TBulkTriVortexAGLII::TBulkTriVortexAGLII() : fCalcNeeded(true), fFirstCall(true) {
|
||||
|
||||
// read startup file
|
||||
string startup_path_name("BMW_startup.xml");
|
||||
std::string startup_path_name("BMW_startup.xml");
|
||||
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
||||
@ -783,7 +782,7 @@ TBulkTriVortexAGLII::TBulkTriVortexAGLII() : fCalcNeeded(true), fFirstCall(true)
|
||||
// Parameters: all the parameters for the function to be fitted through TBulkTriVortexAGLII (phase, av.field, lambda, core-radius, [not implemented: bkg weight])
|
||||
//------------------
|
||||
|
||||
double TBulkTriVortexAGLII::operator()(double t, const vector<double> &par) const {
|
||||
double TBulkTriVortexAGLII::operator()(double t, const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size() == 4 || par.size() == 5 || par.size() == 7 || par.size() == 8);
|
||||
|
||||
@ -876,7 +875,7 @@ double TBulkTriVortexAGLII::operator()(double t, const vector<double> &par) cons
|
||||
TBulkTriVortexNGL::TBulkTriVortexNGL() : fCalcNeeded(true), fFirstCall(true) {
|
||||
|
||||
// read startup file
|
||||
string startup_path_name("BMW_startup.xml");
|
||||
std::string startup_path_name("BMW_startup.xml");
|
||||
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
||||
@ -932,7 +931,7 @@ TBulkTriVortexNGL::TBulkTriVortexNGL() : fCalcNeeded(true), fFirstCall(true) {
|
||||
// Parameters: all the parameters for the function to be fitted through TBulkTriVortexNGL (phase, appl.field, lambda, xi, [not implemented: bkg weight])
|
||||
//------------------
|
||||
|
||||
double TBulkTriVortexNGL::operator()(double t, const vector<double> &par) const {
|
||||
double TBulkTriVortexNGL::operator()(double t, const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size() == 4 || par.size() == 5);
|
||||
|
||||
@ -1031,7 +1030,7 @@ TBulkAnisotropicTriVortexLondonGlobal::~TBulkAnisotropicTriVortexLondonGlobal()
|
||||
TBulkAnisotropicTriVortexLondonGlobal::TBulkAnisotropicTriVortexLondonGlobal() : fCalcNeeded(true), fFirstCall(true) {
|
||||
|
||||
// read startup file
|
||||
string startup_path_name("BMW_startup.xml");
|
||||
std::string startup_path_name("BMW_startup.xml");
|
||||
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
||||
@ -1081,7 +1080,7 @@ TBulkAnisotropicTriVortexLondonGlobal::TBulkAnisotropicTriVortexLondonGlobal() :
|
||||
}
|
||||
}
|
||||
|
||||
void TBulkAnisotropicTriVortexLondonGlobal::Calc(const vector<double> &par) const {
|
||||
void TBulkAnisotropicTriVortexLondonGlobal::Calc(const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size() == 6);
|
||||
/*
|
||||
@ -1191,7 +1190,7 @@ TBulkAnisotropicTriVortexLondon::~TBulkAnisotropicTriVortexLondon()
|
||||
* \param globalPart reference to the global user function object vector
|
||||
* \param idx global user function index within the theory tree
|
||||
*/
|
||||
void TBulkAnisotropicTriVortexLondon::SetGlobalPart(vector<void *> &globalPart, UInt_t idx)
|
||||
void TBulkAnisotropicTriVortexLondon::SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx)
|
||||
{
|
||||
fIdxGlobal = static_cast<Int_t>(idx);
|
||||
|
||||
@ -1273,7 +1272,7 @@ TBulkAnisotropicTriVortexMLGlobal::~TBulkAnisotropicTriVortexMLGlobal() {
|
||||
TBulkAnisotropicTriVortexMLGlobal::TBulkAnisotropicTriVortexMLGlobal() : fCalcNeeded(true), fFirstCall(true) {
|
||||
|
||||
// read startup file
|
||||
string startup_path_name("BMW_startup.xml");
|
||||
std::string startup_path_name("BMW_startup.xml");
|
||||
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
||||
@ -1323,7 +1322,7 @@ TBulkAnisotropicTriVortexMLGlobal::TBulkAnisotropicTriVortexMLGlobal() : fCalcNe
|
||||
}
|
||||
}
|
||||
|
||||
void TBulkAnisotropicTriVortexMLGlobal::Calc(const vector<double> &par) const {
|
||||
void TBulkAnisotropicTriVortexMLGlobal::Calc(const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size() == 6);
|
||||
/*
|
||||
@ -1433,7 +1432,7 @@ TBulkAnisotropicTriVortexML::~TBulkAnisotropicTriVortexML()
|
||||
* \param globalPart reference to the global user function object vector
|
||||
* \param idx global user function index within the theory tree
|
||||
*/
|
||||
void TBulkAnisotropicTriVortexML::SetGlobalPart(vector<void *> &globalPart, UInt_t idx)
|
||||
void TBulkAnisotropicTriVortexML::SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx)
|
||||
{
|
||||
fIdxGlobal = static_cast<Int_t>(idx);
|
||||
|
||||
@ -1515,7 +1514,7 @@ TBulkAnisotropicTriVortexAGLGlobal::~TBulkAnisotropicTriVortexAGLGlobal() {
|
||||
TBulkAnisotropicTriVortexAGLGlobal::TBulkAnisotropicTriVortexAGLGlobal() : fCalcNeeded(true), fFirstCall(true) {
|
||||
|
||||
// read startup file
|
||||
string startup_path_name("BMW_startup.xml");
|
||||
std::string startup_path_name("BMW_startup.xml");
|
||||
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
||||
@ -1565,7 +1564,7 @@ TBulkAnisotropicTriVortexAGLGlobal::TBulkAnisotropicTriVortexAGLGlobal() : fCalc
|
||||
}
|
||||
}
|
||||
|
||||
void TBulkAnisotropicTriVortexAGLGlobal::Calc(const vector<double> &par) const {
|
||||
void TBulkAnisotropicTriVortexAGLGlobal::Calc(const std::vector<double> &par) const {
|
||||
|
||||
assert(par.size() == 6);
|
||||
/*
|
||||
@ -1676,7 +1675,7 @@ TBulkAnisotropicTriVortexAGL::~TBulkAnisotropicTriVortexAGL()
|
||||
* \param globalPart reference to the global user function object vector
|
||||
* \param idx global user function index within the theory tree
|
||||
*/
|
||||
void TBulkAnisotropicTriVortexAGL::SetGlobalPart(vector<void *> &globalPart, UInt_t idx)
|
||||
void TBulkAnisotropicTriVortexAGL::SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx)
|
||||
{
|
||||
fIdxGlobal = static_cast<Int_t>(idx);
|
||||
|
||||
|
39
src/external/libFitPofB/include/TBofZCalc.h
vendored
39
src/external/libFitPofB/include/TBofZCalc.h
vendored
@ -30,7 +30,6 @@
|
||||
#define _TBofZCalc_H_
|
||||
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* <p>Base class for any kind of theory function B(z)
|
||||
@ -47,8 +46,8 @@ public:
|
||||
fParam.clear();
|
||||
}
|
||||
|
||||
virtual vector<double>* DataZ() const {return &fZ;}
|
||||
virtual vector<double>* DataBZ() const {return &fBZ;}
|
||||
virtual std::vector<double>* DataZ() const {return &fZ;}
|
||||
virtual std::vector<double>* DataBZ() const {return &fBZ;}
|
||||
virtual void Calculate();
|
||||
virtual double GetBofZ(double) const = 0;
|
||||
virtual double GetBmin() const = 0;
|
||||
@ -58,9 +57,9 @@ public:
|
||||
protected:
|
||||
int fSteps; ///< number of discrete points where B(z) is calculated
|
||||
double fDZ; ///< resolution in z (spacing between two neighboring discrete B(z) points)
|
||||
vector<double> fParam; ///< parameters of the B(z) function
|
||||
mutable vector<double> fZ; ///< vector holding all z-values
|
||||
mutable vector<double> fBZ; ///< vector holding all B(z)-values
|
||||
std::vector<double> fParam; ///< parameters of the B(z) function
|
||||
mutable std::vector<double> fZ; ///< vector holding all z-values
|
||||
mutable std::vector<double> fBZ; ///< vector holding all B(z)-values
|
||||
};
|
||||
|
||||
/**
|
||||
@ -73,7 +72,7 @@ public:
|
||||
TBofZCalcInverse() {}
|
||||
virtual ~TBofZCalcInverse() {}
|
||||
|
||||
virtual vector< pair<double, double> > GetInverseAndDerivative(double) const = 0;
|
||||
virtual std::vector< std::pair<double, double> > GetInverseAndDerivative(double) const = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -83,11 +82,11 @@ class TLondon1D_HS : public TBofZCalcInverse {
|
||||
|
||||
public:
|
||||
|
||||
TLondon1D_HS(const vector<double>&, unsigned int steps = 3000);
|
||||
TLondon1D_HS(const std::vector<double>&, unsigned int steps = 3000);
|
||||
double GetBofZ(double) const;
|
||||
double GetBmin() const;
|
||||
double GetBmax() const;
|
||||
vector< pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
std::vector< std::pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
|
||||
};
|
||||
|
||||
@ -98,11 +97,11 @@ class TLondon1D_1L : public TBofZCalcInverse {
|
||||
|
||||
public:
|
||||
|
||||
TLondon1D_1L(const vector<double>&, unsigned int steps = 3000);
|
||||
TLondon1D_1L(const std::vector<double>&, unsigned int steps = 3000);
|
||||
double GetBofZ(double) const;
|
||||
double GetBmin() const;
|
||||
double GetBmax() const;
|
||||
vector< pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
std::vector< std::pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
|
||||
private:
|
||||
void SetBmin();
|
||||
@ -121,11 +120,11 @@ class TLondon1D_2L : public TBofZCalcInverse {
|
||||
|
||||
public:
|
||||
|
||||
TLondon1D_2L(const vector<double>&, unsigned int steps = 3000);
|
||||
TLondon1D_2L(const std::vector<double>&, unsigned int steps = 3000);
|
||||
double GetBofZ(double) const;
|
||||
double GetBmin() const;
|
||||
double GetBmax() const;
|
||||
vector< pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
std::vector< std::pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
|
||||
private:
|
||||
void SetBmin();
|
||||
@ -145,11 +144,11 @@ class TProximity1D_1LHS : public TBofZCalcInverse {
|
||||
|
||||
public:
|
||||
|
||||
TProximity1D_1LHS(const vector<double>&, unsigned int steps = 3000);
|
||||
TProximity1D_1LHS(const std::vector<double>&, unsigned int steps = 3000);
|
||||
double GetBofZ(double) const;
|
||||
double GetBmin() const;
|
||||
double GetBmax() const;
|
||||
vector< pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
std::vector< std::pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
|
||||
private:
|
||||
void SetBmin();
|
||||
@ -168,11 +167,11 @@ class TLondon1D_3L : public TBofZCalcInverse {
|
||||
|
||||
public:
|
||||
|
||||
TLondon1D_3L(const vector<double>&, unsigned int steps = 3000);
|
||||
TLondon1D_3L(const std::vector<double>&, unsigned int steps = 3000);
|
||||
double GetBofZ(double) const;
|
||||
double GetBmin() const;
|
||||
double GetBmax() const;
|
||||
vector< pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
std::vector< std::pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
|
||||
private:
|
||||
void SetBmin();
|
||||
@ -192,11 +191,11 @@ class TLondon1D_3LS : public TBofZCalcInverse {
|
||||
|
||||
public:
|
||||
|
||||
TLondon1D_3LS(const vector<double>&, unsigned int steps = 3000);
|
||||
TLondon1D_3LS(const std::vector<double>&, unsigned int steps = 3000);
|
||||
double GetBofZ(double) const;
|
||||
double GetBmin() const;
|
||||
double GetBmax() const;
|
||||
vector< pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
std::vector< std::pair<double, double> > GetInverseAndDerivative(double) const;
|
||||
|
||||
private:
|
||||
void SetBmin();
|
||||
@ -216,7 +215,7 @@ class TLondon1D_3LwInsulator : public TBofZCalc {
|
||||
|
||||
public:
|
||||
|
||||
TLondon1D_3LwInsulator(const vector<double>&, unsigned int steps = 3000);
|
||||
TLondon1D_3LwInsulator(const std::vector<double>&, unsigned int steps = 3000);
|
||||
double GetBofZ(double) const;
|
||||
double GetBmin() const;
|
||||
double GetBmax() const;
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
// the following ifdef is needed for GCC 4.6 or higher, fftw 3.3 or higher and root 5.30.03 or lower
|
||||
//#ifdef __CINT__
|
||||
@ -51,7 +50,7 @@ public:
|
||||
virtual ~TBulkVortexFieldCalc();
|
||||
|
||||
virtual double* DataB() const {return fFFTout;}
|
||||
virtual void SetParameters(const vector<double>& par) {fParam = par; fGridExists = false;}
|
||||
virtual void SetParameters(const std::vector<double>& par) {fParam = par; fGridExists = false;}
|
||||
virtual void CalculateGrid() const = 0;
|
||||
virtual double GetBmin() const;
|
||||
virtual double GetBmax() const;
|
||||
@ -61,13 +60,13 @@ public:
|
||||
virtual bool IsTriangular() const = 0;
|
||||
|
||||
protected:
|
||||
vector<double> fParam; ///< parameters used to calculate B(x,y)
|
||||
std::vector<double> fParam; ///< parameters used to calculate B(x,y)
|
||||
unsigned int fSteps; ///< number of steps in which the "unit cell" of the vortex lattice is devided in (in each direction)
|
||||
mutable fftw_complex *fFFTin; ///< Fourier components of the field
|
||||
mutable double *fFFTout; ///< spatial field distribution B(x,y) in a "unit cell" of the vortex lattice
|
||||
fftw_plan fFFTplan; ///< FFTW plan for the 2D-Fourier transform from Fourier space to real space
|
||||
bool fUseWisdom; ///< tag determining if FFTW wisdom is used
|
||||
string fWisdom; ///< file name of the FFTW wisdom-file
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom-file
|
||||
mutable bool fGridExists; ///< tag determining if B(x,y) has been calculated for the given set of parameters
|
||||
};
|
||||
|
||||
@ -79,7 +78,7 @@ class TBulkTriVortexLondonFieldCalc : public TBulkVortexFieldCalc {
|
||||
|
||||
public:
|
||||
|
||||
TBulkTriVortexLondonFieldCalc(const string&, const unsigned int steps = 256);
|
||||
TBulkTriVortexLondonFieldCalc(const std::string&, const unsigned int steps = 256);
|
||||
~TBulkTriVortexLondonFieldCalc() {}
|
||||
|
||||
void CalculateGrid() const;
|
||||
@ -95,7 +94,7 @@ class TBulkAnisotropicTriVortexLondonFieldCalc : public TBulkVortexFieldCalc {
|
||||
|
||||
public:
|
||||
|
||||
TBulkAnisotropicTriVortexLondonFieldCalc(const string&, const unsigned int steps = 256);
|
||||
TBulkAnisotropicTriVortexLondonFieldCalc(const std::string&, const unsigned int steps = 256);
|
||||
~TBulkAnisotropicTriVortexLondonFieldCalc() {}
|
||||
|
||||
void CalculateGrid() const;
|
||||
@ -111,7 +110,7 @@ class TBulkSqVortexLondonFieldCalc : public TBulkVortexFieldCalc {
|
||||
|
||||
public:
|
||||
|
||||
TBulkSqVortexLondonFieldCalc(const string&, const unsigned int steps = 256);
|
||||
TBulkSqVortexLondonFieldCalc(const std::string&, const unsigned int steps = 256);
|
||||
~TBulkSqVortexLondonFieldCalc() {}
|
||||
|
||||
void CalculateGrid() const;
|
||||
@ -127,7 +126,7 @@ class TBulkTriVortexMLFieldCalc : public TBulkVortexFieldCalc {
|
||||
|
||||
public:
|
||||
|
||||
TBulkTriVortexMLFieldCalc(const string&, const unsigned int steps = 256);
|
||||
TBulkTriVortexMLFieldCalc(const std::string&, const unsigned int steps = 256);
|
||||
~TBulkTriVortexMLFieldCalc() {}
|
||||
|
||||
void CalculateGrid() const;
|
||||
@ -144,7 +143,7 @@ class TBulkAnisotropicTriVortexMLFieldCalc : public TBulkVortexFieldCalc {
|
||||
|
||||
public:
|
||||
|
||||
TBulkAnisotropicTriVortexMLFieldCalc(const string&, const unsigned int steps = 256);
|
||||
TBulkAnisotropicTriVortexMLFieldCalc(const std::string&, const unsigned int steps = 256);
|
||||
~TBulkAnisotropicTriVortexMLFieldCalc() {}
|
||||
|
||||
void CalculateGrid() const;
|
||||
@ -160,7 +159,7 @@ class TBulkTriVortexAGLFieldCalc : public TBulkVortexFieldCalc {
|
||||
|
||||
public:
|
||||
|
||||
TBulkTriVortexAGLFieldCalc(const string&, const unsigned int steps = 256);
|
||||
TBulkTriVortexAGLFieldCalc(const std::string&, const unsigned int steps = 256);
|
||||
~TBulkTriVortexAGLFieldCalc() {}
|
||||
|
||||
void CalculateGrid() const;
|
||||
@ -176,7 +175,7 @@ class TBulkTriVortexAGLIIFieldCalc : public TBulkVortexFieldCalc {
|
||||
|
||||
public:
|
||||
|
||||
TBulkTriVortexAGLIIFieldCalc(const string&, const unsigned int steps = 256);
|
||||
TBulkTriVortexAGLIIFieldCalc(const std::string&, const unsigned int steps = 256);
|
||||
~TBulkTriVortexAGLIIFieldCalc() {}
|
||||
|
||||
void CalculateGrid() const;
|
||||
@ -193,7 +192,7 @@ class TBulkAnisotropicTriVortexAGLFieldCalc : public TBulkVortexFieldCalc {
|
||||
|
||||
public:
|
||||
|
||||
TBulkAnisotropicTriVortexAGLFieldCalc(const string&, const unsigned int steps = 256);
|
||||
TBulkAnisotropicTriVortexAGLFieldCalc(const std::string&, const unsigned int steps = 256);
|
||||
~TBulkAnisotropicTriVortexAGLFieldCalc() {}
|
||||
|
||||
void CalculateGrid() const;
|
||||
@ -210,7 +209,7 @@ class TBulkTriVortexNGLFieldCalc : public TBulkVortexFieldCalc {
|
||||
|
||||
public:
|
||||
|
||||
TBulkTriVortexNGLFieldCalc(const string&, const unsigned int steps = 256);
|
||||
TBulkTriVortexNGLFieldCalc(const std::string&, const unsigned int steps = 256);
|
||||
~TBulkTriVortexNGLFieldCalc();
|
||||
|
||||
void CalculateGrid() const;
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
// the following ifdef is needed for GCC 4.6 or higher, fftw 3.3 or higher and root 5.30.03 or lower
|
||||
//#ifdef __CINT__
|
||||
@ -52,8 +51,8 @@ public:
|
||||
|
||||
virtual ~TFilmVortexFieldCalc();
|
||||
|
||||
virtual vector<float*> DataB() const {return fBout;}
|
||||
virtual void SetParameters(const vector<float>& par) {fParam = par; fGridExists = false;}
|
||||
virtual std::vector<float*> DataB() const {return fBout;}
|
||||
virtual void SetParameters(const std::vector<float>& par) {fParam = par; fGridExists = false;}
|
||||
virtual void CalculateGrid() const = 0;
|
||||
virtual float GetBmin() const;
|
||||
virtual float GetBmax() const;
|
||||
@ -62,14 +61,14 @@ public:
|
||||
virtual unsigned int GetNumberOfSteps() const {return fSteps;}
|
||||
|
||||
protected:
|
||||
vector<float> fParam;
|
||||
std::vector<float> fParam;
|
||||
unsigned int fSteps; // number of steps, the "unit cell" of the vortex lattice is devided in (in x- and y- direction)
|
||||
unsigned int fStepsZ; // number of layers that should be calculated in z-direction (film slices)
|
||||
mutable fftwf_complex *fFFTin; // Fourier components of omega
|
||||
mutable vector<float*> fBout; // three pointers to Bx, By, Bz; each of these arrays is in row-major order
|
||||
mutable std::vector<float*> fBout; // three pointers to Bx, By, Bz; each of these arrays is in row-major order
|
||||
fftwf_plan fFFTplan;
|
||||
bool fUseWisdom;
|
||||
string fWisdom;
|
||||
std::string fWisdom;
|
||||
mutable bool fGridExists;
|
||||
};
|
||||
|
||||
@ -81,7 +80,7 @@ class TFilmTriVortexNGLFieldCalc : public TFilmVortexFieldCalc {
|
||||
|
||||
public:
|
||||
|
||||
TFilmTriVortexNGLFieldCalc(const string&, const unsigned int steps = 256, const unsigned int stepsZ = 32);
|
||||
TFilmTriVortexNGLFieldCalc(const std::string&, const unsigned int steps = 256, const unsigned int stepsZ = 32);
|
||||
~TFilmTriVortexNGLFieldCalc();
|
||||
|
||||
void CalculateGrid() const;
|
||||
@ -91,7 +90,7 @@ public:
|
||||
fftwf_complex* GetRealSpaceMatrix() const {return fRealSpaceMatrix;}
|
||||
float* GetOmegaMatrix() const {return fOmegaMatrix;}
|
||||
fftwf_complex* GetBkSMatrix() const {return fBkS;}
|
||||
vector<float*> GetOmegaDiffMatrix() const {return fOmegaDiffMatrix;}
|
||||
std::vector<float*> GetOmegaDiffMatrix() const {return fOmegaDiffMatrix;}
|
||||
fftwf_complex* GetQMatrix() const {return fQMatrix;}
|
||||
fftwf_complex* GetPMatrix() const {return fPkMatrix;}
|
||||
|
||||
@ -113,7 +112,7 @@ private:
|
||||
void CalculateGatVortexCore() const;
|
||||
|
||||
mutable float *fOmegaMatrix;
|
||||
mutable vector<float*> fOmegaDiffMatrix;
|
||||
mutable std::vector<float*> fOmegaDiffMatrix;
|
||||
mutable fftwf_complex *fRealSpaceMatrix;
|
||||
mutable fftwf_complex *fBkMatrix;
|
||||
mutable fftwf_complex *fPkMatrix;
|
||||
|
76
src/external/libFitPofB/include/TLondon1D.h
vendored
76
src/external/libFitPofB/include/TLondon1D.h
vendored
@ -44,13 +44,13 @@ public:
|
||||
~TLondon1DHS();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TTrimSPData *fImpProfile; ///< low energy muon implantation profiles
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
@ -77,22 +77,22 @@ public:
|
||||
~TLondon1D1L();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TTrimSPData *fImpProfile; ///< low energy muon implantation profiles
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable vector<double> fParForBofZ; ///< parameters for the calculation of B(z)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable std::vector<double> fParForBofZ; ///< parameters for the calculation of B(z)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fNSteps; ///< number of points for which B(z) is calculated
|
||||
//mutable unsigned int fCallCounter;
|
||||
|
||||
@ -112,22 +112,22 @@ public:
|
||||
~TLondon1D2L();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TTrimSPData *fImpProfile; ///< low energy muon implantation profiles
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable vector<double> fParForBofZ; ///< parameters for the calculation of B(z)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable std::vector<double> fParForBofZ; ///< parameters for the calculation of B(z)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fNSteps; ///< number of points for which B(z) is calculated
|
||||
|
||||
ClassDef(TLondon1D2L,1)
|
||||
@ -146,22 +146,22 @@ public:
|
||||
~TProximity1D1LHS();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TTrimSPData *fImpProfile; ///< low energy muon implantation profiles
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable vector<double> fParForBofZ; ///< parameters for the calculation of B(z)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable std::vector<double> fParForBofZ; ///< parameters for the calculation of B(z)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fNSteps; ///< number of points for which B(z) is calculated
|
||||
|
||||
ClassDef(TProximity1D1LHS,1)
|
||||
@ -180,22 +180,22 @@ public:
|
||||
~TLondon1D3L();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TTrimSPData *fImpProfile; ///< low energy muon implantation profiles
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable vector<double> fParForBofZ; ///< parameters for the calculation of B(z)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable std::vector<double> fParForBofZ; ///< parameters for the calculation of B(z)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fNSteps; ///< number of points for which B(z) is calculated
|
||||
|
||||
ClassDef(TLondon1D3L,1)
|
||||
@ -214,22 +214,22 @@ public:
|
||||
~TLondon1D3LS();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TTrimSPData *fImpProfile; ///< low energy muon implantation profiles
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable vector<double> fParForBofZ; ///< parameters for the calculation of B(z)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable std::vector<double> fParForBofZ; ///< parameters for the calculation of B(z)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fNSteps; ///< number of points for which B(z) is calculated
|
||||
|
||||
ClassDef(TLondon1D3LS,1)
|
||||
|
18
src/external/libFitPofB/include/TPofBCalc.h
vendored
18
src/external/libFitPofB/include/TPofBCalc.h
vendored
@ -46,25 +46,25 @@ class TPofBCalc {
|
||||
public:
|
||||
|
||||
// standard constructor: allocates memory for B and PB, the arrays are filled later by one of the Calculate-methods
|
||||
TPofBCalc(const vector<double>&);
|
||||
TPofBCalc(const std::vector<double>&);
|
||||
// alternative constructor: PB is not actually calculated but copied from a vector
|
||||
TPofBCalc(const vector<double>&, const vector<double>& , double dt = 0.01);
|
||||
TPofBCalc(const std::vector<double>&, const std::vector<double>& , double dt = 0.01);
|
||||
~TPofBCalc() {
|
||||
delete[] fB; fB = 0;
|
||||
delete[] fPB; fPB = 0;
|
||||
delete[] fB; fB = nullptr;
|
||||
delete[] fPB; fPB = nullptr;
|
||||
}
|
||||
|
||||
void Calculate(const string&, const vector<double>&);
|
||||
void Calculate(const TBofZCalc*, const TTrimSPData*, const vector<double>&, unsigned int);
|
||||
void Calculate(const TBofZCalcInverse*, const TTrimSPData*, const vector<double>&);
|
||||
void Calculate(const TBulkVortexFieldCalc*, const vector<double>&);
|
||||
void Calculate(const std::string&, const std::vector<double>&);
|
||||
void Calculate(const TBofZCalc*, const TTrimSPData*, const std::vector<double>&, unsigned int);
|
||||
void Calculate(const TBofZCalcInverse*, const TTrimSPData*, const std::vector<double>&);
|
||||
void Calculate(const TBulkVortexFieldCalc*, const std::vector<double>&);
|
||||
|
||||
const double* DataB() const {return fB;}
|
||||
double* DataPB() const {return fPB;}
|
||||
double GetBmin() const {return fBmin;}
|
||||
double GetBmax() const {return fBmax;}
|
||||
unsigned int GetPBSize() const {return fPBSize;}
|
||||
void SetPB(const vector<double>&) const;
|
||||
void SetPB(const std::vector<double>&) const;
|
||||
void ConvolveGss(double);
|
||||
void AddBackground(double, double, double);
|
||||
double GetFirstMoment() const;
|
||||
|
6
src/external/libFitPofB/include/TPofTCalc.h
vendored
6
src/external/libFitPofB/include/TPofTCalc.h
vendored
@ -48,14 +48,14 @@ class TPofTCalc {
|
||||
|
||||
public:
|
||||
|
||||
TPofTCalc(const TPofBCalc*, const string&, const vector<double>&);
|
||||
TPofTCalc(const TPofBCalc*, const std::string&, const std::vector<double>&);
|
||||
~TPofTCalc();
|
||||
|
||||
const double* DataT() const {return fT;}
|
||||
const double* DataPT() const {return fPT;}
|
||||
void DoFFT();
|
||||
void CalcPol(const vector<double>&);
|
||||
void FakeData(const string&, const vector<double>&, const vector<double>*);
|
||||
void CalcPol(const std::vector<double>&);
|
||||
void FakeData(const std::string&, const std::vector<double>&, const std::vector<double>*);
|
||||
double Eval(double) const;
|
||||
|
||||
private:
|
||||
|
12
src/external/libFitPofB/include/TSkewedGss.h
vendored
12
src/external/libFitPofB/include/TSkewedGss.h
vendored
@ -44,20 +44,20 @@ public:
|
||||
~TSkewedGss();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
|
||||
ClassDef(TSkewedGss,1)
|
||||
};
|
||||
|
132
src/external/libFitPofB/include/TVortex.h
vendored
132
src/external/libFitPofB/include/TVortex.h
vendored
@ -44,22 +44,22 @@ public:
|
||||
~TBulkTriVortexLondon();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TBulkTriVortexLondonFieldCalc *fVortex; ///< spatial field distribution B(x,y) within the vortex lattice
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fGridSteps; ///< number of points in x- and y-direction for which B(x,y) is calculated
|
||||
|
||||
ClassDef(TBulkTriVortexLondon,1)
|
||||
@ -77,22 +77,22 @@ public:
|
||||
~TBulkSqVortexLondon();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TBulkSqVortexLondonFieldCalc *fVortex; ///< spatial field distribution B(x,y) within the vortex lattice
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fGridSteps; ///< number of points in x- and y-direction for which B(x,y) is calculated
|
||||
|
||||
ClassDef(TBulkSqVortexLondon,1)
|
||||
@ -110,22 +110,22 @@ public:
|
||||
~TBulkTriVortexML();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TBulkTriVortexMLFieldCalc *fVortex; ///< spatial field distribution B(x,y) within the vortex lattice
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fGridSteps; ///< number of points in x- and y-direction for which B(x,y) is calculated
|
||||
|
||||
ClassDef(TBulkTriVortexML,1)
|
||||
@ -143,22 +143,22 @@ public:
|
||||
~TBulkTriVortexAGL();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TBulkTriVortexAGLFieldCalc *fVortex; ///< spatial field distribution B(x,y) within the vortex lattice
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fGridSteps; ///< number of points in x- and y-direction for which B(x,y) is calculated
|
||||
|
||||
ClassDef(TBulkTriVortexAGL,1)
|
||||
@ -176,22 +176,22 @@ public:
|
||||
~TBulkTriVortexAGLII();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TBulkTriVortexAGLIIFieldCalc *fVortex; ///< spatial field distribution B(x,y) within the vortex lattice
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fGridSteps; ///< number of points in x- and y-direction for which B(x,y) is calculated
|
||||
|
||||
ClassDef(TBulkTriVortexAGLII,1)
|
||||
@ -209,22 +209,22 @@ public:
|
||||
~TBulkTriVortexNGL();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return false; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
virtual Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
mutable vector<double> fPar; ///< parameters of the model
|
||||
mutable std::vector<double> fPar; ///< parameters of the model
|
||||
TBulkTriVortexNGLFieldCalc *fVortex; ///< spatial field distribution B(x,y) within the vortex lattice
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fGridSteps; ///< number of points in x- and y-direction for which B(x,y) is calculated
|
||||
|
||||
ClassDef(TBulkTriVortexNGL,1)
|
||||
@ -245,22 +245,22 @@ public:
|
||||
|
||||
bool IsValid() { return fValid; }
|
||||
|
||||
void Calc(const vector<double>&) const;
|
||||
void Calc(const std::vector<double>&) const;
|
||||
|
||||
const TPofTCalc* GetPolarizationPointer() const { return fPofT; }
|
||||
|
||||
private:
|
||||
mutable bool fValid; ///< tag indicating if the global part has been calculated
|
||||
mutable vector<double> fPar; ///< parameter vector
|
||||
mutable std::vector<double> fPar; ///< parameter vector
|
||||
TBulkAnisotropicTriVortexLondonFieldCalc *fVortex; ///< spatial field distribution B(x,y) within the vortex lattice
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fGridSteps; ///< number of points in x- and y-direction for which B(x,y) is calculated
|
||||
|
||||
// definition of the class for the ROOT-dictionary
|
||||
@ -280,10 +280,10 @@ public:
|
||||
~TBulkAnisotropicTriVortexLondon();
|
||||
|
||||
virtual bool NeedGlobalPart() const { return true; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, unsigned int idx);
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, unsigned int idx);
|
||||
virtual bool GlobalPartIsValid() const;
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
bool fValid;
|
||||
@ -309,22 +309,22 @@ public:
|
||||
|
||||
bool IsValid() { return fValid; }
|
||||
|
||||
void Calc(const vector<double>&) const;
|
||||
void Calc(const std::vector<double>&) const;
|
||||
|
||||
const TPofTCalc* GetPolarizationPointer() const { return fPofT; }
|
||||
|
||||
private:
|
||||
mutable bool fValid; ///< tag indicating if the global part has been calculated
|
||||
mutable vector<double> fPar; ///< parameter vector
|
||||
mutable std::vector<double> fPar; ///< parameter vector
|
||||
TBulkAnisotropicTriVortexMLFieldCalc *fVortex; ///< spatial field distribution B(x,y) within the vortex lattice
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fGridSteps; ///< number of points in x- and y-direction for which B(x,y) is calculated
|
||||
|
||||
// definition of the class for the ROOT-dictionary
|
||||
@ -344,10 +344,10 @@ public:
|
||||
~TBulkAnisotropicTriVortexML();
|
||||
|
||||
virtual bool NeedGlobalPart() const { return true; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, unsigned int idx);
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, unsigned int idx);
|
||||
virtual bool GlobalPartIsValid() const;
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
bool fValid;
|
||||
@ -373,22 +373,22 @@ public:
|
||||
|
||||
bool IsValid() { return fValid; }
|
||||
|
||||
void Calc(const vector<double>&) const;
|
||||
void Calc(const std::vector<double>&) const;
|
||||
|
||||
const TPofTCalc* GetPolarizationPointer() const { return fPofT; }
|
||||
|
||||
private:
|
||||
mutable bool fValid; ///< tag indicating if the global part has been calculated
|
||||
mutable vector<double> fPar; ///< parameter vector
|
||||
mutable std::vector<double> fPar; ///< parameter vector
|
||||
TBulkAnisotropicTriVortexAGLFieldCalc *fVortex; ///< spatial field distribution B(x,y) within the vortex lattice
|
||||
TPofBCalc *fPofB; ///< static field distribution P(B)
|
||||
TPofTCalc *fPofT; ///< muon spin polarization p(t)
|
||||
mutable bool fCalcNeeded; ///< tag needed to avoid unnecessary calculations if the core parameters were unchanged
|
||||
mutable bool fFirstCall; ///< tag for checking if the function operator is called the first time
|
||||
mutable vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
string fWisdom; ///< file name of the FFTW wisdom file
|
||||
mutable std::vector<double> fParForVortex; ///< parameters for the calculation of B(x,y)
|
||||
mutable std::vector<double> fParForPofB; ///< parameters for the calculation of P(B)
|
||||
mutable std::vector<double> fParForPofT; ///< parameters for the calculation of p(t)
|
||||
std::string fWisdom; ///< file name of the FFTW wisdom file
|
||||
unsigned int fGridSteps; ///< number of points in x- and y-direction for which B(x,y) is calculated
|
||||
|
||||
// definition of the class for the ROOT-dictionary
|
||||
@ -408,10 +408,10 @@ public:
|
||||
~TBulkAnisotropicTriVortexAGL();
|
||||
|
||||
virtual bool NeedGlobalPart() const { return true; }
|
||||
virtual void SetGlobalPart(vector<void *> &globalPart, unsigned int idx);
|
||||
virtual void SetGlobalPart(std::vector<void *> &globalPart, unsigned int idx);
|
||||
virtual bool GlobalPartIsValid() const;
|
||||
|
||||
double operator()(double, const vector<double>&) const;
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
private:
|
||||
bool fValid;
|
||||
|
Reference in New Issue
Block a user