diff --git a/src/external/TFitPofB-lib/classes/Makefile.TFitPofB b/src/external/TFitPofB-lib/classes/Makefile.TFitPofB index 325e68b4..24b80cdb 100644 --- a/src/external/TFitPofB-lib/classes/Makefile.TFitPofB +++ b/src/external/TFitPofB-lib/classes/Makefile.TFitPofB @@ -25,6 +25,7 @@ OBJS += TTrimSPDataHandler.o OBJS += TBofZCalc.o OBJS += TPofBCalc.o OBJS += TPofTCalc.o +OBJS += TFitPofBStartupHandler.o TFitPofBStartupHandlerDict.o OBJS += TLondon1D.o TLondon1DDict.o SHLIB = libTFitPofB.so @@ -56,3 +57,7 @@ TLondon1DDict.cpp: ../include/TLondon1D.h ../include/TLondon1DLinkDef.h @echo "Generating dictionary $@..." rootcint -f $@ -c -p $^ +TFitPofBStartupHandlerDict.cpp: ../include/TFitPofBStartupHandler.h ../include/TFitPofBStartupHandlerLinkDef.h + @echo "Generating dictionary $@..." + rootcint -f $@ -c -p $^ + diff --git a/src/external/TFitPofB-lib/classes/TBofZCalc.cpp b/src/external/TFitPofB-lib/classes/TBofZCalc.cpp index aec91c20..6dc70e5d 100644 --- a/src/external/TFitPofB-lib/classes/TBofZCalc.cpp +++ b/src/external/TFitPofB-lib/classes/TBofZCalc.cpp @@ -5,7 +5,7 @@ Author: Bastian M. Wojek e-mail: bastian.wojek@psi.ch - 2008/05/24 + 2008/05/30 ***************************************************************************/ @@ -116,11 +116,47 @@ TLondon1D_2L::TLondon1D_2L(const vector ¶m) { //------------------ // Constructor of the TLondon1D_3L class +// 1D-London screening in a thin superconducting film, three layers, three lambdas +// Parameters: Bext[G], deadlayer[nm], thickness1[nm], thickness2[nm], thickness3[nm], lambda1[nm], lambda2[nm], lambda3[nm] +//------------------ + +TLondon1D_3L::TLondon1D_3L(const vector ¶m) { + + unsigned int n(5000); // number of steps for the calculation + + double N1(param[7]*cosh(param[4]/param[7])*((exp(2.0*param[2]/param[5])-1.0)*param[6]*cosh(param[3]/param[6]) + (1.0+exp(2.0*param[2]/param[5]))*param[5]*sinh(param[3]/param[6])) + 2.0*exp(param[2]/param[5])*param[6]*(param[5]*cosh(param[2]/param[5])*cosh(param[3]/param[6]) + param[6]*sinh(param[2]/param[5])*sinh(param[3]/param[6]))*sinh(param[4]/param[7])); + + double N21(2.0*(param[7]*cosh(param[4]/param[7])*((-1.0+exp(2.0*param[2]/param[5]))*param[6]*cosh(param[3]/param[6]) + (1.0+exp(2.0*param[2]/param[5]))*param[5]*sinh(param[3]/param[6])) + 2.0*exp(param[2]/param[5])*param[6]*(param[5]*cosh(param[2]/param[5])*cosh(param[3]/param[6]) + param[6]*sinh(param[2]/param[5])*sinh(param[3]/param[6]))*sinh(param[4]/param[7]))); + + double N22(((param[5]+exp(2.0*param[2]/param[5])*(param[5]-param[6])+param[6])*(-param[7]*cosh(param[4]/param[7]) + param[6]*sinh(param[4]/param[7]))+exp(2.0*param[3]/param[6])*(param[5]-param[6] + exp(2.0*param[2]/param[5])*(param[5]+param[6]))*(param[7]*cosh(param[4]/param[7])+param[6]*sinh(param[4]/param[7])))); + + double N3(4.0*((1.0+exp(2.0*param[2]/param[5]))*param[5]*(param[7]*cosh(param[4]/param[7])*sinh(param[3]/param[6]) + param[6]*cosh(param[3]/param[6])*sinh(param[4]/param[7])) + (-1.0+exp(2.0*param[2]/param[5]))*param[6]*(param[7]*cosh(param[3]/param[6])*cosh(param[4]/param[7]) + param[6]*sinh(param[3]/param[6])*sinh(param[4]/param[7])))); + + fDZ = (param[2]+param[3]+param[4])/double(n); + double ZZ, BBz; + + for (unsigned int j(0); j ¶m) { +TLondon1D_3LS::TLondon1D_3LS(const vector ¶m) { unsigned int n(5000); // number of steps for the calculation diff --git a/src/external/TFitPofB-lib/classes/TFitPofBStartupHandler.cpp b/src/external/TFitPofB-lib/classes/TFitPofBStartupHandler.cpp new file mode 100644 index 00000000..b88bc054 --- /dev/null +++ b/src/external/TFitPofB-lib/classes/TFitPofBStartupHandler.cpp @@ -0,0 +1,244 @@ + /*************************************************************************** + + TFitPofBStartupHandler.h + + Author: Bastian M. Wojek + e-mail: bastian.wojek@psi.ch + + 2008/05/30 + + based upon: + $Id: PStartupHandler.cpp 3340 2008-04-30 12:27:01Z nemu $ + by Andreas Suter + +***************************************************************************/ + +/*************************************************************************** + * Copyright (C) 2007 by Andreas Suter, Bastian M. Wojek * + * * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include +using namespace std; + +#include "TFitPofBStartupHandler.h" + +ClassImpQ(TFitPofBStartupHandler) + +//-------------------------------------------------------------------------- +// Constructor +//-------------------------------------------------------------------------- +/** + *

+ */ +TFitPofBStartupHandler::TFitPofBStartupHandler() +{ +} + +//-------------------------------------------------------------------------- +// Destructor +//-------------------------------------------------------------------------- +/** + *

+ */ +TFitPofBStartupHandler::~TFitPofBStartupHandler() +{ + // clean up + fEnergyList.clear(); +} + +//-------------------------------------------------------------------------- +// OnStartDocument +//-------------------------------------------------------------------------- +/** + *

+ */ +void TFitPofBStartupHandler::OnStartDocument() +{ + fKey = eEmpty; +} + +//-------------------------------------------------------------------------- +// OnEndDocument +//-------------------------------------------------------------------------- +/** + *

+ */ +void TFitPofBStartupHandler::OnEndDocument() +{ + // check if anything was set, and if not set some default stuff + CheckLists(); +} + +//-------------------------------------------------------------------------- +// OnStartElement +//-------------------------------------------------------------------------- +/** + *

+ * + * \param str + * \param attributes + */ +void TFitPofBStartupHandler::OnStartElement(const char *str, const TList *attributes) +{ + if (!strcmp(str, "data_path")) { + fKey = eDataPath; + } else if (!strcmp(str, "energy")) { + fKey = eEnergy; + } +} + +//-------------------------------------------------------------------------- +// OnEndElement +//-------------------------------------------------------------------------- +/** + *

+ * + * \param str + */ +void TFitPofBStartupHandler::OnEndElement(const char *str) +{ + fKey = eEmpty; +} + +//-------------------------------------------------------------------------- +// OnCharacters +//-------------------------------------------------------------------------- +/** + *

+ * + * \param str + */ +void TFitPofBStartupHandler::OnCharacters(const char *str) +{ + switch (fKey) { + case eDataPath: + // set the data path to the given path + fDataPath = str; + break; + case eEnergy: + // add str to the energy list + fEnergyList.push_back(str); + break; + default: + break; + } +} + +//-------------------------------------------------------------------------- +// OnComment +//-------------------------------------------------------------------------- +/** + *

+ * + * \param str + */ +void TFitPofBStartupHandler::OnComment(const char *str) +{ + // nothing to be done for now +} + +//-------------------------------------------------------------------------- +// OnWarning +//-------------------------------------------------------------------------- +/** + *

+ * + * \param str + */ +void TFitPofBStartupHandler::OnWarning(const char *str) +{ + cout << endl << "TFitPofBStartupHandler **WARNING** " << str; + cout << endl; +} + +//-------------------------------------------------------------------------- +// OnError +//-------------------------------------------------------------------------- +/** + *

+ * + * \param str + */ +void TFitPofBStartupHandler::OnError(const char *str) +{ + cout << endl << "TFitPofBStartupHandler **ERROR** " << str; + cout << endl; +} + +//-------------------------------------------------------------------------- +// OnFatalError +//-------------------------------------------------------------------------- +/** + *

+ * + * \param str + */ +void TFitPofBStartupHandler::OnFatalError(const char *str) +{ + cout << endl << "TFitPofBStartupHandler **FATAL ERROR** " << str; + cout << endl; +} + +//-------------------------------------------------------------------------- +// OnCdataBlock +//-------------------------------------------------------------------------- +/** + *

+ * + * \param str + */ +void TFitPofBStartupHandler::OnCdataBlock(const char *str, int len) +{ + // nothing to be done for now +} + +//-------------------------------------------------------------------------- +// CheckList +//-------------------------------------------------------------------------- +/** + *

+ * + */ +void TFitPofBStartupHandler::CheckLists() +{ + // check if anything was set, and if not set some default stuff + + // check if any data path is given + cout << endl << ">> check data path ..."; + if (!fDataPath.size()) { + cout << endl << ">> This is not going to work, you have to set a valid data path where to find the rge-files in the xml-file!" << endl; + exit(-1); + } + + // check if any energies are given + cout << endl << ">> check energy list ..." << endl; + if (!fEnergyList.size()) { + cout << endl << ">> Energy list empty! Setting the default list."; + char eChar[5]; + for(unsigned int i(0); i<33; i++) { + for(unsigned int j(0); j<10; j++) { + sprintf(eChar, "%02u_%u", i, j); + fEnergyList.push_back(string(eChar)); + } + } + } +} + +// end --------------------------------------------------------------------- + diff --git a/src/external/TFitPofB-lib/classes/TLondon1D.cpp b/src/external/TFitPofB-lib/classes/TLondon1D.cpp index 8af5b6a2..c96b4aa7 100644 --- a/src/external/TFitPofB-lib/classes/TLondon1D.cpp +++ b/src/external/TFitPofB-lib/classes/TLondon1D.cpp @@ -5,7 +5,7 @@ Author: Bastian M. Wojek e-mail: bastian.wojek@psi.ch - 2008/05/29 + 2008/05/30 ***************************************************************************/ @@ -13,6 +13,9 @@ #include using namespace std; +#include +#include "TFitPofBStartupHandler.h" + ClassImp(TLondon1D) ClassImp(TLondon1D1L) ClassImp(TLondon1D2L) @@ -37,33 +40,52 @@ TLondon1D::~TLondon1D() { TLondon1D1L::TLondon1D1L(const vector &parNo, const vector &par) { + // extract function parameters for(unsigned int i(0); iConnectToHandler("TFitPofBStartupHandler", startupHandler); + int status (saxParser->ParseFile(startup_path_name.c_str())); + // check for parse errors + if (status) { // error + cout << endl << "**WARNING** reading/parsing TFitPofB_startup.xml failed." << endl; + } + startupHandler->CheckLists(); - vector energy_vec(energy_arr, energy_arr+(sizeof(energy_arr)/sizeof(energy_arr[0]))); - - vector par_for_PofT; - - for (unsigned int i(0); i<3; i++) - par_for_PofT.push_back(fPar[i]); + string rge_path(startupHandler->GetDataPath()); + vector energy_vec(startupHandler->GetEnergyList()); TTrimSPData *x = new TTrimSPData(rge_path, energy_vec); fImpProfile = x; x = 0; delete x; + vector par_for_PofT; + + for (unsigned int i(0); i<3; i++) + par_for_PofT.push_back(fPar[i]); + TPofTCalc *y = new TPofTCalc(par_for_PofT); fPofT = y; y = 0; delete y; + + // clean up + if (saxParser) { + delete saxParser; + saxParser = 0; + } + if (startupHandler) { + delete startupHandler; + startupHandler = 0; + } } //------------------ @@ -160,39 +182,58 @@ double TLondon1D1L::Eval(double t, const vector &par) const { TLondon1D2L::TLondon1D2L(const vector &parNo, const vector &par) : fLastTwoChanged(true) { +// extract function parameters for(unsigned int i(0); iConnectToHandler("TFitPofBStartupHandler", startupHandler); + int status (saxParser->ParseFile(startup_path_name.c_str())); + // check for parse errors + if (status) { // error + cout << endl << "**WARNING** reading/parsing TFitPofB_startup.xml failed." << endl; + } + startupHandler->CheckLists(); - vector energy_vec(energy_arr, energy_arr+(sizeof(energy_arr)/sizeof(energy_arr[0]))); - - vector par_for_PofT; - - for (unsigned int i(0); i<3; i++) - par_for_PofT.push_back(fPar[i]); + string rge_path(startupHandler->GetDataPath()); + vector energy_vec(startupHandler->GetEnergyList()); TTrimSPData *x = new TTrimSPData(rge_path, energy_vec); fImpProfile = x; x = 0; delete x; + vector par_for_PofT; + + for (unsigned int i(0); i<3; i++) + par_for_PofT.push_back(fPar[i]); + TPofTCalc *y = new TPofTCalc(par_for_PofT); fPofT = y; y = 0; delete y; + + // clean up + if (saxParser) { + delete saxParser; + saxParser = 0; + } + if (startupHandler) { + delete startupHandler; + startupHandler = 0; + } } //------------------ // TLondon1D2L-Method that calls the procedures to create B(z), p(B) and P(t) // It finally returns P(t) for a given t. -// Parameters: all the parameters for the function to be fitted through TLondon1D1L +// Parameters: all the parameters for the function to be fitted through TLondon1D2L //------------------ double TLondon1D2L::Eval(double t, const vector &par) const { @@ -292,48 +333,67 @@ double TLondon1D2L::Eval(double t, const vector &par) const { } //------------------ -// Constructor of the TLondon1D3LS class -- reading available implantation profiles and +// Constructor of the TLondon1D3L class -- reading available implantation profiles and // creates (a pointer to) the TPofTCalc object (with the FFT plan) //------------------ -TLondon1D3LS::TLondon1D3LS(const vector &parNo, const vector &par) : fLastThreeChanged(true) { +TLondon1D3L::TLondon1D3L(const vector &parNo, const vector &par) : fLastThreeChanged(true) { + // extract function parameters for(unsigned int i(0); iConnectToHandler("TFitPofBStartupHandler", startupHandler); + int status (saxParser->ParseFile(startup_path_name.c_str())); + // check for parse errors + if (status) { // error + cout << endl << "**WARNING** reading/parsing TFitPofB_startup.xml failed." << endl; + } + startupHandler->CheckLists(); - vector energy_vec(energy_arr, energy_arr+(sizeof(energy_arr)/sizeof(energy_arr[0]))); - - vector par_for_PofT; - - for (unsigned int i(0); i<3; i++) - par_for_PofT.push_back(fPar[i]); + string rge_path(startupHandler->GetDataPath()); + vector energy_vec(startupHandler->GetEnergyList()); TTrimSPData *x = new TTrimSPData(rge_path, energy_vec); fImpProfile = x; x = 0; delete x; + vector par_for_PofT; + + for (unsigned int i(0); i<3; i++) + par_for_PofT.push_back(fPar[i]); + TPofTCalc *y = new TPofTCalc(par_for_PofT); fPofT = y; y = 0; delete y; + // clean up + if (saxParser) { + delete saxParser; + saxParser = 0; + } + if (startupHandler) { + delete startupHandler; + startupHandler = 0; + } + } //------------------ -// TLondon1D3LS-Method that calls the procedures to create B(z), p(B) and P(t) +// TLondon1D3L-Method that calls the procedures to create B(z), p(B) and P(t) // It finally returns P(t) for a given t. -// Parameters: all the parameters for the function to be fitted through TLondon1D1L +// Parameters: all the parameters for the function to be fitted through TLondon1D3L //------------------ -double TLondon1D3LS::Eval(double t, const vector &par) const { +double TLondon1D3L::Eval(double t, const vector &par) const { // check if any parameter has changed @@ -429,3 +489,161 @@ double TLondon1D3LS::Eval(double t, const vector &par) const { return fPofT->Eval(t); } + +//------------------ +// Constructor of the TLondon1D3LS class -- reading available implantation profiles and +// creates (a pointer to) the TPofTCalc object (with the FFT plan) +//------------------ + +TLondon1D3LS::TLondon1D3LS(const vector &parNo, const vector &par) { + + // extract function parameters + for(unsigned int i(0); iConnectToHandler("TFitPofBStartupHandler", startupHandler); + int status (saxParser->ParseFile(startup_path_name.c_str())); + // check for parse errors + if (status) { // error + cout << endl << "**WARNING** reading/parsing TFitPofB_startup.xml failed." << endl; + } + startupHandler->CheckLists(); + + string rge_path(startupHandler->GetDataPath()); + vector energy_vec(startupHandler->GetEnergyList()); + + TTrimSPData *x = new TTrimSPData(rge_path, energy_vec); + fImpProfile = x; + x = 0; + delete x; + + vector par_for_PofT; + + for (unsigned int i(0); i<3; i++) + par_for_PofT.push_back(fPar[i]); + + TPofTCalc *y = new TPofTCalc(par_for_PofT); + fPofT = y; + y = 0; + delete y; + + // clean up + if (saxParser) { + delete saxParser; + saxParser = 0; + } + if (startupHandler) { + delete startupHandler; + startupHandler = 0; + } + +} + +//------------------ +// TLondon1D3LS-Method that calls the procedures to create B(z), p(B) and P(t) +// It finally returns P(t) for a given t. +// Parameters: all the parameters for the function to be fitted through TLondon1D3LS +//------------------ + +double TLondon1D3LS::Eval(double t, const vector &par) const { + + // check if any parameter has changed + + bool par_changed(false); + bool only_phase_changed(false); + + for (unsigned int i(0); i par_for_PofT; + +// cout << "par_for_PofT: "; + + for (unsigned int i(0); i<3; i++) { + par_for_PofT.push_back(par[i]); +// cout << par[i] << " "; + } +// cout << endl; + + if(!only_phase_changed) { + + cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << endl; + + vector par_for_BofZ; + vector par_for_PofB; + +// cout << "par_for_BofZ: "; + + for (unsigned int i(4); i interfaces; + interfaces.push_back(par[5]+par[6]); + interfaces.push_back(par[5]+par[6]+par[7]); + + vector weights; + for(unsigned int i(par.size()-3); iWeightLayers(par[3], interfaces, weights); + } + + TLondon1D_3LS BofZ3S(par_for_BofZ); + TPofBCalc PofB3S(BofZ3S, *fImpProfile, par_for_PofB); + fPofT->DoFFT(PofB3S); + + } else { + cout << "Only the phase parameter has changed, (re-)calculating P(t) now..." << endl; + } + + fPofT->CalcPol(par_for_PofT); + + fCalcNeeded = false; + fLastThreeChanged = false; + } + + return fPofT->Eval(t); + +} diff --git a/src/external/TFitPofB-lib/classes/TTrimSPDataHandler.cpp b/src/external/TFitPofB-lib/classes/TTrimSPDataHandler.cpp index a8f53e7a..d10d8bc2 100644 --- a/src/external/TFitPofB-lib/classes/TTrimSPDataHandler.cpp +++ b/src/external/TFitPofB-lib/classes/TTrimSPDataHandler.cpp @@ -5,7 +5,7 @@ Author: Bastian M. Wojek e-mail: bastian.wojek@psi.ch - 2008/05/26 + 2008/05/30 ***************************************************************************/ @@ -37,13 +37,12 @@ TTrimSPData::TTrimSPData(const string &path, vector &energyVec) { energyStr = path + energyVec[i] + ".rge"; - fEnergy.push_back(atof(energyVec[i].replace(2,1,".").c_str())); - ifstream *rgeFile = new ifstream(energyStr.c_str()); if(! *rgeFile) { - cout << "rge-file not found! Exit now." << endl; - exit(-1); + cout << "rge-file not found! Try next energy..." << endl; + delete rgeFile; } else { + fEnergy.push_back(atof(energyVec[i].replace(2,1,".").c_str())); while(*rgeFile >> word) if(word == "PARTICLES") break; @@ -66,6 +65,8 @@ TTrimSPData::TTrimSPData(const string &path, vector &energyVec) { } } + cout << "Read in " << fDataNZ.size() << " implantation profiles in total." << endl; + fOrigDataNZ = fDataNZ; for(unsigned int i(0); i& ); + +}; + #endif // _BofZCalc_H_ diff --git a/src/external/TFitPofB-lib/include/TFitPofBStartupHandler.h b/src/external/TFitPofB-lib/include/TFitPofBStartupHandler.h new file mode 100644 index 00000000..1d5071b7 --- /dev/null +++ b/src/external/TFitPofB-lib/include/TFitPofBStartupHandler.h @@ -0,0 +1,77 @@ +/*************************************************************************** + + TFitPofBStartupHandler.h + + Author: Bastian M. Wojek + e-mail: bastian.wojek@psi.ch + + 2008/05/30 + + based upon: + $Id: PStartupHandler.h 3396 2008-05-29 14:41:33Z nemu $ + by Andreas Suter + +***************************************************************************/ + +/*************************************************************************** + * Copyright (C) 2007 by Andreas Suter, Bastian M. Wojek * + * * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef _TFITPOFBSTARTUPHANDLER_H_ +#define _TFITPOFBSTARTUPHANDLER_H_ + +#include +#include +#include +#include + +class TFitPofBStartupHandler : public TQObject { + public: + TFitPofBStartupHandler(); + virtual ~TFitPofBStartupHandler(); + + virtual void OnStartDocument(); // SLOT + virtual void OnEndDocument(); // SLOT + virtual void OnStartElement(const char*, const TList*); // SLOT + virtual void OnEndElement(const char*); // SLOT + virtual void OnCharacters(const char*); // SLOT + virtual void OnComment(const char*); // SLOT + virtual void OnWarning(const char*); // SLOT + virtual void OnError(const char*); // SLOT + virtual void OnFatalError(const char*); // SLOT + virtual void OnCdataBlock(const char*, int); // SLOT + + virtual void CheckLists(); + + virtual const string GetDataPath() const { return fDataPath; } + virtual vector GetEnergyList() const { return fEnergyList; } + + private: + enum EKeyWords {eEmpty, eComment, eDataPath, eEnergy, eEnergyList}; + + EKeyWords fKey; + + string fDataPath; + vector fEnergyList; + + ClassDef(TFitPofBStartupHandler, 1) +}; + +#endif // _TFITPOFBSTARTUPHANDLER_H_ + diff --git a/src/external/TFitPofB-lib/include/TFitPofBStartupHandlerLinkDef.h b/src/external/TFitPofB-lib/include/TFitPofBStartupHandlerLinkDef.h new file mode 100644 index 00000000..86d09b90 --- /dev/null +++ b/src/external/TFitPofB-lib/include/TFitPofBStartupHandlerLinkDef.h @@ -0,0 +1,23 @@ +/*************************************************************************** + + TLondon1DLinkDef.h + + Author: Bastian M. Wojek + e-mail: bastian.wojek@psi.ch + + 2008/05/29 + +***************************************************************************/ + +// root dictionary stuff -------------------------------------------------- +#ifdef __CINT__ + +#pragma link off all globals; +#pragma link off all classes; +#pragma link off all functions; + +#pragma link C++ class TFitPofBStartupHandler+; + +#endif //__CINT__ +// root dictionary stuff -------------------------------------------------- + diff --git a/src/external/TFitPofB-lib/include/TLondon1D.h b/src/external/TFitPofB-lib/include/TLondon1D.h index 7ba6444a..299a10be 100644 --- a/src/external/TFitPofB-lib/include/TLondon1D.h +++ b/src/external/TFitPofB-lib/include/TLondon1D.h @@ -5,7 +5,7 @@ Author: Bastian M. Wojek e-mail: bastian.wojek@psi.ch - 2008/05/29 + 2008/05/30 ***************************************************************************/ @@ -18,6 +18,7 @@ class TLondon1D : public TObject { public: + // default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE! TLondon1D() : fCalcNeeded(true) {} virtual ~TLondon1D(); @@ -35,6 +36,7 @@ protected: class TLondon1D1L : public TLondon1D { public: + // default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE! TLondon1D1L() {} TLondon1D1L(const vector& , const vector&); ~TLondon1D1L() {} @@ -47,6 +49,7 @@ public: class TLondon1D2L : public TLondon1D { public: + // default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE! TLondon1D2L() : fLastTwoChanged(true) {} TLondon1D2L(const vector& , const vector&); ~TLondon1D2L() {} @@ -59,9 +62,27 @@ private: ClassDef(TLondon1D2L,1) }; +class TLondon1D3L : public TLondon1D { + +public: + // default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE! + TLondon1D3L() : fLastThreeChanged(true) {} + TLondon1D3L(const vector& , const vector&); + ~TLondon1D3L() {} + + double Eval(double, const vector&) const; + +private: + mutable bool fLastThreeChanged; + + ClassDef(TLondon1D3L,1) +}; + + class TLondon1D3LS : public TLondon1D { public: + // default conctructor only for the ROOT dictionary - DO NOT USE IT OTHERWISE! TLondon1D3LS() : fLastThreeChanged(true) {} TLondon1D3LS(const vector& , const vector&); ~TLondon1D3LS() {} diff --git a/src/external/TFitPofB-lib/include/TLondon1DLinkDef.h b/src/external/TFitPofB-lib/include/TLondon1DLinkDef.h index cf0b5342..66da0b0c 100644 --- a/src/external/TFitPofB-lib/include/TLondon1DLinkDef.h +++ b/src/external/TFitPofB-lib/include/TLondon1DLinkDef.h @@ -19,6 +19,7 @@ #pragma link C++ class TLondon1D+; #pragma link C++ class TLondon1D1L+; #pragma link C++ class TLondon1D2L+; +#pragma link C++ class TLondon1D3L+; #pragma link C++ class TLondon1D3LS+; #endif //__CINT__ diff --git a/src/external/TFitPofB-lib/include/TPofTCalc.h b/src/external/TFitPofB-lib/include/TPofTCalc.h index 9420bb8b..fe45d097 100644 --- a/src/external/TFitPofB-lib/include/TPofTCalc.h +++ b/src/external/TFitPofB-lib/include/TPofTCalc.h @@ -20,6 +20,7 @@ class TPofTCalc { public: + TPofTCalc(const vector&); ~TPofTCalc(); diff --git a/src/external/TFitPofB-lib/test/Makefile.test b/src/external/TFitPofB-lib/test/Makefile.test index 1e93760d..9eb05e85 100644 --- a/src/external/TFitPofB-lib/test/Makefile.test +++ b/src/external/TFitPofB-lib/test/Makefile.test @@ -19,7 +19,7 @@ CXXFLAGS += $(ROOTCFLAGS) LDFLAGS += # the ROOT libraries -LIBS = $(ROOTLIBS) +LIBS = $(ROOTLIBS) -lXMLParser EXEC = test diff --git a/src/external/TFitPofB-lib/test/TFitPofB_startup.xml b/src/external/TFitPofB-lib/test/TFitPofB_startup.xml new file mode 100644 index 00000000..52716c4d --- /dev/null +++ b/src/external/TFitPofB-lib/test/TFitPofB_startup.xml @@ -0,0 +1,17 @@ + + + + TFitPofB_startup.xml + Defines path and energies of TrimSP-rge-files to be read in + + /home/l_wojek/TrimSP/AuYBCO_2005/AuYBCO-500000- + + 04_6 + 09_6 + 14_6 + 18_6 + 21_6 + 24_6 + 28_7 + + diff --git a/src/external/TFitPofB-lib/test/test.cpp b/src/external/TFitPofB-lib/test/test.cpp index 79bba95b..a5b4fc33 100644 --- a/src/external/TFitPofB-lib/test/test.cpp +++ b/src/external/TFitPofB-lib/test/test.cpp @@ -101,7 +101,7 @@ int main(){ /**************** Test TLondon1D1L ********************************* unsigned int parNo_arr[] = {1, 3, 5, 7, 9, 10, 11, 12}; - double par_arr[] = {0.0, 999.0, 0.01, 999.0, 0.01, 999.0, 21.6, 999.0, 100.0, 5.0, 190.0, 180.0}; + double par_arr[] = {0.0, 999.0, 0.01, 999.0, 0.01, 999.0, 4.6, 999.0, 100.0, 5.0, 190.0, 180.0}; vector parNo_vec(parNo_arr, parNo_arr+(sizeof(parNo_arr)/sizeof(parNo_arr[0]))); vector par_vec(par_arr, par_arr+(sizeof(par_arr)/sizeof(par_arr[0]))); @@ -136,6 +136,25 @@ int main(){ /**************** Test TLondon1D3LS *********************************/ + unsigned int parNo_arr[] = {1, 3, 5, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19}; + double par_arr[] = {0.0, 999.0, 0.01, 999.0, 0.01, 999.0, 4.6, 999.0, 100.0, 5.0, 70.0, 50.0, 70.0, 180.0, 180.0, 180.0, 1.0, 1.0, 1.0}; + + vector parNo_vec(parNo_arr, parNo_arr+(sizeof(parNo_arr)/sizeof(parNo_arr[0]))); + vector par_vec(par_arr, par_arr+(sizeof(par_arr)/sizeof(par_arr[0]))); + + vector par_vec_sub; + + for(unsigned int i(0); i data01, data02, data03, data04, data05, data06, data07, data08, data09, data10;