diff --git a/src/external/TFitPofB-lib/classes/TFitPofBStartupHandler.cpp b/src/external/TFitPofB-lib/classes/TFitPofBStartupHandler.cpp index 194eba2c..af3ea221 100644 --- a/src/external/TFitPofB-lib/classes/TFitPofBStartupHandler.cpp +++ b/src/external/TFitPofB-lib/classes/TFitPofBStartupHandler.cpp @@ -49,7 +49,8 @@ ClassImpQ(TFitPofBStartupHandler) /** *

*/ -TFitPofBStartupHandler::TFitPofBStartupHandler() : fDeltat(0.), fDeltaB(0.), fNSteps(0), fGridSteps(0) +TFitPofBStartupHandler::TFitPofBStartupHandler() : + fDebug(false), fLEM(false), fVortex(false), fDataPath(""), fDeltat(0.), fDeltaB(0.), fWisdomFile(""), fNSteps(0), fGridSteps(0) { } @@ -318,7 +319,7 @@ void TFitPofBStartupHandler::CheckLists() if(fDebug) cout << endl << "TFitPofBStartupHandler::CheckLists: check data path ..." << endl; if (!fDataPath.size()) { - cout << "TFitPofBStartupHandler::CheckLists: 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; + cerr << "TFitPofBStartupHandler::CheckLists: 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; assert(fDataPath.size()); } else { if(fDebug) @@ -329,19 +330,19 @@ void TFitPofBStartupHandler::CheckLists() if(fDebug) cout << endl << "TFitPofBStartupHandler::CheckLists: check energy list ..." << endl; if (fEnergyList.size() != fEnergyLabelList.size()) { - cout << "TFitPofBStartupHandler::CheckLists: The number of energies and energy labels are different! Please fix it!" << endl \ + cerr << "TFitPofBStartupHandler::CheckLists: The number of energies and energy labels are different! Please fix it!" << endl \ << "TFitPofBStartupHandler::CheckLists: The program will be terminated now!" << endl; assert(fEnergyList.size() == fEnergyLabelList.size()); } if (fEnergyList.empty()) { - cout << "TFitPofBStartupHandler::CheckLists: Energy list empty!" << endl \ + cerr << "TFitPofBStartupHandler::CheckLists: Energy list empty!" << endl \ << "TFitPofBStartupHandler::CheckLists: Trying to use the standard energies: 0.0 to 35.0 keV in 0.1 keV steps" << endl; for (double x(0.0); x<= 35.0; x+=0.1) { fEnergyList.push_back(x); } } if (fEnergyLabelList.empty()) { - cout << "TFitPofBStartupHandler::CheckLists: Energy label list empty!" << endl \ + cerr << "TFitPofBStartupHandler::CheckLists: Energy label list empty!" << endl \ << "TFitPofBStartupHandler::CheckLists: Trying to use the specified energies as labels in the format %02.1f..." << endl \ << "TFitPofBStartupHandler::CheckLists: Most probably this will go wrong and should therefore be fixed in the xml-file!" << endl; char eChar[5]; @@ -376,7 +377,6 @@ void TFitPofBStartupHandler::CheckLists() } if (fVortex) { - // check if any number of steps for the theory function is specified if(fDebug) cout << endl << "TFitPofBStartupHandler::CheckLists: check number of steps for Vortex grid ..." << endl; diff --git a/src/external/TFitPofB-lib/classes/TLondon1D.cpp b/src/external/TFitPofB-lib/classes/TLondon1D.cpp index ae179eb0..c0c44f85 100644 --- a/src/external/TFitPofB-lib/classes/TLondon1D.cpp +++ b/src/external/TFitPofB-lib/classes/TLondon1D.cpp @@ -179,7 +179,7 @@ TLondon1DHS::TLondon1DHS() : fCalcNeeded(true), fFirstCall(true) { fParForPofB.push_back(0.005); // Bkg-width fParForPofB.push_back(0.0); // Bkg-weight - fImpProfile = new TTrimSPData(rge_path, energy_vec); + fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug()); fPofB = new TPofBCalc(fParForPofB); @@ -327,7 +327,7 @@ TLondon1D1L::TLondon1D1L() : fCalcNeeded(true), fFirstCall(true) { fParForPofB.push_back(0.005); // Bkg-width fParForPofB.push_back(0.0); // Bkg-weight - fImpProfile = new TTrimSPData(rge_path, energy_vec); + fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug()); fPofB = new TPofBCalc(fParForPofB); @@ -510,7 +510,7 @@ TLondon1D2L::TLondon1D2L() : fCalcNeeded(true), fFirstCall(true) { fParForPofB.push_back(0.005); // Bkg-width fParForPofB.push_back(0.0); // Bkg-weight - fImpProfile = new TTrimSPData(rge_path, energy_vec); + fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug()); fPofB = new TPofBCalc(fParForPofB); @@ -680,7 +680,7 @@ TProximity1D1LHS::TProximity1D1LHS() : fCalcNeeded(true), fFirstCall(true) { fParForPofB.push_back(0.01); // Bkg-width fParForPofB.push_back(0.0); // Bkg-weight - fImpProfile = new TTrimSPData(rge_path, energy_vec); + fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug()); fPofB = new TPofBCalc(fParForPofB); @@ -827,7 +827,7 @@ TLondon1D3L::TLondon1D3L() : fCalcNeeded(true), fFirstCall(true) { fParForPofB.push_back(0.005); // Bkg-width fParForPofB.push_back(0.0); // Bkg-weight - fImpProfile = new TTrimSPData(rge_path, energy_vec); + fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug()); fPofB = new TPofBCalc(fParForPofB); @@ -996,7 +996,7 @@ TLondon1D3LS::TLondon1D3LS() : fCalcNeeded(true), fFirstCall(true) { fParForPofB.push_back(0.005); // Bkg-width fParForPofB.push_back(0.0); // Bkg-weight - fImpProfile = new TTrimSPData(rge_path, energy_vec); + fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug()); fPofB = new TPofBCalc(fParForPofB); @@ -1159,7 +1159,7 @@ double TLondon1D3LS::operator()(double t, const vector &par) const { // fParForPofB.push_back(startupHandler->GetDeltaB()); // fParForPofB.push_back(0.0); // -// fImpProfile = new TTrimSPData(rge_path, energy_vec); +// fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug()); // // fPofT = new TPofTCalc(fWisdom, fParForPofT); // diff --git a/src/external/TFitPofB-lib/classes/TTrimSPDataHandler.cpp b/src/external/TFitPofB-lib/classes/TTrimSPDataHandler.cpp index 5edbc64e..d3aabc44 100644 --- a/src/external/TFitPofB-lib/classes/TTrimSPDataHandler.cpp +++ b/src/external/TFitPofB-lib/classes/TTrimSPDataHandler.cpp @@ -41,24 +41,9 @@ using namespace std; //-------------------- // Constructor of the TrimSPData class -- reading all available trim.SP-rge-files with a given name into std::vectors -// The rge-file names have to contain the Implantation energy just before the rge-extension in the format %02u_%1u -// Example: string path("/home/user/TrimSP/SomeSample-"); -// string energyArr[] = {"02_1", "02_5", "03_5", "05_0", "07_5", "10_0", "12_5"}; -// vector energyVec(energyArr, energyArr+(sizeof(energyArr)/sizeof(energyArr[0]))); -// -// This will read the files "/home/user/TrimSP/SomeSample-02_1.rge", "/home/user/TrimSP/SomeSample-02_5.rge" and so on. -// -// Alternative supported energy formats in the energyVec are, e.g. for E=2.1keV: -// 02-1.rge -// 02.1.rge -// 021.rge -// -// 21.rge is explicitly not possible since it is not clear, if this denotes 2.1keV or 21.0keV! -// -// Also always use the same format within one energyVec - otherwise sorting of the vector will not work properly! //-------------------- -TTrimSPData::TTrimSPData(const string &path, map &energies) { +TTrimSPData::TTrimSPData(const string &path, map &energies, bool debug) { // sort the energies in ascending order - this might be useful for later applications (energy-interpolations etc.) // after the change from the vector to the map this is not necessary any more - since maps are always ordered! @@ -75,7 +60,7 @@ TTrimSPData::TTrimSPData(const string &path, map &energies) { ifstream *rgeFile = new ifstream(energyStr.c_str()); if(! *rgeFile) { - cout << "TTrimSPData::TTrimSPData: file " << energyStr << " not found! Try next energy..." << endl; + cerr << "TTrimSPData::TTrimSPData: file " << energyStr << " not found! Try next energy..." << endl; delete rgeFile; rgeFile = 0; } else { @@ -97,10 +82,10 @@ TTrimSPData::TTrimSPData(const string &path, map &energies) { vnzz.push_back(nzz); } - fDZ.push_back(vzz[1]-vzz[0]); + fDZ.push_back(0.5*(vzz[2]-vzz[0])); // it happens that TRIM.SP uses different step sizes in one output file, therefore take the average while(zz < 2100.0){ - zz += *(fDZ.end()-1); + zz += fDZ.back(); vzz.push_back(zz); vnzz.push_back(0.0); } @@ -124,11 +109,12 @@ TTrimSPData::TTrimSPData(const string &path, map &energies) { } } - cout << "TTrimSPData::TTrimSPData: Read in " << fDataNZ.size() << " implantation profiles in total." << endl; + if (debug) + cout << "TTrimSPData::TTrimSPData: Read in " << fDataNZ.size() << " implantation profiles in total." << endl; fOrigDataNZ = fDataNZ; - for(unsigned int i(0); i&); + TTrimSPData(const string&, map&, bool debug = false); ~TTrimSPData() { fDataZ.clear();