44#include <TApplication.h>
47#include <TSAXParser.h>
50#include "git-revision.h"
98 std::cout << std::endl <<
"usage: musrFT [Options] [<msr-files> | -df, --data-file <data-file>]";
99 std::cout << std::endl <<
" <msr-files> : msr-file name(s). These msr-files are used for the Fourier transform.";
100 std::cout << std::endl <<
" It can be a list of msr-files, e.g. musrFT 3110.msr 3111.msr";
101 std::cout << std::endl <<
" For the syntax of the msr-file check the user manual of musrfit.";
102 std::cout << std::endl <<
" -df, --data-file <data-file> : This allows to feed only muSR data file(s) to";
103 std::cout << std::endl <<
" perform the Fourier transform. Since the extended <msr-file> information";
104 std::cout << std::endl <<
" are missing, they will need to be provided by to options, or musrFT";
105 std::cout << std::endl <<
" tries to guess, based on musrfit_startup.xml settings.";
106 std::cout << std::endl <<
" Options: ";
107 std::cout << std::endl <<
" --help : display this help and exit";
108 std::cout << std::endl <<
" --version : output version information and exit";
109 std::cout << std::endl <<
" -g, --graphic-format <graphic-format-extension> : ";
110 std::cout << std::endl <<
" will produce a graphic-output-file without starting a root session.";
111 std::cout << std::endl <<
" the name is based either on the <msr-file> or the <data-file>,";
112 std::cout << std::endl <<
" e.g. 3310.msr -> 3310_0.png.";
113 std::cout << std::endl <<
" Supported graphic-format-extension: eps, pdf, gif, jpg, png, svg, xpm, root";
114 std::cout << std::endl <<
" --dump <fln> : rather than starting a root session and showing Fourier graphs of the data,";
115 std::cout << std::endl <<
" it will output the Fourier data in an ascii file <fln>.";
116 std::cout << std::endl <<
" -br, --background-range <start> <end>: background interval used to estimate the background to be";
117 std::cout << std::endl <<
" subtracted before the Fourier transform. <start>, <end> to be given in bins.";
118 std::cout << std::endl <<
" -bg, --background <list> : gives the background explicit for each histogram.";
119 std::cout << std::endl <<
" -fo, --fourier-option <fopt>: <fopt> can be 'real', 'imag', 'real+imag', 'power', 'phase', or 'phaseOptReal'.";
120 std::cout << std::endl <<
" If this is not defined (neither on the command line nor in the musrfit_startup.xml),";
121 std::cout << std::endl <<
" default will be 'power'.";
122 std::cout << std::endl <<
" -ap, --apodization <val> : <val> can be either 'none', 'weak', 'medium', 'strong'.";
123 std::cout << std::endl <<
" Default will be 'none'.";
124 std::cout << std::endl <<
" -fp, --fourier-power <N> : <N> being the Fourier power, i.e. 2^<N> used for zero padding.";
125 std::cout << std::endl <<
" Default is -1, i.e. no zero padding will be performed.";
126 std::cout << std::endl <<
" -u, --units <units> : <units> is used to define the x-axis of the Fourier transform.";
127 std::cout << std::endl <<
" One may choose between the fields (Gauss) or (Tesla), the frequency (MHz),";
128 std::cout << std::endl <<
" and the angular-frequency domain (Mc/s).";
129 std::cout << std::endl <<
" Default will be 'MHz'.";
130 std::cout << std::endl <<
" -ph, --phase <val> : defines the initial phase <val>. This only is of concern for 'real',";
131 std::cout << std::endl <<
" '<imag>', and 'real+imag'.";
132 std::cout << std::endl <<
" Default will be 0.0.";
133 std::cout << std::endl <<
" -fr, --fourier-range <start> <end> : Fourier range. <start>, <end> are interpreted in the units given.";
134 std::cout << std::endl <<
" Default will be -1.0 for both which means, take the full Fourier range.";
135 std::cout << std::endl <<
" -tr, --time-range <start> <end> : time domain range to be used for Fourier transform.";
136 std::cout << std::endl <<
" <start>, <end> are to be given in (us). If nothing is given, the full time range";
137 std::cout << std::endl <<
" found in the data file(s) will be used.";
138 std::cout << std::endl <<
" --histo <list> : give the <list> of histograms to be used for the Fourier transform.";
139 std::cout << std::endl <<
" E.g. musrFT -df lem15_his_01234.root --histo 1 3, will only be needed together with";
140 std::cout << std::endl <<
" the option --data-file. If multiple data file are given, <list> will apply";
141 std::cout << std::endl <<
" to all data-files given. If --histo is not given, all histos of a data file will be used.";
142 std::cout << std::endl <<
" <list> can be anything like: 2 3 6, or 2-17, or 1-6 9, etc.";
143 std::cout << std::endl <<
" -a, --average : show the average of ALL Fourier transformed data.";
144 std::cout << std::endl <<
" -ad, --average-per-data-set : show the average of the Fourier transformed data per data set.";
145 std::cout << std::endl <<
" --t0 <list> : A list of t0's can be provided. This in conjunction with --data-file and";
146 std::cout << std::endl <<
" --fourier-option real allows to get the proper initial phase if t0's are known.";
147 std::cout << std::endl <<
" If a single t0 for multiple histos is given, it is assume, that this t0 is common";
148 std::cout << std::endl <<
" to all histos.";
149 std::cout << std::endl <<
" Example: musrFT -df lem15_his_01234.root -fo real --t0 2750 --histo 1 3";
150 std::cout << std::endl <<
" -pa, --packing <N> : if <N> (an integer), the time domain data will first be packed/rebinned by <N>.";
151 std::cout << std::endl <<
" --title <title> : give a global title for the plot.";
152 std::cout << std::endl <<
" --create-msr-file <fln> : creates a msr-file based on the command line options";
153 std::cout << std::endl <<
" provided. This will help on the way to a full fitting model.";
154 std::cout << std::endl <<
" -lc, --lifetimecorrection <fudge>: try to eliminate muon life time decay. Only makes sense for low";
155 std::cout << std::endl <<
" transverse fields. <fudge> is a tweaking factor and should be kept around 1.0.";
156 std::cout << std::endl <<
" --timeout <timeout> : <timeout> given in seconds after which musrFT terminates.";
157 std::cout << std::endl <<
" If <timeout> <= 0, no timeout will take place. Default <timeout> is 3600.";
158 std::cout << std::endl << std::endl;
170 startupParam.
dumpFln = TString(
"");
186 startupParam.
title = TString(
"");
209 Int_t start = i+1, end = 0;
213 if (argv[i][0] ==
'-') {
214 if (!isdigit(argv[i][1]) || (argv[i][1] ==
'-'))
221 std::cerr << std::endl <<
">> musrFT **ERROR** something is wrong with the --histo arguments." << std::endl;
222 startupParam.
histo.clear();
228 for (Int_t j=start; j<end; j++) {
230 if (!tstr.Contains(
"-")) {
231 if (tstr.IsDigit()) {
232 startupParam.
histo.push_back(tstr.Atoi());
234 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument '" << tstr <<
"' which is not a number." << std::endl;
235 startupParam.
histo.clear();
240 if (tok.size() != 2) {
241 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument '" << tstr <<
"' which is not of the form <h0>-<hN>." << std::endl;
242 startupParam.
histo.clear();
246 Int_t first=0, last=0;
248 if (sstr.IsDigit()) {
251 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument '" << tstr <<
"' which is of the form <h0>-<hN>,";
252 std::cerr << std::endl <<
" but <h0>='" << sstr <<
"' is not a number." << std::endl;
253 startupParam.
histo.clear();
257 if (sstr.IsDigit()) {
260 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument '" << tstr <<
"' which is of the form <h0>-<hN>,";
261 std::cerr << std::endl <<
" but <hN>='" << sstr <<
"' is not a number." << std::endl;
262 startupParam.
histo.clear();
267 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument of the form <h0>-<hN> with h0=" << first <<
" > hN=" << last <<
"." << std::endl;
268 startupParam.
histo.clear();
272 for (Int_t k=first; k<=last; k++) {
273 startupParam.
histo.push_back(k);
295 for (Int_t i=1; i<argc; i++) {
297 if (tstr.BeginsWith(
"--version")) {
300 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;
302 std::cout << std::endl <<
"musrFT version: " << PACKAGE_VERSION <<
" (" << BUILD_TYPE <<
"), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
306 std::cout << std::endl <<
"musrFT git-branch: " << GIT_BRANCH <<
", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
308 std::cout << std::endl <<
"musrFT version: unknown." << std::endl << std::endl;
312 }
else if (tstr.BeginsWith(
"--help")) {
315 }
else if (tstr.BeginsWith(
"-g") || tstr.BeginsWith(
"--graphic-format")) {
317 std::cerr << std::endl <<
">> musrFT **ERROR** found option --graphic-format without argument!" << std::endl;
320 TString topt(argv[i+1]);
321 if (!topt.BeginsWith(
"eps") && !topt.BeginsWith(
"pdf") && !topt.BeginsWith(
"gif") && !topt.BeginsWith(
"jpg") &&
322 !topt.BeginsWith(
"png") && !topt.BeginsWith(
"svg") && !topt.BeginsWith(
"xpm") && !topt.BeginsWith(
"root")) {
323 std::cerr << std::endl <<
">> musrFT **ERROR** found unrecogniced graphic format '" << topt <<
"'!" << std::endl;
328 }
else if (tstr.BeginsWith(
"--dump")) {
330 std::cerr << std::endl <<
">> musrFT **ERROR** found option --dump without argument!" << std::endl;
333 startupParam.
dumpFln = argv[i+1];
335 }
else if (tstr.Contains(
"-br") || tstr.Contains(
"--background-range")) {
337 std::cerr << std::endl <<
">> musrFT **ERROR** found option --background-range with wrong number of arguments." << std::endl;
341 bkgRange[0] = argv[i+1];
342 bkgRange[1] = argv[i+2];
343 if (!bkgRange[0].IsDigit()) {
344 std::cerr << std::endl <<
">> musrFT **ERROR** <start> bin of option --background-range is NOT an int-number! ('" << bkgRange[0] <<
"')." << std::endl;
347 if (!bkgRange[1].IsDigit()) {
348 std::cerr << std::endl <<
">> musrFT **ERROR** <end> bin of option --background-range is NOT an int-number! ('" << bkgRange[1] <<
"')." << std::endl;
351 startupParam.
bkg_range[0] = bkgRange[0].Atoi();
352 startupParam.
bkg_range[1] = bkgRange[1].Atoi();
354 }
else if (tstr.BeginsWith(
"-bg") || !tstr.CompareTo(
"--background")) {
357 if (argv[i][0] ==
'-') {
362 if (!topt.IsFloat()) {
363 std::cerr << std::endl <<
">> musrFT **ERROR** found option --background='" << topt <<
"' which is not a float" << std::endl;
366 startupParam.
bkg.push_back(topt.Atoi());
369 if (startupParam.
bkg.size() == 0) {
370 std::cerr << std::endl <<
">> musrFT **ERROR** found option --background without argument!" << std::endl;
373 }
else if (tstr.BeginsWith(
"-fo") || tstr.BeginsWith(
"--fourier-option")) {
375 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-option without arguments." << std::endl;
378 TString topt(argv[i+1]);
379 if (!topt.BeginsWith(
"real") && !topt.BeginsWith(
"imag") && !topt.BeginsWith(
"power") &&
380 !topt.BeginsWith(
"phase") && !topt.BeginsWith(
"phaseOptReal")) {
381 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-option with unrecognized argument '" << topt <<
"'." << std::endl;
386 }
else if (tstr.BeginsWith(
"-ap") || tstr.BeginsWith(
"--apodization")) {
388 std::cerr << std::endl <<
">> musrFT **ERROR** found option --apodization without arguments." << std::endl;
391 TString topt(argv[i+1]);
392 if (!topt.BeginsWith(
"none") && !topt.BeginsWith(
"weak") && !topt.BeginsWith(
"medium") && !topt.BeginsWith(
"strong")) {
393 std::cerr << std::endl <<
">> musrFT **ERROR** found option --apodization with unrecognized argument '" << topt <<
"'." << std::endl;
398 }
else if (tstr.BeginsWith(
"-fp") || tstr.BeginsWith(
"--fourier-power")) {
400 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-power without arguments." << std::endl;
403 TString fourierPower(argv[i+1]);
404 if (!fourierPower.IsDigit()) {
405 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-power with a power which is not an integer '" << fourierPower <<
"'." << std::endl;
410 std::cerr << std::endl <<
">> musrFT **ERROR** found Fourier power '" << fourierPower <<
"', which is out of range [1..20]" << std::endl;
414 }
else if (tstr.BeginsWith(
"-u") || tstr.BeginsWith(
"--units")) {
416 std::cerr << std::endl <<
">> musrFT **ERROR** found option --units without arguments." << std::endl;
419 TString topt(argv[i+1]);
420 if (!topt.BeginsWith(
"MHz", TString::kIgnoreCase) && !topt.BeginsWith(
"Gauss", TString::kIgnoreCase) &&
421 !topt.BeginsWith(
"Tesla", TString::kIgnoreCase) && !topt.BeginsWith(
"Mc/s", TString::kIgnoreCase)) {
422 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-option with unrecognized argument '" << topt <<
"'." << std::endl;
427 }
else if (tstr.BeginsWith(
"-ph") || tstr.BeginsWith(
"--phase")) {
429 std::cerr << std::endl <<
">> musrFT **ERROR** found option --phase without argument!" << std::endl;
432 TString phase(argv[i+1]);
433 if (!phase.IsFloat()) {
434 std::cerr << std::endl <<
">> musrFT **ERROR** found --phase argument '" << phase <<
"' which is not a number." << std::endl;
439 }
else if (tstr.BeginsWith(
"-fr") || tstr.BeginsWith(
"--fourier-range")) {
441 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-range with wrong number of arguments!" << std::endl;
444 TString fourierRange[2] = {argv[i+1], argv[i+2]};
445 if (!fourierRange[0].IsFloat() || !fourierRange[1].IsFloat()) {
446 std::cerr << std::endl <<
">> musrFT **ERROR** found invalid --fourier-range arguments '" << fourierRange[0] <<
"' and/or '" << fourierRange[1] <<
"'." << std::endl;
452 }
else if (tstr.BeginsWith(
"-tr") || tstr.BeginsWith(
"--time-range")) {
454 std::cerr << std::endl <<
">> musrFT **ERROR** found option --time-range with wrong number of arguments!" << std::endl;
457 TString timeRange[2] = {argv[i+1], argv[i+2]};
458 if (!timeRange[0].IsFloat() || !timeRange[1].IsFloat()) {
459 std::cerr << std::endl <<
">> musrFT **ERROR** found invalid --time-range arguments '" << timeRange[0] <<
"' and/or '" << timeRange[1] <<
"'." << std::endl;
462 startupParam.
timeRange[0] = timeRange[0].Atof();
463 startupParam.
timeRange[1] = timeRange[1].Atof();
465 }
else if (!tstr.CompareTo(
"-a") || !tstr.CompareTo(
"--average")) {
467 }
else if (!tstr.CompareTo(
"-ad") || !tstr.CompareTo(
"--average-per-data-set")) {
469 }
else if (tstr.BeginsWith(
"--histo")) {
472 }
else if (tstr.BeginsWith(
"--t0")) {
475 if (argv[i][0] ==
'-') {
480 if (!topt.IsDigit()) {
481 std::cerr << std::endl <<
">> musrFT **ERROR** found option t0='" << topt <<
"' which is not a number" << std::endl;
484 startupParam.
t0.push_back(topt.Atoi());
487 if (startupParam.
t0.size() == 0) {
488 std::cerr << std::endl <<
">> musrFT **ERROR** found option --t0 without argument!" << std::endl;
491 }
else if (tstr.BeginsWith(
"--title")) {
493 std::cerr << std::endl <<
">> musrFT **ERROR** found option --title without argument!" << std::endl;
497 startupParam.
title = argv[i];
498 }
else if (tstr.BeginsWith(
"-pa") || tstr.BeginsWith(
"--packing")) {
500 std::cerr << std::endl <<
">> musrFT **ERROR** found option --packing without argument!" << std::endl;
504 TString pack = TString(argv[i]);
505 if (!pack.IsDigit()) {
506 std::cerr << std::endl <<
">> musrFT **ERROR** found option --packing with argument '" << pack <<
"' which is NOT an integer!" << std::endl;
509 startupParam.
packing = pack.Atoi();
510 }
else if (tstr.BeginsWith(
"--create-msr-file")) {
512 std::cerr << std::endl <<
">> musrFT **ERROR** found option --create-msr-file without argument!" << std::endl;
516 startupParam.
msrFlnOut = TString(argv[i]);
517 }
else if (tstr.BeginsWith(
"-lc") || tstr.BeginsWith(
"--lifetimecorrection")) {
519 std::cerr << std::endl <<
">> musrFT **ERROR** found option --lifetimecorrection without argument!" << std::endl;
523 TString fudge(argv[i]);
524 if (!fudge.IsFloat()) {
525 std::cerr << std::endl <<
">> musrFT **ERROR** found option --lifetimecorrection with a fudge which is not a double '" << fudge <<
"'." << std::endl;
529 }
else if (tstr.BeginsWith(
"--timeout")) {
531 std::cerr << std::endl <<
">> musrFT **ERROR** found option --timeout without argument!" << std::endl;
537 std::cerr << std::endl <<
">> musrFT **ERROR** found option --timeout with a <timeout> which is not an integer '" << tt <<
"'." << std::endl;
540 startupParam.
timeout = tt.Atoi();
541 }
else if (tstr.BeginsWith(
"-df") || tstr.BeginsWith(
"--data-file")) {
543 if (argv[i][0] ==
'-') {
547 startupParam.
dataFln.push_back(argv[i]);
548 TString fln(argv[i]);
549 TString fileFormat(
"??");
550 if (fln.Contains(
".root", TString::kIgnoreCase))
551 fileFormat =
"MusrRoot";
552 else if (fln.Contains(
".bin", TString::kIgnoreCase))
553 fileFormat =
"PsiBin";
554 else if (fln.Contains(
".mdu", TString::kIgnoreCase))
555 fileFormat =
"PsiMdu";
556 else if (fln.Contains(
".nxs", TString::kIgnoreCase))
557 fileFormat =
"NeXus";
558 else if (fln.Contains(
".msr", TString::kIgnoreCase))
561 if (fileFormat ==
"??") {
562 std::cerr << std::endl <<
">> musrFT **ERROR** found data file name with unrecognized data file format ('" << fln <<
"')." << std::endl;
569 if (startupParam.
dataFln.size() == 0) {
570 std::cerr << std::endl <<
">> musrFT **ERROR** found option --data-file without argument!" << std::endl;
573 }
else if (tstr.Contains(
".msr")) {
574 startupParam.
msrFln.push_back(tstr);
576 std::cerr << std::endl <<
">> musrFT **ERROR** unrecognized option '" << tstr <<
"' found." << std::endl;
582 if ((startupParam.
msrFln.size() == 0) && (startupParam.
dataFln.size() == 0)) {
583 std::cerr << std::endl <<
">> musrFT **ERROR** neither <msr-file> nor <data-file> defined." << std::endl;
587 std::cerr << std::endl <<
">> musrFT **WARNING** in --background-range, start=" << startupParam.
bkg_range[0] <<
" > end=" << startupParam.
bkg_range[1] <<
", will swap them." << std::endl;
588 Double_t swap = startupParam.
bkg_range[0];
593 std::cerr << std::endl <<
">> musrFT **WARNING** in --fourier-range, start=" << startupParam.
fourierRange[0] <<
" > end=" << startupParam.
fourierRange[1] <<
", will swap them." << std::endl;
599 std::cerr << std::endl <<
">> musrFT **WARNING** Options: --average and --average-per-data-set exclude each other, will choose the latter." << std::endl;
620 size_t idx = str.Last(
'/');
622 str.Remove(0, idx+1);
627 metaInfo += TString::Format(
"T%d=%0.2fK,", i, rawRunData->
GetTemperature(i));
632 metaInfo += TString(
"B=??,");
633 else if (dval < 5000.0)
634 metaInfo += TString::Format(
"B=%0.1fG,", dval);
636 metaInfo += TString::Format(
"B=%0.1fT,", dval/1.0e4);
640 metaInfo += TString(
"E=??;");
641 else if (dval < 1000.0)
642 metaInfo += TString::Format(
"E=%0.1fkeV;", dval);
644 metaInfo += TString::Format(
"E=%0.1fMeV;", dval/1.0e3);
661 std::cout << std::endl <<
">> musrFT **WARNING** try to estimate t0 from maximum in the data set";
662 std::cout << std::endl <<
" '" << rd.
info <<
"'";
663 std::cout << std::endl <<
" NO warranty this is sensible!" << std::endl;
667 for (UInt_t i=1; i<rd.
rawData.size(); i++) {
673 std::cout << std::endl <<
">> musrFT_estimateT0: estimated t0=" << idx << std::endl;
700Int_t
musrFT_dumpData(TString fln, std::vector<PFourier*> &fourierData, Double_t start, Double_t end)
702 std::vector<PDoubleVector> data;
707 TH1F *hRe=
nullptr, *hIm=
nullptr;
711 hRe = fourierData[0]->GetRealFourier();
713 start = hRe->GetBinCenter(1);
715 end = hRe->GetBinCenter(hRe->GetNbinsX());
718 UInt_t minSize = hRe->GetNbinsX()-1;
720 for (UInt_t i=1; i<fourierData.size(); i++) {
721 hRe = fourierData[i]->GetRealFourier();
722 if (hRe->GetNbinsX()-1 < (Int_t)minSize)
723 minSize = hRe->GetNbinsX()-1;
727 for (UInt_t i=0; i<fourierData.size(); i++) {
728 hRe = fourierData[i]->GetRealFourier();
729 hIm = fourierData[i]->GetImaginaryFourier();
730 for (Int_t j=1; j<(Int_t)minSize; j++) {
731 dval = hRe->GetBinCenter(j);
732 if ((dval >= start) && (dval <= end)) {
733 freq.push_back(dval);
734 re.push_back(hRe->GetBinContent(j));
735 im.push_back(hIm->GetBinContent(j));
736 pwr.push_back(hRe->GetBinContent(j)*hRe->GetBinContent(j)+hIm->GetBinContent(j)*hIm->GetBinContent(j));
739 data.push_back(freq);
752 std::ofstream fout(fln, std::ofstream::out);
756 for (UInt_t i=0; i<fourierData.size()-1; i++)
757 fout <<
"freq" << i <<
", Re[d" << i <<
"], Im[d" << i <<
"], Pwr[d" << i <<
"], ";
758 fout <<
"freq" << fourierData.size()-1 <<
", Re[d" << fourierData.size()-1 <<
"], Im[d" << fourierData.size()-1 <<
"], Pwr[d" << fourierData.size()-1 <<
"]" << std::endl;
761 for (UInt_t j=0; j<data[0].size(); j++) {
762 for (UInt_t i=0; i<data.size()-1; i++) {
763 fout << data[i][j] <<
", ";
765 fout << data[data.size()-1][j] << std::endl;
787 if (rawRunData ==
nullptr) {
788 std::cerr << std::endl <<
">> musrFT_groupHistos **ERROR** Couldn't get raw run data for run '" << runName <<
"'." << std::endl;
800 t0.resize(histoList.size());
802 for (UInt_t i=0; i<t0.size(); i++)
806 if (i >= t0.size()) {
807 std::cerr << std::endl <<
">> musrFT_groupHistos **WARNING** found #t0's in GLOBAL block > #histos!";
808 std::cerr << std::endl <<
">> This should NEVER happen. Will ignore these entries.";
809 std::cerr << std::endl <<
">> Please check your msr-file!!" << std::endl;
816 if (i >= t0.size()) {
817 std::cerr << std::endl <<
">> musrFT_groupHistos **WARNING** found #t0's in RUN block > #histos!";
818 std::cerr << std::endl <<
">> This should NEVER happen. Will ignore these entries.";
819 std::cerr << std::endl <<
">> Please check your msr-file!!" << std::endl;
827 for (UInt_t i=0; i<t0.size(); i++) {
829 std::cout << std::endl <<
">> musrFT_groupHistos **WARNING** try to estimate t0 from maximum in the data set";
830 std::cout << std::endl <<
">> '" << runName <<
"', histo " << histoList[i] <<
". NO warranty this is sensible!";
832 max = rawRunData->
GetDataBin(histoList[i])->at(0);
833 for (UInt_t j=1; j<rawRunData->
GetDataBin(histoList[i])->size(); j++) {
834 if (rawRunData->
GetDataBin(histoList[i])->at(j) > max) {
835 max = rawRunData->
GetDataBin(histoList[i])->at(j);
839 std::cout << std::endl <<
">> estimated t0=" << idx << std::endl;
846 for (UInt_t i=1; i<histoList.size(); i++) {
847 for (UInt_t j=0; j<data.size(); j++) {
848 if ((j+t0[i]-t0[0] >= 0) && (j+t0[i]-t0[0] < rawRunData->
GetDataBin(histoList[i])->size())) {
849 data[j] += rawRunData->
GetDataBin(histoList[i])->at(j);
856 rd.
t0 =
static_cast<Int_t
>(t0[0]);
873 std::ofstream fout(param.
msrFlnOut.Data(), std::ofstream::out);
876 if (param.
title.Length() == 0) {
877 if (param.
dataFln.size() != 0) {
883 fout << param.
title << std::endl;
884 fout <<
"###############################################################" << std::endl;
887 fout <<
"GLOBAL" << std::endl;
888 fout <<
"fittype 0 (single histogram fit)" << std::endl;
889 if (param.
t0.size() == 1) {
890 fout <<
"t0 " << param.
t0[0] << std::endl;
895 fout <<
"packing " << param.
packing << std::endl;
897 fout <<
"###############################################################" << std::endl;
901 TString fileFormat(
"MUSR-ROOT");
902 for (UInt_t i=0; i<param.
dataFln.size(); i++) {
904 fileFormat = TString(
"PSI-BIN");
906 fileFormat = TString(
"PSI-MDU");
908 fileFormat = TString(
"NEXUS");
910 fileFormat = TString(
"MUD");
911 for (UInt_t j=0; j<param.
histo.size(); j++) {
912 fout <<
"RUN " << param.
dataFln[i] <<
" BXXX IXX " << fileFormat <<
" (name beamline institute data-file-format)" << std::endl;
913 fout <<
"forward " << param.
histo[j] << std::endl;
914 if ((param.
t0.size() > 1) && (j < param.
t0.size())) {
915 fout <<
"t0 " << param.
t0[j] << std::endl;
918 fout <<
"background " << param.
bkg_range[0] <<
" " << param.
bkg_range[1] << std::endl;
919 fout <<
"#--------------------------------------------------------------" << std::endl;
923 fout <<
"###############################################################" << std::endl;
926 fout <<
"PLOT 0 (single histo plot)" << std::endl;
927 if (param.
histo.size() == 0) {
928 fout <<
"runs 1" << std::endl;
931 for (UInt_t i=0; i<param.
histo.size(); i++)
936 fout <<
"range 0 10" << std::endl;
941 fout <<
"###############################################################" << std::endl;
944 fout <<
"FOURIER" << std::endl;
946 fout <<
"units MHz # units either 'Gauss', 'MHz', or 'Mc/s'" << std::endl;
948 fout <<
"units " << param.
fourierUnits <<
" # units either 'Gauss', 'MHz', or 'Mc/s'" << std::endl;
951 fout <<
"plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL" << std::endl;
953 fout <<
"plot " << param.
fourierOpt <<
" # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL" << std::endl;
956 fout <<
"fourier_power " << param.
fourierPower << std::endl;
958 fout <<
"apodization " << param.
apodization <<
" # NONE, WEAK, MEDIUM, STRONG" << std::endl;
975 gettimeofday(&now, 0);
977 return (
static_cast<Double_t
>(now.tv_sec) * 1.0e6 +
static_cast<Double_t
>(now.tv_usec))/1.0e3;
991Int_t
main(Int_t argc, Char_t *argv[])
1019 if (startupParam.
msrFlnOut.Length() > 0) {
1029 std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
1030 std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
1031 if (!startupHandler->StartupFileFound()) {
1032 std::cerr << std::endl <<
">> musrFT **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
1033 std::cerr << std::endl;
1036 saxParser->ConnectToHandler(
"PStartupHandler", startupHandler.get());
1043 std::cerr << std::endl <<
">> musrFT **WARNING** Reading/parsing musrfit_startup.xml failed.";
1044 std::cerr << std::endl;
1052 std::vector< std::unique_ptr<PMsrHandler> > msrHandler;
1053 msrHandler.resize(startupParam.
msrFln.size());
1054 for (UInt_t i=0; i<startupParam.
msrFln.size(); i++) {
1055 msrHandler[i] = std::make_unique<PMsrHandler>(startupParam.
msrFln[i].Data(), &startup_options,
true);
1056 status = msrHandler[i]->ReadMsrFile();
1060 std::cout << std::endl <<
">> musrFT **ERROR** couldn't find " << startupParam.
msrFln[i] << std::endl << std::endl;
1063 std::cout << std::endl <<
">> musrFT **SYNTAX ERROR** in file " << startupParam.
msrFln[i] <<
", full stop here." << std::endl << std::endl;
1066 std::cout << std::endl <<
">> musrFT **UNKOWN ERROR** when trying to read the msr-file" << std::endl << std::endl;
1075 for (UInt_t i=0; i<msrHandler.size(); i++) {
1076 PMsrRunList *runList = msrHandler[i]->GetMsrRunList();
1077 for (UInt_t j=0; j<runList->at(i).GetFileFormatSize(); j++) {
1078 ffstr = *(runList->at(i).GetFileFormat(j));
1079 if (!ffstr.CompareTo(
"ascii", TString::kIgnoreCase) || !ffstr.CompareTo(
"dat", TString::kIgnoreCase) || !ffstr.CompareTo(
"db", TString::kIgnoreCase)) {
1080 std::cout << std::endl;
1081 std::cout <<
"**ERROR** Currently file format's 'ASCII', 'DAT', nor 'DB' are NOT supported." << std::endl;
1082 std::cout << std::endl;
1088 std::vector< std::unique_ptr<PRunDataHandler> > runDataHandler;
1089 runDataHandler.resize(startupParam.
msrFln.size()+startupParam.
dataFln.size());
1091 for (UInt_t i=0; i<msrHandler.size(); i++) {
1094 runDataHandler[i] = std::make_unique<PRunDataHandler>(msrHandler[i].get(), startupHandler->GetDataPathList());
1096 runDataHandler[i] = std::make_unique<PRunDataHandler>(msrHandler[i].get());
1097 if (runDataHandler[i] ==
nullptr) {
1098 std::cerr <<
">> musrFT: **ERROR** couldn't allocate PRunDataHandler object." << std::endl;
1104 for (UInt_t i=msrHandler.size(); i<msrHandler.size()+startupParam.
dataFln.size(); i++) {
1107 runDataHandler[i] = std::make_unique<PRunDataHandler>(startupParam.
dataFln[i-msrHandler.size()], startupParam.
dataFileFormat[i-msrHandler.size()], startupHandler->GetDataPathList());
1109 runDataHandler[i] = std::make_unique<PRunDataHandler>(startupParam.
dataFln[i-msrHandler.size()], startupParam.
dataFileFormat[i-msrHandler.size()]);
1110 if (runDataHandler[i] ==
nullptr) {
1111 std::cerr <<
">> musrFT: **ERROR** couldn't allocate PRunDataHandler object." << std::endl;
1119 Int_t dataSetTagCounter = 0;
1120 TString prevDataSetPathName(
"");
1121 TString str(
""), fln(
"");
1124 for (UInt_t i=0; i<runDataHandler.size(); i++) {
1125 runDataHandler[i]->ReadData();
1127 if (!runDataHandler[i]->IsAllDataAvailable()) {
1128 if (i < msrHandler.size()) {
1129 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't read data from msr-file '" << startupParam.
msrFln[i] <<
"'." << std::endl;
1131 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't read data-file '" << startupParam.
dataFln[i] <<
"'." << std::endl;
1137 PRawRunData *rawRunData = runDataHandler[i]->GetRunData();
1138 if (rawRunData ==
nullptr) {
1139 if (i < msrHandler.size()) {
1140 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain the raw run data set from msr-file " << startupParam.
msrFln[i] << std::endl;
1142 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain the raw run data set for " << startupParam.
dataFln[i-msrHandler.size()] << std::endl;
1148 if (i >= msrHandler.size()) {
1149 for (UInt_t j=0; j<startupParam.
histo.size(); j++) {
1151 std::cerr << std::endl <<
">> musrFT **ERROR** found histo no " << startupParam.
histo[j] <<
" > # of histo in the file (";
1152 std::cerr << startupParam.
dataFln[i] <<
" // # histo: " << rawRunData->
GetNoOfHistos() <<
")." << std::endl;
1156 if (startupParam.
histo.size() == 0) {
1159 startupParam.
histo.push_back(j+1);
1164 if (i < msrHandler.size()) {
1166 if (startupParam.
title.Length() == 0)
1167 startupParam.
title = *(msrHandler[0]->GetMsrTitle());
1170 if (plot ==
nullptr) {
1171 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain PLOT block from msr-handler." << std::endl;
1175 PMsrRunList *runs = msrHandler[i]->GetMsrRunList();
1176 if (runs ==
nullptr) {
1177 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain RUN block(s) from msr-handler." << std::endl;
1182 if (global ==
nullptr) {
1183 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain GLOBAL block from msr-handler." << std::endl;
1188 if (fourierBlock ==
nullptr) {
1189 std::cerr << std::endl <<
">> msrFT **WARNING** couldn't obtain FOURIER block from msr-handler." << std::endl;
1194 unitTag = fourierBlock->
fUnits;
1239 if (startupParam.
fourierOpt.BeginsWith(
"??")) {
1240 fourierPlotTag = fourierBlock->
fPlotTag;
1249 for (UInt_t j=0; j<runList.size(); j++) {
1252 str = *(runs->at(runList[j]-1).GetRunName());
1253 if (prevDataSetPathName.CompareTo(str)) {
1255 prevDataSetPathName = str;
1260 for (UInt_t k=0; k<runs->at(runList[j]-1).GetForwardHistoNoSize(); k++) {
1261 histoList.push_back(runs->at(runList[j]-1).GetForwardHistoNo(k));
1265 fln = *(runs->at(runList[j]-1).GetRunName());
1268 hh = TString::Format(
"h%d", histoList[0]);
1269 for (UInt_t k=1; k<histoList.size(); k++)
1270 hh += TString::Format(
"/%d", histoList[k]);
1284 if (plot->at(0).fTmin.size() > 0) {
1292 if (
musrFT_groupHistos(runDataHandler[i].get(), global, runs->at(runList[j]-1), rd)) {
1303 if (runs->at(runList[j]-1).GetPacking() != -1) {
1304 pack = runs->at(runList[j]-1).GetPacking();
1311 Int_t bkgStart=-1, bkgEnd=-1;
1312 bkgStart = runs->at(runList[j]-1).GetBkgRange(0);
1313 bkgEnd = runs->at(runList[j]-1).GetBkgRange(1);
1314 if ((startupParam.
bkg_range[0] == -1) && (bkgStart != -1))
1316 if ((startupParam.
bkg_range[1] == -1) && (bkgEnd != -1))
1323 str = *(runDataHandler[i]->GetRunData()->GetFileName());
1324 if (prevDataSetPathName.CompareTo(str)) {
1326 prevDataSetPathName = str;
1330 for (UInt_t j=0; j<startupParam.
histo.size(); j++) {
1331 idx = startupParam.
histo[j];
1334 rd.
info = TString::Format(
"h%d:", idx);
1350 if (startupParam.
t0.size() == 1)
1351 rd.
t0 = startupParam.
t0[0];
1352 else if (j < startupParam.
t0.size())
1353 rd.
t0 = startupParam.
t0[j];
1371 if (!startupParam.
fourierOpt.CompareTo(
"real", TString::kIgnoreCase))
1373 else if (!startupParam.
fourierOpt.CompareTo(
"imag", TString::kIgnoreCase))
1375 else if (!startupParam.
fourierOpt.CompareTo(
"real+imag", TString::kIgnoreCase))
1377 else if (!startupParam.
fourierOpt.CompareTo(
"power", TString::kIgnoreCase))
1379 else if (!startupParam.
fourierOpt.CompareTo(
"phase", TString::kIgnoreCase))
1381 else if (!startupParam.
fourierOpt.CompareTo(
"phaseoptreal", TString::kIgnoreCase))
1398 std::vector<TH1F*> histo = data.
GetData();
1401 if (startupParam.
fourierUnits.BeginsWith(
"gauss", TString::kIgnoreCase))
1403 else if (startupParam.
fourierUnits.BeginsWith(
"tesla", TString::kIgnoreCase))
1405 else if (startupParam.
fourierUnits.BeginsWith(
"mhz", TString::kIgnoreCase))
1407 else if (startupParam.
fourierUnits.BeginsWith(
"mc/s", TString::kIgnoreCase))
1412 std::vector<PFourier*> fourier;
1413 fourier.resize(histo.size());
1414 for (UInt_t i=0; i<fourier.size(); i++) {
1416 if (fourier[i] ==
nullptr) {
1417 std::cerr <<
">> musrFT: **ERROR** couldn't invoke PFourier object" << std::endl;
1423 if (startupParam.
apodization.BeginsWith(
"weak", TString::kIgnoreCase))
1425 else if (startupParam.
apodization.BeginsWith(
"medium", TString::kIgnoreCase))
1427 else if (startupParam.
apodization.BeginsWith(
"strong", TString::kIgnoreCase))
1431 Int_t noOfFourier =
static_cast<Int_t
>(fourier.size());
1433 Int_t chunk = noOfFourier/omp_get_num_procs();
1436 #pragma omp parallel for default(shared) schedule(dynamic,chunk)
1438 for (Int_t i=0; i<noOfFourier; i++) {
1439 fourier[i]->Transform(apodTag);
1442 std::cout << std::endl <<
"info> after FFT. calculation time: " << (end-start)/1.0e3 <<
" (sec)." << std::endl;
1447 startupParam.
fourierRange[1] = fourier[0]->GetMaxFreq();
1450 std::unique_ptr<PFourierCanvas> fourierCanvas;
1455 if (startupParam.
dumpFln.Length() > 0) {
1460 Bool_t batch =
false;
1462 std::vector<char*> args;
1463 args.push_back(argv[0]);
1466 args.push_back((
char*)
"-b");
1468 int cc = args.size();
1470 TApplication app(
"App", &cc, args.data());
1472 if (startupHandler) {
1473 fourierCanvas = std::unique_ptr<PFourierCanvas>(
new PFourierCanvas(fourier, dataSetTag, startupParam.
title.Data(),
1477 startupHandler->GetMarkerList(),
1478 startupHandler->GetColorList(),
1481 fourierCanvas = std::unique_ptr<PFourierCanvas>(
new PFourierCanvas(fourier, dataSetTag, startupParam.
title.Data(),
1487 if (fourierCanvas ==
nullptr) {
1488 std::cerr <<
">> musrFT: **ERROR** couldn't invoke PFourierCanvas object." << std::endl;
1492 fourierCanvas->UpdateFourierPad();
1493 fourierCanvas->UpdateInfoPad();
1496 if (!fourierCanvas->IsValid()) {
1497 std::cerr << std::endl <<
">> musrFT **SEVERE ERROR** Couldn't invoke all necessary objects, will quit.";
1498 std::cerr << std::endl;
1503 TQObject::Connect(
"TCanvas",
"Closed()",
"PFourierCanvas", fourierCanvas.get(),
"LastCanvasClosed()");
1505 fourierCanvas->SetTimeout(startupParam.
timeout);
1507 fourierCanvas->Connect(
"Done(Int_t)",
"TApplication", &app,
"Terminate(Int_t)");
1510 TString fileName(
"");
1512 if (startupParam.
dataFln.size() > 0) {
1513 fileName = startupParam.
dataFln[0];
1515 if (startupParam.
msrFln.size() > 0) {
1516 fileName = startupParam.
msrFln[0];
1518 Ssiz_t idx = fileName.Last(
'.');
1519 fileName.Remove(idx, fileName.Length());
1522 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 PMUSR_MSR_RUN_ERROR
Error during run processing or fitting.
#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.
static std::vector< std::string > Split(const std::string &str, const std::string &delimiters)
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