Small changes in libTFitPofB to get rid of annoying messages (if the debug flag is not set)
This commit is contained in:
@ -49,7 +49,8 @@ ClassImpQ(TFitPofBStartupHandler)
|
|||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*/
|
*/
|
||||||
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)
|
if(fDebug)
|
||||||
cout << endl << "TFitPofBStartupHandler::CheckLists: check data path ..." << endl;
|
cout << endl << "TFitPofBStartupHandler::CheckLists: check data path ..." << endl;
|
||||||
if (!fDataPath.size()) {
|
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());
|
assert(fDataPath.size());
|
||||||
} else {
|
} else {
|
||||||
if(fDebug)
|
if(fDebug)
|
||||||
@ -329,19 +330,19 @@ void TFitPofBStartupHandler::CheckLists()
|
|||||||
if(fDebug)
|
if(fDebug)
|
||||||
cout << endl << "TFitPofBStartupHandler::CheckLists: check energy list ..." << endl;
|
cout << endl << "TFitPofBStartupHandler::CheckLists: check energy list ..." << endl;
|
||||||
if (fEnergyList.size() != fEnergyLabelList.size()) {
|
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;
|
<< "TFitPofBStartupHandler::CheckLists: The program will be terminated now!" << endl;
|
||||||
assert(fEnergyList.size() == fEnergyLabelList.size());
|
assert(fEnergyList.size() == fEnergyLabelList.size());
|
||||||
}
|
}
|
||||||
if (fEnergyList.empty()) {
|
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;
|
<< "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) {
|
for (double x(0.0); x<= 35.0; x+=0.1) {
|
||||||
fEnergyList.push_back(x);
|
fEnergyList.push_back(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fEnergyLabelList.empty()) {
|
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: 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;
|
<< "TFitPofBStartupHandler::CheckLists: Most probably this will go wrong and should therefore be fixed in the xml-file!" << endl;
|
||||||
char eChar[5];
|
char eChar[5];
|
||||||
@ -376,7 +377,6 @@ void TFitPofBStartupHandler::CheckLists()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fVortex) {
|
if (fVortex) {
|
||||||
|
|
||||||
// check if any number of steps for the theory function is specified
|
// check if any number of steps for the theory function is specified
|
||||||
if(fDebug)
|
if(fDebug)
|
||||||
cout << endl << "TFitPofBStartupHandler::CheckLists: check number of steps for Vortex grid ..." << endl;
|
cout << endl << "TFitPofBStartupHandler::CheckLists: check number of steps for Vortex grid ..." << endl;
|
||||||
|
14
src/external/TFitPofB-lib/classes/TLondon1D.cpp
vendored
14
src/external/TFitPofB-lib/classes/TLondon1D.cpp
vendored
@ -179,7 +179,7 @@ TLondon1DHS::TLondon1DHS() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
fParForPofB.push_back(0.005); // Bkg-width
|
fParForPofB.push_back(0.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
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);
|
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.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
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);
|
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.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
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);
|
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.01); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
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);
|
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.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
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);
|
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.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
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);
|
fPofB = new TPofBCalc(fParForPofB);
|
||||||
|
|
||||||
@ -1159,7 +1159,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
|||||||
// fParForPofB.push_back(startupHandler->GetDeltaB());
|
// fParForPofB.push_back(startupHandler->GetDeltaB());
|
||||||
// fParForPofB.push_back(0.0);
|
// 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);
|
// fPofT = new TPofTCalc(fWisdom, fParForPofT);
|
||||||
//
|
//
|
||||||
|
@ -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
|
// 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<string> 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:
|
|
||||||
// <some_path>02-1.rge
|
|
||||||
// <some_path>02.1.rge
|
|
||||||
// <some_path>021.rge
|
|
||||||
//
|
|
||||||
// <some_path>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<double, string> &energies) {
|
TTrimSPData::TTrimSPData(const string &path, map<double, string> &energies, bool debug) {
|
||||||
|
|
||||||
// sort the energies in ascending order - this might be useful for later applications (energy-interpolations etc.)
|
// 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!
|
// 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<double, string> &energies) {
|
|||||||
|
|
||||||
ifstream *rgeFile = new ifstream(energyStr.c_str());
|
ifstream *rgeFile = new ifstream(energyStr.c_str());
|
||||||
if(! *rgeFile) {
|
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;
|
delete rgeFile;
|
||||||
rgeFile = 0;
|
rgeFile = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -97,10 +82,10 @@ TTrimSPData::TTrimSPData(const string &path, map<double, string> &energies) {
|
|||||||
vnzz.push_back(nzz);
|
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){
|
while(zz < 2100.0){
|
||||||
zz += *(fDZ.end()-1);
|
zz += fDZ.back();
|
||||||
vzz.push_back(zz);
|
vzz.push_back(zz);
|
||||||
vnzz.push_back(0.0);
|
vnzz.push_back(0.0);
|
||||||
}
|
}
|
||||||
@ -124,11 +109,12 @@ TTrimSPData::TTrimSPData(const string &path, map<double, string> &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;
|
fOrigDataNZ = fDataNZ;
|
||||||
|
|
||||||
for(unsigned int i(0); i<fEnergy.size();i++)
|
for(unsigned int i(0); i<fEnergy.size();++i)
|
||||||
fIsNormalized.push_back(false);
|
fIsNormalized.push_back(false);
|
||||||
|
|
||||||
fEnergyIter = fEnergy.end();
|
fEnergyIter = fEnergy.end();
|
||||||
|
@ -67,6 +67,7 @@ class TFitPofBStartupHandler : public TQObject {
|
|||||||
virtual const string GetWisdomFile() const { return fWisdomFile; }
|
virtual const string GetWisdomFile() const { return fWisdomFile; }
|
||||||
virtual const unsigned int GetNSteps() const { return fNSteps; }
|
virtual const unsigned int GetNSteps() const { return fNSteps; }
|
||||||
virtual const unsigned int GetGridSteps() const { return fGridSteps; }
|
virtual const unsigned int GetGridSteps() const { return fGridSteps; }
|
||||||
|
virtual const bool GetDebug() const { return fDebug; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum EKeyWords {eEmpty, eComment, eDebug, eLEM, eVortex, eDataPath, eEnergyLabel, \
|
enum EKeyWords {eEmpty, eComment, eDebug, eLEM, eVortex, eDataPath, eEnergyLabel, \
|
||||||
|
@ -44,7 +44,7 @@ class TTrimSPData {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TTrimSPData(const string&, map<double, string>&);
|
TTrimSPData(const string&, map<double, string>&, bool debug = false);
|
||||||
|
|
||||||
~TTrimSPData() {
|
~TTrimSPData() {
|
||||||
fDataZ.clear();
|
fDataZ.clear();
|
||||||
|
Reference in New Issue
Block a user