Merged muonspin/musrfit/root6 into master

This commit is contained in:
Zaher Salman
2017-05-23 14:42:44 +02:00
291 changed files with 16063 additions and 4080 deletions

View File

@@ -1343,6 +1343,8 @@ Bool_t PFitter::ExecuteMinos()
// the 2nd condition is from an all together unused variable
// the 3rd condition is a variable fixed via the FIX command
if ((fMnUserParams.Error(i) != 0.0) && (fRunInfo->ParameterInUse(i) != 0) && (!fMnUserParams.Parameters().at(i).IsFixed())) {
cout << ">> PFitter::ExecuteMinos(): calculate errors for " << fParams[i].fName << endl;
// 1-sigma MINOS errors
ROOT::Minuit2::MinosError err = minos.Minos(i);

View File

@@ -1582,7 +1582,9 @@ void PMusrCanvas::ExportData(const Char_t *fileName)
switch (fPlotType) {
case MSR_PLOT_SINGLE_HISTO:
case MSR_PLOT_SINGLE_HISTO_RRF:
case MSR_PLOT_ASYM:
case MSR_PLOT_ASYM_RRF:
case MSR_PLOT_MU_MINUS:
if (fDifferenceView) { // difference view plot
switch (fCurrentPlotView) {
@@ -4593,14 +4595,8 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
dataYmax = GetMaximum(fData[i].data, dataXmin, dataXmax);
}
Double_t dd = 0.05*fabs(dataYmax-dataYmin);
if (!fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) {
dataYmin -= dd;
dataYmax += dd;
} else {
if (dataYmin < 0)
dataYmin = 0.1;
dataYmax += dd;
}
dataYmin -= dd;
dataYmax += dd;
}
} else { // set the x-/y-range to the previous fHistoFrame range
dataXmin = xmin;
@@ -4618,16 +4614,13 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
dataYmax = GetMaximum(fData[i].data, dataXmin, dataXmax);
}
Double_t dd = 0.05*fabs(dataYmax-dataYmin);
if (!fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) {
dataYmin -= dd;
dataYmax += dd;
} else {
if (dataYmin < 0)
dataYmin = 0.1;
dataYmax += dd;
}
dataYmin -= dd;
dataYmax += dd;
}
}
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) {
dataYmin = 1.0e-4 * dataYmax;
}
// create histo frame in order to plot histograms possibly with different x-frames
fHistoFrame = fDataTheoryPad->DrawFrame(dataXmin, dataYmin, dataXmax, dataYmax);
@@ -4756,14 +4749,8 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
dataYmax = GetMaximum(fNonMusrData[i].data, dataXmin, dataXmax);
}
Double_t dd = 0.05*fabs(dataYmax-dataYmin);
if (!fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) {
dataYmin -= dd;
dataYmax += dd;
} else {
if (dataYmin < 0)
dataYmin = 0.1;
dataYmax += dd;
}
dataYmin -= dd;
dataYmax += dd;
}
} else { // set the x-/y-range to the previous fHistoFrame range
dataXmin = xmin;
@@ -4781,16 +4768,14 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
dataYmax = GetMaximum(fNonMusrData[i].data, dataXmin, dataXmax);
}
Double_t dd = 0.05*fabs(dataYmax-dataYmin);
if (!fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) {
dataYmin -= dd;
dataYmax += dd;
} else {
if (dataYmin < 0)
dataYmin = 0.1;
dataYmax += dd;
}
dataYmin -= dd;
dataYmax += dd;
}
}
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) {
if (dataYmin <= 0.0)
dataYmin = 1.0e-4 * dataYmax;
}
// create fMultiGraphData, and add all data and theory
fMultiGraphData = new TMultiGraph();

View File

@@ -147,7 +147,7 @@ PStartupHandler::PStartupHandler()
// if musrfit_startup.xml is still not found, will create a default one
if (!fStartupFileFound) {
cout << endl << "**INFO** no musrfit_startup.xml file found, will write a default one." << endl;
if (!WriteDefaulStartupFile()) {
if (!WriteDefaultStartupFile()) {
cerr << endl << "**ERROR** couldn't write default musrfit_startup.xml." << endl;
} else {
home = getenv("HOME");
@@ -587,9 +587,9 @@ Bool_t PStartupHandler::StartupFileExists(Char_t *fln)
}
//--------------------------------------------------------------------------
// WriteDefaulStartupFile
// WriteDefaultStartupFile
//--------------------------------------------------------------------------
Bool_t PStartupHandler::WriteDefaulStartupFile()
Bool_t PStartupHandler::WriteDefaultStartupFile()
{
// get home
Char_t startup_path_name[256];

View File

@@ -2687,14 +2687,16 @@ void PTheory::CalculateGaussLFIntegral(const Double_t *val) const
fLFIntegral.push_back(0.0); // start value of the integral
ft = 0.0;
Double_t step = 0.0;
Double_t step = 0.0, lastStep = 1.0, diff = 0.0;
do {
t += dt;
step = 0.5*dt*preFactor*(exp(-0.5*pow(Delta * (t-dt), 2.0))*sin(w0*(t-dt))+
exp(-0.5*pow(Delta * t, 2.0))*sin(w0*t));
diff = fabs(fabs(step)-fabs(lastStep));
lastStep = step;
ft += step;
fLFIntegral.push_back(ft);
} while ((t <= 20.0) && (fabs(step) > 1.0e-10));
} while ((t <= 20.0) && (diff > 1.0e-10));
}
//--------------------------------------------------------------------------
@@ -2760,13 +2762,15 @@ void PTheory::CalculateLorentzLFIntegral(const Double_t *val) const
ft += 0.5*dt*preFactor*(1.0+sin(w0*t)/(w0*t)*exp(-a*t));
fLFIntegral.push_back(ft);
// calculate all the other integral bin values
Double_t step = 0.0;
Double_t step = 0.0, lastStep = 1.0, diff = 0.0;
do {
t += dt;
step = 0.5*dt*preFactor*(sin(w0*(t-dt))/(w0*(t-dt))*exp(-a*(t-dt))+sin(w0*t)/(w0*t)*exp(-a*t));
diff = fabs(fabs(step)-fabs(lastStep));
lastStep = step;
ft += step;
fLFIntegral.push_back(ft);
} while ((t <= 20.0) && (fabs(step) > 1.0e-10));
} while ((t <= 20.0) && (diff > 1.0e-10));
}