37#include <TObjString.h>
38#include <TGFileDialog.h>
43static const char *
gFiletypes[] = {
"Data files",
"*.dat",
84 std::cerr << std::endl <<
">> PMusrCanvasPlotRange::SetXRange(): **WARNING** xmin > xmax, will swap them." << std::endl;
109 std::cerr << std::endl <<
">> PMusrCanvasPlotRange::SetYRange(): **WARNING** ymin > ymax, will swap them." << std::endl;
173 gStyle->SetHistMinimumZero(kTRUE);
206 Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
207 const Bool_t batch,
const Bool_t fourier,
const Bool_t avg,
208 const Bool_t theoAsData) :
232 gStyle->SetHistMinimumZero(kTRUE);
272 Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
275 const Bool_t batch,
const Bool_t fourier,
const Bool_t avg,
276 const Bool_t theoAsData) :
299 gStyle->SetHistMinimumZero(kTRUE);
311 if (
fData.size() > 0) {
312 for (UInt_t i=0; i<
fData.size(); i++)
346 if (
fMsrHandler->GetMsrFourierList()->fFourierBlockPresent) {
347 fFourier.fFourierBlockPresent =
true;
351 if (
fMsrHandler->GetMsrFourierList()->fFourierPower != -1) {
363 if ((
fMsrHandler->GetMsrFourierList()->fRangeForPhaseCorrection[0] != -1.0) &&
364 (
fMsrHandler->GetMsrFourierList()->fRangeForPhaseCorrection[1] != -1.0)) {
365 fFourier.fRangeForPhaseCorrection[0] =
fMsrHandler->GetMsrFourierList()->fRangeForPhaseCorrection[0];
366 fFourier.fRangeForPhaseCorrection[1] =
fMsrHandler->GetMsrFourierList()->fRangeForPhaseCorrection[1];
368 if ((
fMsrHandler->GetMsrFourierList()->fPlotRange[0] != -1.0) &&
369 (
fMsrHandler->GetMsrFourierList()->fPlotRange[1] != -1.0)) {
376 if (((
fMsrHandler->GetMsrPlotList()->at(0).fRRFPacking > 0) &&
377 (
fMsrHandler->GetMsrPlotList()->at(0).fRRFFreq != 0.0)) ||
378 (
fMsrHandler->GetMsrGlobal()->GetRRFPacking() > 0 &&
379 fMsrHandler->GetMsrGlobal()->GetRRFUnit().CompareTo(
"??"))) {
385 Int_t rrfUnitTag = -1;
386 Double_t rrfFreq = 0.0;
387 if (
fMsrHandler->GetMsrPlotList()->at(0).fRRFPacking > 0) {
388 fRRFText = std::make_unique<TString>(
"RRF: ");
389 rrfUnitTag =
fMsrHandler->GetMsrPlotList()->at(0).fRRFUnit;
390 rrfFreq =
fMsrHandler->GetMsrPlotList()->at(0).fRRFFreq;
391 TString rrfFreqStr(
"");
392 rrfFreqStr.Form(
"%.5g", rrfFreq);
394 *
fRRFText += TString(
"#nu_{RRF} = ");
398 *
fRRFText += TString(
"#nu_{RRF} = ");
402 *
fRRFText += TString(
"#omega_{RRF} = ");
414 *
fRRFText += TString(
", RRF packing = ");
417 fRRFText = std::make_unique<TString>(
"RRF: ");
418 rrfUnitTag =
fMsrHandler->GetMsrGlobal()->GetRRFUnitTag();
420 TString rrfFreqStr(
"");
421 rrfFreqStr.Form(
"%.5g", rrfFreq);
423 *
fRRFText += TString(
"#nu_{RRF} = ");
427 *
fRRFText += TString(
"#nu_{RRF} = ");
431 *
fRRFText += TString(
"#omega_{RRF} = ");
443 *
fRRFText += TString(
", RRF packing = ");
466 fTimeoutTimer->Connect(
"Timeout()",
"PMusrCanvas",
this,
"Done()");
485 Double_t ypos = 0.0, yoffset = 0.0;
492 for (UInt_t i=0; i<param.size(); i++) {
493 if (param[i].fName.Length() > maxLength)
494 maxLength = param[i].fName.Length();
499 if (param.size() > 20)
500 yoffset = 1.0 / (param.size()+1);
507 for (UInt_t i=0; i<param.size(); i++) {
510 snprintf(accStr,
sizeof(accStr),
"%%.%dlf", accuracy);
518 str += param[i].fName;
519 for (Int_t j=0; j<maxLength-param[i].fName.Length(); j++)
522 if (round(param[i].fValue)-param[i].fValue==0)
523 snprintf(cnum,
sizeof(cnum),
"%.1lf", param[i].fValue);
525 snprintf(cnum,
sizeof(cnum), accStr, param[i].fValue);
527 for (Int_t j=0; j<9-(Int_t)strlen(cnum); j++)
531 if (param[i].fPosErrorPresent) {
534 err = (param[i].fPosError - param[i].fStep) / 2.0;
536 if ((fabs(fabs(param[i].fStep) - param[i].fPosError) < 0.1*fabs(param[i].fStep)) &&
537 (fabs(fabs(param[i].fStep) - param[i].fPosError) < 0.1*param[i].fPosError)) {
538 if (round(err)-err==0)
539 snprintf(cnum,
sizeof(cnum),
"%.1lf", err);
541 snprintf(cnum,
sizeof(cnum), accStr, err);
543 snprintf(accStr,
sizeof(accStr),
"%%.%dlf!!", accuracy);
544 if (round(err)-err==0)
545 snprintf(cnum,
sizeof(cnum),
"%.1lf!!", err);
547 snprintf(cnum,
sizeof(cnum), accStr, err);
551 if (round(param[i].fStep)-param[i].fStep==0)
552 snprintf(cnum,
sizeof(cnum),
"%.1lf", param[i].fStep);
554 snprintf(cnum,
sizeof(cnum), accStr, param[i].fStep);
557 ypos = 0.98-i*yoffset;
563 if (theory.size() > 20)
564 yoffset = 1.0/(theory.size()+1);
567 for (UInt_t i=1; i<theory.size(); i++) {
569 str = theory[i].fLine;
570 idx = str.Index(
"(");
573 str.Resize(str.Strip().Length());
575 ypos = 0.98 - i*yoffset;
582 for (UInt_t i=1; i<functions.size(); i++) {
584 fTheoryPad->AddText(0.03, ypos, functions[i].fLine.Data());
611 for (UInt_t i=0; i<plotInfo.
fRuns.size(); i++) {
613 if ((Int_t)plotInfo.
fRuns[i] > (Int_t)runs.size()) {
615 std::cerr << std::endl <<
">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** run plot number " << (Int_t)plotInfo.
fRuns[i] <<
" is larger than the number of runs " << runs.size();
616 std::cerr << std::endl;
620 runNo = (UInt_t)plotInfo.
fRuns[i]-1;
621 if (runs[runNo].GetFitType() != -1) {
622 fitType = runs[runNo].GetFitType();
626 std::cerr << std::endl <<
">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** plottype = " <<
fPlotType;
627 std::cerr <<
", fittype = " << runs[runNo].GetFitType() <<
"(RUN block)/";
628 std::cerr <<
"fittype = " << globalBlock->
GetFitType() <<
"(GLOBAL block). However, they have to correspond!";
629 std::cerr << std::endl;
635 for (UInt_t i=0; i<plotInfo.
fRuns.size(); i++) {
638 runNo = (UInt_t)plotInfo.
fRuns[i]-1;
640 if (runs[runNo].GetFitType() != -1) {
641 fitType = runs[runNo].GetFitType();
649 std::cerr << std::endl <<
">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** couldn't obtain run no " << runNo <<
" for a single histogram plot";
650 std::cerr << std::endl;
661 std::cerr << std::endl <<
">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** couldn't obtain run no " << runNo <<
" for a single histogram RRF plot";
662 std::cerr << std::endl;
673 std::cerr << std::endl <<
">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** couldn't obtain run no " << runNo <<
" for a asymmetry plot";
674 std::cerr << std::endl;
685 std::cerr << std::endl <<
">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** couldn't obtain run no " << runNo <<
" for a beta-NMR asymmetry plot";
686 std::cerr << std::endl;
697 std::cerr << std::endl <<
">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** couldn't obtain run no " << runNo <<
" for a asymmetry RRF plot";
698 std::cerr << std::endl;
709 std::cerr << std::endl <<
">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** couldn't obtain run no " << runNo <<
" for a mu minus single histogram plot";
710 std::cerr << std::endl;
721 std::cerr << std::endl <<
">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** couldn't obtain run no " << runNo <<
" for a none musr data plot";
722 std::cerr << std::endl;
741 std::cerr << std::endl <<
">> PMusrCanvas::UpdateDataTheoryPad(): **ERROR** wrong plottype tag?!";
742 std::cerr << std::endl;
831 TString tstr, tsubstr;
836 tstr += statistic.
fDate;
837 tstr += TString(
", ");
841 tstr += TString(
"chisq = ");
843 tstr += TString(
"maxLH = ");
845 tstr += statistic.
fMin;
846 tstr += TString(
" , NDF = ");
847 tstr += statistic.
fNdf;
849 tstr += TString(
" , chisq/NDF = ");
851 tstr += TString(
" , maxLH/NDF = ");
853 if (statistic.
fNdf != 0) {
854 tstr += statistic.
fMin/statistic.
fNdf;
856 tstr += TString(
"undefined");
868 for (UInt_t i=0; i<
fData.size(); i++) {
870 runNo = (UInt_t)plotInfo.
fRuns[i]-1;
871 if (runs[runNo].GetRunNameSize() > 1)
872 tstr =
"++" + *runs[runNo].GetRunName() + TString(
",");
874 tstr = *runs[runNo].GetRunName() + TString(
",");
878 tstr += TString(
"h:");
880 fMsrHandler->GetGroupingString(runNo,
"forward", grouping);
882 tstr += TString(
",");
886 tstr += TString(
"h:");
888 fMsrHandler->GetGroupingString(runNo,
"forward", grouping);
890 tstr += TString(
"/");
892 fMsrHandler->GetGroupingString(runNo,
"backward", grouping);
894 tstr += TString(
",");
897 ddvec =
fRunList->GetTemp(*runs[runNo].GetRunName());
898 if (ddvec->empty()) {
899 tstr += TString(
"T=");
900 tstr += TString(
"??,");
901 }
else if (ddvec->size() == 1){
902 tstr += TString(
"T=");
903 snprintf(sval,
sizeof(sval),
"%0.2lf", ddvec->at(0).first);
904 tstr += TString(sval) + TString(
"K,");
906 for(UInt_t i(0); i<ddvec->size(); ++i){
907 snprintf(sval,
sizeof(sval),
"T%u=", i);
908 tstr += TString(sval);
909 snprintf(sval,
sizeof(sval),
"%0.2lf", ddvec->at(i).first);
910 tstr += TString(sval) + TString(
"K,");
914 tstr += TString(
"B=");
915 dval =
fRunList->GetField(*runs[runNo].GetRunName());
917 tstr += TString(
"??,");
920 snprintf(sval,
sizeof(sval),
"%0.2lf", dval);
921 tstr += TString(sval) + TString(
"G,");
923 snprintf(sval,
sizeof(sval),
"%0.2lf", dval/1.0e4);
924 tstr += TString(sval) + TString(
"T,");
928 tstr += TString(
"E=");
929 dval =
fRunList->GetEnergy(*runs[runNo].GetRunName());
931 tstr += TString(
"??,");
934 snprintf(sval,
sizeof(sval),
"%0.2lf", dval);
935 tstr += TString(sval) + TString(
"keV,");
937 snprintf(sval,
sizeof(sval),
"%0.2lf", dval/1.0e3);
938 tstr += TString(sval) + TString(
"MeV,");
942 tstr +=
fRunList->GetSetup(*runs[runNo].GetRunName());
962 Emit(
"Done(Int_t)",
status);
986 if (event != kKeyPress)
992 if (!strcmp(selected->GetTitle(),
"dataTheoryPad"))
1006 enum eKeySwitch {kNotRelevant, kData, kDiffData, kFourier, kDiffFourier, kFourierDiff};
1007 eKeySwitch relevantKeySwitch = kNotRelevant;
1008 static eKeySwitch lastKeySwitch = kNotRelevant;
1010 if ((lastKeySwitch == kFourierDiff) && (x ==
'f')) {
1011 std::cout <<
"**INFO** f-d-f doesn't make any sense, will ignore 'f' ..." << std::endl;
1015 if ((lastKeySwitch == kDiffFourier) && (x ==
'd')) {
1016 std::cout <<
"**INFO** d-f-d doesn't make any sense, will ignore 'd' ..." << std::endl;
1022 }
else if (x ==
'd') {
1035 relevantKeySwitch = kDiffData;
1037 relevantKeySwitch = kData;
1039 relevantKeySwitch = kFourierDiff;
1041 relevantKeySwitch = kFourier;
1042 }
else if (x ==
'u') {
1060 }
else if (x ==
'f') {
1063 relevantKeySwitch = kDiffFourier;
1065 relevantKeySwitch = kFourier;
1067 relevantKeySwitch = kDiffData;
1069 relevantKeySwitch = kData;
1118 }
else if (x ==
'+') {
1121 }
else if (x ==
'-') {
1124 }
else if (x ==
'a') {
1125 if (
fData.size() > 1) {
1139 relevantKeySwitch = kDiffData;
1141 relevantKeySwitch = kData;
1143 relevantKeySwitch = kFourierDiff;
1145 relevantKeySwitch = kFourier;
1147 std::cout <<
"**INFO** averaging of a single data set doesn't make any sense, will ignore 'a' ..." << std::endl;
1150 }
else if (x ==
'c') {
1160 }
else if (x ==
't') {
1161 if (
fData.size() == 1) {
1164 fData[0].theory->SetLineColor(kRed);
1165 fData[0].theory->SetLineWidth(2);
1168 fData[0].theory->SetLineWidth(1);
1177 lastKeySwitch = relevantKeySwitch;
1180 switch (relevantKeySwitch) {
1230 static Int_t previousPlotView =
PV_DATA;
1266 if (previousPlotView ==
PV_DATA)
1289 if (previousPlotView ==
PV_DATA)
1312 if (previousPlotView ==
PV_DATA)
1335 if (previousPlotView ==
PV_DATA)
1358 if (previousPlotView ==
PV_DATA)
1369 if (
fData[0].dataFourierPhaseOptReal ==
nullptr) {
1370 if (
fData[0].dataFourierRe ==
nullptr)
1388 if (previousPlotView ==
PV_DATA)
1453 if (
fData.size() > 1) {
1465 std::cout <<
"**INFO** averaging of a single data set doesn't make any sense, will ignore 'a' ..." << std::endl;
1469 static TString dir(
".");
1472 fi.fIniDir = StrDup(dir);
1473 fi.fOverwrite =
true;
1474 new TGFileDialog(0,
fImp, kFDSave, &fi);
1475 if (fi.fFilename && strlen(fi.fFilename)) {
1503 if (gROOT->GetListOfCanvases()->IsEmpty()) {
1517 gROOT->GetListOfCanvases()->Remove(
fMainCanvas.get());
1532 std::cout << std::endl <<
">> SaveGraphicsAndQuit: will dump the canvas into a graphics output file (" << graphicsFormat <<
") ..."<< std::endl;
1534 TString str(fileName);
1539 if (str.Contains(
".msr")) {
1540 idx = str.Index(
".msr");
1543 if (str.Contains(
".mlog")) {
1544 idx = str.Index(
".mlog");
1549 std::cerr << std::endl <<
">> PMusrCanvas::SaveGraphicsAndQuit(): **ERROR** fileName (" << fileName <<
") is invalid." << std::endl;
1557 str.Replace(idx, size, ext, strlen(ext));
1560 snprintf(ext,
sizeof(ext),
".%s", graphicsFormat);
1561 str.Replace(idx, size, ext, strlen(ext));
1563 std::cout << std::endl <<
">> SaveGraphicsAndQuit: " << str.Data() << std::endl;
1581 if (fileName ==
nullptr) {
1582 std::cerr << std::endl <<
">> PMusrCanvas::ExportData(): **ERROR** NO path file name provided. Will do nothing." << std::endl;
1594 Double_t xval, yval;
1609 xmin =
fHistoFrame->GetXaxis()->GetBinCenter(xminBin);
1610 xmax =
fHistoFrame->GetXaxis()->GetBinCenter(xmaxBin);
1616 for (UInt_t i=0; i<
fData.size(); i++) {
1623 xminBin =
fData[0].diffFourierRe->GetXaxis()->GetFirst();
1624 xmaxBin =
fData[0].diffFourierRe->GetXaxis()->GetLast();
1625 xmin =
fData[0].diffFourierRe->GetXaxis()->GetBinCenter(xminBin);
1626 xmax =
fData[0].diffFourierRe->GetXaxis()->GetBinCenter(xmaxBin);
1632 for (UInt_t i=0; i<
fData.size(); i++) {
1639 xminBin =
fData[0].diffFourierIm->GetXaxis()->GetFirst();
1640 xmaxBin =
fData[0].diffFourierIm->GetXaxis()->GetLast();
1641 xmin =
fData[0].diffFourierIm->GetXaxis()->GetBinCenter(xminBin);
1642 xmax =
fData[0].diffFourierIm->GetXaxis()->GetBinCenter(xmaxBin);
1648 for (UInt_t i=0; i<
fData.size(); i++) {
1655 xminBin =
fData[0].diffFourierRe->GetXaxis()->GetFirst();
1656 xmaxBin =
fData[0].diffFourierRe->GetXaxis()->GetLast();
1657 xmin =
fData[0].diffFourierRe->GetXaxis()->GetBinCenter(xminBin);
1658 xmax =
fData[0].diffFourierRe->GetXaxis()->GetBinCenter(xmaxBin);
1665 for (UInt_t i=0; i<
fData.size(); i++) {
1673 xminBin =
fData[0].diffFourierPwr->GetXaxis()->GetFirst();
1674 xmaxBin =
fData[0].diffFourierPwr->GetXaxis()->GetLast();
1675 xmin =
fData[0].diffFourierPwr->GetXaxis()->GetBinCenter(xminBin);
1676 xmax =
fData[0].diffFourierPwr->GetXaxis()->GetBinCenter(xmaxBin);
1682 for (UInt_t i=0; i<
fData.size(); i++) {
1689 xminBin =
fData[0].diffFourierPhase->GetXaxis()->GetFirst();
1690 xmaxBin =
fData[0].diffFourierPhase->GetXaxis()->GetLast();
1691 xmin =
fData[0].diffFourierPhase->GetXaxis()->GetBinCenter(xminBin);
1692 xmax =
fData[0].diffFourierPhase->GetXaxis()->GetBinCenter(xmaxBin);
1698 for (UInt_t i=0; i<
fData.size(); i++) {
1712 xmin =
fHistoFrame->GetXaxis()->GetBinCenter(xminBin);
1713 xmax =
fHistoFrame->GetXaxis()->GetBinCenter(xmaxBin);
1720 for (UInt_t i=0; i<
fData.size(); i++) {
1729 xminBin =
fData[0].dataFourierRe->GetXaxis()->GetFirst();
1730 xmaxBin =
fData[0].dataFourierRe->GetXaxis()->GetLast();
1731 xmin =
fData[0].dataFourierRe->GetXaxis()->GetBinCenter(xminBin);
1732 xmax =
fData[0].dataFourierRe->GetXaxis()->GetBinCenter(xmaxBin);
1739 for (UInt_t i=0; i<
fData.size(); i++) {
1747 xminBin =
fData[0].dataFourierIm->GetXaxis()->GetFirst();
1748 xmaxBin =
fData[0].dataFourierIm->GetXaxis()->GetLast();
1749 xmin =
fData[0].dataFourierIm->GetXaxis()->GetBinCenter(xminBin);
1750 xmax =
fData[0].dataFourierIm->GetXaxis()->GetBinCenter(xmaxBin);
1757 for (UInt_t i=0; i<
fData.size(); i++) {
1765 xminBin =
fData[0].dataFourierRe->GetXaxis()->GetFirst();
1766 xmaxBin =
fData[0].dataFourierRe->GetXaxis()->GetLast();
1767 xmin =
fData[0].dataFourierRe->GetXaxis()->GetBinCenter(xminBin);
1768 xmax =
fData[0].dataFourierRe->GetXaxis()->GetBinCenter(xmaxBin);
1776 for (UInt_t i=0; i<
fData.size(); i++) {
1786 xminBin =
fData[0].dataFourierPwr->GetXaxis()->GetFirst();
1787 xmaxBin =
fData[0].dataFourierPwr->GetXaxis()->GetLast();
1788 xmin =
fData[0].dataFourierPwr->GetXaxis()->GetBinCenter(xminBin);
1789 xmax =
fData[0].dataFourierPwr->GetXaxis()->GetBinCenter(xmaxBin);
1796 for (UInt_t i=0; i<
fData.size(); i++) {
1804 xminBin =
fData[0].dataFourierPhase->GetXaxis()->GetFirst();
1805 xmaxBin =
fData[0].dataFourierPhase->GetXaxis()->GetLast();
1806 xmin =
fData[0].dataFourierPhase->GetXaxis()->GetBinCenter(xminBin);
1807 xmax =
fData[0].dataFourierPhase->GetXaxis()->GetBinCenter(xmaxBin);
1814 for (UInt_t i=0; i<
fData.size(); i++) {
1822 xminBin =
fData[0].dataFourierPhaseOptReal->GetXaxis()->GetFirst();
1823 xmaxBin =
fData[0].dataFourierPhaseOptReal->GetXaxis()->GetLast();
1824 xmin =
fData[0].dataFourierPhaseOptReal->GetXaxis()->GetBinCenter(xminBin);
1825 xmax =
fData[0].dataFourierPhaseOptReal->GetXaxis()->GetBinCenter(xmaxBin);
1832 for (UInt_t i=0; i<
fData.size(); i++) {
1865 if ((xval >= xmin) && (xval <= xmax)) {
1866 dump.
dataX.push_back(xval);
1867 dump.
data.push_back(yval);
1873 if (dump.
dataX.size() > 0)
1874 dumpVector.push_back(dump);
1912 if ((xval >= xmin) && (xval <= xmax)) {
1913 dump.
dataX.push_back(xval);
1914 dump.
data.push_back(yval);
1920 if (dump.
dataX.size() > 0)
1921 dumpVector.push_back(dump);
1929 for (Int_t j=0; j<
fNonMusrData[i].theory->GetN(); j++) {
1933 if ((xval >= xmin) && (xval <= xmax)) {
1934 dump.
dataX.push_back(xval);
1935 dump.
data.push_back(yval);
1940 if (dump.
dataX.size() > 0)
1941 dumpVector.push_back(dump);
1968 fout.open(fileName, std::iostream::out);
1969 if (!fout.is_open()) {
1970 std::cerr << std::endl <<
">> PMusrCanvas::ExportData(): **ERROR** couldn't open file " << fileName <<
" for writing." << std::endl;
1975 UInt_t maxLength = 0;
1976 for (UInt_t i=0; i<dumpVector.size(); i++) {
1977 if (maxLength < dumpVector[i].dataX.size())
1978 maxLength = dumpVector[i].dataX.size();
1987 fout <<
"% from averaged view" << std::endl;
1988 fout <<
"x, diff, errDiff" << std::endl;
1990 for (UInt_t i=0; i<dumpVector.size()-1; i++) {
1991 fout <<
"x" << i <<
" , diff" << i <<
", errDiff" << i <<
", ";
1993 fout <<
"x" << dumpVector.size()-1 <<
" , diff" << dumpVector.size()-1 <<
", errDiff" << dumpVector.size()-1 << std::endl;
1998 fout <<
"% from averaged view" << std::endl;
1999 fout <<
"x, F_diffRe" << std::endl;
2001 for (UInt_t i=0; i<dumpVector.size()-1; i++) {
2002 fout <<
"freq" << i <<
", F_diffRe" << i <<
", ";
2004 fout <<
"freq" << dumpVector.size()-1 <<
", F_diffRe" << dumpVector.size()-1 << std::endl;
2009 fout <<
"% from averaged view" << std::endl;
2010 fout <<
"x, F_diffIm" << std::endl;
2012 for (UInt_t i=0; i<dumpVector.size()-1; i++) {
2013 fout <<
"freq" << i <<
", F_diffIm" << i <<
", ";
2015 fout <<
"freq" << dumpVector.size()-1 <<
", F_diffIm" << dumpVector.size()-1 << std::endl;
2020 fout <<
"% from averaged view" << std::endl;
2021 fout <<
"x, F_diffRe, F_diffIm" << std::endl;
2023 for (UInt_t i=0; i<dumpVector.size()/2; i++) {
2024 fout <<
"freq" << i <<
", F_diffRe" << i <<
", ";
2026 for (UInt_t i=0; i<dumpVector.size()/2-1; i++) {
2027 fout <<
"freq" << i <<
", F_diffIm" << i <<
", ";
2029 fout <<
"freq" << dumpVector.size()/2-1 <<
", F_diffIm" << dumpVector.size()/2-1 << std::endl;
2034 fout <<
"% from averaged view" << std::endl;
2035 fout <<
"x, F_diffPwr" << std::endl;
2037 for (UInt_t i=0; i<dumpVector.size()-1; i++) {
2038 fout <<
"freq" << i <<
", F_diffPwr" << i <<
", ";
2040 fout <<
"freq" << dumpVector.size()-1 <<
", F_diffPwr" << dumpVector.size()-1 << std::endl;
2045 fout <<
"% from averaged view" << std::endl;
2046 fout <<
"x, F_diffPhase" << std::endl;
2048 for (UInt_t i=0; i<dumpVector.size()-1; i++) {
2049 fout <<
"freq" << i <<
", F_diffPhase" << i <<
", ";
2051 fout <<
"freq" << dumpVector.size()-1 <<
", F_diffPhase" << dumpVector.size()-1 << std::endl;
2059 for (UInt_t i=0; i<maxLength; i++) {
2061 for (UInt_t j=0; j<dumpVector.size()-1; j++) {
2062 if (i<dumpVector[j].dataX.size()) {
2063 fout << dumpVector[j].dataX[i] <<
", ";
2064 fout << dumpVector[j].data[i] <<
", ";
2065 if (dumpVector[j].dataErr.size() > 0)
2066 fout << dumpVector[j].dataErr[i] <<
", ";
2068 if (dumpVector[j].dataErr.size() > 0)
2075 if (i<dumpVector[dumpVector.size()-1].dataX.size()) {
2076 fout << dumpVector[dumpVector.size()-1].dataX[i] <<
", ";
2077 fout << dumpVector[dumpVector.size()-1].data[i] <<
", ";
2078 if (dumpVector[dumpVector.size()-1].dataErr.size() > 0)
2079 fout << dumpVector[dumpVector.size()-1].dataErr[i];
2081 if (dumpVector[dumpVector.size()-1].dataErr.size() > 0)
2093 fout <<
"% from averaged view" << std::endl;
2094 fout <<
"% xData, data, errData, xTheory, theory" << std::endl;
2096 for (UInt_t i=0; i<dumpVector.size(); i++) {
2098 fout <<
"xData" << i/2 <<
", data" << i/2 <<
", errData" << i/2 <<
", ";
2100 if (i == dumpVector.size()-1)
2101 fout <<
"xTheory" << (i-1)/2 <<
", theory" << (i-1)/2 << std::endl;
2103 fout <<
"xTheory" << (i-1)/2 <<
", theory" << (i-1)/2 <<
", ";
2109 fout <<
"% from averaged view" << std::endl;
2110 fout <<
"freq, F_Re, freqTheo, F_theoRe" << std::endl;
2112 for (UInt_t i=0; i<dumpVector.size(); i++) {
2114 fout <<
"freq" << i/2 <<
", F_Re" << i/2 <<
", ";
2116 if (i == dumpVector.size()-1)
2117 fout <<
"freqTheo" << (i-1)/2 <<
", F_theoRe" << (i-1)/2 << std::endl;
2119 fout <<
"freqTheo" << (i-1)/2 <<
", F_theoRe" << (i-1)/2 <<
", ";
2125 fout <<
"% from averaged view" << std::endl;
2126 fout <<
"freq, F_Im, freqTheo, F_theoIm" << std::endl;
2129 for (UInt_t i=0; i<dumpVector.size(); i++) {
2131 fout <<
"freq" << i/2 <<
", F_Im" << i/2 <<
", ";
2133 if (i == dumpVector.size()-1)
2134 fout <<
"freqTheo" << (i-1)/2 <<
", F_theoIm" << (i-1)/2 << std::endl;
2136 fout <<
"freqTheo" << (i-1)/2 <<
", F_theoIm" << (i-1)/2 <<
", ";
2142 fout <<
"% from averaged view" << std::endl;
2143 fout <<
"freq, F_Re, freqTheo, F_theoRe, freq, F_Im, freqTheo, F_theoIm" << std::endl;
2145 for (UInt_t i=0; i<dumpVector.size(); i++) {
2147 fout <<
"freq" << i/4 <<
", F_Re" << i/4 <<
", ";
2148 else if (i % 4 == 1)
2149 fout <<
"freqTheo" << (i-1)/4 <<
", F_theoRe" << (i-1)/4 <<
", ";
2150 else if (i % 4 == 2)
2151 fout <<
"freq" << (i-2)/4 <<
", F_Im" << (i-2)/4 <<
", ";
2153 if (i == dumpVector.size()-1)
2154 fout <<
"freqTheo" << (i-3)/4 <<
", F_theoIm" << (i-3)/4 << std::endl;
2156 fout <<
"freqTheo" << (i-3)/4 <<
", F_theoIm" << (i-3)/4 <<
", ";
2162 fout <<
"% from averaged view" << std::endl;
2163 fout <<
"freq, F_Pwr, freqTheo, F_theoPwr" << std::endl;
2165 for (UInt_t i=0; i<dumpVector.size(); i++) {
2167 fout <<
"freq" << i/2 <<
", F_Pwr" << i/2 <<
", ";
2169 if (i == dumpVector.size()-1)
2170 fout <<
"freqTheo" << (i-1)/2 <<
", F_theoPwr" << (i-1)/2 << std::endl;
2172 fout <<
"freqTheo" << (i-1)/2 <<
", F_theoPwr" << (i-1)/2 <<
", ";
2178 fout <<
"% from averaged view" << std::endl;
2179 fout <<
"freq, F_Phase, freqTheo, F_theoPhase" << std::endl;
2181 for (UInt_t i=0; i<dumpVector.size(); i++) {
2183 fout <<
"freq" << i/2 <<
", F_Phase" << i/2 <<
", ";
2185 if (i == dumpVector.size()-1)
2186 fout <<
"freqTheo" << (i-1)/2 <<
", F_theoPhase" << (i-1)/2 << std::endl;
2188 fout <<
"freqTheo" << (i-1)/2 <<
", F_theoPhase" << (i-1)/2 <<
", ";
2197 for (UInt_t i=0; i<maxLength; i++) {
2199 for (UInt_t j=0; j<dumpVector.size()-1; j++) {
2200 if (i<dumpVector[j].dataX.size()) {
2201 fout << std::setprecision(9) << dumpVector[j].dataX[i] <<
", ";
2202 fout << std::setprecision(9) << dumpVector[j].data[i] <<
", ";
2203 if (dumpVector[j].dataErr.size() > 0)
2204 fout << std::setprecision(9) << dumpVector[j].dataErr[i] <<
", ";
2206 if (dumpVector[j].dataErr.size() > 0)
2213 if (i<dumpVector[dumpVector.size()-1].dataX.size()) {
2214 fout << std::setprecision(9) << dumpVector[dumpVector.size()-1].dataX[i] <<
", ";
2215 fout << std::setprecision(9) << dumpVector[dumpVector.size()-1].data[i];
2227 for (UInt_t i=0; i<dumpVector.size(); i++) {
2228 dumpVector[i].dataX.clear();
2229 dumpVector[i].data.clear();
2230 dumpVector[i].dataErr.clear();
2234 std::cout << std::endl <<
">> Data windows saved in ascii format ..." << std::endl;
2260 for (Int_t j=1; j<data->GetNbinsX(); j++) {
2262 x = data->GetBinCenter(j);
2264 if ((x >= xmin) && (x <= xmax)) {
2265 dump.
dataX.push_back(x);
2266 dump.
data.push_back(data->GetBinContent(j));
2268 dump.
dataErr.push_back(data->GetBinError(j));
2273 if (dump.
dataX.size() > 0)
2274 dumpData.push_back(dump);
2285 TString musrStyle(
"musrStyle");
2287 fStyle = std::make_unique<TStyle>(musrStyle, musrStyle);
2301 fFourier.fFourierBlockPresent =
false;
2308 for (UInt_t i=0; i<2; i++) {
2309 fFourier.fRangeForPhaseCorrection[i] = -1.0;
2327 fDataAvg.dataFourierPhase =
nullptr;
2328 fDataAvg.dataFourierPhaseOptReal =
nullptr;
2330 fDataAvg.theoryFourierRe =
nullptr;
2331 fDataAvg.theoryFourierIm =
nullptr;
2332 fDataAvg.theoryFourierPwr =
nullptr;
2333 fDataAvg.theoryFourierPhase =
nullptr;
2334 fDataAvg.theoryFourierPhaseOptReal =
nullptr;
2339 fDataAvg.diffFourierPhase =
nullptr;
2340 fDataAvg.diffFourierPhaseOptReal =
nullptr;
2373 TString canvasName = TString(
"fMainCanvas");
2375 fMainCanvas = std::make_unique<TCanvas>(canvasName.Data(), title, wtopx, wtopy, ww, wh);
2377 fMainCanvas->Connect(
"Closed()",
"PMusrCanvas",
this,
"LastCanvasClosed()");
2382 fImp->Connect(
"CloseWindow()",
"PMusrCanvas",
this,
"WindowClosed()");
2410 fBar->MapSubwindows();
2413 fPopupMain->Connect(
"TGPopupMenu",
"Activated(Int_t)",
"PMusrCanvas",
this,
"HandleMenuPopup(Int_t)");
2420 fTitlePad = std::make_unique<TPaveText>(0.0,
YTITLE, 1.0, 1.0,
"NDC");
2421 fTitlePad->SetFillColor(TColor::GetColor(255,255,255));
2438 fTheoryPad = std::make_unique<TPaveText>(
XTHEO, 0.1, 1.0, 0.5,
"NDC");
2439 fTheoryPad->SetFillColor(TColor::GetColor(255,255,255));
2445 fInfoPad = std::make_unique<TLegend>(0.0, 0.0, 1.0,
YINFO,
"NDC");
2446 fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
2455 fMainCanvas->Connect(
"ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
"PMusrCanvas",
2456 this,
"HandleCmdKey(Int_t,Int_t,Int_t,TObject*)");
2469 dataSet.
data =
nullptr;
2475 dataSet.
theory =
nullptr;
2481 dataSet.
diff =
nullptr;
2500 dataSet.
data =
nullptr;
2505 dataSet.
theory =
nullptr;
2510 dataSet.
diff =
nullptr;
2529 delete dataSet.
data;
2530 dataSet.
data =
nullptr;
2554 dataSet.
theory =
nullptr;
2577 delete dataSet.
diff;
2578 dataSet.
diff =
nullptr;
2617 delete dataSet.
data;
2618 dataSet.
data =
nullptr;
2638 dataSet.
theory =
nullptr;
2657 delete dataSet.
diff;
2658 dataSet.
diff =
nullptr;
2701 Double_t xmin, xmax, ymin, ymax;
2711 name = *
fMsrHandler->GetMsrRunList()->at(runNo).GetRunName() +
"_DataRunNo";
2712 name +=
static_cast<Int_t
>(runNo);
2737 (
fMsrHandler->GetMsrRunList()->at(runNo).IsLifetimeCorrected())) {
2768 start =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0);
2770 start =
fMsrHandler->GetMsrGlobal()->GetFitRange(0);
2772 end =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1);
2774 end =
fMsrHandler->GetMsrGlobal()->GetFitRange(1);
2786 (
fMsrHandler->GetMsrRunList()->at(runNo).IsLifetimeCorrected())) {
2848 dataHisto =
new TH1F(name, name, size, start, end);
2852 UInt_t startBin = 0;
2853 UInt_t endBin = data->
GetValue()->size();
2857 Double_t startFitRange =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0);
2859 startFitRange =
fMsrHandler->GetMsrGlobal()->GetFitRange(0);
2864 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin data < 0 for 'use_fit_range', will set it to 0" << std::endl << std::endl;
2865 }
else if (dval >= (Double_t)data->
GetValue()->size()) {
2866 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin data=" << (UInt_t)dval <<
" >= data vector size=" << data->
GetValue()->size() <<
" for 'use_fit_range',";
2867 std::cerr << std::endl <<
">> will set it to data vector size" << std::endl << std::endl;
2868 startBin = data->
GetValue()->size();
2870 startBin = (UInt_t)dval;
2873 Double_t endFitRange =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1);
2875 endFitRange =
fMsrHandler->GetMsrGlobal()->GetFitRange(1);
2880 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin data < 0 for 'use_fit_range', will set it to 0" << std::endl << std::endl;
2881 }
else if (dval >= (Double_t)data->
GetValue()->size()) {
2882 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin data=" << (UInt_t)dval <<
" >= data vector size=" << data->
GetValue()->size() <<
" for 'use_fit_range',";
2883 std::cerr << std::endl <<
">> will set it to data vector size" << std::endl << std::endl;
2886 endBin = (UInt_t)dval;
2895 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin data < 0 for 'sub_ranges', will set it to 0" << std::endl << std::endl;
2896 }
else if (dval >= (Double_t)data->
GetValue()->size()) {
2897 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin data=" << (UInt_t)dval <<
" >= data vector size=" << data->
GetValue()->size() <<
" for 'sub_ranges',";
2898 std::cerr << std::endl <<
">> will set it to data vector size" << std::endl << std::endl;
2899 startBin = data->
GetValue()->size();
2901 startBin = (UInt_t)dval;
2907 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin data < 0 for 'sub_ranges', will set it to 0" << std::endl << std::endl;
2908 }
else if (dval >= (Double_t)data->
GetValue()->size()) {
2909 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin data=" << (UInt_t)dval <<
" >= data vector size=" << data->
GetValue()->size() <<
" for 'sub_ranges',";
2910 std::cerr << std::endl <<
">> will set it to data vector size" << std::endl << std::endl;
2913 endBin = (UInt_t)dval;
2917 for (UInt_t i=startBin; i<endBin; i++) {
2918 dataHisto->SetBinContent(i-startBin+1, data->
GetValue()->at(i));
2919 dataHisto->SetBinError(i-startBin+1, data->
GetError()->at(i));
2924 dataHisto->SetMarkerColor(
fColorList[plotNo]);
2927 TRandom rand(plotNo);
2928 Int_t color = TColor::GetColor((Int_t)rand.Integer(255), (Int_t)rand.Integer(255), (Int_t)rand.Integer(255));
2929 dataHisto->SetMarkerColor(color);
2930 dataHisto->SetLineColor(color);
2933 dataHisto->SetMarkerSize(1);
2938 TRandom rand(plotNo);
2939 dataHisto->SetMarkerStyle(20+(Int_t)rand.Integer(10));
2944 name = *
fMsrHandler->GetMsrRunList()->at(runNo).GetRunName() +
"_TheoRunNo";
2945 name += (Int_t)runNo;
2954 start =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0);
2956 start =
fMsrHandler->GetMsrGlobal()->GetFitRange(0);
2958 end =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1);
2960 end =
fMsrHandler->GetMsrGlobal()->GetFitRange(1);
2981 theoHisto =
new TH1F(name, name, size, start, end);
2989 Double_t startFitRange =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0);
2991 startFitRange =
fMsrHandler->GetMsrGlobal()->GetFitRange(0);
2996 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin theory < 0 for 'use_fit_range', will set it to 0" << std::endl << std::endl;
2997 }
else if (dval >= (Double_t)data->
GetTheory()->size()) {
2998 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin theory=" << (UInt_t)dval <<
" >= theory vector size=" << data->
GetTheory()->size() <<
" for 'use_fit_range',";
2999 std::cerr << std::endl <<
">> will set it to theory vector size" << std::endl << std::endl;
3002 startBin = (UInt_t)dval;
3005 Double_t endFitRange =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1);
3007 endFitRange =
fMsrHandler->GetMsrGlobal()->GetFitRange(1);
3012 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin theory < 0 for 'use_fit_range', will set it to 0" << std::endl << std::endl;
3013 }
else if (dval >= (Double_t)data->
GetTheory()->size()) {
3014 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin theory=" << (UInt_t)dval <<
" >= theory vector size=" << data->
GetTheory()->size() <<
" for 'use_fit_range',";
3015 std::cerr << std::endl <<
">> will set it to theory vector size" << std::endl << std::endl;
3018 endBin = (UInt_t)dval;
3030 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin theory < 0 for 'sub_ranges', will set it to 0" << std::endl << std::endl;
3031 }
else if (dval >= (Double_t)data->
GetTheory()->size()) {
3032 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin theory=" << (UInt_t)dval <<
" >= theory vector size=" << data->
GetTheory()->size() <<
" for 'sub_ranges',";
3033 std::cerr << std::endl <<
">> will set it to theory vector size" << std::endl << std::endl;
3036 startBin = (UInt_t)dval;
3042 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin theory < 0 for 'sub_ranges', will set it to 0" << std::endl << std::endl;
3043 }
else if (dval >= (Double_t)data->
GetTheory()->size()) {
3044 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin theory=" << (UInt_t)dval <<
" >= theory vector size=" << data->
GetTheory()->size() <<
" for 'sub_ranges',";
3045 std::cerr << std::endl <<
">> will set it to theory vector size" << std::endl << std::endl;
3048 endBin = (UInt_t)dval;
3052 for (UInt_t i=startBin; i<endBin; i++) {
3053 theoHisto->SetBinContent(i-startBin+1, data->
GetTheory()->at(i));
3060 TRandom rand(plotNo);
3061 Int_t color = TColor::GetColor((Int_t)rand.Integer(255), (Int_t)rand.Integer(255), (Int_t)rand.Integer(255));
3062 theoHisto->SetLineColor(color);
3066 dataSet.
data = dataHisto;
3067 dataSet.
theory = theoHisto;
3070 fData.push_back(dataSet);
3086 TGraphErrors *dataHisto;
3087 TGraphErrors *theoHisto;
3097 dataHisto =
new TGraphErrors(data->
GetX()->size());
3100 for (UInt_t i=0; i<data->
GetX()->size(); i++) {
3101 dataHisto->SetPoint(i, data->
GetX()->at(i), data->
GetValue()->at(i));
3102 dataHisto->SetPointError(i, 0.0, data->
GetError()->at(i));
3107 dataHisto->SetMarkerColor(
fColorList[plotNo]);
3110 TRandom rand(plotNo);
3111 Int_t color = TColor::GetColor((Int_t)rand.Integer(255), (Int_t)rand.Integer(255), (Int_t)rand.Integer(255));
3112 dataHisto->SetMarkerColor(color);
3113 dataHisto->SetLineColor(color);
3116 dataHisto->SetMarkerSize(1);
3121 TRandom rand(plotNo);
3122 dataHisto->SetMarkerStyle(20+(Int_t)rand.Integer(10));
3128 theoHisto =
new TGraphErrors(data->
GetXTheory()->size());
3131 for (UInt_t i=0; i<data->
GetXTheory()->size(); i++) {
3133 theoHisto->SetPointError(i, 0.0, 0.0);
3140 TRandom rand(plotNo);
3141 Int_t color = TColor::GetColor((Int_t)rand.Integer(255), (Int_t)rand.Integer(255), (Int_t)rand.Integer(255));
3142 theoHisto->SetLineColor(color);
3146 dataSet.
data = dataHisto;
3147 dataSet.
theory = theoHisto;
3151 Double_t xmin=0.0, xmax=0.0, ymin=0.0, ymax=0.0, x=0.0, y=0.0;
3155 dataSet.
data->GetPoint(0, xmin, y);
3156 dataSet.
data->GetPoint(dataSet.
data->GetN()-1, xmax, y);
3157 dataSet.
data->GetPoint(0, x, y);
3160 for (Int_t i=1; i<dataSet.
data->GetN(); i++) {
3161 dataSet.
data->GetPoint(i, x, y);
3167 Double_t dx = 0.025*(xmax-xmin);
3168 Double_t dy = 0.025*(ymax-ymin);
3190 xmin =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0);
3191 xmax =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1);
3253 for (UInt_t i=0; i<
fData.size(); i++) {
3255 name = TString(
fData[i].data->GetTitle()) +
"_diff";
3256 diffHisto =
new TH1F(name, name,
fData[i].data->GetNbinsX(),
3257 fData[i].data->GetXaxis()->GetXmin(),
3258 fData[i].data->GetXaxis()->GetXmax());
3261 diffHisto->SetMarkerColor(
fData[i].data->GetMarkerColor());
3262 diffHisto->SetLineColor(
fData[i].data->GetLineColor());
3264 diffHisto->SetMarkerSize(
fData[i].data->GetMarkerSize());
3266 diffHisto->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
3269 fData[i].diff = diffHisto;
3272 for (Int_t j=1; j<
fData[i].data->GetNbinsX()-1; j++) {
3275 fData[i].data->GetBinContent(j),
3277 fData[i].diff->SetBinContent(j, value);
3279 value =
fData[i].data->GetBinError(j);
3280 fData[i].diff->SetBinError(j, value);
3284 TGraphErrors *diffHisto;
3292 diffHisto =
new TGraphErrors(
fNonMusrData[i].data->GetN());
3295 name = TString(
fNonMusrData[i].data->GetTitle()) +
"_diff";
3296 diffHisto->SetNameTitle(name.Data(), name.Data());
3299 diffHisto->SetMarkerColor(
fNonMusrData[i].data->GetMarkerColor());
3300 diffHisto->SetLineColor(
fNonMusrData[i].data->GetLineColor());
3302 diffHisto->SetMarkerSize(
fNonMusrData[i].data->GetMarkerSize());
3304 diffHisto->SetMarkerStyle(
fNonMusrData[i].data->GetMarkerStyle());
3341 if (
fData[0].dataFourierRe ==
nullptr) {
3343 double startTime =
fXmin;
3344 double endTime =
fXmax;
3351 for (UInt_t i=0; i<
fData.size(); i++) {
3355 std::cerr << std::endl <<
">> PMusrCanvas::HandleFourier(): **SEVERE ERROR** couldn't invoke PFourier to calculate the Fourier data ..." << std::endl;
3360 scale = sqrt(
fData[0].data->GetBinWidth(1)/(endTime-startTime));
3371 fData[i].dataFourierRe->SetMarkerColor(
fData[i].data->GetMarkerColor());
3372 fData[i].dataFourierRe->SetLineColor(
fData[i].data->GetLineColor());
3373 fData[i].dataFourierIm->SetMarkerColor(
fData[i].data->GetMarkerColor());
3374 fData[i].dataFourierIm->SetLineColor(
fData[i].data->GetLineColor());
3375 fData[i].dataFourierPwr->SetMarkerColor(
fData[i].data->GetMarkerColor());
3376 fData[i].dataFourierPwr->SetLineColor(
fData[i].data->GetLineColor());
3377 fData[i].dataFourierPhase->SetMarkerColor(
fData[i].data->GetMarkerColor());
3378 fData[i].dataFourierPhase->SetLineColor(
fData[i].data->GetLineColor());
3381 fData[i].dataFourierRe->SetMarkerSize(1);
3382 fData[i].dataFourierIm->SetMarkerSize(1);
3383 fData[i].dataFourierPwr->SetMarkerSize(1);
3384 fData[i].dataFourierPhase->SetMarkerSize(1);
3387 fData[i].dataFourierRe->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
3388 fData[i].dataFourierIm->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
3389 fData[i].dataFourierPwr->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
3390 fData[i].dataFourierPhase->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
3397 Int_t powerPad =
fFourier.fFourierPower+5;
3400 if (!fourierTheory->
IsValid()) {
3401 std::cerr << std::endl <<
">> PMusrCanvas::HandleFourier(): **SEVERE ERROR** couldn't invoke PFourier to calculate the Fourier theory ..." << std::endl;
3405 scale = sqrt(
fData[0].theory->GetBinWidth(1)/(endTime-startTime)*
fData[0].theory->GetBinWidth(1)/
fData[0].data->GetBinWidth(1));
3416 delete fourierTheory;
3419 fData[i].theoryFourierRe->SetLineColor(
fData[i].theory->GetLineColor());
3420 fData[i].theoryFourierIm->SetLineColor(
fData[i].theory->GetLineColor());
3421 fData[i].theoryFourierPwr->SetLineColor(
fData[i].theory->GetLineColor());
3422 fData[i].theoryFourierPhase->SetLineColor(
fData[i].theory->GetLineColor());
3431 if (
fFourier.fPhase.size() != 0.0) {
3437 for (UInt_t i=0; i<
fData.size(); i++) {
3439 cp = TMath::Cos(
fFourier.fPhase[0]/180.0*TMath::Pi());
3440 sp = TMath::Sin(
fFourier.fPhase[0]/180.0*TMath::Pi());
3442 cp = TMath::Cos(
fFourier.fPhase[i]/180.0*TMath::Pi());
3443 sp = TMath::Sin(
fFourier.fPhase[i]/180.0*TMath::Pi());
3445 if ((
fData[i].dataFourierRe !=
nullptr) && (
fData[i].dataFourierIm !=
nullptr)) {
3446 for (Int_t j=0; j<
fData[i].dataFourierRe->GetNbinsX(); j++) {
3448 re =
fData[i].dataFourierRe->GetBinContent(j) * cp +
fData[i].dataFourierIm->GetBinContent(j) * sp;
3449 im =
fData[i].dataFourierIm->GetBinContent(j) * cp -
fData[i].dataFourierRe->GetBinContent(j) * sp;
3451 fData[i].dataFourierRe->SetBinContent(j, re);
3452 fData[i].dataFourierIm->SetBinContent(j, im);
3455 if ((
fData[i].theoryFourierRe !=
nullptr) && (
fData[i].theoryFourierIm !=
nullptr)) {
3456 for (Int_t j=0; j<
fData[i].theoryFourierRe->GetNbinsX(); j++) {
3458 re =
fData[i].theoryFourierRe->GetBinContent(j) * cp +
fData[i].theoryFourierIm->GetBinContent(j) * sp;
3459 im =
fData[i].theoryFourierIm->GetBinContent(j) * cp -
fData[i].theoryFourierRe->GetBinContent(j) * sp;
3461 fData[i].theoryFourierRe->SetBinContent(j, re);
3462 fData[i].theoryFourierIm->SetBinContent(j, im);
3485 if (
fData[0].diffFourierRe ==
nullptr) {
3487 if (
fData[0].diff ==
nullptr)
3493 double startTime =
fHistoFrame->GetBinCenter(bin);
3497 for (UInt_t i=0; i<
fData.size(); i++) {
3501 std::cerr << std::endl <<
">> PMusrCanvas::HandleFourier(): **SEVERE ERROR** couldn't invoke PFourier to calculate the Fourier diff ..." << std::endl;
3506 scale = sqrt(
fData[0].diff->GetBinWidth(1)/(endTime-startTime));
3517 fData[i].diffFourierRe->SetMarkerColor(
fData[i].diff->GetMarkerColor());
3518 fData[i].diffFourierRe->SetLineColor(
fData[i].diff->GetLineColor());
3519 fData[i].diffFourierIm->SetMarkerColor(
fData[i].diff->GetMarkerColor());
3520 fData[i].diffFourierIm->SetLineColor(
fData[i].diff->GetLineColor());
3521 fData[i].diffFourierPwr->SetMarkerColor(
fData[i].diff->GetMarkerColor());
3522 fData[i].diffFourierPwr->SetLineColor(
fData[i].diff->GetLineColor());
3523 fData[i].diffFourierPhase->SetMarkerColor(
fData[i].diff->GetMarkerColor());
3524 fData[i].diffFourierPhase->SetLineColor(
fData[i].diff->GetLineColor());
3527 fData[i].diffFourierRe->SetMarkerSize(1);
3528 fData[i].diffFourierIm->SetMarkerSize(1);
3529 fData[i].diffFourierPwr->SetMarkerSize(1);
3530 fData[i].diffFourierPhase->SetMarkerSize(1);
3532 fData[i].diffFourierRe->SetMarkerStyle(
fData[i].diff->GetMarkerStyle());
3533 fData[i].diffFourierIm->SetMarkerStyle(
fData[i].diff->GetMarkerStyle());
3534 fData[i].diffFourierPwr->SetMarkerStyle(
fData[i].diff->GetMarkerStyle());
3535 fData[i].diffFourierPhase->SetMarkerStyle(
fData[i].diff->GetMarkerStyle());
3538 fData[i].diffFourierTag = 1;
3542 if (
fFourier.fPhase.size() != 0.0) {
3549 for (UInt_t i=0; i<
fData.size(); i++) {
3550 if ((
fData[i].diffFourierRe !=
nullptr) && (
fData[i].diffFourierIm !=
nullptr)) {
3552 cp = TMath::Cos(
fFourier.fPhase[0]/180.0*TMath::Pi());
3553 sp = TMath::Sin(
fFourier.fPhase[0]/180.0*TMath::Pi());
3555 cp = TMath::Cos(
fFourier.fPhase[i]/180.0*TMath::Pi());
3556 sp = TMath::Sin(
fFourier.fPhase[i]/180.0*TMath::Pi());
3558 for (Int_t j=0; j<
fData[i].diffFourierRe->GetNbinsX(); j++) {
3560 re =
fData[i].diffFourierRe->GetBinContent(j) * cp +
fData[i].diffFourierIm->GetBinContent(j) * sp;
3561 im =
fData[i].diffFourierIm->GetBinContent(j) * cp -
fData[i].diffFourierRe->GetBinContent(j) * sp;
3563 fData[i].diffFourierRe->SetBinContent(j, re);
3564 fData[i].diffFourierIm->SetBinContent(j, im);
3587 if (
fData[0].diffFourierRe ==
nullptr) {
3589 Double_t dval, dvalx;
3592 for (UInt_t i=0; i<
fData.size(); i++) {
3595 name = TString(
fData[i].dataFourierRe->GetTitle()) +
"_diff";
3596 fData[i].diffFourierRe =
new TH1F(name, name,
fData[i].dataFourierRe->GetNbinsX(),
3597 fData[i].dataFourierRe->GetXaxis()->GetXmin(),
3598 fData[i].dataFourierRe->GetXaxis()->GetXmax());
3601 name = TString(
fData[i].dataFourierIm->GetTitle()) +
"_diff";
3602 fData[i].diffFourierIm =
new TH1F(name, name,
fData[i].dataFourierIm->GetNbinsX(),
3603 fData[i].dataFourierIm->GetXaxis()->GetXmin(),
3604 fData[i].dataFourierIm->GetXaxis()->GetXmax());
3606 name = TString(
fData[i].dataFourierPwr->GetTitle()) +
"_diff";
3607 fData[i].diffFourierPwr =
new TH1F(name, name,
fData[i].dataFourierPwr->GetNbinsX(),
3608 fData[i].dataFourierPwr->GetXaxis()->GetXmin(),
3609 fData[i].dataFourierPwr->GetXaxis()->GetXmax());
3611 name = TString(
fData[i].dataFourierPhase->GetTitle()) +
"_diff";
3612 fData[i].diffFourierPhase =
new TH1F(name, name,
fData[i].dataFourierPhase->GetNbinsX(),
3613 fData[i].dataFourierPhase->GetXaxis()->GetXmin(),
3614 fData[i].dataFourierPhase->GetXaxis()->GetXmax());
3617 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
3618 name = TString(
fData[i].dataFourierPhaseOptReal->GetTitle()) +
"_diff";
3619 fData[i].diffFourierPhaseOptReal =
new TH1F(name, name,
fData[i].dataFourierPhaseOptReal->GetNbinsX(),
3620 fData[i].dataFourierPhaseOptReal->GetXaxis()->GetXmin(),
3621 fData[i].dataFourierPhaseOptReal->GetXaxis()->GetXmax());
3625 for (UInt_t j=1; j<
fData[i].dataFourierRe->GetEntries(); j++) {
3626 dvalx =
fData[i].dataFourierRe->GetXaxis()->GetBinCenter(j);
3627 theoBin =
fData[i].theoryFourierRe->FindBin(dvalx);
3628 dval =
fData[i].dataFourierRe->GetBinContent(j) -
fData[i].theoryFourierRe->GetBinContent(theoBin);
3629 fData[i].diffFourierRe->SetBinContent(j, dval);
3630 dvalx =
fData[i].dataFourierIm->GetXaxis()->GetBinCenter(j);
3631 theoBin =
fData[i].theoryFourierIm->FindBin(dvalx);
3632 dval =
fData[i].dataFourierIm->GetBinContent(j) -
fData[i].theoryFourierIm->GetBinContent(theoBin);
3633 fData[i].diffFourierIm->SetBinContent(j, dval);
3634 dvalx =
fData[i].dataFourierPwr->GetXaxis()->GetBinCenter(j);
3635 theoBin =
fData[i].theoryFourierPwr->FindBin(dvalx);
3636 dval =
fData[i].dataFourierPwr->GetBinContent(j) -
fData[i].theoryFourierPwr->GetBinContent(theoBin);
3637 fData[i].diffFourierPwr->SetBinContent(j, dval);
3638 dvalx =
fData[i].dataFourierPhase->GetXaxis()->GetBinCenter(j);
3639 theoBin =
fData[i].theoryFourierPhase->FindBin(dvalx);
3640 dval =
fData[i].dataFourierPhase->GetBinContent(j) -
fData[i].theoryFourierPhase->GetBinContent(theoBin);
3641 fData[i].diffFourierPhase->SetBinContent(j, dval);
3642 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
3643 dvalx =
fData[i].dataFourierPhaseOptReal->GetXaxis()->GetBinCenter(j);
3644 theoBin =
fData[i].theoryFourierPhaseOptReal->FindBin(dvalx);
3645 dval =
fData[i].dataFourierPhaseOptReal->GetBinContent(j) -
fData[i].theoryFourierPhaseOptReal->GetBinContent(theoBin);
3646 fData[i].diffFourierPhaseOptReal->SetBinContent(j, dval);
3651 for (UInt_t i=0; i<
fData.size(); i++) {
3653 fData[i].diffFourierRe->SetMarkerColor(
fData[i].dataFourierRe->GetMarkerColor());
3654 fData[i].diffFourierRe->SetLineColor(
fData[i].dataFourierRe->GetLineColor());
3655 fData[i].diffFourierIm->SetMarkerColor(
fData[i].dataFourierIm->GetMarkerColor());
3656 fData[i].diffFourierIm->SetLineColor(
fData[i].dataFourierIm->GetLineColor());
3657 fData[i].diffFourierPwr->SetMarkerColor(
fData[i].dataFourierPwr->GetMarkerColor());
3658 fData[i].diffFourierPwr->SetLineColor(
fData[i].dataFourierPwr->GetLineColor());
3659 fData[i].diffFourierPhase->SetMarkerColor(
fData[i].dataFourierPhase->GetMarkerColor());
3660 fData[i].diffFourierPhase->SetLineColor(
fData[i].dataFourierPhase->GetLineColor());
3661 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
3662 fData[i].diffFourierPhaseOptReal->SetMarkerColor(
fData[i].dataFourierPhaseOptReal->GetMarkerColor());
3663 fData[i].diffFourierPhaseOptReal->SetLineColor(
fData[i].dataFourierPhaseOptReal->GetLineColor());
3667 fData[i].diffFourierRe->SetMarkerSize(1);
3668 fData[i].diffFourierIm->SetMarkerSize(1);
3669 fData[i].diffFourierPwr->SetMarkerSize(1);
3670 fData[i].diffFourierPhase->SetMarkerSize(1);
3671 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
3672 fData[i].diffFourierPhaseOptReal->SetMarkerSize(1);
3675 fData[i].diffFourierRe->SetMarkerStyle(
fData[i].dataFourierRe->GetMarkerStyle());
3676 fData[i].diffFourierIm->SetMarkerStyle(
fData[i].dataFourierIm->GetMarkerStyle());
3677 fData[i].diffFourierPwr->SetMarkerStyle(
fData[i].dataFourierPwr->GetMarkerStyle());
3678 fData[i].diffFourierPhase->SetMarkerStyle(
fData[i].dataFourierPhase->GetMarkerStyle());
3679 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
3680 fData[i].diffFourierPhaseOptReal->SetMarkerStyle(
fData[i].dataFourierPhaseOptReal->GetMarkerStyle());
3684 fData[i].diffFourierTag = 2;
3710 if (
fData[0].data !=
nullptr) {
3711 name = TString(
fData[0].data->GetTitle()) +
"_avg";
3712 fDataAvg.data =
new TH1F(name, name,
fData[0].data->GetNbinsX(),
3713 fData[0].data->GetXaxis()->GetXmin(),
3714 fData[0].data->GetXaxis()->GetXmax());
3716 if (
fData[0].dataFourierRe !=
nullptr) {
3717 name = TString(
fData[0].dataFourierRe->GetTitle()) +
"_avg";
3718 fDataAvg.dataFourierRe =
new TH1F(name, name,
fData[0].dataFourierRe->GetNbinsX(),
3719 fData[0].dataFourierRe->GetXaxis()->GetXmin(),
3720 fData[0].dataFourierRe->GetXaxis()->GetXmax());
3722 if (
fData[0].dataFourierIm !=
nullptr) {
3723 name = TString(
fData[0].dataFourierIm->GetTitle()) +
"_avg";
3724 fDataAvg.dataFourierIm =
new TH1F(name, name,
fData[0].dataFourierIm->GetNbinsX(),
3725 fData[0].dataFourierIm->GetXaxis()->GetXmin(),
3726 fData[0].dataFourierIm->GetXaxis()->GetXmax());
3728 if (
fData[0].dataFourierPwr !=
nullptr) {
3729 name = TString(
fData[0].dataFourierPwr->GetTitle()) +
"_avg";
3730 fDataAvg.dataFourierPwr =
new TH1F(name, name,
fData[0].dataFourierPwr->GetNbinsX(),
3731 fData[0].dataFourierPwr->GetXaxis()->GetXmin(),
3732 fData[0].dataFourierPwr->GetXaxis()->GetXmax());
3734 if (
fData[0].dataFourierPhase !=
nullptr) {
3735 name = TString(
fData[0].dataFourierPhase->GetTitle()) +
"_avg";
3736 fDataAvg.dataFourierPhase =
new TH1F(name, name,
fData[0].dataFourierPhase->GetNbinsX(),
3737 fData[0].dataFourierPhase->GetXaxis()->GetXmin(),
3738 fData[0].dataFourierPhase->GetXaxis()->GetXmax());
3740 if (
fData[0].dataFourierPhaseOptReal !=
nullptr) {
3741 name = TString(
fData[0].dataFourierPhaseOptReal->GetTitle()) +
"_avg";
3742 fDataAvg.dataFourierPhaseOptReal =
new TH1F(name, name,
fData[0].dataFourierPhaseOptReal->GetNbinsX(),
3743 fData[0].dataFourierPhaseOptReal->GetXaxis()->GetXmin(),
3744 fData[0].dataFourierPhaseOptReal->GetXaxis()->GetXmax());
3746 if (
fData[0].theory !=
nullptr) {
3747 name = TString(
fData[0].theory->GetTitle()) +
"_avg";
3748 fDataAvg.theory =
new TH1F(name, name,
fData[0].theory->GetNbinsX(),
3749 fData[0].theory->GetXaxis()->GetXmin(),
3750 fData[0].theory->GetXaxis()->GetXmax());
3752 if (
fData[0].theoryFourierRe !=
nullptr) {
3753 name = TString(
fData[0].theoryFourierRe->GetTitle()) +
"_avg";
3754 fDataAvg.theoryFourierRe =
new TH1F(name, name,
fData[0].theoryFourierRe->GetNbinsX(),
3755 fData[0].theoryFourierRe->GetXaxis()->GetXmin(),
3756 fData[0].theoryFourierRe->GetXaxis()->GetXmax());
3758 if (
fData[0].theoryFourierIm !=
nullptr) {
3759 name = TString(
fData[0].theoryFourierIm->GetTitle()) +
"_avg";
3760 fDataAvg.theoryFourierIm =
new TH1F(name, name,
fData[0].theoryFourierIm->GetNbinsX(),
3761 fData[0].theoryFourierIm->GetXaxis()->GetXmin(),
3762 fData[0].theoryFourierIm->GetXaxis()->GetXmax());
3764 if (
fData[0].theoryFourierPwr !=
nullptr) {
3765 name = TString(
fData[0].theoryFourierPwr->GetTitle()) +
"_avg";
3766 fDataAvg.theoryFourierPwr =
new TH1F(name, name,
fData[0].theoryFourierPwr->GetNbinsX(),
3767 fData[0].theoryFourierPwr->GetXaxis()->GetXmin(),
3768 fData[0].theoryFourierPwr->GetXaxis()->GetXmax());
3770 if (
fData[0].theoryFourierPhase !=
nullptr) {
3771 name = TString(
fData[0].theoryFourierPhase->GetTitle()) +
"_avg";
3772 fDataAvg.theoryFourierPhase =
new TH1F(name, name,
fData[0].theoryFourierPhase->GetNbinsX(),
3773 fData[0].theoryFourierPhase->GetXaxis()->GetXmin(),
3774 fData[0].theoryFourierPhase->GetXaxis()->GetXmax());
3776 if (
fData[0].theoryFourierPhaseOptReal !=
nullptr) {
3777 name = TString(
fData[0].theoryFourierPhaseOptReal->GetTitle()) +
"_avg";
3778 fDataAvg.theoryFourierPhaseOptReal =
new TH1F(name, name,
fData[0].theoryFourierPhaseOptReal->GetNbinsX(),
3779 fData[0].theoryFourierPhaseOptReal->GetXaxis()->GetXmin(),
3780 fData[0].theoryFourierPhaseOptReal->GetXaxis()->GetXmax());
3782 if (
fData[0].diff !=
nullptr) {
3783 name = TString(
fData[0].diff->GetTitle()) +
"_avg";
3784 fDataAvg.diff =
new TH1F(name, name,
fData[0].diff->GetNbinsX(),
3785 fData[0].diff->GetXaxis()->GetXmin(),
3786 fData[0].diff->GetXaxis()->GetXmax());
3788 if (
fData[0].diffFourierRe !=
nullptr) {
3789 name = TString(
fData[0].diffFourierRe->GetTitle()) +
"_avg";
3790 fDataAvg.diffFourierRe =
new TH1F(name, name,
fData[0].diffFourierRe->GetNbinsX(),
3791 fData[0].diffFourierRe->GetXaxis()->GetXmin(),
3792 fData[0].diffFourierRe->GetXaxis()->GetXmax());
3794 if (
fData[0].diffFourierIm !=
nullptr) {
3795 name = TString(
fData[0].diffFourierIm->GetTitle()) +
"_avg";
3796 fDataAvg.diffFourierIm =
new TH1F(name, name,
fData[0].diffFourierIm->GetNbinsX(),
3797 fData[0].diffFourierIm->GetXaxis()->GetXmin(),
3798 fData[0].diffFourierIm->GetXaxis()->GetXmax());
3800 if (
fData[0].diffFourierPwr !=
nullptr) {
3801 name = TString(
fData[0].diffFourierPwr->GetTitle()) +
"_avg";
3802 fDataAvg.diffFourierPwr =
new TH1F(name, name,
fData[0].diffFourierPwr->GetNbinsX(),
3803 fData[0].diffFourierPwr->GetXaxis()->GetXmin(),
3804 fData[0].diffFourierPwr->GetXaxis()->GetXmax());
3806 if (
fData[0].diffFourierPhase !=
nullptr) {
3807 name = TString(
fData[0].diffFourierPhase->GetTitle()) +
"_avg";
3808 fDataAvg.diffFourierPhase =
new TH1F(name, name,
fData[0].diffFourierPhase->GetNbinsX(),
3809 fData[0].diffFourierPhase->GetXaxis()->GetXmin(),
3810 fData[0].diffFourierPhase->GetXaxis()->GetXmax());
3812 if (
fData[0].diffFourierPhaseOptReal !=
nullptr) {
3813 name = TString(
fData[0].diffFourierPhaseOptReal->GetTitle()) +
"_avg";
3814 fDataAvg.diffFourierPhaseOptReal =
new TH1F(name, name,
fData[0].diffFourierPhaseOptReal->GetNbinsX(),
3815 fData[0].diffFourierPhaseOptReal->GetXaxis()->GetXmin(),
3816 fData[0].diffFourierPhaseOptReal->GetXaxis()->GetXmax());
3822 for (Int_t i=0; i<
fData[0].data->GetNbinsX(); i++) {
3824 for (UInt_t j=0; j<
fData.size(); j++) {
3830 fDataAvg.data->SetMarkerColor(
fData[0].data->GetMarkerColor());
3832 fDataAvg.data->SetMarkerSize(
fData[0].data->GetMarkerSize());
3833 fDataAvg.data->SetMarkerStyle(
fData[0].data->GetMarkerStyle());
3835 if (
fDataAvg.dataFourierRe !=
nullptr) {
3836 for (Int_t i=0; i<
fData[0].dataFourierRe->GetNbinsX(); i++) {
3838 for (UInt_t j=0; j<
fData.size(); j++) {
3841 fDataAvg.dataFourierRe->SetBinContent(i, dval/
fData.size());
3844 fDataAvg.dataFourierRe->SetMarkerColor(
fData[0].dataFourierRe->GetMarkerColor());
3845 fDataAvg.dataFourierRe->SetLineColor(
fData[0].dataFourierRe->GetLineColor());
3846 fDataAvg.dataFourierRe->SetMarkerSize(
fData[0].dataFourierRe->GetMarkerSize());
3847 fDataAvg.dataFourierRe->SetMarkerStyle(
fData[0].dataFourierRe->GetMarkerStyle());
3849 if (
fDataAvg.dataFourierIm !=
nullptr) {
3850 for (Int_t i=0; i<
fData[0].dataFourierIm->GetNbinsX(); i++) {
3852 for (UInt_t j=0; j<
fData.size(); j++) {
3855 fDataAvg.dataFourierIm->SetBinContent(i, dval/
fData.size());
3858 fDataAvg.dataFourierIm->SetMarkerColor(
fData[0].dataFourierIm->GetMarkerColor());
3859 fDataAvg.dataFourierIm->SetLineColor(
fData[0].dataFourierIm->GetLineColor());
3860 fDataAvg.dataFourierIm->SetMarkerSize(
fData[0].dataFourierIm->GetMarkerSize());
3861 fDataAvg.dataFourierIm->SetMarkerStyle(
fData[0].dataFourierIm->GetMarkerStyle());
3863 if (
fDataAvg.dataFourierPwr !=
nullptr) {
3864 for (Int_t i=0; i<
fData[0].dataFourierPwr->GetNbinsX(); i++) {
3866 for (UInt_t j=0; j<
fData.size(); j++) {
3869 fDataAvg.dataFourierPwr->SetBinContent(i, dval/
fData.size());
3872 fDataAvg.dataFourierPwr->SetMarkerColor(
fData[0].dataFourierPwr->GetMarkerColor());
3873 fDataAvg.dataFourierPwr->SetLineColor(
fData[0].dataFourierPwr->GetLineColor());
3874 fDataAvg.dataFourierPwr->SetMarkerSize(
fData[0].dataFourierPwr->GetMarkerSize());
3875 fDataAvg.dataFourierPwr->SetMarkerStyle(
fData[0].dataFourierPwr->GetMarkerStyle());
3877 if (
fDataAvg.dataFourierPhase !=
nullptr) {
3878 for (Int_t i=0; i<
fData[0].dataFourierPhase->GetNbinsX(); i++) {
3880 for (UInt_t j=0; j<
fData.size(); j++) {
3883 fDataAvg.dataFourierPhase->SetBinContent(i, dval/
fData.size());
3886 fDataAvg.dataFourierPhase->SetMarkerColor(
fData[0].dataFourierPhase->GetMarkerColor());
3887 fDataAvg.dataFourierPhase->SetLineColor(
fData[0].dataFourierPhase->GetLineColor());
3888 fDataAvg.dataFourierPhase->SetMarkerSize(
fData[0].dataFourierPhase->GetMarkerSize());
3889 fDataAvg.dataFourierPhase->SetMarkerStyle(
fData[0].dataFourierPhase->GetMarkerStyle());
3891 if (
fDataAvg.dataFourierPhaseOptReal !=
nullptr) {
3892 for (Int_t i=0; i<
fData[0].dataFourierPhaseOptReal->GetNbinsX(); i++) {
3894 for (UInt_t j=0; j<
fData.size(); j++) {
3897 fDataAvg.dataFourierPhaseOptReal->SetBinContent(i, dval/
fData.size());
3900 fDataAvg.dataFourierPhaseOptReal->SetMarkerColor(
fData[0].dataFourierPhaseOptReal->GetMarkerColor());
3901 fDataAvg.dataFourierPhaseOptReal->SetLineColor(
fData[0].dataFourierPhaseOptReal->GetLineColor());
3902 fDataAvg.dataFourierPhaseOptReal->SetMarkerSize(
fData[0].dataFourierPhaseOptReal->GetMarkerSize());
3903 fDataAvg.dataFourierPhaseOptReal->SetMarkerStyle(
fData[0].dataFourierPhaseOptReal->GetMarkerStyle());
3906 for (Int_t i=0; i<
fData[0].theory->GetNbinsX(); i++) {
3908 for (UInt_t j=0; j<
fData.size(); j++) {
3913 fDataAvg.theory->SetLineColor(
fData[0].theory->GetLineColor());
3915 if (
fDataAvg.theoryFourierRe !=
nullptr) {
3916 for (Int_t i=0; i<
fData[0].theoryFourierRe->GetNbinsX(); i++) {
3918 for (UInt_t j=0; j<
fData.size(); j++) {
3921 fDataAvg.theoryFourierRe->SetBinContent(i, dval/
fData.size());
3924 fDataAvg.theoryFourierRe->SetMarkerColor(
fData[0].theoryFourierRe->GetMarkerColor());
3925 fDataAvg.theoryFourierRe->SetLineColor(
fData[0].theoryFourierRe->GetLineColor());
3926 fDataAvg.theoryFourierRe->SetMarkerSize(
fData[0].theoryFourierRe->GetMarkerSize());
3927 fDataAvg.theoryFourierRe->SetMarkerStyle(
fData[0].theoryFourierRe->GetMarkerStyle());
3929 if (
fDataAvg.theoryFourierIm !=
nullptr) {
3930 for (Int_t i=0; i<
fData[0].theoryFourierIm->GetNbinsX(); i++) {
3932 for (UInt_t j=0; j<
fData.size(); j++) {
3935 fDataAvg.theoryFourierIm->SetBinContent(i, dval/
fData.size());
3938 fDataAvg.theoryFourierIm->SetMarkerColor(
fData[0].theoryFourierIm->GetMarkerColor());
3939 fDataAvg.theoryFourierIm->SetLineColor(
fData[0].theoryFourierIm->GetLineColor());
3940 fDataAvg.theoryFourierIm->SetMarkerSize(
fData[0].theoryFourierIm->GetMarkerSize());
3941 fDataAvg.theoryFourierIm->SetMarkerStyle(
fData[0].theoryFourierIm->GetMarkerStyle());
3943 if (
fDataAvg.theoryFourierPwr !=
nullptr) {
3944 for (Int_t i=0; i<
fData[0].theoryFourierPwr->GetNbinsX(); i++) {
3946 for (UInt_t j=0; j<
fData.size(); j++) {
3949 fDataAvg.theoryFourierPwr->SetBinContent(i, dval/
fData.size());
3952 fDataAvg.theoryFourierPwr->SetMarkerColor(
fData[0].theoryFourierPwr->GetMarkerColor());
3953 fDataAvg.theoryFourierPwr->SetLineColor(
fData[0].theoryFourierPwr->GetLineColor());
3954 fDataAvg.theoryFourierPwr->SetMarkerSize(
fData[0].theoryFourierPwr->GetMarkerSize());
3955 fDataAvg.theoryFourierPwr->SetMarkerStyle(
fData[0].theoryFourierPwr->GetMarkerStyle());
3957 if (
fDataAvg.theoryFourierPhase !=
nullptr) {
3958 for (Int_t i=0; i<
fData[0].theoryFourierPhase->GetNbinsX(); i++) {
3960 for (UInt_t j=0; j<
fData.size(); j++) {
3963 fDataAvg.theoryFourierPhase->SetBinContent(i, dval/
fData.size());
3966 fDataAvg.theoryFourierPhase->SetMarkerColor(
fData[0].theoryFourierPhase->GetMarkerColor());
3967 fDataAvg.theoryFourierPhase->SetLineColor(
fData[0].theoryFourierPhase->GetLineColor());
3968 fDataAvg.theoryFourierPhase->SetMarkerSize(
fData[0].theoryFourierPhase->GetMarkerSize());
3969 fDataAvg.theoryFourierPhase->SetMarkerStyle(
fData[0].theoryFourierPhase->GetMarkerStyle());
3971 if (
fDataAvg.theoryFourierPhaseOptReal !=
nullptr) {
3972 for (Int_t i=0; i<
fData[0].theoryFourierPhaseOptReal->GetNbinsX(); i++) {
3974 for (UInt_t j=0; j<
fData.size(); j++) {
3977 fDataAvg.theoryFourierPhaseOptReal->SetBinContent(i, dval/
fData.size());
3980 fDataAvg.theoryFourierPhaseOptReal->SetMarkerColor(
fData[0].theoryFourierPhaseOptReal->GetMarkerColor());
3981 fDataAvg.theoryFourierPhaseOptReal->SetLineColor(
fData[0].theoryFourierPhaseOptReal->GetLineColor());
3982 fDataAvg.theoryFourierPhaseOptReal->SetMarkerSize(
fData[0].theoryFourierPhaseOptReal->GetMarkerSize());
3983 fDataAvg.theoryFourierPhaseOptReal->SetMarkerStyle(
fData[0].theoryFourierPhaseOptReal->GetMarkerStyle());
3986 for (Int_t i=0; i<
fData[0].diff->GetNbinsX(); i++) {
3988 for (UInt_t j=0; j<
fData.size(); j++) {
3994 fDataAvg.diff->SetMarkerColor(
fData[0].diff->GetMarkerColor());
3996 fDataAvg.diff->SetMarkerSize(
fData[0].diff->GetMarkerSize());
3997 fDataAvg.diff->SetMarkerStyle(
fData[0].diff->GetMarkerStyle());
3999 if (
fDataAvg.diffFourierRe !=
nullptr) {
4000 for (Int_t i=0; i<
fData[0].diffFourierRe->GetNbinsX(); i++) {
4002 for (UInt_t j=0; j<
fData.size(); j++) {
4005 fDataAvg.diffFourierRe->SetBinContent(i, dval/
fData.size());
4008 fDataAvg.diffFourierRe->SetMarkerColor(
fData[0].diffFourierRe->GetMarkerColor());
4009 fDataAvg.diffFourierRe->SetLineColor(
fData[0].diffFourierRe->GetLineColor());
4010 fDataAvg.diffFourierRe->SetMarkerSize(
fData[0].diffFourierRe->GetMarkerSize());
4011 fDataAvg.diffFourierRe->SetMarkerStyle(
fData[0].diffFourierRe->GetMarkerStyle());
4013 if (
fDataAvg.diffFourierIm !=
nullptr) {
4014 for (Int_t i=0; i<
fData[0].diffFourierIm->GetNbinsX(); i++) {
4016 for (UInt_t j=0; j<
fData.size(); j++) {
4019 fDataAvg.diffFourierIm->SetBinContent(i, dval/
fData.size());
4022 fDataAvg.diffFourierIm->SetMarkerColor(
fData[0].diffFourierIm->GetMarkerColor());
4023 fDataAvg.diffFourierIm->SetLineColor(
fData[0].diffFourierIm->GetLineColor());
4024 fDataAvg.diffFourierIm->SetMarkerSize(
fData[0].diffFourierIm->GetMarkerSize());
4025 fDataAvg.diffFourierIm->SetMarkerStyle(
fData[0].diffFourierIm->GetMarkerStyle());
4027 if (
fDataAvg.diffFourierPwr !=
nullptr) {
4028 for (Int_t i=0; i<
fData[0].diffFourierPwr->GetNbinsX(); i++) {
4030 for (UInt_t j=0; j<
fData.size(); j++) {
4033 fDataAvg.diffFourierPwr->SetBinContent(i, dval/
fData.size());
4036 fDataAvg.diffFourierPwr->SetMarkerColor(
fData[0].diffFourierPwr->GetMarkerColor());
4037 fDataAvg.diffFourierPwr->SetLineColor(
fData[0].diffFourierPwr->GetLineColor());
4038 fDataAvg.diffFourierPwr->SetMarkerSize(
fData[0].diffFourierPwr->GetMarkerSize());
4039 fDataAvg.diffFourierPwr->SetMarkerStyle(
fData[0].diffFourierPwr->GetMarkerStyle());
4041 if (
fDataAvg.diffFourierPhase !=
nullptr) {
4042 for (Int_t i=0; i<
fData[0].diffFourierPhase->GetNbinsX(); i++) {
4044 for (UInt_t j=0; j<
fData.size(); j++) {
4047 fDataAvg.diffFourierPhase->SetBinContent(i, dval/
fData.size());
4050 fDataAvg.diffFourierPhase->SetMarkerColor(
fData[0].diffFourierPhase->GetMarkerColor());
4051 fDataAvg.diffFourierPhase->SetLineColor(
fData[0].diffFourierPhase->GetLineColor());
4052 fDataAvg.diffFourierPhase->SetMarkerSize(
fData[0].diffFourierPhase->GetMarkerSize());
4053 fDataAvg.diffFourierPhase->SetMarkerStyle(
fData[0].diffFourierPhase->GetMarkerStyle());
4055 if (
fDataAvg.diffFourierPhaseOptReal !=
nullptr) {
4056 for (Int_t i=0; i<
fData[0].diffFourierPhaseOptReal->GetNbinsX(); i++) {
4058 for (UInt_t j=0; j<
fData.size(); j++) {
4061 fDataAvg.diffFourierPhaseOptReal->SetBinContent(i, dval/
fData.size());
4064 fDataAvg.diffFourierPhaseOptReal->SetMarkerColor(
fData[0].dataFourierPhaseOptReal->GetMarkerColor());
4065 fDataAvg.diffFourierPhaseOptReal->SetLineColor(
fData[0].dataFourierPhaseOptReal->GetLineColor());
4066 fDataAvg.diffFourierPhaseOptReal->SetMarkerSize(
fData[0].dataFourierPhaseOptReal->GetMarkerSize());
4067 fDataAvg.diffFourierPhaseOptReal->SetMarkerStyle(
fData[0].dataFourierPhaseOptReal->GetMarkerStyle());
4079 for (UInt_t i=0; i<
fData.size(); i++) {
4080 if (
fData[i].diff !=
nullptr) {
4081 delete fData[i].diff;
4082 fData[i].diff =
nullptr;
4095 for (UInt_t i=0; i<
fData.size(); i++) {
4096 if (
fData[i].dataFourierRe !=
nullptr) {
4097 delete fData[i].dataFourierRe;
4098 fData[i].dataFourierRe =
nullptr;
4100 if (
fData[i].dataFourierIm !=
nullptr) {
4101 delete fData[i].dataFourierIm;
4102 fData[i].dataFourierIm =
nullptr;
4104 if (
fData[i].dataFourierPwr !=
nullptr) {
4105 delete fData[i].dataFourierPwr;
4106 fData[i].dataFourierPwr =
nullptr;
4108 if (
fData[i].dataFourierPhase !=
nullptr) {
4109 delete fData[i].dataFourierPhase;
4110 fData[i].dataFourierPhase =
nullptr;
4112 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
4113 delete fData[i].dataFourierPhaseOptReal;
4114 fData[i].dataFourierPhaseOptReal =
nullptr;
4116 if (
fData[i].theoryFourierRe !=
nullptr) {
4117 delete fData[i].theoryFourierRe;
4118 fData[i].theoryFourierRe =
nullptr;
4120 if (
fData[i].theoryFourierIm !=
nullptr) {
4121 delete fData[i].theoryFourierIm;
4122 fData[i].theoryFourierIm =
nullptr;
4124 if (
fData[i].theoryFourierPwr !=
nullptr) {
4125 delete fData[i].theoryFourierPwr;
4126 fData[i].theoryFourierPwr =
nullptr;
4128 if (
fData[i].theoryFourierPhase !=
nullptr) {
4129 delete fData[i].theoryFourierPhase;
4130 fData[i].theoryFourierPhase =
nullptr;
4132 if (
fData[i].theoryFourierPhaseOptReal !=
nullptr) {
4133 delete fData[i].theoryFourierPhaseOptReal;
4134 fData[i].theoryFourierPhaseOptReal =
nullptr;
4147 for (UInt_t i=0; i<
fData.size(); i++) {
4148 if (
fData[i].diffFourierRe !=
nullptr) {
4149 delete fData[i].diffFourierRe;
4150 fData[i].diffFourierRe =
nullptr;
4152 if (
fData[i].diffFourierIm !=
nullptr) {
4153 delete fData[i].diffFourierIm;
4154 fData[i].diffFourierIm =
nullptr;
4156 if (
fData[i].diffFourierPwr !=
nullptr) {
4157 delete fData[i].diffFourierPwr;
4158 fData[i].diffFourierPwr =
nullptr;
4160 if (
fData[i].diffFourierPhase !=
nullptr) {
4161 delete fData[i].diffFourierPhase;
4162 fData[i].diffFourierPhase =
nullptr;
4164 if (
fData[i].diffFourierPhaseOptReal !=
nullptr) {
4165 delete fData[i].diffFourierPhaseOptReal;
4166 fData[i].diffFourierPhaseOptReal =
nullptr;
4183 if (
fDataAvg.dataFourierRe !=
nullptr) {
4187 if (
fDataAvg.dataFourierIm !=
nullptr) {
4191 if (
fDataAvg.dataFourierPwr !=
nullptr) {
4195 if (
fDataAvg.dataFourierPhase !=
nullptr) {
4197 fDataAvg.dataFourierPhase =
nullptr;
4199 if (
fDataAvg.dataFourierPhaseOptReal !=
nullptr) {
4200 delete fDataAvg.dataFourierPhaseOptReal;
4201 fDataAvg.dataFourierPhaseOptReal =
nullptr;
4207 if (
fDataAvg.theoryFourierRe !=
nullptr) {
4209 fDataAvg.theoryFourierRe =
nullptr;
4211 if (
fDataAvg.theoryFourierIm !=
nullptr) {
4213 fDataAvg.theoryFourierIm =
nullptr;
4215 if (
fDataAvg.theoryFourierPwr !=
nullptr) {
4217 fDataAvg.theoryFourierPwr =
nullptr;
4219 if (
fDataAvg.theoryFourierPhase !=
nullptr) {
4220 delete fDataAvg.theoryFourierPhase;
4221 fDataAvg.theoryFourierPhase =
nullptr;
4223 if (
fDataAvg.theoryFourierPhaseOptReal !=
nullptr) {
4224 delete fDataAvg.theoryFourierPhaseOptReal;
4225 fDataAvg.theoryFourierPhaseOptReal =
nullptr;
4231 if (
fDataAvg.diffFourierRe !=
nullptr) {
4235 if (
fDataAvg.diffFourierIm !=
nullptr) {
4239 if (
fDataAvg.diffFourierPwr !=
nullptr) {
4243 if (
fDataAvg.diffFourierPhase !=
nullptr) {
4245 fDataAvg.diffFourierPhase =
nullptr;
4247 if (
fDataAvg.diffFourierPhaseOptReal !=
nullptr) {
4248 delete fDataAvg.diffFourierPhaseOptReal;
4249 fDataAvg.diffFourierPhaseOptReal =
nullptr;
4261 Double_t min =
fMsrHandler->GetMsrFourierList()->fRangeForPhaseCorrection[0];
4262 Double_t max =
fMsrHandler->GetMsrFourierList()->fRangeForPhaseCorrection[1];
4264 if ((min == -1.0) && (max == -1.0)) {
4269 min =
fData[0].dataFourierRe->GetBinLowEdge(1);
4270 max =
fData[0].dataFourierRe->GetBinLowEdge(
fData[0].dataFourierRe->GetNbinsX())+
fData[0].dataFourierRe->GetBinWidth(1);
4278 for (UInt_t i=0; i<
fData.size(); i++) {
4281 phaseParam, 1.0, min, max);
4283 fData[i].dataFourierPhaseOptReal->SetMarkerColor(
fData[i].data->GetMarkerColor());
4284 fData[i].dataFourierPhaseOptReal->SetLineColor(
fData[i].data->GetLineColor());
4286 fData[i].dataFourierPhaseOptReal->SetMarkerSize(1);
4288 fData[i].dataFourierPhaseOptReal->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
4292 strcpy(hName,
fData[i].theoryFourierPhase->GetName());
4293 strcat(hName,
"_Opt_Real");
4294 fData[i].theoryFourierPhaseOptReal = (TH1F*)
fData[i].theoryFourierRe->Clone(hName);
4298 Int_t minBin =
fData[i].theoryFourierPhaseOptReal->GetXaxis()->FindFixBin(min);
4299 Int_t maxBin =
fData[i].theoryFourierPhaseOptReal->GetXaxis()->FindFixBin(max);
4301 for (Int_t j=1; j<
fData[i].theoryFourierPhaseOptReal->GetNbinsX(); j++) {
4302 ph = phaseParam[0] + phaseParam[1] * (Double_t)(j-minBin+1) / (Double_t)(maxBin-minBin);
4303 re =
fData[i].theoryFourierRe->GetBinContent(j) * cos(ph) -
fData[i].theoryFourierIm->GetBinContent(j) * sin(ph);
4304 fData[i].theoryFourierPhaseOptReal->SetBinContent(j, re);
4307 fData[i].theoryFourierPhaseOptReal->SetLineColor(
fData[i].theory->GetLineColor());
4326 Int_t bin = theo->FindBin(x);
4328 return y - theo->GetBinContent(bin);
4347 Double_t xVal, yVal;
4351 theo->GetPoint(bin, xVal, yVal);
4371 Double_t *xTheo = graph->GetX();
4374 for (i=0; i<graph->GetN(); i++) {
4375 if (*(xTheo+i) >= x) {
4381 if (i == graph->GetN()) {
4404 if (histo ==
nullptr)
4407 Int_t start=0, end=0;
4410 end = histo->GetNbinsX();
4412 start = histo->FindBin(xmin);
4413 if ((start==0) || (start==histo->GetNbinsX()+1))
4415 end = histo->FindBin(xmax);
4416 if ((end==0) || (end==histo->GetNbinsX()+1))
4417 end = histo->GetNbinsX();
4420 Double_t max = histo->GetBinContent(start);
4421 Double_t binContent;
4422 for (Int_t i=start; i<end; i++) {
4423 binContent = histo->GetBinContent(i);
4424 if (max < binContent)
4447 if (histo ==
nullptr)
4450 Int_t start=0, end=0;
4453 end = histo->GetNbinsX();
4455 start = histo->FindBin(xmin);
4456 if ((start==0) || (start==histo->GetNbinsX()+1))
4458 end = histo->FindBin(xmax);
4459 if ((end==0) || (end==histo->GetNbinsX()+1))
4460 end = histo->GetNbinsX();
4463 Double_t min = histo->GetBinContent(start);
4464 Double_t binContent;
4465 for (Int_t i=start; i<end; i++) {
4466 binContent = histo->GetBinContent(i);
4467 if (min > binContent)
4490 if (graph ==
nullptr)
4495 graph->GetPoint(0, x, y);
4497 graph->GetPoint(graph->GetN()-1, x, y);
4501 graph->GetPoint(0, x, y);
4503 for (Int_t i=0; i<graph->GetN(); i++) {
4504 graph->GetPoint(i, x, y);
4505 if ((x >= xmin) && (x <= xmax)) {
4530 if (graph ==
nullptr)
4535 graph->GetPoint(0, x, y);
4537 graph->GetPoint(graph->GetN()-1, x, y);
4541 graph->GetPoint(0, x, y);
4543 for (Int_t i=0; i<graph->GetN(); i++) {
4544 graph->GetPoint(i, x, y);
4545 if ((x >= xmin) && (x <= xmax)) {
4574 Double_t xmin, xmax;
4576 if (
fData.size() > 0) {
4594 Double_t dataXmin=0.0, dataXmax=0.0, dataYmin=0.0, dataYmax=0.0;
4604 for (UInt_t i=1; i<
fData.size(); i++) {
4610 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
4623 for (UInt_t i=1; i<
fData.size(); i++) {
4629 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
4635 dataYmin = 1.0e-4 * dataYmax;
4642 UInt_t noOfPoints = 1000;
4643 for (UInt_t i=0; i<
fData.size(); i++) {
4644 if (
fData[i].data->GetNbinsX() > (Int_t)noOfPoints)
4645 noOfPoints =
fData[i].data->GetNbinsX();
4648 fHistoFrame->SetBins(noOfPoints, dataXmin, dataXmax);
4651 for (UInt_t i=0; i<
fData.size(); i++) {
4652 fData[i].data->GetXaxis()->SetRange(
fData[i].data->FindBin(dataXmin),
fData[i].data->FindBin(dataXmax));
4653 fData[i].data->GetYaxis()->SetRangeUser(dataYmin, dataYmax);
4654 fData[i].theory->GetXaxis()->SetRange(
fData[i].theory->FindBin(dataXmin),
fData[i].theory->FindBin(dataXmax));
4655 fData[i].theory->GetYaxis()->SetRangeUser(dataYmin, dataYmax);
4676 if (runList->at(0).IsLifetimeCorrected()) {
4677 yAxisTitle =
"Asymmetry";
4680 yAxisTitle =
"N(t) per nsec";
4682 yAxisTitle =
"N(t) per bin";
4687 yAxisTitle =
"RRF Asymmetry";
4690 yAxisTitle =
"Asymmetry";
4693 yAxisTitle =
"Asymmetry";
4696 yAxisTitle =
"N(t) per bin";
4703 fHistoFrame->GetYaxis()->SetTitle(yAxisTitle.Data());
4705 for (UInt_t i=0; i<
fData.size(); i++) {
4706 fData[i].data->Draw(
"pesame");
4709 for (UInt_t i=0; i<
fData.size(); i++) {
4710 fData[i].theory->Draw(
"lsame");
4743 UInt_t runNo = (UInt_t)plotInfo.
fRuns[0]-1;
4744 TString xAxisTitle =
fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
4745 TString yAxisTitle =
fRunList->GetYAxisTitle(*runs[runNo].GetRunName(), runNo);
4750 Double_t dataXmin=0.0, dataXmax=0.0, dataYmin=0.0, dataYmax=0.0;
4766 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
4785 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
4791 if (dataYmin <= 0.0)
4792 dataYmin = 1.0e-4 * dataYmax;
4804 TGraphErrors *ge =
new TGraphErrors(*(
fNonMusrData[i].data));
4806 ge->SetEditable(
false);
4814 TGraphErrors *ge =
new TGraphErrors(*(
fNonMusrData[i].theory));
4816 ge->SetEditable(
false);
4840 for (UInt_t i=0; i<plotInfo.
fRuns.size(); i++) {
4841 runNo = (UInt_t)plotInfo.
fRuns[i]-1;
4842 xAxisTitle =
fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
4843 yAxisTitle =
fRunList->GetYAxisTitle(*runs[runNo].GetRunName(), runNo);
4844 legendLabel.push_back(yAxisTitle +
" vs. " + xAxisTitle);
4849 legendLabel.clear();
4891 Double_t xmin, xmax;
4908 Double_t dataXmin=0.0, dataXmax=0.0, dataYmin=0.0, dataYmax=0.0, dd=0.0;
4914 for (UInt_t i=1; i<
fData.size(); i++) {
4921 dd = 0.05*fabs(dataYmax-dataYmin);
4929 for (UInt_t i=1; i<
fData.size(); i++) {
4936 dd = 0.05*fabs(dataYmax-dataYmin);
4944 UInt_t noOfPoints = 1000;
4945 for (UInt_t i=0; i<
fData.size(); i++) {
4946 if (
fData[i].diff->GetNbinsX() > (Int_t)noOfPoints)
4947 noOfPoints =
fData[i].diff->GetNbinsX();
4950 fHistoFrame->SetBins(noOfPoints, dataXmin, dataXmax);
4964 for (UInt_t i=0; i<
fData.size(); i++) {
4965 fData[i].diff->Draw(
"pesame");
4967 if (
fData[i].dataRange->IsXRangePresent())
4968 fData[i].diff->GetXaxis()->SetRangeUser(
fData[i].dataRange->GetXmin(),
fData[i].dataRange->GetXmax());
4970 fData[i].diff->GetXaxis()->SetRange(
fData[i].diff->FindBin(dataXmin),
fData[i].diff->FindBin(dataXmax));
4972 if (
fData[i].dataRange->IsYRangePresent())
4973 fData[i].diff->GetYaxis()->SetRangeUser(
fData[i].dataRange->GetYmin(),
fData[i].dataRange->GetYmax());
4975 fData[i].diff->GetYaxis()->SetRangeUser(dataYmin, dataYmax);
5008 UInt_t runNo = (UInt_t)plotInfo.
fRuns[0]-1;
5009 TString xAxisTitle =
fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
5016 Double_t dataXmin=0.0, dataXmax=0.0, dataYmin=0.0, dataYmax=0.0;
5028 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
5042 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
5052 TGraphErrors *ge =
new TGraphErrors(*(
fNonMusrData[i].diff));
5054 ge->SetEditable(
false);
5102 if (
fData.size() == 0)
5106 TString xAxisTitle(
"");
5108 xAxisTitle = TString(
"Field (G)");
5110 xAxisTitle = TString(
"Field (T)");
5112 xAxisTitle = TString(
"Frequency (MHz)");
5114 xAxisTitle = TString(
"Frequency (Mc/s)");
5116 xAxisTitle = TString(
"??");
5120 Double_t xmin, xmax, ymin, ymax, binContent;
5121 UInt_t noOfPoints = 1000;
5129 xmin =
fData[0].dataFourierRe->GetBinLowEdge(1);
5130 xmax =
fData[0].dataFourierRe->GetBinLowEdge(
fData[0].dataFourierRe->GetNbinsX())+
fData[0].dataFourierRe->GetBinWidth(1);
5138 if (binContent < ymin)
5141 if (binContent > ymax)
5143 for (UInt_t i=1; i<
fData.size(); i++) {
5145 if (binContent < ymin)
5148 if (binContent > ymax)
5151 if (binContent < ymin)
5154 if (binContent > ymax)
5168 for (UInt_t i=0; i<
fData.size(); i++) {
5169 if (
fData[i].dataFourierRe->GetNbinsX() > (Int_t)noOfPoints)
5170 noOfPoints =
fData[i].dataFourierRe->GetNbinsX();
5176 for (UInt_t i=0; i<
fData.size(); i++) {
5177 fData[i].dataFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5178 fData[i].dataFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5179 fData[i].theoryFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5180 fData[i].theoryFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5184 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5188 fHistoFrame->GetYaxis()->SetTitle(
"Real Fourier");
5191 for (UInt_t i=0; i<
fData.size(); i++) {
5192 fData[i].dataFourierRe->Draw(
"psame");
5196 for (UInt_t i=0; i<
fData.size(); i++) {
5197 fData[i].theoryFourierRe->Draw(
"same");
5209 xmin =
fData[0].dataFourierIm->GetBinLowEdge(1);
5210 xmax =
fData[0].dataFourierIm->GetBinLowEdge(
fData[0].dataFourierIm->GetNbinsX())+
fData[0].dataFourierIm->GetBinWidth(1);
5218 if (binContent < ymin)
5221 if (binContent > ymax)
5223 for (UInt_t i=1; i<
fData.size(); i++) {
5225 if (binContent < ymin)
5228 if (binContent > ymax)
5231 if (binContent < ymin)
5234 if (binContent > ymax)
5248 for (UInt_t i=0; i<
fData.size(); i++) {
5249 if (
fData[i].dataFourierIm->GetNbinsX() > (Int_t)noOfPoints)
5250 noOfPoints =
fData[i].dataFourierIm->GetNbinsX();
5256 for (UInt_t i=0; i<
fData.size(); i++) {
5257 fData[i].dataFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5258 fData[i].dataFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5259 fData[i].theoryFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5260 fData[i].theoryFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5264 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5268 fHistoFrame->GetYaxis()->SetTitle(
"Imaginary Fourier");
5271 for (UInt_t i=0; i<
fData.size(); i++) {
5272 fData[i].dataFourierIm->Draw(
"psame");
5276 for (UInt_t i=0; i<
fData.size(); i++) {
5277 fData[i].theoryFourierIm->Draw(
"same");
5289 xmin =
fData[0].dataFourierRe->GetBinLowEdge(1);
5290 xmax =
fData[0].dataFourierRe->GetBinLowEdge(
fData[0].dataFourierRe->GetNbinsX())+
fData[0].dataFourierRe->GetBinWidth(1);
5298 for (UInt_t i=1; i<
fData.size(); i++) {
5300 if (binContent < ymin)
5303 if (binContent > ymax)
5307 for (UInt_t i=0; i<
fData.size(); i++) {
5309 if (binContent < ymin)
5312 if (binContent > ymax)
5316 for (UInt_t i=0; i<
fData.size(); i++) {
5318 if (binContent < ymin)
5321 if (binContent > ymax)
5324 if (binContent < ymin)
5327 if (binContent > ymax)
5341 for (UInt_t i=0; i<
fData.size(); i++) {
5342 if (
fData[i].dataFourierRe->GetNbinsX() > (Int_t)noOfPoints)
5343 noOfPoints =
fData[i].dataFourierRe->GetNbinsX();
5349 for (UInt_t i=0; i<
fData.size(); i++) {
5350 fData[i].dataFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5351 fData[i].dataFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5352 fData[i].theoryFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5353 fData[i].theoryFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5354 fData[i].dataFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5355 fData[i].dataFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5356 fData[i].theoryFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5357 fData[i].theoryFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5361 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5365 fHistoFrame->GetYaxis()->SetTitle(
"Real/Imag Fourier");
5368 for (UInt_t i=0; i<
fData.size(); i++) {
5369 fData[i].dataFourierRe->Draw(
"psame");
5370 fData[i].dataFourierIm->Draw(
"psame");
5374 for (UInt_t i=0; i<
fData.size(); i++) {
5375 fData[i].theoryFourierRe->Draw(
"same");
5376 fData[i].theoryFourierIm->Draw(
"same");
5388 xmin =
fData[0].dataFourierPwr->GetBinLowEdge(1);
5389 xmax =
fData[0].dataFourierPwr->GetBinLowEdge(
fData[0].dataFourierPwr->GetNbinsX())+
fData[0].dataFourierPwr->GetBinWidth(1);
5397 if (binContent < ymin)
5400 if (binContent > ymax)
5402 for (UInt_t i=1; i<
fData.size(); i++) {
5404 if (binContent < ymin)
5407 if (binContent > ymax)
5410 if (binContent < ymin)
5413 if (binContent > ymax)
5427 for (UInt_t i=0; i<
fData.size(); i++) {
5428 if (
fData[i].dataFourierPwr->GetNbinsX() > (Int_t)noOfPoints)
5429 noOfPoints =
fData[i].dataFourierPwr->GetNbinsX();
5435 for (UInt_t i=0; i<
fData.size(); i++) {
5436 fData[i].dataFourierPwr->GetXaxis()->SetRangeUser(xmin, xmax);
5437 fData[i].dataFourierPwr->GetYaxis()->SetRangeUser(0.95*ymin, 1.05*ymax);
5438 fData[i].theoryFourierPwr->GetXaxis()->SetRangeUser(xmin, xmax);
5439 fData[i].theoryFourierPwr->GetYaxis()->SetRangeUser(0.95*ymin, 1.05*ymax);
5443 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5447 fHistoFrame->GetYaxis()->SetTitle(
"Ampl. Fourier");
5450 for (UInt_t i=0; i<
fData.size(); i++) {
5451 fData[i].dataFourierPwr->Draw(
"psame");
5455 for (UInt_t i=0; i<
fData.size(); i++) {
5456 fData[i].theoryFourierPwr->Draw(
"same");
5466 xmin =
fData[0].dataFourierPhase->GetBinLowEdge(1);
5467 xmax =
fData[0].dataFourierPhase->GetBinLowEdge(
fData[0].dataFourierPhase->GetNbinsX())+
fData[0].dataFourierPhase->GetBinWidth(1);
5475 if (binContent < ymin)
5478 if (binContent > ymax)
5480 for (UInt_t i=1; i<
fData.size(); i++) {
5482 if (binContent < ymin)
5485 if (binContent > ymax)
5488 if (binContent < ymin)
5491 if (binContent > ymax)
5505 for (UInt_t i=0; i<
fData.size(); i++) {
5506 if (
fData[i].dataFourierPhase->GetNbinsX() > (Int_t)noOfPoints)
5507 noOfPoints =
fData[i].dataFourierPhase->GetNbinsX();
5512 for (UInt_t i=0; i<
fData.size(); i++) {
5513 fData[i].dataFourierPhase->GetXaxis()->SetRangeUser(xmin, xmax);
5514 fData[i].dataFourierPhase->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5515 fData[i].theoryFourierPhase->GetXaxis()->SetRangeUser(xmin, xmax);
5516 fData[i].theoryFourierPhase->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5520 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5524 fHistoFrame->GetYaxis()->SetTitle(
"Phase Fourier");
5527 for (UInt_t i=0; i<
fData.size(); i++) {
5528 fData[i].dataFourierPhase->Draw(
"psame");
5532 for (UInt_t i=0; i<
fData.size(); i++) {
5533 fData[i].theoryFourierPhase->Draw(
"same");
5543 xmin =
fData[0].dataFourierPhaseOptReal->GetBinLowEdge(1);
5544 xmax =
fData[0].dataFourierPhaseOptReal->GetBinLowEdge(
fData[0].dataFourierPhaseOptReal->GetNbinsX())+
fData[0].dataFourierPhaseOptReal->GetBinWidth(1);
5552 if (binContent < ymin)
5555 if (binContent > ymax)
5557 for (UInt_t i=1; i<
fData.size(); i++) {
5559 if (binContent < ymin)
5562 if (binContent > ymax)
5565 if (binContent < ymin)
5568 if (binContent > ymax)
5582 for (UInt_t i=0; i<
fData.size(); i++) {
5583 if (
fData[i].dataFourierPhaseOptReal->GetNbinsX() > (Int_t)noOfPoints)
5584 noOfPoints =
fData[i].dataFourierPhaseOptReal->GetNbinsX();
5589 for (UInt_t i=0; i<
fData.size(); i++) {
5590 fData[i].dataFourierPhaseOptReal->GetXaxis()->SetRangeUser(xmin, xmax);
5591 fData[i].dataFourierPhaseOptReal->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5592 fData[i].theoryFourierPhaseOptReal->GetXaxis()->SetRangeUser(xmin, xmax);
5593 fData[i].theoryFourierPhaseOptReal->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5597 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5601 fHistoFrame->GetYaxis()->SetTitle(
"Phase Opt. Real Fourier");
5604 for (UInt_t i=0; i<
fData.size(); i++) {
5605 fData[i].dataFourierPhaseOptReal->Draw(
"psame");
5609 for (UInt_t i=0; i<
fData.size(); i++) {
5610 fData[i].theoryFourierPhaseOptReal->Draw(
"same");
5650 if (
fData.size() == 0)
5654 TString xAxisTitle(
"");
5656 xAxisTitle = TString(
"Field (G)");
5658 xAxisTitle = TString(
"Field (T)");
5660 xAxisTitle = TString(
"Frequency (MHz)");
5662 xAxisTitle = TString(
"Frequency (Mc/s)");
5664 xAxisTitle = TString(
"??");
5668 double xmin, xmax, ymin, ymax, binContent;
5676 xmin =
fData[0].diffFourierRe->GetBinLowEdge(1);
5677 xmax =
fData[0].diffFourierRe->GetBinLowEdge(
fData[0].diffFourierRe->GetNbinsX())+
fData[0].diffFourierRe->GetBinWidth(1);
5684 for (UInt_t i=1; i<
fData.size(); i++) {
5686 if (binContent < ymin)
5689 if (binContent > ymax)
5702 for (UInt_t i=0; i<
fData.size(); i++) {
5703 fData[i].diffFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5704 fData[i].diffFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5708 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5712 if (
fData[0].diffFourierTag == 1)
5713 fHistoFrame->GetYaxis()->SetTitle(
"Real Fourier (d-f: data-theory)");
5715 fHistoFrame->GetYaxis()->SetTitle(
"Real Fourier (f-d: [(F data)-(F theory)]");
5718 for (UInt_t i=0; i<
fData.size(); i++) {
5719 fData[i].diffFourierRe->Draw(
"plsame");
5731 xmin =
fData[0].diffFourierIm->GetBinLowEdge(1);
5732 xmax =
fData[0].diffFourierIm->GetBinLowEdge(
fData[0].diffFourierIm->GetNbinsX())+
fData[0].diffFourierIm->GetBinWidth(1);
5739 for (UInt_t i=1; i<
fData.size(); i++) {
5741 if (binContent < ymin)
5744 if (binContent > ymax)
5757 for (UInt_t i=0; i<
fData.size(); i++) {
5758 fData[i].diffFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5759 fData[i].diffFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5763 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5767 if (
fData[0].diffFourierTag == 1)
5768 fHistoFrame->GetYaxis()->SetTitle(
"Imaginary Fourier (d-f: data-theory)");
5770 fHistoFrame->GetYaxis()->SetTitle(
"Imaginary Fourier (f-d: [(F data)-(F theory)]");
5773 for (UInt_t i=0; i<
fData.size(); i++) {
5774 fData[i].diffFourierIm->Draw(
"plsame");
5786 xmin =
fData[0].diffFourierRe->GetBinLowEdge(1);
5787 xmax =
fData[0].diffFourierRe->GetBinLowEdge(
fData[0].diffFourierRe->GetNbinsX())+
fData[0].diffFourierRe->GetBinWidth(1);
5794 for (UInt_t i=1; i<
fData.size(); i++) {
5796 if (binContent < ymin)
5799 if (binContent > ymax)
5802 for (UInt_t i=0; i<
fData.size(); i++) {
5804 if (binContent < ymin)
5807 if (binContent > ymax)
5820 for (UInt_t i=0; i<
fData.size(); i++) {
5821 fData[i].diffFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5822 fData[i].diffFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5823 fData[i].diffFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5824 fData[i].diffFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5828 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5832 if (
fData[0].diffFourierTag == 1)
5833 fHistoFrame->GetYaxis()->SetTitle(
"Real+Imag Fourier (d-f: data-theory)");
5835 fHistoFrame->GetYaxis()->SetTitle(
"Real+Imag Fourier (f-d: [(F data)-(F theory)]");
5838 for (UInt_t i=0; i<
fData.size(); i++) {
5839 fData[i].diffFourierRe->Draw(
"plsame");
5840 fData[i].diffFourierIm->Draw(
"plsame");
5852 xmin =
fData[0].diffFourierPwr->GetBinLowEdge(1);
5853 xmax =
fData[0].diffFourierPwr->GetBinLowEdge(
fData[0].diffFourierPwr->GetNbinsX())+
fData[0].diffFourierPwr->GetBinWidth(1);
5860 for (UInt_t i=1; i<
fData.size(); i++) {
5862 if (binContent < ymin)
5865 if (binContent > ymax)
5878 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5881 for (UInt_t i=0; i<
fData.size(); i++) {
5882 fData[i].diffFourierPwr->GetXaxis()->SetRangeUser(xmin, xmax);
5883 fData[i].diffFourierPwr->GetYaxis()->SetRangeUser(0.95*ymin, 1.05*ymax);
5888 if (
fData[0].diffFourierTag == 1)
5889 fHistoFrame->GetYaxis()->SetTitle(
"Ampl. Fourier (d-f: data-theory)");
5891 fHistoFrame->GetYaxis()->SetTitle(
"Ampl. Fourier (f-d: [(F data)-(F theory)]");
5894 for (UInt_t i=0; i<
fData.size(); i++) {
5895 fData[i].diffFourierPwr->Draw(
"plsame");
5905 xmin =
fData[0].diffFourierPhase->GetBinLowEdge(1);
5906 xmax =
fData[0].diffFourierPhase->GetBinLowEdge(
fData[0].diffFourierPhase->GetNbinsX())+
fData[0].diffFourierPhase->GetBinWidth(1);
5913 for (UInt_t i=1; i<
fData.size(); i++) {
5915 if (binContent < ymin)
5918 if (binContent > ymax)
5931 for (UInt_t i=0; i<
fData.size(); i++) {
5932 fData[i].diffFourierPhase->GetXaxis()->SetRangeUser(xmin, xmax);
5933 fData[i].diffFourierPhase->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5937 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5941 if (
fData[0].diffFourierTag == 1)
5942 fHistoFrame->GetYaxis()->SetTitle(
"Phase Fourier (d-f: data-theory)");
5944 fHistoFrame->GetYaxis()->SetTitle(
"Phase Fourier [f-d: (F data)-(F theory)]");
5947 for (UInt_t i=0; i<
fData.size(); i++) {
5948 fData[i].diffFourierPhase->Draw(
"plsame");
5960 xmin =
fData[0].diffFourierPhaseOptReal->GetBinLowEdge(1);
5961 xmax =
fData[0].diffFourierPhaseOptReal->GetBinLowEdge(
fData[0].diffFourierPhaseOptReal->GetNbinsX())+
fData[0].diffFourierPhaseOptReal->GetBinWidth(1);
5968 for (UInt_t i=1; i<
fData.size(); i++) {
5970 if (binContent < ymin)
5973 if (binContent > ymax)
5986 for (UInt_t i=0; i<
fData.size(); i++) {
5987 fData[i].diffFourierPhaseOptReal->GetXaxis()->SetRangeUser(xmin, xmax);
5988 fData[i].diffFourierPhaseOptReal->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5992 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5996 if (
fData[0].diffFourierTag == 1)
5997 fHistoFrame->GetYaxis()->SetTitle(
"Real Fourier (d-f: data-theory)");
5999 fHistoFrame->GetYaxis()->SetTitle(
"Real Fourier (f-d: [(F data)-(F theory)]");
6002 for (UInt_t i=0; i<
fData.size(); i++) {
6003 fData[i].diffFourierPhaseOptReal->Draw(
"plsame");
6035 str = TString(
"phase = ");
6068 TString xAxisTitle(
"");
6072 xAxisTitle = TString(
"time (s)");
6074 xAxisTitle = TString(
"time (#mus)");
6078 xAxisTitle = TString(
"Field (G)");
6080 xAxisTitle = TString(
"Field (T)");
6082 xAxisTitle = TString(
"Frequency (MHz)");
6084 xAxisTitle = TString(
"Frequency (Mc/s)");
6086 xAxisTitle = TString(
"??");
6090 TString yAxisTitle(
"");
6096 if (runList->at(0).IsLifetimeCorrected()) {
6097 yAxisTitle =
"<asymmetry>";
6100 yAxisTitle =
"<N(t)> per nsec";
6102 yAxisTitle =
"<N(t)> per bin";
6106 yAxisTitle =
"<asymmetry>";
6109 yAxisTitle =
"<asymmetry>";
6112 yAxisTitle =
"<N(t)> per bin";
6119 yAxisTitle =
"<data-theory>";
6125 yAxisTitle =
"<Real Fourier>";
6128 yAxisTitle =
"<Imaginary Fourier>";
6131 yAxisTitle =
"<Real/Imag Fourier>";
6134 yAxisTitle =
"<Ampl. Fourier>";
6137 yAxisTitle =
"<Phase Fourier>";
6140 yAxisTitle =
"<Phase Opt. Real Fourier>";
6149 if (
fData[0].diffFourierTag == 1)
6150 yAxisTitle =
"<Real Fourier (d-f: data-theory)>";
6152 yAxisTitle =
"<Real Fourier (f-d: [(F data)-(F theory)]>";
6155 if (
fData[0].diffFourierTag == 1)
6156 yAxisTitle =
"<Imag Fourier (d-f: data-theory)>";
6158 yAxisTitle =
"<Imag Fourier (f-d: [(F data)-(F theory)]>";
6162 if (
fData[0].diffFourierTag == 1)
6163 yAxisTitle =
"<Real/Imag Fourier (d-f: data-theory)>";
6165 yAxisTitle =
"<Real/Imag Fourier (f-d: [(F data)-(F theory)]>";
6169 if (
fData[0].diffFourierTag == 1)
6170 yAxisTitle =
"<Ampl. Fourier (d-f: data-theory)>";
6172 yAxisTitle =
"<Ampl. Fourier (f-d: [(F data)-(F theory)]>";
6176 if (
fData[0].diffFourierTag == 1)
6177 yAxisTitle =
"<Phase Fourier (d-f: data-theory)>";
6179 yAxisTitle =
"<Phase Fourier (f-d: [(F data)-(F theory)]>";
6190 Double_t xmin, xmax, ymin, ymax;
6204 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
6205 fHistoFrame->GetYaxis()->SetTitle(yAxisTitle.Data());
6220 fDataAvg.dataFourierRe->Draw(
"psame");
6221 fDataAvg.theoryFourierRe->Draw(
"same");
6223 fDataAvg.diffFourierRe->Draw(
"psame");
6228 fDataAvg.dataFourierIm->Draw(
"psame");
6229 fDataAvg.theoryFourierIm->Draw(
"same");
6231 fDataAvg.diffFourierIm->Draw(
"psame");
6236 fDataAvg.dataFourierRe->Draw(
"psame");
6237 fDataAvg.theoryFourierRe->Draw(
"same");
6238 fDataAvg.dataFourierIm->Draw(
"psame");
6239 fDataAvg.theoryFourierIm->Draw(
"same");
6241 fDataAvg.diffFourierRe->Draw(
"psame");
6242 fDataAvg.diffFourierIm->Draw(
"psame");
6247 fDataAvg.dataFourierPwr->Draw(
"psame");
6248 fDataAvg.theoryFourierPwr->Draw(
"same");
6250 fDataAvg.diffFourierPwr->Draw(
"psame");
6255 fDataAvg.dataFourierPhase->Draw(
"psame");
6256 fDataAvg.theoryFourierPhase->Draw(
"same");
6258 fDataAvg.diffFourierPhase->Draw(
"psame");
6263 fDataAvg.dataFourierPhaseOptReal->Draw(
"psame");
6264 fDataAvg.theoryFourierPhaseOptReal->Draw(
"same");
6266 fDataAvg.diffFourierPhaseOptReal->Draw(
"psame");
6296 const double cp = TMath::Cos(
fFourier.fPhaseIncrement/180.0*TMath::Pi());
6297 const double sp = TMath::Sin(
fFourier.fPhaseIncrement/180.0*TMath::Pi());
6303 for (UInt_t i=0; i<
fData.size(); i++) {
6304 if ((
fData[i].dataFourierRe !=
nullptr) && (
fData[i].dataFourierIm !=
nullptr)) {
6305 for (Int_t j=0; j<
fData[i].dataFourierRe->GetNbinsX(); j++) {
6307 re =
fData[i].dataFourierRe->GetBinContent(j) * cp +
fData[i].dataFourierIm->GetBinContent(j) * sp;
6308 im =
fData[i].dataFourierIm->GetBinContent(j) * cp -
fData[i].dataFourierRe->GetBinContent(j) * sp;
6310 fData[i].dataFourierRe->SetBinContent(j, re);
6311 fData[i].dataFourierIm->SetBinContent(j, im);
6314 if ((
fData[i].theoryFourierRe !=
nullptr) && (
fData[i].theoryFourierIm !=
nullptr)) {
6315 for (Int_t j=0; j<
fData[i].theoryFourierRe->GetNbinsX(); j++) {
6317 re =
fData[i].theoryFourierRe->GetBinContent(j) * cp +
fData[i].theoryFourierIm->GetBinContent(j) * sp;
6318 im =
fData[i].theoryFourierIm->GetBinContent(j) * cp -
fData[i].theoryFourierRe->GetBinContent(j) * sp;
6320 fData[i].theoryFourierRe->SetBinContent(j, re);
6321 fData[i].theoryFourierIm->SetBinContent(j, im);
6324 if ((
fData[i].diffFourierRe !=
nullptr) && (
fData[i].diffFourierIm !=
nullptr)) {
6325 for (Int_t j=0; j<
fData[i].diffFourierRe->GetNbinsX(); j++) {
6327 re =
fData[i].diffFourierRe->GetBinContent(j) * cp +
fData[i].diffFourierIm->GetBinContent(j) * sp;
6328 im =
fData[i].diffFourierIm->GetBinContent(j) * cp -
fData[i].diffFourierRe->GetBinContent(j) * sp;
6330 fData[i].diffFourierRe->SetBinContent(j, re);
6331 fData[i].diffFourierIm->SetBinContent(j, im);
6349 const double cp = TMath::Cos(
fFourier.fPhaseIncrement/180.0*TMath::Pi());
6350 const double sp = TMath::Sin(
fFourier.fPhaseIncrement/180.0*TMath::Pi());
6356 for (UInt_t i=0; i<
fData.size(); i++) {
6357 if ((
fData[i].dataFourierRe !=
nullptr) && (
fData[i].dataFourierIm !=
nullptr)) {
6358 for (Int_t j=0; j<
fData[i].dataFourierRe->GetNbinsX(); j++) {
6360 re =
fData[i].dataFourierRe->GetBinContent(j) * cp -
fData[i].dataFourierIm->GetBinContent(j) * sp;
6361 im =
fData[i].dataFourierIm->GetBinContent(j) * cp +
fData[i].dataFourierRe->GetBinContent(j) * sp;
6363 fData[i].dataFourierRe->SetBinContent(j, re);
6364 fData[i].dataFourierIm->SetBinContent(j, im);
6367 if ((
fData[i].theoryFourierRe !=
nullptr) && (
fData[i].theoryFourierIm !=
nullptr)) {
6368 for (Int_t j=0; j<
fData[i].theoryFourierRe->GetNbinsX(); j++) {
6370 re =
fData[i].theoryFourierRe->GetBinContent(j) * cp -
fData[i].theoryFourierIm->GetBinContent(j) * sp;
6371 im =
fData[i].theoryFourierIm->GetBinContent(j) * cp +
fData[i].theoryFourierRe->GetBinContent(j) * sp;
6373 fData[i].theoryFourierRe->SetBinContent(j, re);
6374 fData[i].theoryFourierIm->SetBinContent(j, im);
6377 if ((
fData[i].diffFourierRe !=
nullptr) && (
fData[i].diffFourierIm !=
nullptr)) {
6378 for (Int_t j=0; j<
fData[i].diffFourierRe->GetNbinsX(); j++) {
6380 re =
fData[i].diffFourierRe->GetBinContent(j) * cp -
fData[i].diffFourierIm->GetBinContent(j) * sp;
6381 im =
fData[i].diffFourierIm->GetBinContent(j) * cp +
fData[i].diffFourierRe->GetBinContent(j) * sp;
6383 fData[i].diffFourierRe->SetBinContent(j, re);
6384 fData[i].diffFourierIm->SetBinContent(j, im);
6406 Bool_t willScale =
true;
6409 for (UInt_t i=0; i<cmd->size(); i++) {
6410 if (cmd->at(i).fLine.Contains(
"SCALE_N0_BKG", TString::kIgnoreCase)) {
6411 TObjArray *tokens =
nullptr;
6412 TObjString *ostr =
nullptr;
6414 tokens = cmd->at(i).fLine.Tokenize(
" \t");
6415 if (tokens->GetEntries() != 2) {
6416 std::cerr << std::endl <<
">> PRunSingleHisto::IsScaleN0AndBkg(): **WARNING** Found uncorrect 'SCALE_N0_BKG' command, will ignore it.";
6417 std::cerr << std::endl <<
">> Allowed commands: SCALE_N0_BKG TRUE | FALSE" << std::endl;
6420 ostr =
dynamic_cast<TObjString*
>(tokens->At(1));
6421 str = ostr->GetString();
6422 if (!str.CompareTo(
"FALSE", TString::kIgnoreCase)) {
6447 const UInt_t precLimit = 6;
6448 UInt_t decimalPoint = 0;
6449 UInt_t accuracy = 6;
6451 if (param.
fStep == 0.0) {
6454 snprintf(str,
sizeof(str),
"%lf", param.
fValue);
6457 for (UInt_t i=0; i<strlen(str); i++) {
6458 if (str[i] ==
'.') {
6465 for (Int_t i=strlen(str)-1; i>=0; i--) {
6466 if (str[i] !=
'0') {
6467 if (((UInt_t)i-decimalPoint) < precLimit)
6468 accuracy = (UInt_t)i-decimalPoint;
6470 accuracy = precLimit;
6477 for (UInt_t i=0; i<precLimit; i++) {
6478 if ((Int_t)(param.
fStep*pow(10.0,(Double_t)i)) != 0) {
6484 if (accuracy+1 <= precLimit)
6489 for (UInt_t i=0; i<precLimit; i++) {
6490 if ((Int_t)(param.
fStep*pow(10.0,(Double_t)i)) != 0) {
6496 UInt_t accuracy2 = 6;
6497 for (UInt_t i=0; i<precLimit; i++) {
6498 if ((Int_t)(param.
fStep*pow(10.0,(Double_t)i)) != 0) {
6504 if (accuracy2 > accuracy)
6505 accuracy = accuracy2;
6507 if (accuracy+1 <= precLimit)
6530 if (histo ==
nullptr)
6533 Int_t idx = histo->FindBin(xVal);
6536 if ((idx < 1) || (idx > histo->GetNbinsX()))
6541 if (histo->GetBinCenter(idx) > xVal)
6544 Double_t x0, x1, y0, y1;
6545 x0 = histo->GetBinCenter(idx);
6546 x1 = histo->GetBinCenter(idx+1);
6547 y0 = histo->GetBinContent(idx);
6548 y1 = histo->GetBinContent(idx+1);
6550 return (y1-y0)*(xVal-x0)/(x1-x0)+y0;
static const Char_t * gFiletypes[]
ClassImp(PMusrCanvasPlotRange) PMusrCanvasPlotRange
Constructor initializing plot range to undefined state.
ClassImpQ(PMusrCanvas) PMusrCanvas
Default constructor initializing canvas to undefined state.
#define PV_FOURIER_REAL_AND_IMAG
Plot view: real and imaginary parts simultaneously.
#define PV_FOURIER_PHASE
Plot view: phase spectrum.
#define PV_FOURIER_PWR
Plot view: power spectrum.
#define P_MENU_ID_FOURIER_PHASE_PLUS
Fourier menu: increment phase.
#define P_MENU_ID_DIFFERENCE
Menu ID for Difference view (data-theory)
#define XTHEO
X-position of theory pad.
#define P_MENU_ID_FOURIER
Menu ID for Fourier submenu.
#define P_MENU_ID_FOURIER_IMAG
Fourier menu: imaginary part.
#define P_MENU_PLOT_OFFSET
Offset for plot-specific menu IDs.
#define P_MENU_ID_AVERAGE
Menu ID for Average view.
#define P_MENU_ID_EXPORT_DATA
Menu ID for Export Data function.
#define P_MENU_ID_DATA
Menu ID for Data view.
#define P_MENU_ID_FOURIER_REAL
Fourier menu: real part.
#define P_MENU_ID_FOURIER_PHASE_MINUS
Fourier menu: decrement phase.
#define P_MENU_ID_FOURIER_REAL_AND_IMAG
Fourier menu: real and imaginary.
#define P_MENU_ID_FOURIER_PWR
Fourier menu: power spectrum.
#define P_MENU_ID_FOURIER_PHASE
Fourier menu: phase spectrum.
std::vector< PMusrCanvasAsciiDump > PMusrCanvasAsciiDumpVector
#define PV_DATA
Plot view: time-domain data.
#define PV_FOURIER_PHASE_OPT_REAL
Plot view: phase-optimized real part.
#define YINFO
Y-position of info/legend pad.
#define PV_FOURIER_REAL
Plot view: real part of Fourier transform.
#define P_MENU_ID_FOURIER_PHASE_OPT_REAL
Fourier menu: phase-optimized real.
#define PV_FOURIER_IMAG
Plot view: imaginary part of Fourier transform.
#define YTITLE
Y-position of title pad.
#define MSR_FITTYPE_ASYM
Fit asymmetry A(t) = (F-αB)/(F+αB)
#define MSR_PLOT_SINGLE_HISTO
Plot single histogram.
#define FOURIER_UNIT_FREQ
Frequency in MHz.
#define FOURIER_PLOT_REAL_AND_IMAG
Plot both real and imaginary components (default)
#define RRF_UNIT_MHz
Frequency in MHz (megahertz)
std::vector< PMsrRunBlock > PMsrRunList
#define FOURIER_UNIT_GAUSS
Magnetic field in Gauss (G)
#define MSR_FITTYPE_SINGLE_HISTO_RRF
Fit single histogram in rotating reference frame.
#define FOURIER_PLOT_NOT_GIVEN
Plot type not specified.
#define FOURIER_PLOT_POWER
Plot power spectrum |F(ω)|²
#define MSR_FITTYPE_SINGLE_HISTO
Fit single histogram (e.g., positron counts vs. time)
#define FOURIER_PLOT_REAL
Plot real component only.
#define FOURIER_PLOT_PHASE_OPT_REAL
Plot phase-optimized real component.
#define MSR_FITTYPE_MU_MINUS
Fit negative muon (μ-) single histogram.
#define MSR_PLOT_ASYM_RRF
Plot asymmetry in rotating reference frame.
std::vector< PMsrLineStructure > PMsrLines
#define MSR_FITTYPE_ASYM_RRF
Fit asymmetry in rotating reference frame.
#define MSR_FITTYPE_NON_MUSR
Fit non-μSR data (general x-y data)
#define MSR_PLOT_SINGLE_HISTO_RRF
Plot single histogram in rotating reference frame.
#define FOURIER_APOD_NONE
No apodization (rectangular window)
#define FOURIER_UNIT_CYCLES
Angular frequency in Mc/s (Mega-cycles per second)
std::vector< PDoublePair > PDoublePairVector
#define MSR_PLOT_ASYM
Plot asymmetry.
std::vector< Int_t > PIntVector
#define MSR_PLOT_MU_MINUS
Plot negative muon (μ-) data.
std::vector< PMsrParamStructure > PMsrParamList
#define MSR_FITTYPE_BNMR
Fit beta-detected NMR asymmetry.
#define RRF_UNIT_Mcs
Angular frequency in Mc/s (Mega-cycles per second)
#define RRF_UNIT_G
Equivalent magnetic field in Gauss (G)
#define FOURIER_PLOT_IMAG
Plot imaginary component only.
#define RRF_UNIT_kHz
Frequency in kHz (kilohertz)
#define MSR_PLOT_BNMR
Plot beta-detected NMR data.
#define RRF_UNIT_T
Equivalent magnetic field in Tesla (T)
#define FOURIER_PLOT_PHASE
Plot phase spectrum arg(F(ω))
#define FOURIER_UNIT_NOT_GIVEN
Units not specified.
#define FOURIER_UNIT_TESLA
Magnetic field in Tesla (T)
#define FOURIER_APOD_NOT_GIVEN
Apodization not specified.
std::vector< TString > PStringVector
std::vector< Double_t > PDoubleVector
#define MSR_PLOT_NON_MUSR
Plot non-μSR data.
virtual TH1F * GetImaginaryFourier(const Double_t scale=1.0)
virtual void Transform(UInt_t apodizationTag=0)
virtual TH1F * GetRealFourier(const Double_t scale=1.0)
virtual TH1F * GetPowerFourier(const Double_t scale=1.0)
static TH1F * GetPhaseOptRealFourier(const TH1F *re, const TH1F *im, std::vector< Double_t > &phase, const Double_t scale=1.0, const Double_t min=-1.0, const Double_t max=-1.0)
virtual TH1F * GetPhaseFourier(const Double_t scale=1.0)
virtual Int_t GetFitType()
MSR file parser and manager for the musrfit framework.
Helper class for managing plot axis ranges.
Bool_t fXRangePresent
Flag: true if X-range explicitly set.
virtual void SetXRange(Double_t xmin, Double_t xmax)
Sets X-axis range and marks it as present.
Double_t fYmin
Minimum Y value.
PMusrCanvasPlotRange()
Default constructor.
virtual Double_t GetXmax()
Returns maximum X value.
Bool_t fYRangePresent
Flag: true if Y-range explicitly set.
Double_t fYmax
Maximum Y value.
virtual Double_t GetYmin()
Returns minimum Y value.
virtual Double_t GetXmin()
Returns minimum X value.
Double_t fXmax
Maximum X value.
virtual Double_t GetYmax()
Returns maximum Y value.
Double_t fXmin
Minimum X value.
virtual void SetYRange(Double_t ymin, Double_t ymax)
Sets Y-axis range and marks it as present.
ROOT-based canvas for interactive visualization of muSR data and fits.
virtual Double_t CalculateDiff(const Double_t x, const Double_t y, TH1F *theo)
virtual Int_t FindBin(const Double_t x, TGraphErrors *graph)
PMsrFourierStructure fFourier
structure holding all the information necessary to perform the Fourier transform
virtual void CleanupFourier()
std::unique_ptr< TTimer > fTimeoutTimer
timeout timer in order to terminate if no action is taking place for too long
Bool_t fValid
if true, everything looks OK
virtual void InitMusrCanvas(const Char_t *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
Int_t fPreviousPlotView
tag showing the previous plot view
std::unique_ptr< TPaveText > fTitlePad
title pad used to display a title
PRunListCollection * fRunList
data handler
virtual void HandleFourier()
PMusrCanvasDataSet fDataAvg
set of all averaged data to be plotted (asymmetry/single histogram)
virtual void Done(Int_t status=0)
ROOT signal emitted when canvas is closed or timeout occurs.
virtual void SaveGraphicsAndQuit(Char_t *fileName, Char_t *graphicsFormat)
Saves canvas to graphics file and emits Done signal.
Bool_t fYRangePresent
flag indicating if x-/y-range is present
PIntVector fMarkerList
list of markers
virtual void CleanupAverage()
virtual void InitDataSet(PMusrCanvasDataSet &dataSet)
virtual void CreateStyle()
virtual void PlotFourierDifference(Bool_t unzoom=false)
virtual void HandleAverage()
std::unique_ptr< TGPopupMenu > fPopupFourier
popup menu of the Musrfit/Fourier sub menu
PDoubleVector fCurrentFourierPhase
holds the current Fourier phase(s)
Bool_t fTheoAsData
flag if true, calculate theory points only at the data points
Int_t fPlotType
plot type tag: -1 == undefined, MSR_PLOT_SINGLE_HISTO == single histogram, MSR_PLOT_ASYM == asymmetry...
Int_t fCurrentPlotView
tag showing what the current plot view is: data, fourier, ...
virtual void HandleDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
virtual void HandleDifferenceFourier()
virtual void CalcPhaseOptReFT()
PMusrCanvas::CalcPhaseOptReFT.
virtual void SetMsrHandler(PMsrHandler *msrHandler)
Sets the MSR file handler for accessing fit parameters and configuration.
virtual Double_t GetMinimum(TH1F *histo, Double_t xmin=-1.0, Double_t xmax=-1.0)
std::unique_ptr< TPad > fDataTheoryPad
data/theory pad used to display the data/theory
std::unique_ptr< TLatex > fRRFLatexText
used to display RRF info
virtual void LastCanvasClosed()
ROOT slot called when this is the last canvas being closed.
virtual Double_t GetMaximum(TH1F *histo, Double_t xmin=-1.0, Double_t xmax=-1.0)
Bool_t fBatchMode
musrview in ROOT batch mode
virtual void CleanupDifference()
std::unique_ptr< TStyle > fStyle
A collection of all graphics attributes.
virtual void HandleDifference()
std::unique_ptr< TLegend > fInfoPad
info pad used to display a legend of the data plotted
std::unique_ptr< TCanvas > fMainCanvas
main canvas
TMultiGraph * fMultiGraphData
fMultiGraphData is a 'global' graph needed in order to plot error graphs (data) with (potentially) di...
PIntVector fColorList
list of colors
PMsrHandler * fMsrHandler
msr-file handler
PMusrCanvas()
Default constructor.
virtual void HandleFourierDifference()
PMusrCanvasDataList fData
list of all histogram data to be plotted (asymmetry/single histogram)
Bool_t fAveragedView
tag showing that the averaged view or normal view should be presented.
std::unique_ptr< TLatex > fCurrentFourierPhaseText
used in Re/Im Fourier to show the current phase in the pad
Double_t fYmax
data/theory frame range
TGPopupMenu * fPopupMain
popup menu Musrfit in the main menu bar
TH1F * fHistoFrame
fHistoFrame is a 'global' frame needed in order to plot histograms with (potentially) different x-fra...
virtual void InitAverage()
virtual void UpdateInfoPad()
Updates info/legend pad with run information.
Int_t fPlotNumber
plot number
Bool_t fStartWithFourier
flag if true, the Fourier transform will be presented bypassing the time domain representation
virtual void InitFourier()
virtual void CleanupFourierDifference()
virtual void PlotDifference(Bool_t unzoom=false)
virtual void HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
ROOT slot handling keyboard commands (e.g., 'f' for Fourier, 'd' for data)
virtual Bool_t IsScaleN0AndBkg()
virtual void SetTimeout(Int_t ival)
Sets timeout in seconds after which Done signal is emitted (0=no timeout)
virtual void IncrementFourierPhase()
virtual Double_t GetInterpolatedValue(TH1F *histo, Double_t xVal)
virtual void PlotData(Bool_t unzoom=false)
std::unique_ptr< TString > fRRFText
RRF information.
TMultiGraph * fMultiGraphDiff
fMultiGraphDiff is a 'global' graph needed in order to plot error graphs (data-theory) with (potentia...
Bool_t fStartWithAvg
flag if true, the averaged data/Fourier will be presented
virtual void CleanupDataSet(PMusrCanvasDataSet &dataSet)
TRootCanvas * fImp
ROOT native GUI version of main window with menubar and drawing area.
virtual void HandleMenuPopup(Int_t id)
ROOT slot handling menu selections.
virtual UInt_t GetNeededAccuracy(PMsrParamStructure param)
virtual void PlotFourier(Bool_t unzoom=false)
std::unique_ptr< TLegend > fMultiGraphLegend
used for non-muSR plots to display a legend
Int_t fTimeout
timeout after which the Done signal should be emited. If timeout <= 0, no timeout is taking place
virtual void ExportData(const Char_t *fileName)
Exports displayed data to ASCII file.
Bool_t fToggleColor
tag showing if a single histo theory is color toggled
virtual void HandleNonMusrDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
virtual void PlotFourierPhaseValue(Bool_t unzoom=false)
std::unique_ptr< TPaveText > fTheoryPad
theory pad used to display the theory and functions
virtual void DecrementFourierPhase()
Bool_t fDifferenceView
tag showing that the shown data, fourier, are the difference between data and theory
virtual void UpdateParamTheoryPad()
Updates parameter and theory display pads with current fit results.
virtual void UpdateDataTheoryPad()
Updates main data/theory plotting pad.
virtual ~PMusrCanvas()
Destructor - cleans up all histograms, graphs, and ROOT objects.
std::unique_ptr< TPaveText > fParameterPad
parameter pad used to display the fitting parameters
virtual void PlotAverage(Bool_t unzoom=false)
Bool_t fScaleN0AndBkg
true=N0 and background is scaled to (1/ns), otherwise (1/bin) for the single histogram case
virtual void WindowClosed()
ROOT slot called when canvas window is closed.
virtual void GetExportDataSet(const TH1F *data, const Double_t xmin, const Double_t xmax, PMusrCanvasAsciiDumpVector &dumpData, const Bool_t hasError=true)
PMusrCanvasNonMusrDataList fNonMusrData
list of all error graphs to be plotted (non-muSR)
virtual const PDoubleVector * GetX()
Returns pointer to x-axis vector (used only for non-μSR data)
virtual Double_t GetTheoryTimeStart()
Returns the start time for theory evaluation in microseconds (μs)
virtual const PDoubleVector * GetValue()
Returns pointer to data value vector (asymmetry, counts, or y-data)
virtual const PDoubleVector * GetTheory()
Returns pointer to theory value vector.
virtual Double_t GetDataTimeStep()
Returns the time bin width for data in microseconds (μs)
virtual Double_t GetTheoryTimeStep()
Returns the time step for theory evaluation in microseconds (μs)
virtual const PDoubleVector * GetError()
Returns pointer to data error vector (statistical uncertainties)
virtual Double_t GetDataTimeStart()
Returns the start time of the data set in microseconds (μs)
virtual const PDoubleVector * GetXTheory()
Returns pointer to x-axis vector for theory (non-μSR only)
Double_t fStep
Step size / error / negative error (context-dependent)
Bool_t fPosErrorPresent
True if positive error explicitly defined (asymmetric errors)
Double_t fValue
Parameter value (initial or fitted)
PIntVector fRuns
list of runs to be plotted
UInt_t fNdf
number of degrees of freedom
TString fDate
string holding fitting date and time
Double_t fMin
chisq or max. likelihood
Bool_t fChisq
flag telling if min = chi2 or min = max.likelihood
PDoubleVector dataErr
error of the y-axis data set
PDoubleVector dataX
x-axis data set
PDoubleVector data
y-axis data set
TH1F * theoryFourierIm
imaginary part of the Fourier transform of the theory histogram
TH1F * theoryFourierPwr
power spectrum of the Fourier transform of the theory histogram
UInt_t diffFourierTag
0=not relevant, 1=d-f (Fourier of difference time spectra), 2=f-d (difference of Fourier spectra)
TH1F * theory
theory histogram belonging to the data histogram
TH1F * dataFourierRe
real part of the Fourier transform of the data histogram
TH1F * diffFourierPhase
phase spectrum of the Fourier transform of the diff histogram
TH1F * dataFourierPhase
phase spectrum of the Fourier transform of the data histogram
TH1F * theoryFourierPhaseOptReal
phase optimized real part spectrum Fourier transform of the theory histogram
TH1F * diff
difference histogram, i.e. data-theory
TH1F * diffFourierPhaseOptReal
phase optimized real part spectrum Fourier transform of the diff histogram
TH1F * dataFourierIm
imaginary part of the Fourier transform of the data histogram
TH1F * data
data histogram
TH1F * diffFourierIm
imaginary part of the Fourier transform of the diff histogram
TH1F * theoryFourierPhase
phase spectrum of the Fourier transform of the theory histogram
TH1F * dataFourierPhaseOptReal
phase optimized real part spectrum Fourier transform of the data histogram
PMusrCanvasPlotRange * dataRange
keep the msr-file plot data range
TH1F * diffFourierPwr
power spectrum of the Fourier transform of the diff histogram
TH1F * dataFourierPwr
power spectrum of the Fourier transform of the data histogram
TH1F * diffFourierRe
real part of the Fourier transform of the diff histogram
TH1F * theoryFourierRe
real part of the Fourier transform of the theory histogram
TGraphErrors * dataFourierPhase
phase spectrum of the Fourier transform of the data error graph
TGraphErrors * theoryFourierRe
real part of the Fourier transform of the theory error graph
TGraphErrors * theoryFourierIm
imaginary part of the Fourier transform of the theory error graph
TGraphErrors * dataFourierRe
real part of the Fourier transform of the data error graph
TGraphErrors * theoryFourierPwr
power spectrum of the Fourier transform of the theory error graph
TGraphErrors * data
data error graph
TGraphErrors * theoryFourierPhase
phase spectrum of the Fourier transform of the theory error graph
UInt_t diffFourierTag
0=not relevant, 1=d-f (Fourier of difference time spectra), 2=f-d (difference of Fourier spectra)
TGraphErrors * diffFourierPhase
phase spectrum of the Fourier transform of the diff error graph
TGraphErrors * diffFourierPwr
power spectrum of the Fourier transform of the diff error graph
PMusrCanvasPlotRange * dataRange
keep the msr-file plot data range
TGraphErrors * diffFourierRe
real part of the Fourier transform of the diff error graph
TGraphErrors * dataFourierIm
imaginary part of the Fourier transform of the data error graph
TGraphErrors * diffFourierIm
imaginary part of the Fourier transform of the diff error graph
TGraphErrors * theory
theory histogram belonging to the data error graph
TGraphErrors * diff
difference error graph, i.e. data-theory
TGraphErrors * dataFourierPwr
power spectrum of the Fourier transform of the data error graph