37#include <TGFileDialog.h>
41#include "PStringUtils.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);
2931 Int_t r = (Int_t)rand.Integer(255);
2932 Int_t g = (Int_t)rand.Integer(255);
2933 Int_t b = (Int_t)rand.Integer(255);
2934 Int_t color = TColor::GetColor(r, g, b);
2935 dataHisto->SetMarkerColor(color);
2936 dataHisto->SetLineColor(color);
2939 dataHisto->SetMarkerSize(1);
2944 TRandom rand(plotNo);
2945 dataHisto->SetMarkerStyle(20+(Int_t)rand.Integer(10));
2950 name = *
fMsrHandler->GetMsrRunList()->at(runNo).GetRunName() +
"_TheoRunNo";
2951 name += (Int_t)runNo;
2960 start =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0);
2962 start =
fMsrHandler->GetMsrGlobal()->GetFitRange(0);
2964 end =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1);
2966 end =
fMsrHandler->GetMsrGlobal()->GetFitRange(1);
2987 theoHisto =
new TH1F(name, name, size, start, end);
2995 Double_t startFitRange =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0);
2997 startFitRange =
fMsrHandler->GetMsrGlobal()->GetFitRange(0);
3002 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin theory < 0 for 'use_fit_range', will set it to 0" << std::endl << std::endl;
3003 }
else if (dval >= (Double_t)data->
GetTheory()->size()) {
3004 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin theory=" << (UInt_t)dval <<
" >= theory vector size=" << data->
GetTheory()->size() <<
" for 'use_fit_range',";
3005 std::cerr << std::endl <<
">> will set it to theory vector size" << std::endl << std::endl;
3008 startBin = (UInt_t)dval;
3011 Double_t endFitRange =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1);
3013 endFitRange =
fMsrHandler->GetMsrGlobal()->GetFitRange(1);
3018 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin theory < 0 for 'use_fit_range', will set it to 0" << std::endl << std::endl;
3019 }
else if (dval >= (Double_t)data->
GetTheory()->size()) {
3020 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin theory=" << (UInt_t)dval <<
" >= theory vector size=" << data->
GetTheory()->size() <<
" for 'use_fit_range',";
3021 std::cerr << std::endl <<
">> will set it to theory vector size" << std::endl << std::endl;
3024 endBin = (UInt_t)dval;
3036 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin theory < 0 for 'sub_ranges', will set it to 0" << std::endl << std::endl;
3037 }
else if (dval >= (Double_t)data->
GetTheory()->size()) {
3038 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found startBin theory=" << (UInt_t)dval <<
" >= theory vector size=" << data->
GetTheory()->size() <<
" for 'sub_ranges',";
3039 std::cerr << std::endl <<
">> will set it to theory vector size" << std::endl << std::endl;
3042 startBin = (UInt_t)dval;
3048 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin theory < 0 for 'sub_ranges', will set it to 0" << std::endl << std::endl;
3049 }
else if (dval >= (Double_t)data->
GetTheory()->size()) {
3050 std::cerr << std::endl <<
">> PMusrCanvas::HandleDataSet(): **WARNING** found endBin theory=" << (UInt_t)dval <<
" >= theory vector size=" << data->
GetTheory()->size() <<
" for 'sub_ranges',";
3051 std::cerr << std::endl <<
">> will set it to theory vector size" << std::endl << std::endl;
3054 endBin = (UInt_t)dval;
3058 for (UInt_t i=startBin; i<endBin; i++) {
3059 theoHisto->SetBinContent(i-startBin+1, data->
GetTheory()->at(i));
3066 TRandom rand(plotNo);
3070 Int_t r = (Int_t)rand.Integer(255);
3071 Int_t g = (Int_t)rand.Integer(255);
3072 Int_t b = (Int_t)rand.Integer(255);
3073 Int_t color = TColor::GetColor(r, g, b);
3074 theoHisto->SetLineColor(color);
3078 dataSet.
data = dataHisto;
3079 dataSet.
theory = theoHisto;
3082 fData.push_back(dataSet);
3098 TGraphErrors *dataHisto;
3099 TGraphErrors *theoHisto;
3109 dataHisto =
new TGraphErrors(data->
GetX()->size());
3112 for (UInt_t i=0; i<data->
GetX()->size(); i++) {
3113 dataHisto->SetPoint(i, data->
GetX()->at(i), data->
GetValue()->at(i));
3114 dataHisto->SetPointError(i, 0.0, data->
GetError()->at(i));
3119 dataHisto->SetMarkerColor(
fColorList[plotNo]);
3122 TRandom rand(plotNo);
3126 Int_t r = (Int_t)rand.Integer(255);
3127 Int_t g = (Int_t)rand.Integer(255);
3128 Int_t b = (Int_t)rand.Integer(255);
3129 Int_t color = TColor::GetColor(r, g, b);
3130 dataHisto->SetMarkerColor(color);
3131 dataHisto->SetLineColor(color);
3134 dataHisto->SetMarkerSize(1);
3139 TRandom rand(plotNo);
3140 dataHisto->SetMarkerStyle(20+(Int_t)rand.Integer(10));
3146 theoHisto =
new TGraphErrors(data->
GetXTheory()->size());
3149 for (UInt_t i=0; i<data->
GetXTheory()->size(); i++) {
3151 theoHisto->SetPointError(i, 0.0, 0.0);
3158 TRandom rand(plotNo);
3162 Int_t r = (Int_t)rand.Integer(255);
3163 Int_t g = (Int_t)rand.Integer(255);
3164 Int_t b = (Int_t)rand.Integer(255);
3165 Int_t color = TColor::GetColor(r, g, b);
3166 theoHisto->SetLineColor(color);
3170 dataSet.
data = dataHisto;
3171 dataSet.
theory = theoHisto;
3175 Double_t xmin=0.0, xmax=0.0, ymin=0.0, ymax=0.0, x=0.0, y=0.0;
3179 dataSet.
data->GetPoint(0, xmin, y);
3180 dataSet.
data->GetPoint(dataSet.
data->GetN()-1, xmax, y);
3181 dataSet.
data->GetPoint(0, x, y);
3184 for (Int_t i=1; i<dataSet.
data->GetN(); i++) {
3185 dataSet.
data->GetPoint(i, x, y);
3191 Double_t dx = 0.025*(xmax-xmin);
3192 Double_t dy = 0.025*(ymax-ymin);
3214 xmin =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0);
3215 xmax =
fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1);
3277 for (UInt_t i=0; i<
fData.size(); i++) {
3279 name = TString(
fData[i].data->GetTitle()) +
"_diff";
3280 diffHisto =
new TH1F(name, name,
fData[i].data->GetNbinsX(),
3281 fData[i].data->GetXaxis()->GetXmin(),
3282 fData[i].data->GetXaxis()->GetXmax());
3285 diffHisto->SetMarkerColor(
fData[i].data->GetMarkerColor());
3286 diffHisto->SetLineColor(
fData[i].data->GetLineColor());
3288 diffHisto->SetMarkerSize(
fData[i].data->GetMarkerSize());
3290 diffHisto->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
3293 fData[i].diff = diffHisto;
3296 for (Int_t j=1; j<
fData[i].data->GetNbinsX()-1; j++) {
3299 fData[i].data->GetBinContent(j),
3301 fData[i].diff->SetBinContent(j, value);
3303 value =
fData[i].data->GetBinError(j);
3304 fData[i].diff->SetBinError(j, value);
3308 TGraphErrors *diffHisto;
3316 diffHisto =
new TGraphErrors(
fNonMusrData[i].data->GetN());
3319 name = TString(
fNonMusrData[i].data->GetTitle()) +
"_diff";
3320 diffHisto->SetNameTitle(name.Data(), name.Data());
3323 diffHisto->SetMarkerColor(
fNonMusrData[i].data->GetMarkerColor());
3324 diffHisto->SetLineColor(
fNonMusrData[i].data->GetLineColor());
3326 diffHisto->SetMarkerSize(
fNonMusrData[i].data->GetMarkerSize());
3328 diffHisto->SetMarkerStyle(
fNonMusrData[i].data->GetMarkerStyle());
3365 if (
fData[0].dataFourierRe ==
nullptr) {
3367 double startTime =
fXmin;
3368 double endTime =
fXmax;
3375 for (UInt_t i=0; i<
fData.size(); i++) {
3379 std::cerr << std::endl <<
">> PMusrCanvas::HandleFourier(): **SEVERE ERROR** couldn't invoke PFourier to calculate the Fourier data ..." << std::endl;
3384 scale = sqrt(
fData[0].data->GetBinWidth(1)/(endTime-startTime));
3395 fData[i].dataFourierRe->SetMarkerColor(
fData[i].data->GetMarkerColor());
3396 fData[i].dataFourierRe->SetLineColor(
fData[i].data->GetLineColor());
3397 fData[i].dataFourierIm->SetMarkerColor(
fData[i].data->GetMarkerColor());
3398 fData[i].dataFourierIm->SetLineColor(
fData[i].data->GetLineColor());
3399 fData[i].dataFourierPwr->SetMarkerColor(
fData[i].data->GetMarkerColor());
3400 fData[i].dataFourierPwr->SetLineColor(
fData[i].data->GetLineColor());
3401 fData[i].dataFourierPhase->SetMarkerColor(
fData[i].data->GetMarkerColor());
3402 fData[i].dataFourierPhase->SetLineColor(
fData[i].data->GetLineColor());
3405 fData[i].dataFourierRe->SetMarkerSize(1);
3406 fData[i].dataFourierIm->SetMarkerSize(1);
3407 fData[i].dataFourierPwr->SetMarkerSize(1);
3408 fData[i].dataFourierPhase->SetMarkerSize(1);
3411 fData[i].dataFourierRe->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
3412 fData[i].dataFourierIm->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
3413 fData[i].dataFourierPwr->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
3414 fData[i].dataFourierPhase->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
3421 Int_t powerPad =
fFourier.fFourierPower+5;
3424 if (!fourierTheory->
IsValid()) {
3425 std::cerr << std::endl <<
">> PMusrCanvas::HandleFourier(): **SEVERE ERROR** couldn't invoke PFourier to calculate the Fourier theory ..." << std::endl;
3429 scale = sqrt(
fData[0].theory->GetBinWidth(1)/(endTime-startTime)*
fData[0].theory->GetBinWidth(1)/
fData[0].data->GetBinWidth(1));
3440 delete fourierTheory;
3443 fData[i].theoryFourierRe->SetLineColor(
fData[i].theory->GetLineColor());
3444 fData[i].theoryFourierIm->SetLineColor(
fData[i].theory->GetLineColor());
3445 fData[i].theoryFourierPwr->SetLineColor(
fData[i].theory->GetLineColor());
3446 fData[i].theoryFourierPhase->SetLineColor(
fData[i].theory->GetLineColor());
3455 if (
fFourier.fPhase.size() != 0.0) {
3461 for (UInt_t i=0; i<
fData.size(); i++) {
3463 cp = TMath::Cos(
fFourier.fPhase[0]/180.0*TMath::Pi());
3464 sp = TMath::Sin(
fFourier.fPhase[0]/180.0*TMath::Pi());
3466 cp = TMath::Cos(
fFourier.fPhase[i]/180.0*TMath::Pi());
3467 sp = TMath::Sin(
fFourier.fPhase[i]/180.0*TMath::Pi());
3469 if ((
fData[i].dataFourierRe !=
nullptr) && (
fData[i].dataFourierIm !=
nullptr)) {
3470 for (Int_t j=0; j<
fData[i].dataFourierRe->GetNbinsX(); j++) {
3472 re =
fData[i].dataFourierRe->GetBinContent(j) * cp +
fData[i].dataFourierIm->GetBinContent(j) * sp;
3473 im =
fData[i].dataFourierIm->GetBinContent(j) * cp -
fData[i].dataFourierRe->GetBinContent(j) * sp;
3475 fData[i].dataFourierRe->SetBinContent(j, re);
3476 fData[i].dataFourierIm->SetBinContent(j, im);
3479 if ((
fData[i].theoryFourierRe !=
nullptr) && (
fData[i].theoryFourierIm !=
nullptr)) {
3480 for (Int_t j=0; j<
fData[i].theoryFourierRe->GetNbinsX(); j++) {
3482 re =
fData[i].theoryFourierRe->GetBinContent(j) * cp +
fData[i].theoryFourierIm->GetBinContent(j) * sp;
3483 im =
fData[i].theoryFourierIm->GetBinContent(j) * cp -
fData[i].theoryFourierRe->GetBinContent(j) * sp;
3485 fData[i].theoryFourierRe->SetBinContent(j, re);
3486 fData[i].theoryFourierIm->SetBinContent(j, im);
3509 if (
fData[0].diffFourierRe ==
nullptr) {
3511 if (
fData[0].diff ==
nullptr)
3517 double startTime =
fHistoFrame->GetBinCenter(bin);
3521 for (UInt_t i=0; i<
fData.size(); i++) {
3525 std::cerr << std::endl <<
">> PMusrCanvas::HandleFourier(): **SEVERE ERROR** couldn't invoke PFourier to calculate the Fourier diff ..." << std::endl;
3530 scale = sqrt(
fData[0].diff->GetBinWidth(1)/(endTime-startTime));
3541 fData[i].diffFourierRe->SetMarkerColor(
fData[i].diff->GetMarkerColor());
3542 fData[i].diffFourierRe->SetLineColor(
fData[i].diff->GetLineColor());
3543 fData[i].diffFourierIm->SetMarkerColor(
fData[i].diff->GetMarkerColor());
3544 fData[i].diffFourierIm->SetLineColor(
fData[i].diff->GetLineColor());
3545 fData[i].diffFourierPwr->SetMarkerColor(
fData[i].diff->GetMarkerColor());
3546 fData[i].diffFourierPwr->SetLineColor(
fData[i].diff->GetLineColor());
3547 fData[i].diffFourierPhase->SetMarkerColor(
fData[i].diff->GetMarkerColor());
3548 fData[i].diffFourierPhase->SetLineColor(
fData[i].diff->GetLineColor());
3551 fData[i].diffFourierRe->SetMarkerSize(1);
3552 fData[i].diffFourierIm->SetMarkerSize(1);
3553 fData[i].diffFourierPwr->SetMarkerSize(1);
3554 fData[i].diffFourierPhase->SetMarkerSize(1);
3556 fData[i].diffFourierRe->SetMarkerStyle(
fData[i].diff->GetMarkerStyle());
3557 fData[i].diffFourierIm->SetMarkerStyle(
fData[i].diff->GetMarkerStyle());
3558 fData[i].diffFourierPwr->SetMarkerStyle(
fData[i].diff->GetMarkerStyle());
3559 fData[i].diffFourierPhase->SetMarkerStyle(
fData[i].diff->GetMarkerStyle());
3562 fData[i].diffFourierTag = 1;
3566 if (
fFourier.fPhase.size() != 0.0) {
3573 for (UInt_t i=0; i<
fData.size(); i++) {
3574 if ((
fData[i].diffFourierRe !=
nullptr) && (
fData[i].diffFourierIm !=
nullptr)) {
3576 cp = TMath::Cos(
fFourier.fPhase[0]/180.0*TMath::Pi());
3577 sp = TMath::Sin(
fFourier.fPhase[0]/180.0*TMath::Pi());
3579 cp = TMath::Cos(
fFourier.fPhase[i]/180.0*TMath::Pi());
3580 sp = TMath::Sin(
fFourier.fPhase[i]/180.0*TMath::Pi());
3582 for (Int_t j=0; j<
fData[i].diffFourierRe->GetNbinsX(); j++) {
3584 re =
fData[i].diffFourierRe->GetBinContent(j) * cp +
fData[i].diffFourierIm->GetBinContent(j) * sp;
3585 im =
fData[i].diffFourierIm->GetBinContent(j) * cp -
fData[i].diffFourierRe->GetBinContent(j) * sp;
3587 fData[i].diffFourierRe->SetBinContent(j, re);
3588 fData[i].diffFourierIm->SetBinContent(j, im);
3611 if (
fData[0].diffFourierRe ==
nullptr) {
3613 Double_t dval, dvalx;
3616 for (UInt_t i=0; i<
fData.size(); i++) {
3619 name = TString(
fData[i].dataFourierRe->GetTitle()) +
"_diff";
3620 fData[i].diffFourierRe =
new TH1F(name, name,
fData[i].dataFourierRe->GetNbinsX(),
3621 fData[i].dataFourierRe->GetXaxis()->GetXmin(),
3622 fData[i].dataFourierRe->GetXaxis()->GetXmax());
3625 name = TString(
fData[i].dataFourierIm->GetTitle()) +
"_diff";
3626 fData[i].diffFourierIm =
new TH1F(name, name,
fData[i].dataFourierIm->GetNbinsX(),
3627 fData[i].dataFourierIm->GetXaxis()->GetXmin(),
3628 fData[i].dataFourierIm->GetXaxis()->GetXmax());
3630 name = TString(
fData[i].dataFourierPwr->GetTitle()) +
"_diff";
3631 fData[i].diffFourierPwr =
new TH1F(name, name,
fData[i].dataFourierPwr->GetNbinsX(),
3632 fData[i].dataFourierPwr->GetXaxis()->GetXmin(),
3633 fData[i].dataFourierPwr->GetXaxis()->GetXmax());
3635 name = TString(
fData[i].dataFourierPhase->GetTitle()) +
"_diff";
3636 fData[i].diffFourierPhase =
new TH1F(name, name,
fData[i].dataFourierPhase->GetNbinsX(),
3637 fData[i].dataFourierPhase->GetXaxis()->GetXmin(),
3638 fData[i].dataFourierPhase->GetXaxis()->GetXmax());
3641 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
3642 name = TString(
fData[i].dataFourierPhaseOptReal->GetTitle()) +
"_diff";
3643 fData[i].diffFourierPhaseOptReal =
new TH1F(name, name,
fData[i].dataFourierPhaseOptReal->GetNbinsX(),
3644 fData[i].dataFourierPhaseOptReal->GetXaxis()->GetXmin(),
3645 fData[i].dataFourierPhaseOptReal->GetXaxis()->GetXmax());
3649 for (UInt_t j=1; j<
fData[i].dataFourierRe->GetEntries(); j++) {
3650 dvalx =
fData[i].dataFourierRe->GetXaxis()->GetBinCenter(j);
3651 theoBin =
fData[i].theoryFourierRe->FindBin(dvalx);
3652 dval =
fData[i].dataFourierRe->GetBinContent(j) -
fData[i].theoryFourierRe->GetBinContent(theoBin);
3653 fData[i].diffFourierRe->SetBinContent(j, dval);
3654 dvalx =
fData[i].dataFourierIm->GetXaxis()->GetBinCenter(j);
3655 theoBin =
fData[i].theoryFourierIm->FindBin(dvalx);
3656 dval =
fData[i].dataFourierIm->GetBinContent(j) -
fData[i].theoryFourierIm->GetBinContent(theoBin);
3657 fData[i].diffFourierIm->SetBinContent(j, dval);
3658 dvalx =
fData[i].dataFourierPwr->GetXaxis()->GetBinCenter(j);
3659 theoBin =
fData[i].theoryFourierPwr->FindBin(dvalx);
3660 dval =
fData[i].dataFourierPwr->GetBinContent(j) -
fData[i].theoryFourierPwr->GetBinContent(theoBin);
3661 fData[i].diffFourierPwr->SetBinContent(j, dval);
3662 dvalx =
fData[i].dataFourierPhase->GetXaxis()->GetBinCenter(j);
3663 theoBin =
fData[i].theoryFourierPhase->FindBin(dvalx);
3664 dval =
fData[i].dataFourierPhase->GetBinContent(j) -
fData[i].theoryFourierPhase->GetBinContent(theoBin);
3665 fData[i].diffFourierPhase->SetBinContent(j, dval);
3666 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
3667 dvalx =
fData[i].dataFourierPhaseOptReal->GetXaxis()->GetBinCenter(j);
3668 theoBin =
fData[i].theoryFourierPhaseOptReal->FindBin(dvalx);
3669 dval =
fData[i].dataFourierPhaseOptReal->GetBinContent(j) -
fData[i].theoryFourierPhaseOptReal->GetBinContent(theoBin);
3670 fData[i].diffFourierPhaseOptReal->SetBinContent(j, dval);
3675 for (UInt_t i=0; i<
fData.size(); i++) {
3677 fData[i].diffFourierRe->SetMarkerColor(
fData[i].dataFourierRe->GetMarkerColor());
3678 fData[i].diffFourierRe->SetLineColor(
fData[i].dataFourierRe->GetLineColor());
3679 fData[i].diffFourierIm->SetMarkerColor(
fData[i].dataFourierIm->GetMarkerColor());
3680 fData[i].diffFourierIm->SetLineColor(
fData[i].dataFourierIm->GetLineColor());
3681 fData[i].diffFourierPwr->SetMarkerColor(
fData[i].dataFourierPwr->GetMarkerColor());
3682 fData[i].diffFourierPwr->SetLineColor(
fData[i].dataFourierPwr->GetLineColor());
3683 fData[i].diffFourierPhase->SetMarkerColor(
fData[i].dataFourierPhase->GetMarkerColor());
3684 fData[i].diffFourierPhase->SetLineColor(
fData[i].dataFourierPhase->GetLineColor());
3685 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
3686 fData[i].diffFourierPhaseOptReal->SetMarkerColor(
fData[i].dataFourierPhaseOptReal->GetMarkerColor());
3687 fData[i].diffFourierPhaseOptReal->SetLineColor(
fData[i].dataFourierPhaseOptReal->GetLineColor());
3691 fData[i].diffFourierRe->SetMarkerSize(1);
3692 fData[i].diffFourierIm->SetMarkerSize(1);
3693 fData[i].diffFourierPwr->SetMarkerSize(1);
3694 fData[i].diffFourierPhase->SetMarkerSize(1);
3695 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
3696 fData[i].diffFourierPhaseOptReal->SetMarkerSize(1);
3699 fData[i].diffFourierRe->SetMarkerStyle(
fData[i].dataFourierRe->GetMarkerStyle());
3700 fData[i].diffFourierIm->SetMarkerStyle(
fData[i].dataFourierIm->GetMarkerStyle());
3701 fData[i].diffFourierPwr->SetMarkerStyle(
fData[i].dataFourierPwr->GetMarkerStyle());
3702 fData[i].diffFourierPhase->SetMarkerStyle(
fData[i].dataFourierPhase->GetMarkerStyle());
3703 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
3704 fData[i].diffFourierPhaseOptReal->SetMarkerStyle(
fData[i].dataFourierPhaseOptReal->GetMarkerStyle());
3708 fData[i].diffFourierTag = 2;
3734 if (
fData[0].data !=
nullptr) {
3735 name = TString(
fData[0].data->GetTitle()) +
"_avg";
3736 fDataAvg.data =
new TH1F(name, name,
fData[0].data->GetNbinsX(),
3737 fData[0].data->GetXaxis()->GetXmin(),
3738 fData[0].data->GetXaxis()->GetXmax());
3740 if (
fData[0].dataFourierRe !=
nullptr) {
3741 name = TString(
fData[0].dataFourierRe->GetTitle()) +
"_avg";
3742 fDataAvg.dataFourierRe =
new TH1F(name, name,
fData[0].dataFourierRe->GetNbinsX(),
3743 fData[0].dataFourierRe->GetXaxis()->GetXmin(),
3744 fData[0].dataFourierRe->GetXaxis()->GetXmax());
3746 if (
fData[0].dataFourierIm !=
nullptr) {
3747 name = TString(
fData[0].dataFourierIm->GetTitle()) +
"_avg";
3748 fDataAvg.dataFourierIm =
new TH1F(name, name,
fData[0].dataFourierIm->GetNbinsX(),
3749 fData[0].dataFourierIm->GetXaxis()->GetXmin(),
3750 fData[0].dataFourierIm->GetXaxis()->GetXmax());
3752 if (
fData[0].dataFourierPwr !=
nullptr) {
3753 name = TString(
fData[0].dataFourierPwr->GetTitle()) +
"_avg";
3754 fDataAvg.dataFourierPwr =
new TH1F(name, name,
fData[0].dataFourierPwr->GetNbinsX(),
3755 fData[0].dataFourierPwr->GetXaxis()->GetXmin(),
3756 fData[0].dataFourierPwr->GetXaxis()->GetXmax());
3758 if (
fData[0].dataFourierPhase !=
nullptr) {
3759 name = TString(
fData[0].dataFourierPhase->GetTitle()) +
"_avg";
3760 fDataAvg.dataFourierPhase =
new TH1F(name, name,
fData[0].dataFourierPhase->GetNbinsX(),
3761 fData[0].dataFourierPhase->GetXaxis()->GetXmin(),
3762 fData[0].dataFourierPhase->GetXaxis()->GetXmax());
3764 if (
fData[0].dataFourierPhaseOptReal !=
nullptr) {
3765 name = TString(
fData[0].dataFourierPhaseOptReal->GetTitle()) +
"_avg";
3766 fDataAvg.dataFourierPhaseOptReal =
new TH1F(name, name,
fData[0].dataFourierPhaseOptReal->GetNbinsX(),
3767 fData[0].dataFourierPhaseOptReal->GetXaxis()->GetXmin(),
3768 fData[0].dataFourierPhaseOptReal->GetXaxis()->GetXmax());
3770 if (
fData[0].theory !=
nullptr) {
3771 name = TString(
fData[0].theory->GetTitle()) +
"_avg";
3772 fDataAvg.theory =
new TH1F(name, name,
fData[0].theory->GetNbinsX(),
3773 fData[0].theory->GetXaxis()->GetXmin(),
3774 fData[0].theory->GetXaxis()->GetXmax());
3776 if (
fData[0].theoryFourierRe !=
nullptr) {
3777 name = TString(
fData[0].theoryFourierRe->GetTitle()) +
"_avg";
3778 fDataAvg.theoryFourierRe =
new TH1F(name, name,
fData[0].theoryFourierRe->GetNbinsX(),
3779 fData[0].theoryFourierRe->GetXaxis()->GetXmin(),
3780 fData[0].theoryFourierRe->GetXaxis()->GetXmax());
3782 if (
fData[0].theoryFourierIm !=
nullptr) {
3783 name = TString(
fData[0].theoryFourierIm->GetTitle()) +
"_avg";
3784 fDataAvg.theoryFourierIm =
new TH1F(name, name,
fData[0].theoryFourierIm->GetNbinsX(),
3785 fData[0].theoryFourierIm->GetXaxis()->GetXmin(),
3786 fData[0].theoryFourierIm->GetXaxis()->GetXmax());
3788 if (
fData[0].theoryFourierPwr !=
nullptr) {
3789 name = TString(
fData[0].theoryFourierPwr->GetTitle()) +
"_avg";
3790 fDataAvg.theoryFourierPwr =
new TH1F(name, name,
fData[0].theoryFourierPwr->GetNbinsX(),
3791 fData[0].theoryFourierPwr->GetXaxis()->GetXmin(),
3792 fData[0].theoryFourierPwr->GetXaxis()->GetXmax());
3794 if (
fData[0].theoryFourierPhase !=
nullptr) {
3795 name = TString(
fData[0].theoryFourierPhase->GetTitle()) +
"_avg";
3796 fDataAvg.theoryFourierPhase =
new TH1F(name, name,
fData[0].theoryFourierPhase->GetNbinsX(),
3797 fData[0].theoryFourierPhase->GetXaxis()->GetXmin(),
3798 fData[0].theoryFourierPhase->GetXaxis()->GetXmax());
3800 if (
fData[0].theoryFourierPhaseOptReal !=
nullptr) {
3801 name = TString(
fData[0].theoryFourierPhaseOptReal->GetTitle()) +
"_avg";
3802 fDataAvg.theoryFourierPhaseOptReal =
new TH1F(name, name,
fData[0].theoryFourierPhaseOptReal->GetNbinsX(),
3803 fData[0].theoryFourierPhaseOptReal->GetXaxis()->GetXmin(),
3804 fData[0].theoryFourierPhaseOptReal->GetXaxis()->GetXmax());
3806 if (
fData[0].diff !=
nullptr) {
3807 name = TString(
fData[0].diff->GetTitle()) +
"_avg";
3808 fDataAvg.diff =
new TH1F(name, name,
fData[0].diff->GetNbinsX(),
3809 fData[0].diff->GetXaxis()->GetXmin(),
3810 fData[0].diff->GetXaxis()->GetXmax());
3812 if (
fData[0].diffFourierRe !=
nullptr) {
3813 name = TString(
fData[0].diffFourierRe->GetTitle()) +
"_avg";
3814 fDataAvg.diffFourierRe =
new TH1F(name, name,
fData[0].diffFourierRe->GetNbinsX(),
3815 fData[0].diffFourierRe->GetXaxis()->GetXmin(),
3816 fData[0].diffFourierRe->GetXaxis()->GetXmax());
3818 if (
fData[0].diffFourierIm !=
nullptr) {
3819 name = TString(
fData[0].diffFourierIm->GetTitle()) +
"_avg";
3820 fDataAvg.diffFourierIm =
new TH1F(name, name,
fData[0].diffFourierIm->GetNbinsX(),
3821 fData[0].diffFourierIm->GetXaxis()->GetXmin(),
3822 fData[0].diffFourierIm->GetXaxis()->GetXmax());
3824 if (
fData[0].diffFourierPwr !=
nullptr) {
3825 name = TString(
fData[0].diffFourierPwr->GetTitle()) +
"_avg";
3826 fDataAvg.diffFourierPwr =
new TH1F(name, name,
fData[0].diffFourierPwr->GetNbinsX(),
3827 fData[0].diffFourierPwr->GetXaxis()->GetXmin(),
3828 fData[0].diffFourierPwr->GetXaxis()->GetXmax());
3830 if (
fData[0].diffFourierPhase !=
nullptr) {
3831 name = TString(
fData[0].diffFourierPhase->GetTitle()) +
"_avg";
3832 fDataAvg.diffFourierPhase =
new TH1F(name, name,
fData[0].diffFourierPhase->GetNbinsX(),
3833 fData[0].diffFourierPhase->GetXaxis()->GetXmin(),
3834 fData[0].diffFourierPhase->GetXaxis()->GetXmax());
3836 if (
fData[0].diffFourierPhaseOptReal !=
nullptr) {
3837 name = TString(
fData[0].diffFourierPhaseOptReal->GetTitle()) +
"_avg";
3838 fDataAvg.diffFourierPhaseOptReal =
new TH1F(name, name,
fData[0].diffFourierPhaseOptReal->GetNbinsX(),
3839 fData[0].diffFourierPhaseOptReal->GetXaxis()->GetXmin(),
3840 fData[0].diffFourierPhaseOptReal->GetXaxis()->GetXmax());
3846 for (Int_t i=0; i<
fData[0].data->GetNbinsX(); i++) {
3848 for (UInt_t j=0; j<
fData.size(); j++) {
3854 fDataAvg.data->SetMarkerColor(
fData[0].data->GetMarkerColor());
3856 fDataAvg.data->SetMarkerSize(
fData[0].data->GetMarkerSize());
3857 fDataAvg.data->SetMarkerStyle(
fData[0].data->GetMarkerStyle());
3859 if (
fDataAvg.dataFourierRe !=
nullptr) {
3860 for (Int_t i=0; i<
fData[0].dataFourierRe->GetNbinsX(); i++) {
3862 for (UInt_t j=0; j<
fData.size(); j++) {
3865 fDataAvg.dataFourierRe->SetBinContent(i, dval/
fData.size());
3868 fDataAvg.dataFourierRe->SetMarkerColor(
fData[0].dataFourierRe->GetMarkerColor());
3869 fDataAvg.dataFourierRe->SetLineColor(
fData[0].dataFourierRe->GetLineColor());
3870 fDataAvg.dataFourierRe->SetMarkerSize(
fData[0].dataFourierRe->GetMarkerSize());
3871 fDataAvg.dataFourierRe->SetMarkerStyle(
fData[0].dataFourierRe->GetMarkerStyle());
3873 if (
fDataAvg.dataFourierIm !=
nullptr) {
3874 for (Int_t i=0; i<
fData[0].dataFourierIm->GetNbinsX(); i++) {
3876 for (UInt_t j=0; j<
fData.size(); j++) {
3879 fDataAvg.dataFourierIm->SetBinContent(i, dval/
fData.size());
3882 fDataAvg.dataFourierIm->SetMarkerColor(
fData[0].dataFourierIm->GetMarkerColor());
3883 fDataAvg.dataFourierIm->SetLineColor(
fData[0].dataFourierIm->GetLineColor());
3884 fDataAvg.dataFourierIm->SetMarkerSize(
fData[0].dataFourierIm->GetMarkerSize());
3885 fDataAvg.dataFourierIm->SetMarkerStyle(
fData[0].dataFourierIm->GetMarkerStyle());
3887 if (
fDataAvg.dataFourierPwr !=
nullptr) {
3888 for (Int_t i=0; i<
fData[0].dataFourierPwr->GetNbinsX(); i++) {
3890 for (UInt_t j=0; j<
fData.size(); j++) {
3893 fDataAvg.dataFourierPwr->SetBinContent(i, dval/
fData.size());
3896 fDataAvg.dataFourierPwr->SetMarkerColor(
fData[0].dataFourierPwr->GetMarkerColor());
3897 fDataAvg.dataFourierPwr->SetLineColor(
fData[0].dataFourierPwr->GetLineColor());
3898 fDataAvg.dataFourierPwr->SetMarkerSize(
fData[0].dataFourierPwr->GetMarkerSize());
3899 fDataAvg.dataFourierPwr->SetMarkerStyle(
fData[0].dataFourierPwr->GetMarkerStyle());
3901 if (
fDataAvg.dataFourierPhase !=
nullptr) {
3902 for (Int_t i=0; i<
fData[0].dataFourierPhase->GetNbinsX(); i++) {
3904 for (UInt_t j=0; j<
fData.size(); j++) {
3907 fDataAvg.dataFourierPhase->SetBinContent(i, dval/
fData.size());
3910 fDataAvg.dataFourierPhase->SetMarkerColor(
fData[0].dataFourierPhase->GetMarkerColor());
3911 fDataAvg.dataFourierPhase->SetLineColor(
fData[0].dataFourierPhase->GetLineColor());
3912 fDataAvg.dataFourierPhase->SetMarkerSize(
fData[0].dataFourierPhase->GetMarkerSize());
3913 fDataAvg.dataFourierPhase->SetMarkerStyle(
fData[0].dataFourierPhase->GetMarkerStyle());
3915 if (
fDataAvg.dataFourierPhaseOptReal !=
nullptr) {
3916 for (Int_t i=0; i<
fData[0].dataFourierPhaseOptReal->GetNbinsX(); i++) {
3918 for (UInt_t j=0; j<
fData.size(); j++) {
3921 fDataAvg.dataFourierPhaseOptReal->SetBinContent(i, dval/
fData.size());
3924 fDataAvg.dataFourierPhaseOptReal->SetMarkerColor(
fData[0].dataFourierPhaseOptReal->GetMarkerColor());
3925 fDataAvg.dataFourierPhaseOptReal->SetLineColor(
fData[0].dataFourierPhaseOptReal->GetLineColor());
3926 fDataAvg.dataFourierPhaseOptReal->SetMarkerSize(
fData[0].dataFourierPhaseOptReal->GetMarkerSize());
3927 fDataAvg.dataFourierPhaseOptReal->SetMarkerStyle(
fData[0].dataFourierPhaseOptReal->GetMarkerStyle());
3930 for (Int_t i=0; i<
fData[0].theory->GetNbinsX(); i++) {
3932 for (UInt_t j=0; j<
fData.size(); j++) {
3937 fDataAvg.theory->SetLineColor(
fData[0].theory->GetLineColor());
3939 if (
fDataAvg.theoryFourierRe !=
nullptr) {
3940 for (Int_t i=0; i<
fData[0].theoryFourierRe->GetNbinsX(); i++) {
3942 for (UInt_t j=0; j<
fData.size(); j++) {
3945 fDataAvg.theoryFourierRe->SetBinContent(i, dval/
fData.size());
3948 fDataAvg.theoryFourierRe->SetMarkerColor(
fData[0].theoryFourierRe->GetMarkerColor());
3949 fDataAvg.theoryFourierRe->SetLineColor(
fData[0].theoryFourierRe->GetLineColor());
3950 fDataAvg.theoryFourierRe->SetMarkerSize(
fData[0].theoryFourierRe->GetMarkerSize());
3951 fDataAvg.theoryFourierRe->SetMarkerStyle(
fData[0].theoryFourierRe->GetMarkerStyle());
3953 if (
fDataAvg.theoryFourierIm !=
nullptr) {
3954 for (Int_t i=0; i<
fData[0].theoryFourierIm->GetNbinsX(); i++) {
3956 for (UInt_t j=0; j<
fData.size(); j++) {
3959 fDataAvg.theoryFourierIm->SetBinContent(i, dval/
fData.size());
3962 fDataAvg.theoryFourierIm->SetMarkerColor(
fData[0].theoryFourierIm->GetMarkerColor());
3963 fDataAvg.theoryFourierIm->SetLineColor(
fData[0].theoryFourierIm->GetLineColor());
3964 fDataAvg.theoryFourierIm->SetMarkerSize(
fData[0].theoryFourierIm->GetMarkerSize());
3965 fDataAvg.theoryFourierIm->SetMarkerStyle(
fData[0].theoryFourierIm->GetMarkerStyle());
3967 if (
fDataAvg.theoryFourierPwr !=
nullptr) {
3968 for (Int_t i=0; i<
fData[0].theoryFourierPwr->GetNbinsX(); i++) {
3970 for (UInt_t j=0; j<
fData.size(); j++) {
3973 fDataAvg.theoryFourierPwr->SetBinContent(i, dval/
fData.size());
3976 fDataAvg.theoryFourierPwr->SetMarkerColor(
fData[0].theoryFourierPwr->GetMarkerColor());
3977 fDataAvg.theoryFourierPwr->SetLineColor(
fData[0].theoryFourierPwr->GetLineColor());
3978 fDataAvg.theoryFourierPwr->SetMarkerSize(
fData[0].theoryFourierPwr->GetMarkerSize());
3979 fDataAvg.theoryFourierPwr->SetMarkerStyle(
fData[0].theoryFourierPwr->GetMarkerStyle());
3981 if (
fDataAvg.theoryFourierPhase !=
nullptr) {
3982 for (Int_t i=0; i<
fData[0].theoryFourierPhase->GetNbinsX(); i++) {
3984 for (UInt_t j=0; j<
fData.size(); j++) {
3987 fDataAvg.theoryFourierPhase->SetBinContent(i, dval/
fData.size());
3990 fDataAvg.theoryFourierPhase->SetMarkerColor(
fData[0].theoryFourierPhase->GetMarkerColor());
3991 fDataAvg.theoryFourierPhase->SetLineColor(
fData[0].theoryFourierPhase->GetLineColor());
3992 fDataAvg.theoryFourierPhase->SetMarkerSize(
fData[0].theoryFourierPhase->GetMarkerSize());
3993 fDataAvg.theoryFourierPhase->SetMarkerStyle(
fData[0].theoryFourierPhase->GetMarkerStyle());
3995 if (
fDataAvg.theoryFourierPhaseOptReal !=
nullptr) {
3996 for (Int_t i=0; i<
fData[0].theoryFourierPhaseOptReal->GetNbinsX(); i++) {
3998 for (UInt_t j=0; j<
fData.size(); j++) {
4001 fDataAvg.theoryFourierPhaseOptReal->SetBinContent(i, dval/
fData.size());
4004 fDataAvg.theoryFourierPhaseOptReal->SetMarkerColor(
fData[0].theoryFourierPhaseOptReal->GetMarkerColor());
4005 fDataAvg.theoryFourierPhaseOptReal->SetLineColor(
fData[0].theoryFourierPhaseOptReal->GetLineColor());
4006 fDataAvg.theoryFourierPhaseOptReal->SetMarkerSize(
fData[0].theoryFourierPhaseOptReal->GetMarkerSize());
4007 fDataAvg.theoryFourierPhaseOptReal->SetMarkerStyle(
fData[0].theoryFourierPhaseOptReal->GetMarkerStyle());
4010 for (Int_t i=0; i<
fData[0].diff->GetNbinsX(); i++) {
4012 for (UInt_t j=0; j<
fData.size(); j++) {
4018 fDataAvg.diff->SetMarkerColor(
fData[0].diff->GetMarkerColor());
4020 fDataAvg.diff->SetMarkerSize(
fData[0].diff->GetMarkerSize());
4021 fDataAvg.diff->SetMarkerStyle(
fData[0].diff->GetMarkerStyle());
4023 if (
fDataAvg.diffFourierRe !=
nullptr) {
4024 for (Int_t i=0; i<
fData[0].diffFourierRe->GetNbinsX(); i++) {
4026 for (UInt_t j=0; j<
fData.size(); j++) {
4029 fDataAvg.diffFourierRe->SetBinContent(i, dval/
fData.size());
4032 fDataAvg.diffFourierRe->SetMarkerColor(
fData[0].diffFourierRe->GetMarkerColor());
4033 fDataAvg.diffFourierRe->SetLineColor(
fData[0].diffFourierRe->GetLineColor());
4034 fDataAvg.diffFourierRe->SetMarkerSize(
fData[0].diffFourierRe->GetMarkerSize());
4035 fDataAvg.diffFourierRe->SetMarkerStyle(
fData[0].diffFourierRe->GetMarkerStyle());
4037 if (
fDataAvg.diffFourierIm !=
nullptr) {
4038 for (Int_t i=0; i<
fData[0].diffFourierIm->GetNbinsX(); i++) {
4040 for (UInt_t j=0; j<
fData.size(); j++) {
4043 fDataAvg.diffFourierIm->SetBinContent(i, dval/
fData.size());
4046 fDataAvg.diffFourierIm->SetMarkerColor(
fData[0].diffFourierIm->GetMarkerColor());
4047 fDataAvg.diffFourierIm->SetLineColor(
fData[0].diffFourierIm->GetLineColor());
4048 fDataAvg.diffFourierIm->SetMarkerSize(
fData[0].diffFourierIm->GetMarkerSize());
4049 fDataAvg.diffFourierIm->SetMarkerStyle(
fData[0].diffFourierIm->GetMarkerStyle());
4051 if (
fDataAvg.diffFourierPwr !=
nullptr) {
4052 for (Int_t i=0; i<
fData[0].diffFourierPwr->GetNbinsX(); i++) {
4054 for (UInt_t j=0; j<
fData.size(); j++) {
4057 fDataAvg.diffFourierPwr->SetBinContent(i, dval/
fData.size());
4060 fDataAvg.diffFourierPwr->SetMarkerColor(
fData[0].diffFourierPwr->GetMarkerColor());
4061 fDataAvg.diffFourierPwr->SetLineColor(
fData[0].diffFourierPwr->GetLineColor());
4062 fDataAvg.diffFourierPwr->SetMarkerSize(
fData[0].diffFourierPwr->GetMarkerSize());
4063 fDataAvg.diffFourierPwr->SetMarkerStyle(
fData[0].diffFourierPwr->GetMarkerStyle());
4065 if (
fDataAvg.diffFourierPhase !=
nullptr) {
4066 for (Int_t i=0; i<
fData[0].diffFourierPhase->GetNbinsX(); i++) {
4068 for (UInt_t j=0; j<
fData.size(); j++) {
4071 fDataAvg.diffFourierPhase->SetBinContent(i, dval/
fData.size());
4074 fDataAvg.diffFourierPhase->SetMarkerColor(
fData[0].diffFourierPhase->GetMarkerColor());
4075 fDataAvg.diffFourierPhase->SetLineColor(
fData[0].diffFourierPhase->GetLineColor());
4076 fDataAvg.diffFourierPhase->SetMarkerSize(
fData[0].diffFourierPhase->GetMarkerSize());
4077 fDataAvg.diffFourierPhase->SetMarkerStyle(
fData[0].diffFourierPhase->GetMarkerStyle());
4079 if (
fDataAvg.diffFourierPhaseOptReal !=
nullptr) {
4080 for (Int_t i=0; i<
fData[0].diffFourierPhaseOptReal->GetNbinsX(); i++) {
4082 for (UInt_t j=0; j<
fData.size(); j++) {
4085 fDataAvg.diffFourierPhaseOptReal->SetBinContent(i, dval/
fData.size());
4088 fDataAvg.diffFourierPhaseOptReal->SetMarkerColor(
fData[0].dataFourierPhaseOptReal->GetMarkerColor());
4089 fDataAvg.diffFourierPhaseOptReal->SetLineColor(
fData[0].dataFourierPhaseOptReal->GetLineColor());
4090 fDataAvg.diffFourierPhaseOptReal->SetMarkerSize(
fData[0].dataFourierPhaseOptReal->GetMarkerSize());
4091 fDataAvg.diffFourierPhaseOptReal->SetMarkerStyle(
fData[0].dataFourierPhaseOptReal->GetMarkerStyle());
4103 for (UInt_t i=0; i<
fData.size(); i++) {
4104 if (
fData[i].diff !=
nullptr) {
4105 delete fData[i].diff;
4106 fData[i].diff =
nullptr;
4119 for (UInt_t i=0; i<
fData.size(); i++) {
4120 if (
fData[i].dataFourierRe !=
nullptr) {
4121 delete fData[i].dataFourierRe;
4122 fData[i].dataFourierRe =
nullptr;
4124 if (
fData[i].dataFourierIm !=
nullptr) {
4125 delete fData[i].dataFourierIm;
4126 fData[i].dataFourierIm =
nullptr;
4128 if (
fData[i].dataFourierPwr !=
nullptr) {
4129 delete fData[i].dataFourierPwr;
4130 fData[i].dataFourierPwr =
nullptr;
4132 if (
fData[i].dataFourierPhase !=
nullptr) {
4133 delete fData[i].dataFourierPhase;
4134 fData[i].dataFourierPhase =
nullptr;
4136 if (
fData[i].dataFourierPhaseOptReal !=
nullptr) {
4137 delete fData[i].dataFourierPhaseOptReal;
4138 fData[i].dataFourierPhaseOptReal =
nullptr;
4140 if (
fData[i].theoryFourierRe !=
nullptr) {
4141 delete fData[i].theoryFourierRe;
4142 fData[i].theoryFourierRe =
nullptr;
4144 if (
fData[i].theoryFourierIm !=
nullptr) {
4145 delete fData[i].theoryFourierIm;
4146 fData[i].theoryFourierIm =
nullptr;
4148 if (
fData[i].theoryFourierPwr !=
nullptr) {
4149 delete fData[i].theoryFourierPwr;
4150 fData[i].theoryFourierPwr =
nullptr;
4152 if (
fData[i].theoryFourierPhase !=
nullptr) {
4153 delete fData[i].theoryFourierPhase;
4154 fData[i].theoryFourierPhase =
nullptr;
4156 if (
fData[i].theoryFourierPhaseOptReal !=
nullptr) {
4157 delete fData[i].theoryFourierPhaseOptReal;
4158 fData[i].theoryFourierPhaseOptReal =
nullptr;
4171 for (UInt_t i=0; i<
fData.size(); i++) {
4172 if (
fData[i].diffFourierRe !=
nullptr) {
4173 delete fData[i].diffFourierRe;
4174 fData[i].diffFourierRe =
nullptr;
4176 if (
fData[i].diffFourierIm !=
nullptr) {
4177 delete fData[i].diffFourierIm;
4178 fData[i].diffFourierIm =
nullptr;
4180 if (
fData[i].diffFourierPwr !=
nullptr) {
4181 delete fData[i].diffFourierPwr;
4182 fData[i].diffFourierPwr =
nullptr;
4184 if (
fData[i].diffFourierPhase !=
nullptr) {
4185 delete fData[i].diffFourierPhase;
4186 fData[i].diffFourierPhase =
nullptr;
4188 if (
fData[i].diffFourierPhaseOptReal !=
nullptr) {
4189 delete fData[i].diffFourierPhaseOptReal;
4190 fData[i].diffFourierPhaseOptReal =
nullptr;
4207 if (
fDataAvg.dataFourierRe !=
nullptr) {
4211 if (
fDataAvg.dataFourierIm !=
nullptr) {
4215 if (
fDataAvg.dataFourierPwr !=
nullptr) {
4219 if (
fDataAvg.dataFourierPhase !=
nullptr) {
4221 fDataAvg.dataFourierPhase =
nullptr;
4223 if (
fDataAvg.dataFourierPhaseOptReal !=
nullptr) {
4224 delete fDataAvg.dataFourierPhaseOptReal;
4225 fDataAvg.dataFourierPhaseOptReal =
nullptr;
4231 if (
fDataAvg.theoryFourierRe !=
nullptr) {
4233 fDataAvg.theoryFourierRe =
nullptr;
4235 if (
fDataAvg.theoryFourierIm !=
nullptr) {
4237 fDataAvg.theoryFourierIm =
nullptr;
4239 if (
fDataAvg.theoryFourierPwr !=
nullptr) {
4241 fDataAvg.theoryFourierPwr =
nullptr;
4243 if (
fDataAvg.theoryFourierPhase !=
nullptr) {
4244 delete fDataAvg.theoryFourierPhase;
4245 fDataAvg.theoryFourierPhase =
nullptr;
4247 if (
fDataAvg.theoryFourierPhaseOptReal !=
nullptr) {
4248 delete fDataAvg.theoryFourierPhaseOptReal;
4249 fDataAvg.theoryFourierPhaseOptReal =
nullptr;
4255 if (
fDataAvg.diffFourierRe !=
nullptr) {
4259 if (
fDataAvg.diffFourierIm !=
nullptr) {
4263 if (
fDataAvg.diffFourierPwr !=
nullptr) {
4267 if (
fDataAvg.diffFourierPhase !=
nullptr) {
4269 fDataAvg.diffFourierPhase =
nullptr;
4271 if (
fDataAvg.diffFourierPhaseOptReal !=
nullptr) {
4272 delete fDataAvg.diffFourierPhaseOptReal;
4273 fDataAvg.diffFourierPhaseOptReal =
nullptr;
4285 Double_t min =
fMsrHandler->GetMsrFourierList()->fRangeForPhaseCorrection[0];
4286 Double_t max =
fMsrHandler->GetMsrFourierList()->fRangeForPhaseCorrection[1];
4288 if ((min == -1.0) && (max == -1.0)) {
4293 min =
fData[0].dataFourierRe->GetBinLowEdge(1);
4294 max =
fData[0].dataFourierRe->GetBinLowEdge(
fData[0].dataFourierRe->GetNbinsX())+
fData[0].dataFourierRe->GetBinWidth(1);
4302 for (UInt_t i=0; i<
fData.size(); i++) {
4305 phaseParam, 1.0, min, max);
4307 fData[i].dataFourierPhaseOptReal->SetMarkerColor(
fData[i].data->GetMarkerColor());
4308 fData[i].dataFourierPhaseOptReal->SetLineColor(
fData[i].data->GetLineColor());
4310 fData[i].dataFourierPhaseOptReal->SetMarkerSize(1);
4312 fData[i].dataFourierPhaseOptReal->SetMarkerStyle(
fData[i].data->GetMarkerStyle());
4316 strcpy(hName,
fData[i].theoryFourierPhase->GetName());
4317 strcat(hName,
"_Opt_Real");
4318 fData[i].theoryFourierPhaseOptReal = (TH1F*)
fData[i].theoryFourierRe->Clone(hName);
4322 Int_t minBin =
fData[i].theoryFourierPhaseOptReal->GetXaxis()->FindFixBin(min);
4323 Int_t maxBin =
fData[i].theoryFourierPhaseOptReal->GetXaxis()->FindFixBin(max);
4325 for (Int_t j=1; j<
fData[i].theoryFourierPhaseOptReal->GetNbinsX(); j++) {
4326 ph = phaseParam[0] + phaseParam[1] * (Double_t)(j-minBin+1) / (Double_t)(maxBin-minBin);
4327 re =
fData[i].theoryFourierRe->GetBinContent(j) * cos(ph) -
fData[i].theoryFourierIm->GetBinContent(j) * sin(ph);
4328 fData[i].theoryFourierPhaseOptReal->SetBinContent(j, re);
4331 fData[i].theoryFourierPhaseOptReal->SetLineColor(
fData[i].theory->GetLineColor());
4350 Int_t bin = theo->FindBin(x);
4352 return y - theo->GetBinContent(bin);
4371 Double_t xVal, yVal;
4375 theo->GetPoint(bin, xVal, yVal);
4395 Double_t *xTheo = graph->GetX();
4398 for (i=0; i<graph->GetN(); i++) {
4399 if (*(xTheo+i) >= x) {
4405 if (i == graph->GetN()) {
4428 if (histo ==
nullptr)
4431 Int_t start=0, end=0;
4434 end = histo->GetNbinsX();
4436 start = histo->FindBin(xmin);
4437 if ((start==0) || (start==histo->GetNbinsX()+1))
4439 end = histo->FindBin(xmax);
4440 if ((end==0) || (end==histo->GetNbinsX()+1))
4441 end = histo->GetNbinsX();
4444 Double_t max = histo->GetBinContent(start);
4445 Double_t binContent;
4446 for (Int_t i=start; i<end; i++) {
4447 binContent = histo->GetBinContent(i);
4448 if (max < binContent)
4471 if (histo ==
nullptr)
4474 Int_t start=0, end=0;
4477 end = histo->GetNbinsX();
4479 start = histo->FindBin(xmin);
4480 if ((start==0) || (start==histo->GetNbinsX()+1))
4482 end = histo->FindBin(xmax);
4483 if ((end==0) || (end==histo->GetNbinsX()+1))
4484 end = histo->GetNbinsX();
4487 Double_t min = histo->GetBinContent(start);
4488 Double_t binContent;
4489 for (Int_t i=start; i<end; i++) {
4490 binContent = histo->GetBinContent(i);
4491 if (min > binContent)
4514 if (graph ==
nullptr)
4519 graph->GetPoint(0, x, y);
4521 graph->GetPoint(graph->GetN()-1, x, y);
4525 graph->GetPoint(0, x, y);
4527 for (Int_t i=0; i<graph->GetN(); i++) {
4528 graph->GetPoint(i, x, y);
4529 if ((x >= xmin) && (x <= xmax)) {
4554 if (graph ==
nullptr)
4559 graph->GetPoint(0, x, y);
4561 graph->GetPoint(graph->GetN()-1, x, y);
4565 graph->GetPoint(0, x, y);
4567 for (Int_t i=0; i<graph->GetN(); i++) {
4568 graph->GetPoint(i, x, y);
4569 if ((x >= xmin) && (x <= xmax)) {
4598 Double_t xmin, xmax;
4600 if (
fData.size() > 0) {
4618 Double_t dataXmin=0.0, dataXmax=0.0, dataYmin=0.0, dataYmax=0.0;
4628 for (UInt_t i=1; i<
fData.size(); i++) {
4634 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
4647 for (UInt_t i=1; i<
fData.size(); i++) {
4653 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
4659 dataYmin = 1.0e-4 * dataYmax;
4666 UInt_t noOfPoints = 1000;
4667 for (UInt_t i=0; i<
fData.size(); i++) {
4668 if (
fData[i].data->GetNbinsX() > (Int_t)noOfPoints)
4669 noOfPoints =
fData[i].data->GetNbinsX();
4672 fHistoFrame->SetBins(noOfPoints, dataXmin, dataXmax);
4675 for (UInt_t i=0; i<
fData.size(); i++) {
4676 fData[i].data->GetXaxis()->SetRange(
fData[i].data->FindBin(dataXmin),
fData[i].data->FindBin(dataXmax));
4677 fData[i].data->GetYaxis()->SetRangeUser(dataYmin, dataYmax);
4678 fData[i].theory->GetXaxis()->SetRange(
fData[i].theory->FindBin(dataXmin),
fData[i].theory->FindBin(dataXmax));
4679 fData[i].theory->GetYaxis()->SetRangeUser(dataYmin, dataYmax);
4700 if (runList->at(0).IsLifetimeCorrected()) {
4701 yAxisTitle =
"Asymmetry";
4704 yAxisTitle =
"N(t) per nsec";
4706 yAxisTitle =
"N(t) per bin";
4711 yAxisTitle =
"RRF Asymmetry";
4714 yAxisTitle =
"Asymmetry";
4717 yAxisTitle =
"Asymmetry";
4720 yAxisTitle =
"N(t) per bin";
4727 fHistoFrame->GetYaxis()->SetTitle(yAxisTitle.Data());
4729 for (UInt_t i=0; i<
fData.size(); i++) {
4730 fData[i].data->Draw(
"pesame");
4733 for (UInt_t i=0; i<
fData.size(); i++) {
4734 fData[i].theory->Draw(
"lsame");
4767 UInt_t runNo = (UInt_t)plotInfo.
fRuns[0]-1;
4768 TString xAxisTitle =
fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
4769 TString yAxisTitle =
fRunList->GetYAxisTitle(*runs[runNo].GetRunName(), runNo);
4774 Double_t dataXmin=0.0, dataXmax=0.0, dataYmin=0.0, dataYmax=0.0;
4790 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
4809 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
4815 if (dataYmin <= 0.0)
4816 dataYmin = 1.0e-4 * dataYmax;
4828 TGraphErrors *ge =
new TGraphErrors(*(
fNonMusrData[i].data));
4830 ge->SetEditable(
false);
4838 TGraphErrors *ge =
new TGraphErrors(*(
fNonMusrData[i].theory));
4840 ge->SetEditable(
false);
4864 for (UInt_t i=0; i<plotInfo.
fRuns.size(); i++) {
4865 runNo = (UInt_t)plotInfo.
fRuns[i]-1;
4866 xAxisTitle =
fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
4867 yAxisTitle =
fRunList->GetYAxisTitle(*runs[runNo].GetRunName(), runNo);
4868 legendLabel.push_back(yAxisTitle +
" vs. " + xAxisTitle);
4873 legendLabel.clear();
4915 Double_t xmin, xmax;
4932 Double_t dataXmin=0.0, dataXmax=0.0, dataYmin=0.0, dataYmax=0.0, dd=0.0;
4938 for (UInt_t i=1; i<
fData.size(); i++) {
4945 dd = 0.05*fabs(dataYmax-dataYmin);
4953 for (UInt_t i=1; i<
fData.size(); i++) {
4960 dd = 0.05*fabs(dataYmax-dataYmin);
4968 UInt_t noOfPoints = 1000;
4969 for (UInt_t i=0; i<
fData.size(); i++) {
4970 if (
fData[i].diff->GetNbinsX() > (Int_t)noOfPoints)
4971 noOfPoints =
fData[i].diff->GetNbinsX();
4974 fHistoFrame->SetBins(noOfPoints, dataXmin, dataXmax);
4988 for (UInt_t i=0; i<
fData.size(); i++) {
4989 fData[i].diff->Draw(
"pesame");
4991 if (
fData[i].dataRange->IsXRangePresent())
4992 fData[i].diff->GetXaxis()->SetRangeUser(
fData[i].dataRange->GetXmin(),
fData[i].dataRange->GetXmax());
4994 fData[i].diff->GetXaxis()->SetRange(
fData[i].diff->FindBin(dataXmin),
fData[i].diff->FindBin(dataXmax));
4996 if (
fData[i].dataRange->IsYRangePresent())
4997 fData[i].diff->GetYaxis()->SetRangeUser(
fData[i].dataRange->GetYmin(),
fData[i].dataRange->GetYmax());
4999 fData[i].diff->GetYaxis()->SetRangeUser(dataYmin, dataYmax);
5032 UInt_t runNo = (UInt_t)plotInfo.
fRuns[0]-1;
5033 TString xAxisTitle =
fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
5040 Double_t dataXmin=0.0, dataXmax=0.0, dataYmin=0.0, dataYmax=0.0;
5052 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
5066 Double_t dd = 0.05*fabs(dataYmax-dataYmin);
5076 TGraphErrors *ge =
new TGraphErrors(*(
fNonMusrData[i].diff));
5078 ge->SetEditable(
false);
5126 if (
fData.size() == 0)
5130 TString xAxisTitle(
"");
5132 xAxisTitle = TString(
"Field (G)");
5134 xAxisTitle = TString(
"Field (T)");
5136 xAxisTitle = TString(
"Frequency (MHz)");
5138 xAxisTitle = TString(
"Frequency (Mc/s)");
5140 xAxisTitle = TString(
"??");
5144 Double_t xmin, xmax, ymin, ymax, binContent;
5145 UInt_t noOfPoints = 1000;
5153 xmin =
fData[0].dataFourierRe->GetBinLowEdge(1);
5154 xmax =
fData[0].dataFourierRe->GetBinLowEdge(
fData[0].dataFourierRe->GetNbinsX())+
fData[0].dataFourierRe->GetBinWidth(1);
5162 if (binContent < ymin)
5165 if (binContent > ymax)
5167 for (UInt_t i=1; i<
fData.size(); i++) {
5169 if (binContent < ymin)
5172 if (binContent > ymax)
5175 if (binContent < ymin)
5178 if (binContent > ymax)
5192 for (UInt_t i=0; i<
fData.size(); i++) {
5193 if (
fData[i].dataFourierRe->GetNbinsX() > (Int_t)noOfPoints)
5194 noOfPoints =
fData[i].dataFourierRe->GetNbinsX();
5200 for (UInt_t i=0; i<
fData.size(); i++) {
5201 fData[i].dataFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5202 fData[i].dataFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5203 fData[i].theoryFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5204 fData[i].theoryFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5208 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5212 fHistoFrame->GetYaxis()->SetTitle(
"Real Fourier");
5215 for (UInt_t i=0; i<
fData.size(); i++) {
5216 fData[i].dataFourierRe->Draw(
"psame");
5220 for (UInt_t i=0; i<
fData.size(); i++) {
5221 fData[i].theoryFourierRe->Draw(
"same");
5233 xmin =
fData[0].dataFourierIm->GetBinLowEdge(1);
5234 xmax =
fData[0].dataFourierIm->GetBinLowEdge(
fData[0].dataFourierIm->GetNbinsX())+
fData[0].dataFourierIm->GetBinWidth(1);
5242 if (binContent < ymin)
5245 if (binContent > ymax)
5247 for (UInt_t i=1; i<
fData.size(); i++) {
5249 if (binContent < ymin)
5252 if (binContent > ymax)
5255 if (binContent < ymin)
5258 if (binContent > ymax)
5272 for (UInt_t i=0; i<
fData.size(); i++) {
5273 if (
fData[i].dataFourierIm->GetNbinsX() > (Int_t)noOfPoints)
5274 noOfPoints =
fData[i].dataFourierIm->GetNbinsX();
5280 for (UInt_t i=0; i<
fData.size(); i++) {
5281 fData[i].dataFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5282 fData[i].dataFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5283 fData[i].theoryFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5284 fData[i].theoryFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5288 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5292 fHistoFrame->GetYaxis()->SetTitle(
"Imaginary Fourier");
5295 for (UInt_t i=0; i<
fData.size(); i++) {
5296 fData[i].dataFourierIm->Draw(
"psame");
5300 for (UInt_t i=0; i<
fData.size(); i++) {
5301 fData[i].theoryFourierIm->Draw(
"same");
5313 xmin =
fData[0].dataFourierRe->GetBinLowEdge(1);
5314 xmax =
fData[0].dataFourierRe->GetBinLowEdge(
fData[0].dataFourierRe->GetNbinsX())+
fData[0].dataFourierRe->GetBinWidth(1);
5322 for (UInt_t i=1; i<
fData.size(); i++) {
5324 if (binContent < ymin)
5327 if (binContent > ymax)
5331 for (UInt_t i=0; i<
fData.size(); i++) {
5333 if (binContent < ymin)
5336 if (binContent > ymax)
5340 for (UInt_t i=0; i<
fData.size(); i++) {
5342 if (binContent < ymin)
5345 if (binContent > ymax)
5348 if (binContent < ymin)
5351 if (binContent > ymax)
5365 for (UInt_t i=0; i<
fData.size(); i++) {
5366 if (
fData[i].dataFourierRe->GetNbinsX() > (Int_t)noOfPoints)
5367 noOfPoints =
fData[i].dataFourierRe->GetNbinsX();
5373 for (UInt_t i=0; i<
fData.size(); i++) {
5374 fData[i].dataFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5375 fData[i].dataFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5376 fData[i].theoryFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5377 fData[i].theoryFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5378 fData[i].dataFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5379 fData[i].dataFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5380 fData[i].theoryFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5381 fData[i].theoryFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5385 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5389 fHistoFrame->GetYaxis()->SetTitle(
"Real/Imag Fourier");
5392 for (UInt_t i=0; i<
fData.size(); i++) {
5393 fData[i].dataFourierRe->Draw(
"psame");
5394 fData[i].dataFourierIm->Draw(
"psame");
5398 for (UInt_t i=0; i<
fData.size(); i++) {
5399 fData[i].theoryFourierRe->Draw(
"same");
5400 fData[i].theoryFourierIm->Draw(
"same");
5412 xmin =
fData[0].dataFourierPwr->GetBinLowEdge(1);
5413 xmax =
fData[0].dataFourierPwr->GetBinLowEdge(
fData[0].dataFourierPwr->GetNbinsX())+
fData[0].dataFourierPwr->GetBinWidth(1);
5421 if (binContent < ymin)
5424 if (binContent > ymax)
5426 for (UInt_t i=1; i<
fData.size(); i++) {
5428 if (binContent < ymin)
5431 if (binContent > ymax)
5434 if (binContent < ymin)
5437 if (binContent > ymax)
5451 for (UInt_t i=0; i<
fData.size(); i++) {
5452 if (
fData[i].dataFourierPwr->GetNbinsX() > (Int_t)noOfPoints)
5453 noOfPoints =
fData[i].dataFourierPwr->GetNbinsX();
5459 for (UInt_t i=0; i<
fData.size(); i++) {
5460 fData[i].dataFourierPwr->GetXaxis()->SetRangeUser(xmin, xmax);
5461 fData[i].dataFourierPwr->GetYaxis()->SetRangeUser(0.95*ymin, 1.05*ymax);
5462 fData[i].theoryFourierPwr->GetXaxis()->SetRangeUser(xmin, xmax);
5463 fData[i].theoryFourierPwr->GetYaxis()->SetRangeUser(0.95*ymin, 1.05*ymax);
5467 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5471 fHistoFrame->GetYaxis()->SetTitle(
"Ampl. Fourier");
5474 for (UInt_t i=0; i<
fData.size(); i++) {
5475 fData[i].dataFourierPwr->Draw(
"psame");
5479 for (UInt_t i=0; i<
fData.size(); i++) {
5480 fData[i].theoryFourierPwr->Draw(
"same");
5490 xmin =
fData[0].dataFourierPhase->GetBinLowEdge(1);
5491 xmax =
fData[0].dataFourierPhase->GetBinLowEdge(
fData[0].dataFourierPhase->GetNbinsX())+
fData[0].dataFourierPhase->GetBinWidth(1);
5499 if (binContent < ymin)
5502 if (binContent > ymax)
5504 for (UInt_t i=1; i<
fData.size(); i++) {
5506 if (binContent < ymin)
5509 if (binContent > ymax)
5512 if (binContent < ymin)
5515 if (binContent > ymax)
5529 for (UInt_t i=0; i<
fData.size(); i++) {
5530 if (
fData[i].dataFourierPhase->GetNbinsX() > (Int_t)noOfPoints)
5531 noOfPoints =
fData[i].dataFourierPhase->GetNbinsX();
5536 for (UInt_t i=0; i<
fData.size(); i++) {
5537 fData[i].dataFourierPhase->GetXaxis()->SetRangeUser(xmin, xmax);
5538 fData[i].dataFourierPhase->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5539 fData[i].theoryFourierPhase->GetXaxis()->SetRangeUser(xmin, xmax);
5540 fData[i].theoryFourierPhase->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5544 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5548 fHistoFrame->GetYaxis()->SetTitle(
"Phase Fourier");
5551 for (UInt_t i=0; i<
fData.size(); i++) {
5552 fData[i].dataFourierPhase->Draw(
"psame");
5556 for (UInt_t i=0; i<
fData.size(); i++) {
5557 fData[i].theoryFourierPhase->Draw(
"same");
5567 xmin =
fData[0].dataFourierPhaseOptReal->GetBinLowEdge(1);
5568 xmax =
fData[0].dataFourierPhaseOptReal->GetBinLowEdge(
fData[0].dataFourierPhaseOptReal->GetNbinsX())+
fData[0].dataFourierPhaseOptReal->GetBinWidth(1);
5576 if (binContent < ymin)
5579 if (binContent > ymax)
5581 for (UInt_t i=1; i<
fData.size(); i++) {
5583 if (binContent < ymin)
5586 if (binContent > ymax)
5589 if (binContent < ymin)
5592 if (binContent > ymax)
5606 for (UInt_t i=0; i<
fData.size(); i++) {
5607 if (
fData[i].dataFourierPhaseOptReal->GetNbinsX() > (Int_t)noOfPoints)
5608 noOfPoints =
fData[i].dataFourierPhaseOptReal->GetNbinsX();
5613 for (UInt_t i=0; i<
fData.size(); i++) {
5614 fData[i].dataFourierPhaseOptReal->GetXaxis()->SetRangeUser(xmin, xmax);
5615 fData[i].dataFourierPhaseOptReal->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5616 fData[i].theoryFourierPhaseOptReal->GetXaxis()->SetRangeUser(xmin, xmax);
5617 fData[i].theoryFourierPhaseOptReal->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5621 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5625 fHistoFrame->GetYaxis()->SetTitle(
"Phase Opt. Real Fourier");
5628 for (UInt_t i=0; i<
fData.size(); i++) {
5629 fData[i].dataFourierPhaseOptReal->Draw(
"psame");
5633 for (UInt_t i=0; i<
fData.size(); i++) {
5634 fData[i].theoryFourierPhaseOptReal->Draw(
"same");
5674 if (
fData.size() == 0)
5678 TString xAxisTitle(
"");
5680 xAxisTitle = TString(
"Field (G)");
5682 xAxisTitle = TString(
"Field (T)");
5684 xAxisTitle = TString(
"Frequency (MHz)");
5686 xAxisTitle = TString(
"Frequency (Mc/s)");
5688 xAxisTitle = TString(
"??");
5692 double xmin, xmax, ymin, ymax, binContent;
5700 xmin =
fData[0].diffFourierRe->GetBinLowEdge(1);
5701 xmax =
fData[0].diffFourierRe->GetBinLowEdge(
fData[0].diffFourierRe->GetNbinsX())+
fData[0].diffFourierRe->GetBinWidth(1);
5708 for (UInt_t i=1; i<
fData.size(); i++) {
5710 if (binContent < ymin)
5713 if (binContent > ymax)
5726 for (UInt_t i=0; i<
fData.size(); i++) {
5727 fData[i].diffFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5728 fData[i].diffFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5732 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5736 if (
fData[0].diffFourierTag == 1)
5737 fHistoFrame->GetYaxis()->SetTitle(
"Real Fourier (d-f: data-theory)");
5739 fHistoFrame->GetYaxis()->SetTitle(
"Real Fourier (f-d: [(F data)-(F theory)]");
5742 for (UInt_t i=0; i<
fData.size(); i++) {
5743 fData[i].diffFourierRe->Draw(
"plsame");
5755 xmin =
fData[0].diffFourierIm->GetBinLowEdge(1);
5756 xmax =
fData[0].diffFourierIm->GetBinLowEdge(
fData[0].diffFourierIm->GetNbinsX())+
fData[0].diffFourierIm->GetBinWidth(1);
5763 for (UInt_t i=1; i<
fData.size(); i++) {
5765 if (binContent < ymin)
5768 if (binContent > ymax)
5781 for (UInt_t i=0; i<
fData.size(); i++) {
5782 fData[i].diffFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5783 fData[i].diffFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5787 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5791 if (
fData[0].diffFourierTag == 1)
5792 fHistoFrame->GetYaxis()->SetTitle(
"Imaginary Fourier (d-f: data-theory)");
5794 fHistoFrame->GetYaxis()->SetTitle(
"Imaginary Fourier (f-d: [(F data)-(F theory)]");
5797 for (UInt_t i=0; i<
fData.size(); i++) {
5798 fData[i].diffFourierIm->Draw(
"plsame");
5810 xmin =
fData[0].diffFourierRe->GetBinLowEdge(1);
5811 xmax =
fData[0].diffFourierRe->GetBinLowEdge(
fData[0].diffFourierRe->GetNbinsX())+
fData[0].diffFourierRe->GetBinWidth(1);
5818 for (UInt_t i=1; i<
fData.size(); i++) {
5820 if (binContent < ymin)
5823 if (binContent > ymax)
5826 for (UInt_t i=0; i<
fData.size(); i++) {
5828 if (binContent < ymin)
5831 if (binContent > ymax)
5844 for (UInt_t i=0; i<
fData.size(); i++) {
5845 fData[i].diffFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
5846 fData[i].diffFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5847 fData[i].diffFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
5848 fData[i].diffFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5852 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5856 if (
fData[0].diffFourierTag == 1)
5857 fHistoFrame->GetYaxis()->SetTitle(
"Real+Imag Fourier (d-f: data-theory)");
5859 fHistoFrame->GetYaxis()->SetTitle(
"Real+Imag Fourier (f-d: [(F data)-(F theory)]");
5862 for (UInt_t i=0; i<
fData.size(); i++) {
5863 fData[i].diffFourierRe->Draw(
"plsame");
5864 fData[i].diffFourierIm->Draw(
"plsame");
5876 xmin =
fData[0].diffFourierPwr->GetBinLowEdge(1);
5877 xmax =
fData[0].diffFourierPwr->GetBinLowEdge(
fData[0].diffFourierPwr->GetNbinsX())+
fData[0].diffFourierPwr->GetBinWidth(1);
5884 for (UInt_t i=1; i<
fData.size(); i++) {
5886 if (binContent < ymin)
5889 if (binContent > ymax)
5902 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5905 for (UInt_t i=0; i<
fData.size(); i++) {
5906 fData[i].diffFourierPwr->GetXaxis()->SetRangeUser(xmin, xmax);
5907 fData[i].diffFourierPwr->GetYaxis()->SetRangeUser(0.95*ymin, 1.05*ymax);
5912 if (
fData[0].diffFourierTag == 1)
5913 fHistoFrame->GetYaxis()->SetTitle(
"Ampl. Fourier (d-f: data-theory)");
5915 fHistoFrame->GetYaxis()->SetTitle(
"Ampl. Fourier (f-d: [(F data)-(F theory)]");
5918 for (UInt_t i=0; i<
fData.size(); i++) {
5919 fData[i].diffFourierPwr->Draw(
"plsame");
5929 xmin =
fData[0].diffFourierPhase->GetBinLowEdge(1);
5930 xmax =
fData[0].diffFourierPhase->GetBinLowEdge(
fData[0].diffFourierPhase->GetNbinsX())+
fData[0].diffFourierPhase->GetBinWidth(1);
5937 for (UInt_t i=1; i<
fData.size(); i++) {
5939 if (binContent < ymin)
5942 if (binContent > ymax)
5955 for (UInt_t i=0; i<
fData.size(); i++) {
5956 fData[i].diffFourierPhase->GetXaxis()->SetRangeUser(xmin, xmax);
5957 fData[i].diffFourierPhase->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
5961 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
5965 if (
fData[0].diffFourierTag == 1)
5966 fHistoFrame->GetYaxis()->SetTitle(
"Phase Fourier (d-f: data-theory)");
5968 fHistoFrame->GetYaxis()->SetTitle(
"Phase Fourier [f-d: (F data)-(F theory)]");
5971 for (UInt_t i=0; i<
fData.size(); i++) {
5972 fData[i].diffFourierPhase->Draw(
"plsame");
5984 xmin =
fData[0].diffFourierPhaseOptReal->GetBinLowEdge(1);
5985 xmax =
fData[0].diffFourierPhaseOptReal->GetBinLowEdge(
fData[0].diffFourierPhaseOptReal->GetNbinsX())+
fData[0].diffFourierPhaseOptReal->GetBinWidth(1);
5992 for (UInt_t i=1; i<
fData.size(); i++) {
5994 if (binContent < ymin)
5997 if (binContent > ymax)
6010 for (UInt_t i=0; i<
fData.size(); i++) {
6011 fData[i].diffFourierPhaseOptReal->GetXaxis()->SetRangeUser(xmin, xmax);
6012 fData[i].diffFourierPhaseOptReal->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
6016 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
6020 if (
fData[0].diffFourierTag == 1)
6021 fHistoFrame->GetYaxis()->SetTitle(
"Real Fourier (d-f: data-theory)");
6023 fHistoFrame->GetYaxis()->SetTitle(
"Real Fourier (f-d: [(F data)-(F theory)]");
6026 for (UInt_t i=0; i<
fData.size(); i++) {
6027 fData[i].diffFourierPhaseOptReal->Draw(
"plsame");
6059 str = TString(
"phase = ");
6092 TString xAxisTitle(
"");
6096 xAxisTitle = TString(
"time (s)");
6098 xAxisTitle = TString(
"time (#mus)");
6102 xAxisTitle = TString(
"Field (G)");
6104 xAxisTitle = TString(
"Field (T)");
6106 xAxisTitle = TString(
"Frequency (MHz)");
6108 xAxisTitle = TString(
"Frequency (Mc/s)");
6110 xAxisTitle = TString(
"??");
6114 TString yAxisTitle(
"");
6120 if (runList->at(0).IsLifetimeCorrected()) {
6121 yAxisTitle =
"<asymmetry>";
6124 yAxisTitle =
"<N(t)> per nsec";
6126 yAxisTitle =
"<N(t)> per bin";
6130 yAxisTitle =
"<asymmetry>";
6133 yAxisTitle =
"<asymmetry>";
6136 yAxisTitle =
"<N(t)> per bin";
6143 yAxisTitle =
"<data-theory>";
6149 yAxisTitle =
"<Real Fourier>";
6152 yAxisTitle =
"<Imaginary Fourier>";
6155 yAxisTitle =
"<Real/Imag Fourier>";
6158 yAxisTitle =
"<Ampl. Fourier>";
6161 yAxisTitle =
"<Phase Fourier>";
6164 yAxisTitle =
"<Phase Opt. Real Fourier>";
6173 if (
fData[0].diffFourierTag == 1)
6174 yAxisTitle =
"<Real Fourier (d-f: data-theory)>";
6176 yAxisTitle =
"<Real Fourier (f-d: [(F data)-(F theory)]>";
6179 if (
fData[0].diffFourierTag == 1)
6180 yAxisTitle =
"<Imag Fourier (d-f: data-theory)>";
6182 yAxisTitle =
"<Imag Fourier (f-d: [(F data)-(F theory)]>";
6186 if (
fData[0].diffFourierTag == 1)
6187 yAxisTitle =
"<Real/Imag Fourier (d-f: data-theory)>";
6189 yAxisTitle =
"<Real/Imag Fourier (f-d: [(F data)-(F theory)]>";
6193 if (
fData[0].diffFourierTag == 1)
6194 yAxisTitle =
"<Ampl. Fourier (d-f: data-theory)>";
6196 yAxisTitle =
"<Ampl. Fourier (f-d: [(F data)-(F theory)]>";
6200 if (
fData[0].diffFourierTag == 1)
6201 yAxisTitle =
"<Phase Fourier (d-f: data-theory)>";
6203 yAxisTitle =
"<Phase Fourier (f-d: [(F data)-(F theory)]>";
6214 Double_t xmin, xmax, ymin, ymax;
6228 fHistoFrame->GetXaxis()->SetTitle(xAxisTitle.Data());
6229 fHistoFrame->GetYaxis()->SetTitle(yAxisTitle.Data());
6244 fDataAvg.dataFourierRe->Draw(
"psame");
6245 fDataAvg.theoryFourierRe->Draw(
"same");
6247 fDataAvg.diffFourierRe->Draw(
"psame");
6252 fDataAvg.dataFourierIm->Draw(
"psame");
6253 fDataAvg.theoryFourierIm->Draw(
"same");
6255 fDataAvg.diffFourierIm->Draw(
"psame");
6260 fDataAvg.dataFourierRe->Draw(
"psame");
6261 fDataAvg.theoryFourierRe->Draw(
"same");
6262 fDataAvg.dataFourierIm->Draw(
"psame");
6263 fDataAvg.theoryFourierIm->Draw(
"same");
6265 fDataAvg.diffFourierRe->Draw(
"psame");
6266 fDataAvg.diffFourierIm->Draw(
"psame");
6271 fDataAvg.dataFourierPwr->Draw(
"psame");
6272 fDataAvg.theoryFourierPwr->Draw(
"same");
6274 fDataAvg.diffFourierPwr->Draw(
"psame");
6279 fDataAvg.dataFourierPhase->Draw(
"psame");
6280 fDataAvg.theoryFourierPhase->Draw(
"same");
6282 fDataAvg.diffFourierPhase->Draw(
"psame");
6287 fDataAvg.dataFourierPhaseOptReal->Draw(
"psame");
6288 fDataAvg.theoryFourierPhaseOptReal->Draw(
"same");
6290 fDataAvg.diffFourierPhaseOptReal->Draw(
"psame");
6320 const double cp = TMath::Cos(
fFourier.fPhaseIncrement/180.0*TMath::Pi());
6321 const double sp = TMath::Sin(
fFourier.fPhaseIncrement/180.0*TMath::Pi());
6327 for (UInt_t i=0; i<
fData.size(); i++) {
6328 if ((
fData[i].dataFourierRe !=
nullptr) && (
fData[i].dataFourierIm !=
nullptr)) {
6329 for (Int_t j=0; j<
fData[i].dataFourierRe->GetNbinsX(); j++) {
6331 re =
fData[i].dataFourierRe->GetBinContent(j) * cp +
fData[i].dataFourierIm->GetBinContent(j) * sp;
6332 im =
fData[i].dataFourierIm->GetBinContent(j) * cp -
fData[i].dataFourierRe->GetBinContent(j) * sp;
6334 fData[i].dataFourierRe->SetBinContent(j, re);
6335 fData[i].dataFourierIm->SetBinContent(j, im);
6338 if ((
fData[i].theoryFourierRe !=
nullptr) && (
fData[i].theoryFourierIm !=
nullptr)) {
6339 for (Int_t j=0; j<
fData[i].theoryFourierRe->GetNbinsX(); j++) {
6341 re =
fData[i].theoryFourierRe->GetBinContent(j) * cp +
fData[i].theoryFourierIm->GetBinContent(j) * sp;
6342 im =
fData[i].theoryFourierIm->GetBinContent(j) * cp -
fData[i].theoryFourierRe->GetBinContent(j) * sp;
6344 fData[i].theoryFourierRe->SetBinContent(j, re);
6345 fData[i].theoryFourierIm->SetBinContent(j, im);
6348 if ((
fData[i].diffFourierRe !=
nullptr) && (
fData[i].diffFourierIm !=
nullptr)) {
6349 for (Int_t j=0; j<
fData[i].diffFourierRe->GetNbinsX(); j++) {
6351 re =
fData[i].diffFourierRe->GetBinContent(j) * cp +
fData[i].diffFourierIm->GetBinContent(j) * sp;
6352 im =
fData[i].diffFourierIm->GetBinContent(j) * cp -
fData[i].diffFourierRe->GetBinContent(j) * sp;
6354 fData[i].diffFourierRe->SetBinContent(j, re);
6355 fData[i].diffFourierIm->SetBinContent(j, im);
6373 const double cp = TMath::Cos(
fFourier.fPhaseIncrement/180.0*TMath::Pi());
6374 const double sp = TMath::Sin(
fFourier.fPhaseIncrement/180.0*TMath::Pi());
6380 for (UInt_t i=0; i<
fData.size(); i++) {
6381 if ((
fData[i].dataFourierRe !=
nullptr) && (
fData[i].dataFourierIm !=
nullptr)) {
6382 for (Int_t j=0; j<
fData[i].dataFourierRe->GetNbinsX(); j++) {
6384 re =
fData[i].dataFourierRe->GetBinContent(j) * cp -
fData[i].dataFourierIm->GetBinContent(j) * sp;
6385 im =
fData[i].dataFourierIm->GetBinContent(j) * cp +
fData[i].dataFourierRe->GetBinContent(j) * sp;
6387 fData[i].dataFourierRe->SetBinContent(j, re);
6388 fData[i].dataFourierIm->SetBinContent(j, im);
6391 if ((
fData[i].theoryFourierRe !=
nullptr) && (
fData[i].theoryFourierIm !=
nullptr)) {
6392 for (Int_t j=0; j<
fData[i].theoryFourierRe->GetNbinsX(); j++) {
6394 re =
fData[i].theoryFourierRe->GetBinContent(j) * cp -
fData[i].theoryFourierIm->GetBinContent(j) * sp;
6395 im =
fData[i].theoryFourierIm->GetBinContent(j) * cp +
fData[i].theoryFourierRe->GetBinContent(j) * sp;
6397 fData[i].theoryFourierRe->SetBinContent(j, re);
6398 fData[i].theoryFourierIm->SetBinContent(j, im);
6401 if ((
fData[i].diffFourierRe !=
nullptr) && (
fData[i].diffFourierIm !=
nullptr)) {
6402 for (Int_t j=0; j<
fData[i].diffFourierRe->GetNbinsX(); j++) {
6404 re =
fData[i].diffFourierRe->GetBinContent(j) * cp -
fData[i].diffFourierIm->GetBinContent(j) * sp;
6405 im =
fData[i].diffFourierIm->GetBinContent(j) * cp +
fData[i].diffFourierRe->GetBinContent(j) * sp;
6407 fData[i].diffFourierRe->SetBinContent(j, re);
6408 fData[i].diffFourierIm->SetBinContent(j, im);
6430 Bool_t willScale =
true;
6433 for (UInt_t i=0; i<cmd->size(); i++) {
6434 if (cmd->at(i).fLine.Contains(
"SCALE_N0_BKG", TString::kIgnoreCase)) {
6435 std::vector<std::string> tokens = PStringUtils::Split(cmd->at(i).fLine.Data(),
" \t");
6436 if (tokens.size() != 2) {
6437 std::cerr << std::endl <<
">> PRunSingleHisto::IsScaleN0AndBkg(): **WARNING** Found uncorrect 'SCALE_N0_BKG' command, will ignore it.";
6438 std::cerr << std::endl <<
">> Allowed commands: SCALE_N0_BKG TRUE | FALSE" << std::endl;
6441 if (PStringUtils::IsEqualNoCase(tokens[1],
"FALSE")) {
6463 const UInt_t precLimit = 6;
6464 UInt_t decimalPoint = 0;
6465 UInt_t accuracy = 6;
6467 if (param.
fStep == 0.0) {
6470 snprintf(str,
sizeof(str),
"%lf", param.
fValue);
6473 for (UInt_t i=0; i<strlen(str); i++) {
6474 if (str[i] ==
'.') {
6481 for (Int_t i=strlen(str)-1; i>=0; i--) {
6482 if (str[i] !=
'0') {
6483 if (((UInt_t)i-decimalPoint) < precLimit)
6484 accuracy = (UInt_t)i-decimalPoint;
6486 accuracy = precLimit;
6493 for (UInt_t i=0; i<precLimit; i++) {
6494 if ((Int_t)(param.
fStep*pow(10.0,(Double_t)i)) != 0) {
6500 if (accuracy+1 <= precLimit)
6505 for (UInt_t i=0; i<precLimit; i++) {
6506 if ((Int_t)(param.
fStep*pow(10.0,(Double_t)i)) != 0) {
6512 UInt_t accuracy2 = 6;
6513 for (UInt_t i=0; i<precLimit; i++) {
6514 if ((Int_t)(param.
fStep*pow(10.0,(Double_t)i)) != 0) {
6520 if (accuracy2 > accuracy)
6521 accuracy = accuracy2;
6523 if (accuracy+1 <= precLimit)
6546 if (histo ==
nullptr)
6549 Int_t idx = histo->FindBin(xVal);
6552 if ((idx < 1) || (idx > histo->GetNbinsX()))
6557 if (histo->GetBinCenter(idx) > xVal)
6560 Double_t x0, x1, y0, y1;
6561 x0 = histo->GetBinCenter(idx);
6562 x1 = histo->GetBinCenter(idx+1);
6563 y0 = histo->GetBinContent(idx);
6564 y1 = histo->GetBinContent(idx+1);
6566 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.
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)
virtual void SaveGraphicsAndQuit(const Char_t *fileName, const Char_t *graphicsFormat)
Saves canvas to graphics file and emits Done signal.
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