resolved merge conflicts with master

This commit is contained in:
2016-12-23 14:16:22 +01:00
54 changed files with 2297 additions and 829 deletions

View File

@ -827,13 +827,7 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
fout << left << "lifetime";
fout << fRuns[runNo].GetLifetimeParamNo() << endl;
} else if (sstr.BeginsWith("lifetimecorrection")) {
/* obsolate, hence do nothing here
if ((fRuns[runNo].IsLifetimeCorrected()) &&
((fRuns[runNo].GetFitType() == MSR_FITTYPE_SINGLE_HISTO) ||
(fGlobal.GetFitType() == MSR_FITTYPE_SINGLE_HISTO))) {
fout << "lifetimecorrection" << endl;
}
*/
// obsolate, hence do nothing here
} else if (sstr.BeginsWith("map")) {
fout << "map ";
for (UInt_t j=0; j<fRuns[runNo].GetMap()->size(); j++) {
@ -1115,8 +1109,10 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
fout << "POWER";
} else if (fFourier.fPlotTag == FOURIER_PLOT_PHASE) {
fout << "PHASE";
} else if (fFourier.fPlotTag == FOURIER_PLOT_PHASE_OPT_REAL) {
fout << "PHASE_OPT_REAL";
}
fout << " # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE";
fout << " # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL";
fout << endl;
} else if (sstr.BeginsWith("phase")) {
if (fFourier.fPhaseParamNo > 0) {
@ -1215,38 +1211,38 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
if (fStatistic.fValid) { // valid fit result
if (fStatistic.fChisq) {
str.Form(" chisq = %.1lf, NDF = %d, chisq/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
fout << str.Data() << endl;
} else {
str.Form(" maxLH = %.1lf, NDF = %d, maxLH/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
}
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
// check if expected chisq needs to be written
if (fStatistic.fMinExpected != 0.0) {
if (fStatistic.fChisq) {
str.Form(" expected chisq = %.1lf, NDF = %d, expected chisq/NDF = %lf",
fStatistic.fMinExpected, fStatistic.fNdf, fStatistic.fMinExpected/fStatistic.fNdf);
} else {
str.Form(" expected maxLH = %.1lf, NDF = %d, expected maxLH/NDF = %lf",
fStatistic.fMinExpected, fStatistic.fNdf, fStatistic.fMinExpected/fStatistic.fNdf);
}
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << endl << str.Data() << endl;
// check if expected chisq needs to be written
if (fStatistic.fMinExpected != 0.0) {
str.Form(" expected chisq = %.1lf, NDF = %d, expected chisq/NDF = %lf",
fStatistic.fMinExpected, fStatistic.fNdf, fStatistic.fMinExpected/fStatistic.fNdf);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << endl << str.Data() << endl;
for (UInt_t i=0; i<fStatistic.fMinExpectedPerHisto.size(); i++) {
if (fStatistic.fNdfPerHisto[i] > 0) {
for (UInt_t i=0; i<fStatistic.fMinExpectedPerHisto.size(); i++) {
if (fStatistic.fNdfPerHisto[i] > 0) {
if (fStatistic.fChisq) {
str.Form(" run block %d: (NDF/red.chisq/red.chisq_e) = (%d/%lf/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i], fStatistic.fMinExpectedPerHisto[i]/fStatistic.fNdfPerHisto[i]);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
} else {
str.Form(" run block %d: (NDF/red.maxLH/red.maxLH_e) = (%d/%lf/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i], fStatistic.fMinExpectedPerHisto[i]/fStatistic.fNdfPerHisto[i]);
}
}
} else if (fStatistic.fNdfPerHisto.size() > 1) { // check if per run chisq needs to be written
for (UInt_t i=0; i<fStatistic.fNdfPerHisto.size(); i++) {
str.Form(" run block %d: (NDF/red.chisq) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
@ -1256,11 +1252,23 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
cout << str.Data() << endl;
}
}
} else { // maxLH
str.Form(" maxLH = %.1lf, NDF = %d, maxLH/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
} else if (fStatistic.fNdfPerHisto.size() > 1) { // check if per run chisq needs to be written
for (UInt_t i=0; i<fStatistic.fNdfPerHisto.size(); i++) {
if (fStatistic.fChisq) {
str.Form(" run block %d: (NDF/red.chisq) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
} else {
str.Form(" run block %d: (NDF/maxLH.chisq) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
}
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
}
}
} else {
fout << "*** FIT DID NOT CONVERGE ***" << endl;
@ -1272,38 +1280,38 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
if (fStatistic.fValid) { // valid fit result
if (fStatistic.fChisq) { // chisq
str.Form(" chisq = %.1lf, NDF = %d, chisq/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
} else {
str.Form(" maxLH = %.1lf, NDF = %d, maxLH/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
}
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
// check if expected chisq needs to be written
if (fStatistic.fMinExpected != 0.0) {
// check if expected chisq needs to be written
if (fStatistic.fMinExpected != 0.0) {
if (fStatistic.fChisq) { // chisq
str.Form(" expected chisq = %.1lf, NDF = %d, expected chisq/NDF = %lf",
fStatistic.fMinExpected, fStatistic.fNdf, fStatistic.fMinExpected/fStatistic.fNdf);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
} else {
str.Form(" expected maxLH = %.1lf, NDF = %d, expected maxLH/NDF = %lf",
fStatistic.fMinExpected, fStatistic.fNdf, fStatistic.fMinExpected/fStatistic.fNdf);
}
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
for (UInt_t i=0; i<fStatistic.fMinExpectedPerHisto.size(); i++) {
if (fStatistic.fNdfPerHisto[i] > 0) {
for (UInt_t i=0; i<fStatistic.fMinExpectedPerHisto.size(); i++) {
if (fStatistic.fNdfPerHisto[i] > 0) {
if (fStatistic.fChisq) { // chisq
str.Form(" run block %d: (NDF/red.chisq/red.chisq_e) = (%d/%lf/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i], fStatistic.fMinExpectedPerHisto[i]/fStatistic.fNdfPerHisto[i]);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
} else {
str.Form(" run block %d: (NDF/red.maxLH/red.maxLH_e) = (%d/%lf/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i], fStatistic.fMinExpectedPerHisto[i]/fStatistic.fNdfPerHisto[i]);
}
}
} else if (fStatistic.fNdfPerHisto.size() > 1) { // check if per run chisq needs to be written
for (UInt_t i=0; i<fStatistic.fNdfPerHisto.size(); i++) {
str.Form(" run block %d: (NDF/red.chisq) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
@ -1313,11 +1321,23 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
cout << str.Data() << endl;
}
}
} else { // max. log. liklihood
str.Form(" maxLH = %.1lf, NDF = %d, maxLH/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
} else if (fStatistic.fNdfPerHisto.size() > 1) { // check if per run chisq needs to be written
for (UInt_t i=0; i<fStatistic.fNdfPerHisto.size(); i++) {
if (fStatistic.fChisq) { // chisq
str.Form(" run block %d: (NDF/red.chisq) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
} else {
str.Form(" run block %d: (NDF/red.maxLH) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
}
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
}
}
} else {
fout << "*** FIT DID NOT CONVERGE ***" << endl;
@ -1328,7 +1348,7 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
if (str.Length() > 0) {
sstr = str;
sstr.Remove(TString::kLeading, ' ');
if (!sstr.BeginsWith("expected chisq") && !sstr.BeginsWith("run block"))
if (!sstr.BeginsWith("expected chisq") && !sstr.BeginsWith("expected maxLH") && !sstr.BeginsWith("run block"))
fout << str.Data() << endl;
} else { // only write endl if not eof is reached. This is preventing growing msr-files, i.e. more and more empty lines at the end of the file
if (!fin.eof())
@ -1351,38 +1371,38 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
if (fStatistic.fValid) { // valid fit result
if (fStatistic.fChisq) {
str.Form(" chisq = %.1lf, NDF = %d, chisq/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
} else {
str.Form(" maxLH = %.1lf, NDF = %d, maxLH/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
}
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
// check if expected chisq needs to be written
if (fStatistic.fMinExpected != 0.0) {
// check if expected chisq needs to be written
if (fStatistic.fMinExpected != 0.0) {
if (fStatistic.fChisq) {
str.Form(" expected chisq = %.1lf, NDF = %d, expected chisq/NDF = %lf",
fStatistic.fMinExpected, fStatistic.fNdf, fStatistic.fMinExpected/fStatistic.fNdf);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
} else {
str.Form(" expected maxLH = %.1lf, NDF = %d, expected maxLH/NDF = %lf",
fStatistic.fMinExpected, fStatistic.fNdf, fStatistic.fMinExpected/fStatistic.fNdf);
}
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
for (UInt_t i=0; i<fStatistic.fMinExpectedPerHisto.size(); i++) {
if (fStatistic.fNdfPerHisto[i] > 0) {
for (UInt_t i=0; i<fStatistic.fMinExpectedPerHisto.size(); i++) {
if (fStatistic.fNdfPerHisto[i] > 0) {
if (fStatistic.fChisq) {
str.Form(" run block %d: (NDF/red.chisq/red.chisq_e) = (%d/%lf/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i], fStatistic.fMinExpectedPerHisto[i]/fStatistic.fNdfPerHisto[i]);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
} else {
str.Form(" run block %d: (NDF/red.maxLH/red.maxLH_e) = (%d/%lf/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i], fStatistic.fMinExpectedPerHisto[i]/fStatistic.fNdfPerHisto[i]);
}
}
} else if (fStatistic.fNdfPerHisto.size() > 1) { // check if per run chisq needs to be written
for (UInt_t i=0; i<fStatistic.fNdfPerHisto.size(); i++) {
str.Form(" run block %d: (NDF/red.chisq) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
@ -1392,13 +1412,23 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
cout << str.Data() << endl;
}
}
} else { // maxLH
str.Form(" maxLH = %.1lf, NDF = %d, maxLH/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
} else if (fStatistic.fNdfPerHisto.size() > 1) { // check if per run chisq needs to be written
for (UInt_t i=0; i<fStatistic.fNdfPerHisto.size(); i++) {
if (fStatistic.fChisq) {
str.Form(" run block %d: (NDF/red.chisq) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
} else {
str.Form(" run block %d: (NDF/red.maxLH) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
}
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
// check if per run block maxLH needs to be written
if (messages)
cout << str.Data() << endl;
}
}
} else {
fout << "*** FIT DID NOT CONVERGE ***" << endl;
@ -1416,38 +1446,38 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
if (fStatistic.fValid) { // valid fit result
if (fStatistic.fChisq) { // chisq
str.Form(" chisq = %.1lf, NDF = %d, chisq/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
} else {
str.Form(" maxLH = %.1lf, NDF = %d, maxLH/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
}
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
// check if expected chisq needs to be written
if (fStatistic.fMinExpected != 0.0) {
// check if expected chisq needs to be written
if (fStatistic.fMinExpected != 0.0) {
if (fStatistic.fChisq) { // chisq
str.Form(" expected chisq = %.1lf, NDF = %d, expected chisq/NDF = %lf",
fStatistic.fMinExpected, fStatistic.fNdf, fStatistic.fMinExpected/fStatistic.fNdf);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
} else {
str.Form(" expected maxLH = %.1lf, NDF = %d, expected maxLH/NDF = %lf",
fStatistic.fMinExpected, fStatistic.fNdf, fStatistic.fMinExpected/fStatistic.fNdf);
}
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
for (UInt_t i=0; i<fStatistic.fMinExpectedPerHisto.size(); i++) {
if (fStatistic.fNdfPerHisto[i] > 0) {
for (UInt_t i=0; i<fStatistic.fMinExpectedPerHisto.size(); i++) {
if (fStatistic.fNdfPerHisto[i] > 0) {
if (fStatistic.fChisq) { // chisq
str.Form(" run block %d: (NDF/red.chisq/red.chisq_e) =(%d/%lf/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinExpectedPerHisto[i]/fStatistic.fNdfPerHisto[i], fStatistic.fMinExpectedPerHisto[i]/fStatistic.fNdfPerHisto[i]);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
} else {
str.Form(" run block %d: (NDF/red.maxLH/red.maxLH_e) =(%d/%lf/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinExpectedPerHisto[i]/fStatistic.fNdfPerHisto[i], fStatistic.fMinExpectedPerHisto[i]/fStatistic.fNdfPerHisto[i]);
}
}
} else if (fStatistic.fNdfPerHisto.size() > 1) { // check if per run chisq needs to be written
for (UInt_t i=0; i<fStatistic.fNdfPerHisto.size(); i++) {
str.Form(" run block %d: (NDF/red.chisq) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
@ -1457,11 +1487,23 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
cout << str.Data() << endl;
}
}
} else { // max. log. liklihood
str.Form(" maxLH = %.1lf, NDF = %d, maxLH/NDF = %lf", fStatistic.fMin, fStatistic.fNdf, fStatistic.fMin / fStatistic.fNdf);
fout << str.Data() << endl;
if (messages)
cout << endl << str.Data() << endl;
} else if (fStatistic.fNdfPerHisto.size() > 1) { // check if per run chisq needs to be written
for (UInt_t i=0; i<fStatistic.fNdfPerHisto.size(); i++) {
if (fStatistic.fChisq) { // chisq
str.Form(" run block %d: (NDF/red.chisq) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
} else {
str.Form(" run block %d: (NDF/red.maxLH) = (%d/%lf)",
i+1, fStatistic.fNdfPerHisto[i], fStatistic.fMinPerHisto[i]/fStatistic.fNdfPerHisto[i]);
}
if (fStartupOptions) {
if (fStartupOptions->writeExpectedChisq)
fout << str.Data() << endl;
}
if (messages)
cout << str.Data() << endl;
}
}
} else {
fout << "*** FIT DID NOT CONVERGE (4) ***" << endl;
@ -2148,8 +2190,10 @@ Int_t PMsrHandler::WriteMsrFile(const Char_t *filename, map<UInt_t, TString> *co
fout << "POWER";
} else if (fFourier.fPlotTag == FOURIER_PLOT_PHASE) {
fout << "PHASE";
} else if (fFourier.fPlotTag == FOURIER_PLOT_PHASE_OPT_REAL) {
fout << "PHASE_OPT_REAL";
}
fout << " # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE";
fout << " # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL";
fout << endl;
}
@ -3846,7 +3890,7 @@ Bool_t PMsrHandler::HandleFourierEntry(PMsrLines &lines)
TObjArray *tokens = 0;
TObjString *ostr = 0;
TString str;
TString str, pcStr=TString("");
Int_t ival;
@ -3953,6 +3997,8 @@ Bool_t PMsrHandler::HandleFourierEntry(PMsrLines &lines)
fourier.fPlotTag = FOURIER_PLOT_POWER;
} else if (!str.CompareTo("phase", TString::kIgnoreCase)) {
fourier.fPlotTag = FOURIER_PLOT_PHASE;
} else if (!str.CompareTo("phase_opt_real", TString::kIgnoreCase)) {
fourier.fPlotTag = FOURIER_PLOT_PHASE_OPT_REAL;
} else { // unrecognized plot tag
error = true;
continue;
@ -3995,21 +4041,10 @@ Bool_t PMsrHandler::HandleFourierEntry(PMsrLines &lines)
}
}
} else if (iter->fLine.BeginsWith("range_for_phase_correction", TString::kIgnoreCase)) {
if (tokens->GetEntries() < 3) { // range values are missing
error = true;
continue;
} else {
for (UInt_t i=0; i<2; i++) {
ostr = dynamic_cast<TObjString*>(tokens->At(i+1));
str = ostr->GetString();
if (str.IsFloat()) {
fourier.fRangeForPhaseCorrection[i] = str.Atof();
} else {
error = true;
continue;
}
}
}
// keep the string. It can only be handled at the very end of the FOURIER block evaluation
// since it needs potentially the range input and there is no guaranty this is already
// available at this point.
pcStr = iter->fLine;
} else if (iter->fLine.BeginsWith("range", TString::kIgnoreCase)) { // fourier plot range
if (tokens->GetEntries() < 3) { // plot range values are missing
error = true;
@ -4047,6 +4082,45 @@ Bool_t PMsrHandler::HandleFourierEntry(PMsrLines &lines)
tokens = 0;
}
// handle range_for_phase_correction if present
if ((pcStr.Length() != 0) && !error) {
// tokenize line
tokens = pcStr.Tokenize(" \t");
switch (tokens->GetEntries()) {
case 2:
ostr = dynamic_cast<TObjString*>(tokens->At(1));
str = ostr->GetString();
if (!str.CompareTo("all", TString::kIgnoreCase)) {
fourier.fRangeForPhaseCorrection[0] = fourier.fPlotRange[0];
fourier.fRangeForPhaseCorrection[1] = fourier.fPlotRange[1];
} else {
error = true;
}
break;
case 3:
for (UInt_t i=0; i<2; i++) {
ostr = dynamic_cast<TObjString*>(tokens->At(i+1));
str = ostr->GetString();
if (str.IsFloat()) {
fourier.fRangeForPhaseCorrection[i] = str.Atof();
} else {
error = true;
}
}
break;
default:
error = true;
break;
}
// clean up
if (tokens) {
delete tokens;
tokens = 0;
}
}
if (error) {
cerr << endl << ">> PMsrHandler::HandleFourierEntry: **ERROR** in line " << iter->fLineNo << ":";
cerr << endl;
@ -4061,9 +4135,9 @@ Bool_t PMsrHandler::HandleFourierEntry(PMsrLines &lines)
cerr << endl << ">> 0 <= n <= 20 are allowed values";
cerr << endl << ">> [dc-corrected true | false]";
cerr << endl << ">> [apodization none | weak | medium | strong]";
cerr << endl << ">> [plot real | imag | real_and_imag | power | phase]";
cerr << endl << ">> [plot real | imag | real_and_imag | power | phase | phase_opt_real]";
cerr << endl << ">> [phase value]";
cerr << endl << ">> [range_for_phase_correction min max]";
cerr << endl << ">> [range_for_phase_correction min max | all]";
cerr << endl << ">> [range min max]";
cerr << endl;
} else { // save last run found
@ -4643,7 +4717,8 @@ Bool_t PMsrHandler::HandleStatisticEntry(PMsrLines &lines)
if (tstr.Length() > 0) {
if (!tstr.BeginsWith("#") && !tstr.BeginsWith("STATISTIC") && !tstr.BeginsWith("chisq") &&
!tstr.BeginsWith("maxLH") && !tstr.BeginsWith("*** FIT DID NOT CONVERGE ***") &&
!tstr.BeginsWith("expected chisq") && !tstr.BeginsWith("run block")) {
!tstr.BeginsWith("expected chisq") && !tstr.BeginsWith("expected maxLH") &&
!tstr.BeginsWith("run block")) {
cerr << endl << ">> PMsrHandler::HandleStatisticEntry: **SYNTAX ERROR** in line " << lines[i].fLineNo;
cerr << endl << ">> '" << lines[i].fLine.Data() << "'";
cerr << endl << ">> not a valid STATISTIC block line";
@ -6033,20 +6108,6 @@ Bool_t PMsrHandler::EstimateN0()
return fStartupOptions->estimateN0;
}
//--------------------------------------------------------------------------
// GetAlphaEstimateN0 (public)
//--------------------------------------------------------------------------
/**
* <p>returns alpha to estimate N0
*/
Double_t PMsrHandler::GetAlphaEstimateN0()
{
if (fStartupOptions == 0)
return 0.0;
return fStartupOptions->alphaEstimateN0;
}
//--------------------------------------------------------------------------
// GetDKSTheoryString (public)
//--------------------------------------------------------------------------