42#include <TApplication.h>
45#include <TSAXParser.h>
48#include "git-revision.h"
52#include "PStringUtils.h"
96 std::cout << std::endl <<
"usage: musrFT [Options] [<msr-files> | -df, --data-file <data-file>]";
97 std::cout << std::endl <<
" <msr-files> : msr-file name(s). These msr-files are used for the Fourier transform.";
98 std::cout << std::endl <<
" It can be a list of msr-files, e.g. musrFT 3110.msr 3111.msr";
99 std::cout << std::endl <<
" For the syntax of the msr-file check the user manual of musrfit.";
100 std::cout << std::endl <<
" -df, --data-file <data-file> : This allows to feed only muSR data file(s) to";
101 std::cout << std::endl <<
" perform the Fourier transform. Since the extended <msr-file> information";
102 std::cout << std::endl <<
" are missing, they will need to be provided by to options, or musrFT";
103 std::cout << std::endl <<
" tries to guess, based on musrfit_startup.xml settings.";
104 std::cout << std::endl <<
" Options: ";
105 std::cout << std::endl <<
" --help : display this help and exit";
106 std::cout << std::endl <<
" --version : output version information and exit";
107 std::cout << std::endl <<
" -g, --graphic-format <graphic-format-extension> : ";
108 std::cout << std::endl <<
" will produce a graphic-output-file without starting a root session.";
109 std::cout << std::endl <<
" the name is based either on the <msr-file> or the <data-file>,";
110 std::cout << std::endl <<
" e.g. 3310.msr -> 3310_0.png.";
111 std::cout << std::endl <<
" Supported graphic-format-extension: eps, pdf, gif, jpg, png, svg, xpm, root";
112 std::cout << std::endl <<
" --dump <fln> : rather than starting a root session and showing Fourier graphs of the data,";
113 std::cout << std::endl <<
" it will output the Fourier data in an ascii file <fln>.";
114 std::cout << std::endl <<
" -br, --background-range <start> <end>: background interval used to estimate the background to be";
115 std::cout << std::endl <<
" subtracted before the Fourier transform. <start>, <end> to be given in bins.";
116 std::cout << std::endl <<
" -bg, --background <list> : gives the background explicit for each histogram.";
117 std::cout << std::endl <<
" -fo, --fourier-option <fopt>: <fopt> can be 'real', 'imag', 'real+imag', 'power', 'phase', or 'phaseOptReal'.";
118 std::cout << std::endl <<
" If this is not defined (neither on the command line nor in the musrfit_startup.xml),";
119 std::cout << std::endl <<
" default will be 'power'.";
120 std::cout << std::endl <<
" -ap, --apodization <val> : <val> can be either 'none', 'weak', 'medium', 'strong'.";
121 std::cout << std::endl <<
" Default will be 'none'.";
122 std::cout << std::endl <<
" -fp, --fourier-power <N> : <N> being the Fourier power, i.e. 2^<N> used for zero padding.";
123 std::cout << std::endl <<
" Default is -1, i.e. no zero padding will be performed.";
124 std::cout << std::endl <<
" -u, --units <units> : <units> is used to define the x-axis of the Fourier transform.";
125 std::cout << std::endl <<
" One may choose between the fields (Gauss) or (Tesla), the frequency (MHz),";
126 std::cout << std::endl <<
" and the angular-frequency domain (Mc/s).";
127 std::cout << std::endl <<
" Default will be 'MHz'.";
128 std::cout << std::endl <<
" -ph, --phase <val> : defines the initial phase <val>. This only is of concern for 'real',";
129 std::cout << std::endl <<
" '<imag>', and 'real+imag'.";
130 std::cout << std::endl <<
" Default will be 0.0.";
131 std::cout << std::endl <<
" -fr, --fourier-range <start> <end> : Fourier range. <start>, <end> are interpreted in the units given.";
132 std::cout << std::endl <<
" Default will be -1.0 for both which means, take the full Fourier range.";
133 std::cout << std::endl <<
" -tr, --time-range <start> <end> : time domain range to be used for Fourier transform.";
134 std::cout << std::endl <<
" <start>, <end> are to be given in (us). If nothing is given, the full time range";
135 std::cout << std::endl <<
" found in the data file(s) will be used.";
136 std::cout << std::endl <<
" --histo <list> : give the <list> of histograms to be used for the Fourier transform.";
137 std::cout << std::endl <<
" E.g. musrFT -df lem15_his_01234.root --histo 1 3, will only be needed together with";
138 std::cout << std::endl <<
" the option --data-file. If multiple data file are given, <list> will apply";
139 std::cout << std::endl <<
" to all data-files given. If --histo is not given, all histos of a data file will be used.";
140 std::cout << std::endl <<
" <list> can be anything like: 2 3 6, or 2-17, or 1-6 9, etc.";
141 std::cout << std::endl <<
" -a, --average : show the average of ALL Fourier transformed data.";
142 std::cout << std::endl <<
" -ad, --average-per-data-set : show the average of the Fourier transformed data per data set.";
143 std::cout << std::endl <<
" --t0 <list> : A list of t0's can be provided. This in conjunction with --data-file and";
144 std::cout << std::endl <<
" --fourier-option real allows to get the proper initial phase if t0's are known.";
145 std::cout << std::endl <<
" If a single t0 for multiple histos is given, it is assume, that this t0 is common";
146 std::cout << std::endl <<
" to all histos.";
147 std::cout << std::endl <<
" Example: musrFT -df lem15_his_01234.root -fo real --t0 2750 --histo 1 3";
148 std::cout << std::endl <<
" -pa, --packing <N> : if <N> (an integer), the time domain data will first be packed/rebinned by <N>.";
149 std::cout << std::endl <<
" --title <title> : give a global title for the plot.";
150 std::cout << std::endl <<
" --create-msr-file <fln> : creates a msr-file based on the command line options";
151 std::cout << std::endl <<
" provided. This will help on the way to a full fitting model.";
152 std::cout << std::endl <<
" -lc, --lifetimecorrection <fudge>: try to eliminate muon life time decay. Only makes sense for low";
153 std::cout << std::endl <<
" transverse fields. <fudge> is a tweaking factor and should be kept around 1.0.";
154 std::cout << std::endl <<
" --timeout <timeout> : <timeout> given in seconds after which musrFT terminates.";
155 std::cout << std::endl <<
" If <timeout> <= 0, no timeout will take place. Default <timeout> is 3600.";
156 std::cout << std::endl << std::endl;
168 startupParam.
dumpFln = TString(
"");
184 startupParam.
title = TString(
"");
207 Int_t start = i+1, end = 0;
211 if (argv[i][0] ==
'-') {
212 if (!isdigit(argv[i][1]) || (argv[i][1] ==
'-'))
219 std::cerr << std::endl <<
">> musrFT **ERROR** something is wrong with the --histo arguments." << std::endl;
220 startupParam.
histo.clear();
226 for (Int_t j=start; j<end; j++) {
228 if (!tstr.Contains(
"-")) {
229 if (tstr.IsDigit()) {
230 startupParam.
histo.push_back(tstr.Atoi());
232 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument '" << tstr <<
"' which is not a number." << std::endl;
233 startupParam.
histo.clear();
237 std::vector<std::string> tok = PStringUtils::Split(tstr.Data(),
"-");
238 if (tok.size() != 2) {
239 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument '" << tstr <<
"' which is not of the form <h0>-<hN>." << std::endl;
240 startupParam.
histo.clear();
244 Int_t first=0, last=0;
246 if (sstr.IsDigit()) {
249 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument '" << tstr <<
"' which is of the form <h0>-<hN>,";
250 std::cerr << std::endl <<
" but <h0>='" << sstr <<
"' is not a number." << std::endl;
251 startupParam.
histo.clear();
255 if (sstr.IsDigit()) {
258 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument '" << tstr <<
"' which is of the form <h0>-<hN>,";
259 std::cerr << std::endl <<
" but <hN>='" << sstr <<
"' is not a number." << std::endl;
260 startupParam.
histo.clear();
265 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument of the form <h0>-<hN> with h0=" << first <<
" > hN=" << last <<
"." << std::endl;
266 startupParam.
histo.clear();
270 for (Int_t k=first; k<=last; k++) {
271 startupParam.
histo.push_back(k);
293 for (Int_t i=1; i<argc; i++) {
295 if (tstr.BeginsWith(
"--version")) {
298 std::cout << std::endl <<
"musrFT version: " << PACKAGE_VERSION <<
", git-branch: " << GIT_BRANCH <<
", git-rev: " << GIT_CURRENT_SHA1 <<
" (" << BUILD_TYPE <<
"), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
300 std::cout << std::endl <<
"musrFT version: " << PACKAGE_VERSION <<
" (" << BUILD_TYPE <<
"), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
304 std::cout << std::endl <<
"musrFT git-branch: " << GIT_BRANCH <<
", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
306 std::cout << std::endl <<
"musrFT version: unknown." << std::endl << std::endl;
310 }
else if (tstr.BeginsWith(
"--help")) {
313 }
else if (tstr.BeginsWith(
"-g") || tstr.BeginsWith(
"--graphic-format")) {
315 std::cerr << std::endl <<
">> musrFT **ERROR** found option --graphic-format without argument!" << std::endl;
318 TString topt(argv[i+1]);
319 if (!topt.BeginsWith(
"eps") && !topt.BeginsWith(
"pdf") && !topt.BeginsWith(
"gif") && !topt.BeginsWith(
"jpg") &&
320 !topt.BeginsWith(
"png") && !topt.BeginsWith(
"svg") && !topt.BeginsWith(
"xpm") && !topt.BeginsWith(
"root")) {
321 std::cerr << std::endl <<
">> musrFT **ERROR** found unrecogniced graphic format '" << topt <<
"'!" << std::endl;
326 }
else if (tstr.BeginsWith(
"--dump")) {
328 std::cerr << std::endl <<
">> musrFT **ERROR** found option --dump without argument!" << std::endl;
331 startupParam.
dumpFln = argv[i+1];
333 }
else if (tstr.Contains(
"-br") || tstr.Contains(
"--background-range")) {
335 std::cerr << std::endl <<
">> musrFT **ERROR** found option --background-range with wrong number of arguments." << std::endl;
339 bkgRange[0] = argv[i+1];
340 bkgRange[1] = argv[i+2];
341 if (!bkgRange[0].IsDigit()) {
342 std::cerr << std::endl <<
">> musrFT **ERROR** <start> bin of option --background-range is NOT an int-number! ('" << bkgRange[0] <<
"')." << std::endl;
345 if (!bkgRange[1].IsDigit()) {
346 std::cerr << std::endl <<
">> musrFT **ERROR** <end> bin of option --background-range is NOT an int-number! ('" << bkgRange[1] <<
"')." << std::endl;
349 startupParam.
bkg_range[0] = bkgRange[0].Atoi();
350 startupParam.
bkg_range[1] = bkgRange[1].Atoi();
352 }
else if (tstr.BeginsWith(
"-bg") || !tstr.CompareTo(
"--background")) {
355 if (argv[i][0] ==
'-') {
360 if (!topt.IsFloat()) {
361 std::cerr << std::endl <<
">> musrFT **ERROR** found option --background='" << topt <<
"' which is not a float" << std::endl;
364 startupParam.
bkg.push_back(topt.Atoi());
367 if (startupParam.
bkg.size() == 0) {
368 std::cerr << std::endl <<
">> musrFT **ERROR** found option --background without argument!" << std::endl;
371 }
else if (tstr.BeginsWith(
"-fo") || tstr.BeginsWith(
"--fourier-option")) {
373 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-option without arguments." << std::endl;
376 TString topt(argv[i+1]);
377 if (!topt.BeginsWith(
"real") && !topt.BeginsWith(
"imag") && !topt.BeginsWith(
"power") &&
378 !topt.BeginsWith(
"phase") && !topt.BeginsWith(
"phaseOptReal")) {
379 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-option with unrecognized argument '" << topt <<
"'." << std::endl;
384 }
else if (tstr.BeginsWith(
"-ap") || tstr.BeginsWith(
"--apodization")) {
386 std::cerr << std::endl <<
">> musrFT **ERROR** found option --apodization without arguments." << std::endl;
389 TString topt(argv[i+1]);
390 if (!topt.BeginsWith(
"none") && !topt.BeginsWith(
"weak") && !topt.BeginsWith(
"medium") && !topt.BeginsWith(
"strong")) {
391 std::cerr << std::endl <<
">> musrFT **ERROR** found option --apodization with unrecognized argument '" << topt <<
"'." << std::endl;
396 }
else if (tstr.BeginsWith(
"-fp") || tstr.BeginsWith(
"--fourier-power")) {
398 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-power without arguments." << std::endl;
401 TString fourierPower(argv[i+1]);
402 if (!fourierPower.IsDigit()) {
403 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-power with a power which is not an integer '" << fourierPower <<
"'." << std::endl;
408 std::cerr << std::endl <<
">> musrFT **ERROR** found Fourier power '" << fourierPower <<
"', which is out of range [1..20]" << std::endl;
412 }
else if (tstr.BeginsWith(
"-u") || tstr.BeginsWith(
"--units")) {
414 std::cerr << std::endl <<
">> musrFT **ERROR** found option --units without arguments." << std::endl;
417 TString topt(argv[i+1]);
418 if (!topt.BeginsWith(
"MHz", TString::kIgnoreCase) && !topt.BeginsWith(
"Gauss", TString::kIgnoreCase) &&
419 !topt.BeginsWith(
"Tesla", TString::kIgnoreCase) && !topt.BeginsWith(
"Mc/s", TString::kIgnoreCase)) {
420 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-option with unrecognized argument '" << topt <<
"'." << std::endl;
425 }
else if (tstr.BeginsWith(
"-ph") || tstr.BeginsWith(
"--phase")) {
427 std::cerr << std::endl <<
">> musrFT **ERROR** found option --phase without argument!" << std::endl;
430 TString phase(argv[i+1]);
431 if (!phase.IsFloat()) {
432 std::cerr << std::endl <<
">> musrFT **ERROR** found --phase argument '" << phase <<
"' which is not a number." << std::endl;
437 }
else if (tstr.BeginsWith(
"-fr") || tstr.BeginsWith(
"--fourier-range")) {
439 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-range with wrong number of arguments!" << std::endl;
442 TString fourierRange[2] = {argv[i+1], argv[i+2]};
443 if (!fourierRange[0].IsFloat() || !fourierRange[1].IsFloat()) {
444 std::cerr << std::endl <<
">> musrFT **ERROR** found invalid --fourier-range arguments '" << fourierRange[0] <<
"' and/or '" << fourierRange[1] <<
"'." << std::endl;
450 }
else if (tstr.BeginsWith(
"-tr") || tstr.BeginsWith(
"--time-range")) {
452 std::cerr << std::endl <<
">> musrFT **ERROR** found option --time-range with wrong number of arguments!" << std::endl;
455 TString timeRange[2] = {argv[i+1], argv[i+2]};
456 if (!timeRange[0].IsFloat() || !timeRange[1].IsFloat()) {
457 std::cerr << std::endl <<
">> musrFT **ERROR** found invalid --time-range arguments '" << timeRange[0] <<
"' and/or '" << timeRange[1] <<
"'." << std::endl;
460 startupParam.
timeRange[0] = timeRange[0].Atof();
461 startupParam.
timeRange[1] = timeRange[1].Atof();
463 }
else if (!tstr.CompareTo(
"-a") || !tstr.CompareTo(
"--average")) {
465 }
else if (!tstr.CompareTo(
"-ad") || !tstr.CompareTo(
"--average-per-data-set")) {
467 }
else if (tstr.BeginsWith(
"--histo")) {
470 }
else if (tstr.BeginsWith(
"--t0")) {
473 if (argv[i][0] ==
'-') {
478 if (!topt.IsDigit()) {
479 std::cerr << std::endl <<
">> musrFT **ERROR** found option t0='" << topt <<
"' which is not a number" << std::endl;
482 startupParam.
t0.push_back(topt.Atoi());
485 if (startupParam.
t0.size() == 0) {
486 std::cerr << std::endl <<
">> musrFT **ERROR** found option --t0 without argument!" << std::endl;
489 }
else if (tstr.BeginsWith(
"--title")) {
491 std::cerr << std::endl <<
">> musrFT **ERROR** found option --title without argument!" << std::endl;
495 startupParam.
title = argv[i];
496 }
else if (tstr.BeginsWith(
"-pa") || tstr.BeginsWith(
"--packing")) {
498 std::cerr << std::endl <<
">> musrFT **ERROR** found option --packing without argument!" << std::endl;
502 TString pack = TString(argv[i]);
503 if (!pack.IsDigit()) {
504 std::cerr << std::endl <<
">> musrFT **ERROR** found option --packing with argument '" << pack <<
"' which is NOT an integer!" << std::endl;
507 startupParam.
packing = pack.Atoi();
508 }
else if (tstr.BeginsWith(
"--create-msr-file")) {
510 std::cerr << std::endl <<
">> musrFT **ERROR** found option --create-msr-file without argument!" << std::endl;
514 startupParam.
msrFlnOut = TString(argv[i]);
515 }
else if (tstr.BeginsWith(
"-lc") || tstr.BeginsWith(
"--lifetimecorrection")) {
517 std::cerr << std::endl <<
">> musrFT **ERROR** found option --lifetimecorrection without argument!" << std::endl;
521 TString fudge(argv[i]);
522 if (!fudge.IsFloat()) {
523 std::cerr << std::endl <<
">> musrFT **ERROR** found option --lifetimecorrection with a fudge which is not a double '" << fudge <<
"'." << std::endl;
527 }
else if (tstr.BeginsWith(
"--timeout")) {
529 std::cerr << std::endl <<
">> musrFT **ERROR** found option --timeout without argument!" << std::endl;
535 std::cerr << std::endl <<
">> musrFT **ERROR** found option --timeout with a <timeout> which is not an integer '" << tt <<
"'." << std::endl;
538 startupParam.
timeout = tt.Atoi();
539 }
else if (tstr.BeginsWith(
"-df") || tstr.BeginsWith(
"--data-file")) {
541 if (argv[i][0] ==
'-') {
545 startupParam.
dataFln.push_back(argv[i]);
546 TString fln(argv[i]);
547 TString fileFormat(
"??");
548 if (fln.Contains(
".root", TString::kIgnoreCase))
549 fileFormat =
"MusrRoot";
550 else if (fln.Contains(
".bin", TString::kIgnoreCase))
551 fileFormat =
"PsiBin";
552 else if (fln.Contains(
".mdu", TString::kIgnoreCase))
553 fileFormat =
"PsiMdu";
554 else if (fln.Contains(
".nxs", TString::kIgnoreCase))
555 fileFormat =
"NeXus";
556 else if (fln.Contains(
".msr", TString::kIgnoreCase))
559 if (fileFormat ==
"??") {
560 std::cerr << std::endl <<
">> musrFT **ERROR** found data file name with unrecognized data file format ('" << fln <<
"')." << std::endl;
567 if (startupParam.
dataFln.size() == 0) {
568 std::cerr << std::endl <<
">> musrFT **ERROR** found option --data-file without argument!" << std::endl;
571 }
else if (tstr.Contains(
".msr")) {
572 startupParam.
msrFln.push_back(tstr);
574 std::cerr << std::endl <<
">> musrFT **ERROR** unrecognized option '" << tstr <<
"' found." << std::endl;
580 if ((startupParam.
msrFln.size() == 0) && (startupParam.
dataFln.size() == 0)) {
581 std::cerr << std::endl <<
">> musrFT **ERROR** neither <msr-file> nor <data-file> defined." << std::endl;
585 std::cerr << std::endl <<
">> musrFT **WARNING** in --background-range, start=" << startupParam.
bkg_range[0] <<
" > end=" << startupParam.
bkg_range[1] <<
", will swap them." << std::endl;
586 Double_t swap = startupParam.
bkg_range[0];
591 std::cerr << std::endl <<
">> musrFT **WARNING** in --fourier-range, start=" << startupParam.
fourierRange[0] <<
" > end=" << startupParam.
fourierRange[1] <<
", will swap them." << std::endl;
597 std::cerr << std::endl <<
">> musrFT **WARNING** Options: --average and --average-per-data-set exclude each other, will choose the latter." << std::endl;
618 size_t idx = str.Last(
'/');
620 str.Remove(0, idx+1);
625 metaInfo += TString::Format(
"T%d=%0.2fK,", i, rawRunData->
GetTemperature(i));
630 metaInfo += TString(
"B=??,");
631 else if (dval < 5000.0)
632 metaInfo += TString::Format(
"B=%0.1fG,", dval);
634 metaInfo += TString::Format(
"B=%0.1fT,", dval/1.0e4);
638 metaInfo += TString(
"E=??;");
639 else if (dval < 1000.0)
640 metaInfo += TString::Format(
"E=%0.1fkeV;", dval);
642 metaInfo += TString::Format(
"E=%0.1fMeV;", dval/1.0e3);
659 std::cout << std::endl <<
">> musrFT **WARNING** try to estimate t0 from maximum in the data set";
660 std::cout << std::endl <<
" '" << rd.
info <<
"'";
661 std::cout << std::endl <<
" NO warranty this is sensible!" << std::endl;
665 for (UInt_t i=1; i<rd.
rawData.size(); i++) {
671 std::cout << std::endl <<
">> musrFT_estimateT0: estimated t0=" << idx << std::endl;
698Int_t
musrFT_dumpData(TString fln, std::vector<PFourier*> &fourierData, Double_t start, Double_t end)
700 std::vector<PDoubleVector> data;
705 TH1F *hRe=
nullptr, *hIm=
nullptr;
709 hRe = fourierData[0]->GetRealFourier();
711 start = hRe->GetBinCenter(1);
713 end = hRe->GetBinCenter(hRe->GetNbinsX());
716 UInt_t minSize = hRe->GetNbinsX()-1;
718 for (UInt_t i=1; i<fourierData.size(); i++) {
719 hRe = fourierData[i]->GetRealFourier();
720 if (hRe->GetNbinsX()-1 < (Int_t)minSize)
721 minSize = hRe->GetNbinsX()-1;
725 for (UInt_t i=0; i<fourierData.size(); i++) {
726 hRe = fourierData[i]->GetRealFourier();
727 hIm = fourierData[i]->GetImaginaryFourier();
728 for (Int_t j=1; j<(Int_t)minSize; j++) {
729 dval = hRe->GetBinCenter(j);
730 if ((dval >= start) && (dval <= end)) {
731 freq.push_back(dval);
732 re.push_back(hRe->GetBinContent(j));
733 im.push_back(hIm->GetBinContent(j));
734 pwr.push_back(hRe->GetBinContent(j)*hRe->GetBinContent(j)+hIm->GetBinContent(j)*hIm->GetBinContent(j));
737 data.push_back(freq);
750 std::ofstream fout(fln, std::ofstream::out);
754 for (UInt_t i=0; i<fourierData.size()-1; i++)
755 fout <<
"freq" << i <<
", Re[d" << i <<
"], Im[d" << i <<
"], Pwr[d" << i <<
"], ";
756 fout <<
"freq" << fourierData.size()-1 <<
", Re[d" << fourierData.size()-1 <<
"], Im[d" << fourierData.size()-1 <<
"], Pwr[d" << fourierData.size()-1 <<
"]" << std::endl;
759 for (UInt_t j=0; j<data[0].size(); j++) {
760 for (UInt_t i=0; i<data.size()-1; i++) {
761 fout << data[i][j] <<
", ";
763 fout << data[data.size()-1][j] << std::endl;
785 if (rawRunData ==
nullptr) {
786 std::cerr << std::endl <<
">> musrFT_groupHistos **ERROR** Couldn't get raw run data for run '" << runName <<
"'." << std::endl;
798 t0.resize(histoList.size());
800 for (UInt_t i=0; i<t0.size(); i++)
804 if (i >= t0.size()) {
805 std::cerr << std::endl <<
">> musrFT_groupHistos **WARNING** found #t0's in GLOBAL block > #histos!";
806 std::cerr << std::endl <<
">> This should NEVER happen. Will ignore these entries.";
807 std::cerr << std::endl <<
">> Please check your msr-file!!" << std::endl;
814 if (i >= t0.size()) {
815 std::cerr << std::endl <<
">> musrFT_groupHistos **WARNING** found #t0's in RUN block > #histos!";
816 std::cerr << std::endl <<
">> This should NEVER happen. Will ignore these entries.";
817 std::cerr << std::endl <<
">> Please check your msr-file!!" << std::endl;
825 for (UInt_t i=0; i<t0.size(); i++) {
827 std::cout << std::endl <<
">> musrFT_groupHistos **WARNING** try to estimate t0 from maximum in the data set";
828 std::cout << std::endl <<
">> '" << runName <<
"', histo " << histoList[i] <<
". NO warranty this is sensible!";
830 max = rawRunData->
GetDataBin(histoList[i])->at(0);
831 for (UInt_t j=1; j<rawRunData->
GetDataBin(histoList[i])->size(); j++) {
832 if (rawRunData->
GetDataBin(histoList[i])->at(j) > max) {
833 max = rawRunData->
GetDataBin(histoList[i])->at(j);
837 std::cout << std::endl <<
">> estimated t0=" << idx << std::endl;
844 for (UInt_t i=1; i<histoList.size(); i++) {
845 for (UInt_t j=0; j<data.size(); j++) {
846 if ((j+t0[i]-t0[0] >= 0) && (j+t0[i]-t0[0] < rawRunData->
GetDataBin(histoList[i])->size())) {
847 data[j] += rawRunData->
GetDataBin(histoList[i])->at(j);
854 rd.
t0 =
static_cast<Int_t
>(t0[0]);
871 std::ofstream fout(param.
msrFlnOut.Data(), std::ofstream::out);
874 if (param.
title.Length() == 0) {
875 if (param.
dataFln.size() != 0) {
881 fout << param.
title << std::endl;
882 fout <<
"###############################################################" << std::endl;
885 fout <<
"GLOBAL" << std::endl;
886 fout <<
"fittype 0 (single histogram fit)" << std::endl;
887 if (param.
t0.size() == 1) {
888 fout <<
"t0 " << param.
t0[0] << std::endl;
893 fout <<
"packing " << param.
packing << std::endl;
895 fout <<
"###############################################################" << std::endl;
899 TString fileFormat(
"MUSR-ROOT");
900 for (UInt_t i=0; i<param.
dataFln.size(); i++) {
902 fileFormat = TString(
"PSI-BIN");
904 fileFormat = TString(
"PSI-MDU");
906 fileFormat = TString(
"NEXUS");
908 fileFormat = TString(
"MUD");
909 for (UInt_t j=0; j<param.
histo.size(); j++) {
910 fout <<
"RUN " << param.
dataFln[i] <<
" BXXX IXX " << fileFormat <<
" (name beamline institute data-file-format)" << std::endl;
911 fout <<
"forward " << param.
histo[j] << std::endl;
912 if ((param.
t0.size() > 1) && (j < param.
t0.size())) {
913 fout <<
"t0 " << param.
t0[j] << std::endl;
916 fout <<
"background " << param.
bkg_range[0] <<
" " << param.
bkg_range[1] << std::endl;
917 fout <<
"#--------------------------------------------------------------" << std::endl;
921 fout <<
"###############################################################" << std::endl;
924 fout <<
"PLOT 0 (single histo plot)" << std::endl;
925 if (param.
histo.size() == 0) {
926 fout <<
"runs 1" << std::endl;
929 for (UInt_t i=0; i<param.
histo.size(); i++)
934 fout <<
"range 0 10" << std::endl;
939 fout <<
"###############################################################" << std::endl;
942 fout <<
"FOURIER" << std::endl;
944 fout <<
"units MHz # units either 'Gauss', 'MHz', or 'Mc/s'" << std::endl;
946 fout <<
"units " << param.
fourierUnits <<
" # units either 'Gauss', 'MHz', or 'Mc/s'" << std::endl;
949 fout <<
"plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL" << std::endl;
951 fout <<
"plot " << param.
fourierOpt <<
" # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL" << std::endl;
954 fout <<
"fourier_power " << param.
fourierPower << std::endl;
956 fout <<
"apodization " << param.
apodization <<
" # NONE, WEAK, MEDIUM, STRONG" << std::endl;
973 gettimeofday(&now, 0);
975 return (
static_cast<Double_t
>(now.tv_sec) * 1.0e6 +
static_cast<Double_t
>(now.tv_usec))/1.0e3;
989Int_t
main(Int_t argc, Char_t *argv[])
1017 if (startupParam.
msrFlnOut.Length() > 0) {
1027 std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
1028 std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
1029 if (!startupHandler->StartupFileFound()) {
1030 std::cerr << std::endl <<
">> musrFT **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
1031 std::cerr << std::endl;
1034 saxParser->ConnectToHandler(
"PStartupHandler", startupHandler.get());
1041 std::cerr << std::endl <<
">> musrFT **WARNING** Reading/parsing musrfit_startup.xml failed.";
1042 std::cerr << std::endl;
1050 std::vector< std::unique_ptr<PMsrHandler> > msrHandler;
1051 msrHandler.resize(startupParam.
msrFln.size());
1052 for (UInt_t i=0; i<startupParam.
msrFln.size(); i++) {
1053 msrHandler[i] = std::make_unique<PMsrHandler>(startupParam.
msrFln[i].Data(), &startup_options,
true);
1054 status = msrHandler[i]->ReadMsrFile();
1058 std::cout << std::endl <<
">> musrFT **ERROR** couldn't find " << startupParam.
msrFln[i] << std::endl << std::endl;
1061 std::cout << std::endl <<
">> musrFT **SYNTAX ERROR** in file " << startupParam.
msrFln[i] <<
", full stop here." << std::endl << std::endl;
1064 std::cout << std::endl <<
">> musrFT **UNKOWN ERROR** when trying to read the msr-file" << std::endl << std::endl;
1073 for (UInt_t i=0; i<msrHandler.size(); i++) {
1074 PMsrRunList *runList = msrHandler[i]->GetMsrRunList();
1075 for (UInt_t j=0; j<runList->at(i).GetFileFormatSize(); j++) {
1076 ffstr = *(runList->at(i).GetFileFormat(j));
1077 if (!ffstr.CompareTo(
"ascii", TString::kIgnoreCase) || !ffstr.CompareTo(
"dat", TString::kIgnoreCase) || !ffstr.CompareTo(
"db", TString::kIgnoreCase)) {
1078 std::cout << std::endl;
1079 std::cout <<
"**ERROR** Currently file format's 'ASCII', 'DAT', nor 'DB' are NOT supported." << std::endl;
1080 std::cout << std::endl;
1086 std::vector< std::unique_ptr<PRunDataHandler> > runDataHandler;
1087 runDataHandler.resize(startupParam.
msrFln.size()+startupParam.
dataFln.size());
1089 for (UInt_t i=0; i<msrHandler.size(); i++) {
1092 runDataHandler[i] = std::make_unique<PRunDataHandler>(msrHandler[i].get(), startupHandler->GetDataPathList());
1094 runDataHandler[i] = std::make_unique<PRunDataHandler>(msrHandler[i].get());
1095 if (runDataHandler[i] ==
nullptr) {
1096 std::cerr <<
">> musrFT: **ERROR** couldn't allocate PRunDataHandler object." << std::endl;
1102 for (UInt_t i=msrHandler.size(); i<msrHandler.size()+startupParam.
dataFln.size(); i++) {
1105 runDataHandler[i] = std::make_unique<PRunDataHandler>(startupParam.
dataFln[i-msrHandler.size()], startupParam.
dataFileFormat[i-msrHandler.size()], startupHandler->GetDataPathList());
1107 runDataHandler[i] = std::make_unique<PRunDataHandler>(startupParam.
dataFln[i-msrHandler.size()], startupParam.
dataFileFormat[i-msrHandler.size()]);
1108 if (runDataHandler[i] ==
nullptr) {
1109 std::cerr <<
">> musrFT: **ERROR** couldn't allocate PRunDataHandler object." << std::endl;
1117 Int_t dataSetTagCounter = 0;
1118 TString prevDataSetPathName(
"");
1119 TString str(
""), fln(
"");
1122 for (UInt_t i=0; i<runDataHandler.size(); i++) {
1123 runDataHandler[i]->ReadData();
1125 if (!runDataHandler[i]->IsAllDataAvailable()) {
1126 if (i < msrHandler.size()) {
1127 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't read data from msr-file '" << startupParam.
msrFln[i] <<
"'." << std::endl;
1129 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't read data-file '" << startupParam.
dataFln[i] <<
"'." << std::endl;
1135 PRawRunData *rawRunData = runDataHandler[i]->GetRunData();
1136 if (rawRunData ==
nullptr) {
1137 if (i < msrHandler.size()) {
1138 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain the raw run data set from msr-file " << startupParam.
msrFln[i] << std::endl;
1140 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain the raw run data set for " << startupParam.
dataFln[i-msrHandler.size()] << std::endl;
1146 if (i >= msrHandler.size()) {
1147 for (UInt_t j=0; j<startupParam.
histo.size(); j++) {
1149 std::cerr << std::endl <<
">> musrFT **ERROR** found histo no " << startupParam.
histo[j] <<
" > # of histo in the file (";
1150 std::cerr << startupParam.
dataFln[i] <<
" // # histo: " << rawRunData->
GetNoOfHistos() <<
")." << std::endl;
1154 if (startupParam.
histo.size() == 0) {
1157 startupParam.
histo.push_back(j+1);
1162 if (i < msrHandler.size()) {
1164 if (startupParam.
title.Length() == 0)
1165 startupParam.
title = *(msrHandler[0]->GetMsrTitle());
1168 if (plot ==
nullptr) {
1169 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain PLOT block from msr-handler." << std::endl;
1173 PMsrRunList *runs = msrHandler[i]->GetMsrRunList();
1174 if (runs ==
nullptr) {
1175 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain RUN block(s) from msr-handler." << std::endl;
1180 if (global ==
nullptr) {
1181 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain GLOBAL block from msr-handler." << std::endl;
1186 if (fourierBlock ==
nullptr) {
1187 std::cerr << std::endl <<
">> msrFT **WARNING** couldn't obtain FOURIER block from msr-handler." << std::endl;
1192 unitTag = fourierBlock->
fUnits;
1237 if (startupParam.
fourierOpt.BeginsWith(
"??")) {
1238 fourierPlotTag = fourierBlock->
fPlotTag;
1247 for (UInt_t j=0; j<runList.size(); j++) {
1250 str = *(runs->at(runList[j]-1).GetRunName());
1251 if (prevDataSetPathName.CompareTo(str)) {
1253 prevDataSetPathName = str;
1258 for (UInt_t k=0; k<runs->at(runList[j]-1).GetForwardHistoNoSize(); k++) {
1259 histoList.push_back(runs->at(runList[j]-1).GetForwardHistoNo(k));
1263 fln = *(runs->at(runList[j]-1).GetRunName());
1266 hh = TString::Format(
"h%d", histoList[0]);
1267 for (UInt_t k=1; k<histoList.size(); k++)
1268 hh += TString::Format(
"/%d", histoList[k]);
1282 if (plot->at(0).fTmin.size() > 0) {
1290 if (
musrFT_groupHistos(runDataHandler[i].get(), global, runs->at(runList[j]-1), rd)) {
1301 if (runs->at(runList[j]-1).GetPacking() != -1) {
1302 pack = runs->at(runList[j]-1).GetPacking();
1309 Int_t bkgStart=-1, bkgEnd=-1;
1310 bkgStart = runs->at(runList[j]-1).GetBkgRange(0);
1311 bkgEnd = runs->at(runList[j]-1).GetBkgRange(1);
1312 if ((startupParam.
bkg_range[0] == -1) && (bkgStart != -1))
1314 if ((startupParam.
bkg_range[1] == -1) && (bkgEnd != -1))
1321 str = *(runDataHandler[i]->GetRunData()->GetFileName());
1322 if (prevDataSetPathName.CompareTo(str)) {
1324 prevDataSetPathName = str;
1328 for (UInt_t j=0; j<startupParam.
histo.size(); j++) {
1329 idx = startupParam.
histo[j];
1332 rd.
info = TString::Format(
"h%d:", idx);
1348 if (startupParam.
t0.size() == 1)
1349 rd.
t0 = startupParam.
t0[0];
1350 else if (j < startupParam.
t0.size())
1351 rd.
t0 = startupParam.
t0[j];
1369 if (!startupParam.
fourierOpt.CompareTo(
"real", TString::kIgnoreCase))
1371 else if (!startupParam.
fourierOpt.CompareTo(
"imag", TString::kIgnoreCase))
1373 else if (!startupParam.
fourierOpt.CompareTo(
"real+imag", TString::kIgnoreCase))
1375 else if (!startupParam.
fourierOpt.CompareTo(
"power", TString::kIgnoreCase))
1377 else if (!startupParam.
fourierOpt.CompareTo(
"phase", TString::kIgnoreCase))
1379 else if (!startupParam.
fourierOpt.CompareTo(
"phaseoptreal", TString::kIgnoreCase))
1396 std::vector<TH1F*> histo = data.
GetData();
1399 if (startupParam.
fourierUnits.BeginsWith(
"gauss", TString::kIgnoreCase))
1401 else if (startupParam.
fourierUnits.BeginsWith(
"tesla", TString::kIgnoreCase))
1403 else if (startupParam.
fourierUnits.BeginsWith(
"mhz", TString::kIgnoreCase))
1405 else if (startupParam.
fourierUnits.BeginsWith(
"mc/s", TString::kIgnoreCase))
1410 std::vector<PFourier*> fourier;
1411 fourier.resize(histo.size());
1412 for (UInt_t i=0; i<fourier.size(); i++) {
1414 if (fourier[i] ==
nullptr) {
1415 std::cerr <<
">> musrFT: **ERROR** couldn't invoke PFourier object" << std::endl;
1421 if (startupParam.
apodization.BeginsWith(
"weak", TString::kIgnoreCase))
1423 else if (startupParam.
apodization.BeginsWith(
"medium", TString::kIgnoreCase))
1425 else if (startupParam.
apodization.BeginsWith(
"strong", TString::kIgnoreCase))
1429 for (UInt_t i=0; i<fourier.size(); i++) {
1430 fourier[i]->Transform(apodTag);
1433 std::cout << std::endl <<
"info> after FFT. calculation time: " << (end-start)/1.0e3 <<
" (sec)." << std::endl;
1438 startupParam.
fourierRange[1] = fourier[0]->GetMaxFreq();
1441 std::unique_ptr<PFourierCanvas> fourierCanvas;
1444 if (startupParam.
dumpFln.Length() > 0) {
1449 Bool_t batch =
false;
1451 std::vector<char*> args;
1452 args.push_back(argv[0]);
1455 args.push_back((
char*)
"-b");
1457 int cc = args.size();
1459 TApplication app(
"App", &cc, args.data());
1461 if (startupHandler) {
1462 fourierCanvas = std::unique_ptr<PFourierCanvas>(
new PFourierCanvas(fourier, dataSetTag, startupParam.
title.Data(),
1466 startupHandler->GetMarkerList(),
1467 startupHandler->GetColorList(),
1470 fourierCanvas = std::unique_ptr<PFourierCanvas>(
new PFourierCanvas(fourier, dataSetTag, startupParam.
title.Data(),
1476 if (fourierCanvas ==
nullptr) {
1477 std::cerr <<
">> musrFT: **ERROR** couldn't invoke PFourierCanvas object." << std::endl;
1481 fourierCanvas->UpdateFourierPad();
1482 fourierCanvas->UpdateInfoPad();
1485 if (!fourierCanvas->IsValid()) {
1486 std::cerr << std::endl <<
">> musrFT **SEVERE ERROR** Couldn't invoke all necessary objects, will quit.";
1487 std::cerr << std::endl;
1491 TQObject::Connect(
"TCanvas",
"Closed()",
"PFourierCanvas", fourierCanvas.get(),
"LastCanvasClosed()");
1493 fourierCanvas->SetTimeout(startupParam.
timeout);
1495 fourierCanvas->Connect(
"Done(Int_t)",
"TApplication", &app,
"Terminate(Int_t)");
1498 TString fileName(
"");
1500 if (startupParam.
dataFln.size() > 0) {
1501 fileName = startupParam.
dataFln[0];
1503 if (startupParam.
msrFln.size() > 0) {
1504 fileName = startupParam.
msrFln[0];
1506 Ssiz_t idx = fileName.Last(
'.');
1507 fileName.Remove(idx, fileName.Length());
1510 fourierCanvas->SaveGraphicsAndQuit(fileName.Data());
#define F_APODIZATION_WEAK
Weak apodization (gentle roll-off at edges)
#define F_APODIZATION_STRONG
Strong apodization (heavy roll-off for best frequency resolution)
#define F_APODIZATION_NONE
No apodization (rectangular window)
#define F_APODIZATION_MEDIUM
Medium apodization (moderate roll-off)
#define PMUSR_DATA_FILE_READ_ERROR
Error reading data file (ROOT, NeXus, MUD, etc.)
#define FOURIER_UNIT_FREQ
Frequency in MHz.
#define FOURIER_PLOT_REAL_AND_IMAG
Plot both real and imaginary components (default)
#define PMUSR_SUCCESS
Successful operation completion.
std::vector< PMsrRunBlock > PMsrRunList
#define FOURIER_UNIT_GAUSS
Magnetic field in Gauss (G)
#define PMUSR_UNSUPPORTED_FEATURE
Requested feature is not yet supported.
#define FOURIER_PLOT_NOT_GIVEN
Plot type not specified.
#define FOURIER_PLOT_POWER
Plot power spectrum |F(ω)|²
#define PMUSR_MSR_FILE_NOT_FOUND
MSR file could not be found at specified path.
#define FOURIER_PLOT_REAL
Plot real component only.
#define FOURIER_PLOT_PHASE_OPT_REAL
Plot phase-optimized real component.
#define FOURIER_APOD_WEAK
Weak apodization (gentle windowing)
std::vector< PMsrPlotStructure > PMsrPlotList
#define PMUSR_MSR_SYNTAX_ERROR
Syntax error detected in MSR file content.
#define FOURIER_UNIT_CYCLES
Angular frequency in Mc/s (Mega-cycles per second)
#define FOURIER_APOD_STRONG
Strong apodization (heavy windowing for best frequency resolution)
std::vector< Int_t > PIntVector
#define FOURIER_PLOT_IMAG
Plot imaginary component only.
#define FOURIER_APOD_MEDIUM
Medium apodization (moderate windowing)
#define FOURIER_PLOT_PHASE
Plot phase spectrum arg(F(ω))
#define FOURIER_UNIT_NOT_GIVEN
Units not specified.
#define PMUSR_MSR_ALLOCATION_ERROR
Memory allocation error while processing MSR file.
#define FOURIER_UNIT_TESLA
Magnetic field in Tesla (T)
#define PMUSR_WRONG_STARTUP_SYNTAX
Incorrect startup command syntax provided.
std::vector< TString > PStringVector
std::vector< Double_t > PDoubleVector
const char * startup_path_name
int parseXmlFile(TSAXParser *, const char *)
Replacement function for TSAXParser::ParseFile().
virtual UInt_t GetT0BinSize()
virtual Int_t GetPacking()
virtual Double_t GetT0Bin(UInt_t idx=0)
virtual UInt_t GetForwardHistoNoSize()
virtual TString * GetRunName(UInt_t idx=0)
virtual UInt_t GetT0BinSize()
virtual Int_t GetForwardHistoNo(UInt_t idx=0)
virtual Double_t GetT0Bin(UInt_t idx=0)
Prepares time-domain μSR data for Fourier transformation.
virtual void DoLifeTimeCorrection(Double_t fudge)
Applies muon lifetime correction for theory-free analysis.
virtual void SetPacking(const Int_t packing)
Sets rebinning/packing factor for data reduction.
UInt_t GetNoOfData()
Returns number of stored data sets.
Int_t GetDataSetTag(const UInt_t idx)
Returns data set tag identifier.
virtual void AddData(musrFT_data &data)
Adds a time-domain data set for processing.
std::vector< TH1F * > GetData()
Creates ROOT histograms for all processed data sets.
virtual void DoBkgCorrection()
Applies background correction to all data sets.
virtual void SetBkgRange(const Int_t *bkgRange)
Sets background range for automatic background calculation.
virtual void DoPacking()
Applies rebinning/packing to reduce data points.
virtual const PDoubleVector * GetDataBin(const UInt_t histoNo)
virtual const Double_t GetTimeResolution()
virtual const TString * GetSample()
virtual const UInt_t GetNoOfTemperatures()
virtual const Double_t GetField()
virtual const Double_t GetEnergy()
virtual const UInt_t GetNoOfHistos()
virtual const TString * GetCryoName()
virtual const PDoublePairVector * GetTemperature() const
Raw data file reader and format converter for μSR data.
virtual PRawRunData * GetRunData(const TString &runName)
Retrieves run data by run name.
Int_t musrFT_dumpData(TString fln, std::vector< PFourier * > &fourierData, Double_t start, Double_t end)
void musrFT_init(musrFT_startup_param &startupParam)
Int_t musrFT_groupHistos(PRunDataHandler *runDataHandler, PMsrGlobalBlock *global, PMsrRunBlock &run, musrFT_data &rd)
void musrFT_dumpMsrFile(musrFT_startup_param ¶m)
Bool_t musrFT_filter_histo(Int_t &i, Int_t argc, Char_t *argv[], musrFT_startup_param &startupParam)
void musrFT_estimateT0(musrFT_data &rd)
Int_t main(Int_t argc, Char_t *argv[])
Int_t musrFT_parse_options(Int_t argc, Char_t *argv[], musrFT_startup_param &startupParam)
void musrFT_cleanup(TH1F *h)
void musrFT_getMetaInfo(const TString fln, PRawRunData *rawRunData, TString &metaInfo)
Int_t fPlotTag
tag used for initial plot. 0=real, 1=imaginary, 2=real & imaginary (default), 3=power,...
Bool_t fFourierBlockPresent
flag indicating if a Fourier block is present in the msr-file
Double_t fPlotRange[2]
field/frequency plot range
Int_t fFourierPower
i.e. zero padding up to 2^fFourierPower, default = 0 which means NO zero padding
Int_t fUnits
flag used to indicate the units. 1=field units (G); 2=field units (T); 3=frequency units (MHz); 4=Mc/...
Int_t fApodization
tag indicating the kind of apodization wished, 0=no appodization (default), 1=weak,...
Bool_t writeExpectedChisq
if set to true, expected chisq and chisq per block will be written
Bool_t estimateN0
if set to true, for single histogram fits N0 will be estimated
Data structure holding raw time-domain μSR data with metadata.
PDoubleVector rawData
Raw time-domain data vector (bin counts)
Double_t timeResolution
Time resolution in microseconds (μs)
Double_t timeRange[2]
Time range to process: [0]=start, [1]=end in microseconds (μs)
Int_t dataSetTag
Data set identifier tag (needed for average-per-data-set operations)
TString info
Metadata string (run name, histogram info, etc.)
Int_t t0
Time zero bin number (start of valid data)
Bool_t showAveragePerDataSet
flag indicating if initially the Fourier average over the given histos shall be plotted,...
TString apodization
apodization setting: none, weak, medium, strong
TString fourierUnits
wished Fourier units: Gauss, Tesla, MHz, Mc/s
Double_t fourierRange[2]
Fourier range to be plotted. Given in the choosen units.
Double_t lifetimecorrection
is == 0.0 for NO life time correction, otherwise it holds the fudge factor
PDoubleVector bkg
background value
Int_t packing
packing for rebinning the time histograms before Fourier transform.
Int_t bkg_range[2]
background range
TString graphicFormat
format for the graphical output dump
TString msrFlnOut
dump file name for msr-file generation
Int_t fourierPower
Fourier power for zero padding, i.e. 2^fourierPower points.
Bool_t showAverage
flag indicating if initially the Fourier average over the given histos shall be plotted,...
PStringVector dataFileFormat
file format guess
Int_t timeout
timeout in (sec) after which musrFT will terminate. if <= 0, no automatic termination will take place...
TString title
title to be shown for the Fourier plot.
Double_t initialPhase
inital Fourier phase for Real/Imag
PStringVector dataFln
raw-data-file names to be used.
PIntVector histo
selection of the histos used from at data file for Fourier
Double_t timeRange[2]
time range used for the Fourier
PIntVector t0
t0 vector for the histos. If not given t0's will be estimated.
TString fourierOpt
Fourier options, i.e. real, imag, power, phase, phaseOptReal.
PStringVector msrFln
msr-file names to be used.
TString dumpFln
dump file name for Fourier data output