41#include <TApplication.h>
45#include <TObjString.h>
46#include <TSAXParser.h>
49#include "git-revision.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 TObjArray *tok = tstr.Tokenize(
"-");
238 if (tok->GetEntries() != 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();
245 Int_t first=0, last=0;
246 ostr =
dynamic_cast<TObjString*
>(tok->At(0));
247 sstr = ostr->GetString();
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();
256 ostr =
dynamic_cast<TObjString*
>(tok->At(1));
257 sstr = ostr->GetString();
258 if (sstr.IsDigit()) {
261 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument '" << tstr <<
"' which is of the form <h0>-<hN>,";
262 std::cerr << std::endl <<
" but <hN>='" << sstr <<
"' is not a number." << std::endl;
263 startupParam.
histo.clear();
268 std::cerr << std::endl <<
">> musrFT **ERROR** found --histo argument of the form <h0>-<hN> with h0=" << first <<
" > hN=" << last <<
"." << std::endl;
269 startupParam.
histo.clear();
273 for (Int_t k=first; k<=last; k++) {
274 startupParam.
histo.push_back(k);
300 for (Int_t i=1; i<argc; i++) {
302 if (tstr.BeginsWith(
"--version")) {
305 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;
307 std::cout << std::endl <<
"musrFT version: " << PACKAGE_VERSION <<
" (" << BUILD_TYPE <<
"), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
311 std::cout << std::endl <<
"musrFT git-branch: " << GIT_BRANCH <<
", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
313 std::cout << std::endl <<
"musrFT version: unknown." << std::endl << std::endl;
317 }
else if (tstr.BeginsWith(
"--help")) {
320 }
else if (tstr.BeginsWith(
"-g") || tstr.BeginsWith(
"--graphic-format")) {
322 std::cerr << std::endl <<
">> musrFT **ERROR** found option --graphic-format without argument!" << std::endl;
325 TString topt(argv[i+1]);
326 if (!topt.BeginsWith(
"eps") && !topt.BeginsWith(
"pdf") && !topt.BeginsWith(
"gif") && !topt.BeginsWith(
"jpg") &&
327 !topt.BeginsWith(
"png") && !topt.BeginsWith(
"svg") && !topt.BeginsWith(
"xpm") && !topt.BeginsWith(
"root")) {
328 std::cerr << std::endl <<
">> musrFT **ERROR** found unrecogniced graphic format '" << topt <<
"'!" << std::endl;
333 }
else if (tstr.BeginsWith(
"--dump")) {
335 std::cerr << std::endl <<
">> musrFT **ERROR** found option --dump without argument!" << std::endl;
338 startupParam.
dumpFln = argv[i+1];
340 }
else if (tstr.Contains(
"-br") || tstr.Contains(
"--background-range")) {
342 std::cerr << std::endl <<
">> musrFT **ERROR** found option --background-range with wrong number of arguments." << std::endl;
346 bkgRange[0] = argv[i+1];
347 bkgRange[1] = argv[i+2];
348 if (!bkgRange[0].IsDigit()) {
349 std::cerr << std::endl <<
">> musrFT **ERROR** <start> bin of option --background-range is NOT an int-number! ('" << bkgRange[0] <<
"')." << std::endl;
352 if (!bkgRange[1].IsDigit()) {
353 std::cerr << std::endl <<
">> musrFT **ERROR** <end> bin of option --background-range is NOT an int-number! ('" << bkgRange[1] <<
"')." << std::endl;
356 startupParam.
bkg_range[0] = bkgRange[0].Atoi();
357 startupParam.
bkg_range[1] = bkgRange[1].Atoi();
359 }
else if (tstr.BeginsWith(
"-bg") || !tstr.CompareTo(
"--background")) {
362 if (argv[i][0] ==
'-') {
367 if (!topt.IsFloat()) {
368 std::cerr << std::endl <<
">> musrFT **ERROR** found option --background='" << topt <<
"' which is not a float" << std::endl;
371 startupParam.
bkg.push_back(topt.Atoi());
374 if (startupParam.
bkg.size() == 0) {
375 std::cerr << std::endl <<
">> musrFT **ERROR** found option --background without argument!" << std::endl;
378 }
else if (tstr.BeginsWith(
"-fo") || tstr.BeginsWith(
"--fourier-option")) {
380 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-option without arguments." << std::endl;
383 TString topt(argv[i+1]);
384 if (!topt.BeginsWith(
"real") && !topt.BeginsWith(
"imag") && !topt.BeginsWith(
"power") &&
385 !topt.BeginsWith(
"phase") && !topt.BeginsWith(
"phaseOptReal")) {
386 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-option with unrecognized argument '" << topt <<
"'." << std::endl;
391 }
else if (tstr.BeginsWith(
"-ap") || tstr.BeginsWith(
"--apodization")) {
393 std::cerr << std::endl <<
">> musrFT **ERROR** found option --apodization without arguments." << std::endl;
396 TString topt(argv[i+1]);
397 if (!topt.BeginsWith(
"none") && !topt.BeginsWith(
"weak") && !topt.BeginsWith(
"medium") && !topt.BeginsWith(
"strong")) {
398 std::cerr << std::endl <<
">> musrFT **ERROR** found option --apodization with unrecognized argument '" << topt <<
"'." << std::endl;
403 }
else if (tstr.BeginsWith(
"-fp") || tstr.BeginsWith(
"--fourier-power")) {
405 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-power without arguments." << std::endl;
408 TString fourierPower(argv[i+1]);
409 if (!fourierPower.IsDigit()) {
410 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-power with a power which is not an integer '" << fourierPower <<
"'." << std::endl;
415 std::cerr << std::endl <<
">> musrFT **ERROR** found Fourier power '" << fourierPower <<
"', which is out of range [1..20]" << std::endl;
419 }
else if (tstr.BeginsWith(
"-u") || tstr.BeginsWith(
"--units")) {
421 std::cerr << std::endl <<
">> musrFT **ERROR** found option --units without arguments." << std::endl;
424 TString topt(argv[i+1]);
425 if (!topt.BeginsWith(
"MHz", TString::kIgnoreCase) && !topt.BeginsWith(
"Gauss", TString::kIgnoreCase) &&
426 !topt.BeginsWith(
"Tesla", TString::kIgnoreCase) && !topt.BeginsWith(
"Mc/s", TString::kIgnoreCase)) {
427 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-option with unrecognized argument '" << topt <<
"'." << std::endl;
432 }
else if (tstr.BeginsWith(
"-ph") || tstr.BeginsWith(
"--phase")) {
434 std::cerr << std::endl <<
">> musrFT **ERROR** found option --phase without argument!" << std::endl;
437 TString phase(argv[i+1]);
438 if (!phase.IsFloat()) {
439 std::cerr << std::endl <<
">> musrFT **ERROR** found --phase argument '" << phase <<
"' which is not a number." << std::endl;
444 }
else if (tstr.BeginsWith(
"-fr") || tstr.BeginsWith(
"--fourier-range")) {
446 std::cerr << std::endl <<
">> musrFT **ERROR** found option --fourier-range with wrong number of arguments!" << std::endl;
449 TString fourierRange[2] = {argv[i+1], argv[i+2]};
450 if (!fourierRange[0].IsFloat() || !fourierRange[1].IsFloat()) {
451 std::cerr << std::endl <<
">> musrFT **ERROR** found invalid --fourier-range arguments '" << fourierRange[0] <<
"' and/or '" << fourierRange[1] <<
"'." << std::endl;
457 }
else if (tstr.BeginsWith(
"-tr") || tstr.BeginsWith(
"--time-range")) {
459 std::cerr << std::endl <<
">> musrFT **ERROR** found option --time-range with wrong number of arguments!" << std::endl;
462 TString timeRange[2] = {argv[i+1], argv[i+2]};
463 if (!timeRange[0].IsFloat() || !timeRange[1].IsFloat()) {
464 std::cerr << std::endl <<
">> musrFT **ERROR** found invalid --time-range arguments '" << timeRange[0] <<
"' and/or '" << timeRange[1] <<
"'." << std::endl;
467 startupParam.
timeRange[0] = timeRange[0].Atof();
468 startupParam.
timeRange[1] = timeRange[1].Atof();
470 }
else if (!tstr.CompareTo(
"-a") || !tstr.CompareTo(
"--average")) {
472 }
else if (!tstr.CompareTo(
"-ad") || !tstr.CompareTo(
"--average-per-data-set")) {
474 }
else if (tstr.BeginsWith(
"--histo")) {
477 }
else if (tstr.BeginsWith(
"--t0")) {
480 if (argv[i][0] ==
'-') {
485 if (!topt.IsDigit()) {
486 std::cerr << std::endl <<
">> musrFT **ERROR** found option t0='" << topt <<
"' which is not a number" << std::endl;
489 startupParam.
t0.push_back(topt.Atoi());
492 if (startupParam.
t0.size() == 0) {
493 std::cerr << std::endl <<
">> musrFT **ERROR** found option --t0 without argument!" << std::endl;
496 }
else if (tstr.BeginsWith(
"--title")) {
498 std::cerr << std::endl <<
">> musrFT **ERROR** found option --title without argument!" << std::endl;
502 startupParam.
title = argv[i];
503 }
else if (tstr.BeginsWith(
"-pa") || tstr.BeginsWith(
"--packing")) {
505 std::cerr << std::endl <<
">> musrFT **ERROR** found option --packing without argument!" << std::endl;
509 TString pack = TString(argv[i]);
510 if (!pack.IsDigit()) {
511 std::cerr << std::endl <<
">> musrFT **ERROR** found option --packing with argument '" << pack <<
"' which is NOT an integer!" << std::endl;
514 startupParam.
packing = pack.Atoi();
515 }
else if (tstr.BeginsWith(
"--create-msr-file")) {
517 std::cerr << std::endl <<
">> musrFT **ERROR** found option --create-msr-file without argument!" << std::endl;
521 startupParam.
msrFlnOut = TString(argv[i]);
522 }
else if (tstr.BeginsWith(
"-lc") || tstr.BeginsWith(
"--lifetimecorrection")) {
524 std::cerr << std::endl <<
">> musrFT **ERROR** found option --lifetimecorrection without argument!" << std::endl;
528 TString fudge(argv[i]);
529 if (!fudge.IsFloat()) {
530 std::cerr << std::endl <<
">> musrFT **ERROR** found option --lifetimecorrection with a fudge which is not a double '" << fudge <<
"'." << std::endl;
534 }
else if (tstr.BeginsWith(
"--timeout")) {
536 std::cerr << std::endl <<
">> musrFT **ERROR** found option --timeout without argument!" << std::endl;
542 std::cerr << std::endl <<
">> musrFT **ERROR** found option --timeout with a <timeout> which is not an integer '" << tt <<
"'." << std::endl;
545 startupParam.
timeout = tt.Atoi();
546 }
else if (tstr.BeginsWith(
"-df") || tstr.BeginsWith(
"--data-file")) {
548 if (argv[i][0] ==
'-') {
552 startupParam.
dataFln.push_back(argv[i]);
553 TString fln(argv[i]);
554 TString fileFormat(
"??");
555 if (fln.Contains(
".root", TString::kIgnoreCase))
556 fileFormat =
"MusrRoot";
557 else if (fln.Contains(
".bin", TString::kIgnoreCase))
558 fileFormat =
"PsiBin";
559 else if (fln.Contains(
".mdu", TString::kIgnoreCase))
560 fileFormat =
"PsiMdu";
561 else if (fln.Contains(
".nxs", TString::kIgnoreCase))
562 fileFormat =
"NeXus";
563 else if (fln.Contains(
".msr", TString::kIgnoreCase))
566 if (fileFormat ==
"??") {
567 std::cerr << std::endl <<
">> musrFT **ERROR** found data file name with unrecognized data file format ('" << fln <<
"')." << std::endl;
574 if (startupParam.
dataFln.size() == 0) {
575 std::cerr << std::endl <<
">> musrFT **ERROR** found option --data-file without argument!" << std::endl;
578 }
else if (tstr.Contains(
".msr")) {
579 startupParam.
msrFln.push_back(tstr);
581 std::cerr << std::endl <<
">> musrFT **ERROR** unrecognized option '" << tstr <<
"' found." << std::endl;
587 if ((startupParam.
msrFln.size() == 0) && (startupParam.
dataFln.size() == 0)) {
588 std::cerr << std::endl <<
">> musrFT **ERROR** neither <msr-file> nor <data-file> defined." << std::endl;
592 std::cerr << std::endl <<
">> musrFT **WARNING** in --background-range, start=" << startupParam.
bkg_range[0] <<
" > end=" << startupParam.
bkg_range[1] <<
", will swap them." << std::endl;
593 Double_t swap = startupParam.
bkg_range[0];
598 std::cerr << std::endl <<
">> musrFT **WARNING** in --fourier-range, start=" << startupParam.
fourierRange[0] <<
" > end=" << startupParam.
fourierRange[1] <<
", will swap them." << std::endl;
604 std::cerr << std::endl <<
">> musrFT **WARNING** Options: --average and --average-per-data-set exclude each other, will choose the latter." << std::endl;
625 size_t idx = str.Last(
'/');
627 str.Remove(0, idx+1);
632 metaInfo += TString::Format(
"T%d=%0.2fK,", i, rawRunData->
GetTemperature(i));
637 metaInfo += TString(
"B=??,");
638 else if (dval < 5000.0)
639 metaInfo += TString::Format(
"B=%0.1fG,", dval);
641 metaInfo += TString::Format(
"B=%0.1fT,", dval/1.0e4);
645 metaInfo += TString(
"E=??;");
646 else if (dval < 1000.0)
647 metaInfo += TString::Format(
"E=%0.1fkeV;", dval);
649 metaInfo += TString::Format(
"E=%0.1fMeV;", dval/1.0e3);
666 std::cout << std::endl <<
">> musrFT **WARNING** try to estimate t0 from maximum in the data set";
667 std::cout << std::endl <<
" '" << rd.
info <<
"'";
668 std::cout << std::endl <<
" NO warranty this is sensible!" << std::endl;
672 for (UInt_t i=1; i<rd.
rawData.size(); i++) {
678 std::cout << std::endl <<
">> musrFT_estimateT0: estimated t0=" << idx << std::endl;
705Int_t
musrFT_dumpData(TString fln, std::vector<PFourier*> &fourierData, Double_t start, Double_t end)
707 std::vector<PDoubleVector> data;
712 TH1F *hRe=
nullptr, *hIm=
nullptr;
716 hRe = fourierData[0]->GetRealFourier();
718 start = hRe->GetBinCenter(1);
720 end = hRe->GetBinCenter(hRe->GetNbinsX());
723 UInt_t minSize = hRe->GetNbinsX()-1;
725 for (UInt_t i=1; i<fourierData.size(); i++) {
726 hRe = fourierData[i]->GetRealFourier();
727 if (hRe->GetNbinsX()-1 < (Int_t)minSize)
728 minSize = hRe->GetNbinsX()-1;
732 for (UInt_t i=0; i<fourierData.size(); i++) {
733 hRe = fourierData[i]->GetRealFourier();
734 hIm = fourierData[i]->GetImaginaryFourier();
735 for (Int_t j=1; j<(Int_t)minSize; j++) {
736 dval = hRe->GetBinCenter(j);
737 if ((dval >= start) && (dval <= end)) {
738 freq.push_back(dval);
739 re.push_back(hRe->GetBinContent(j));
740 im.push_back(hIm->GetBinContent(j));
741 pwr.push_back(hRe->GetBinContent(j)*hRe->GetBinContent(j)+hIm->GetBinContent(j)*hIm->GetBinContent(j));
744 data.push_back(freq);
757 std::ofstream fout(fln, std::ofstream::out);
761 for (UInt_t i=0; i<fourierData.size()-1; i++)
762 fout <<
"freq" << i <<
", Re[d" << i <<
"], Im[d" << i <<
"], Pwr[d" << i <<
"], ";
763 fout <<
"freq" << fourierData.size()-1 <<
", Re[d" << fourierData.size()-1 <<
"], Im[d" << fourierData.size()-1 <<
"], Pwr[d" << fourierData.size()-1 <<
"]" << std::endl;
766 for (UInt_t j=0; j<data[0].size(); j++) {
767 for (UInt_t i=0; i<data.size()-1; i++) {
768 fout << data[i][j] <<
", ";
770 fout << data[data.size()-1][j] << std::endl;
792 if (rawRunData ==
nullptr) {
793 std::cerr << std::endl <<
">> musrFT_groupHistos **ERROR** Couldn't get raw run data for run '" << runName <<
"'." << std::endl;
805 t0.resize(histoList.size());
807 for (UInt_t i=0; i<t0.size(); i++)
811 if (i >= t0.size()) {
812 std::cerr << std::endl <<
">> musrFT_groupHistos **WARNING** found #t0's in GLOBAL block > #histos!";
813 std::cerr << std::endl <<
">> This should NEVER happen. Will ignore these entries.";
814 std::cerr << std::endl <<
">> Please check your msr-file!!" << std::endl;
821 if (i >= t0.size()) {
822 std::cerr << std::endl <<
">> musrFT_groupHistos **WARNING** found #t0's in RUN block > #histos!";
823 std::cerr << std::endl <<
">> This should NEVER happen. Will ignore these entries.";
824 std::cerr << std::endl <<
">> Please check your msr-file!!" << std::endl;
832 for (UInt_t i=0; i<t0.size(); i++) {
834 std::cout << std::endl <<
">> musrFT_groupHistos **WARNING** try to estimate t0 from maximum in the data set";
835 std::cout << std::endl <<
">> '" << runName <<
"', histo " << histoList[i] <<
". NO warranty this is sensible!";
837 max = rawRunData->
GetDataBin(histoList[i])->at(0);
838 for (UInt_t j=1; j<rawRunData->
GetDataBin(histoList[i])->size(); j++) {
839 if (rawRunData->
GetDataBin(histoList[i])->at(j) > max) {
840 max = rawRunData->
GetDataBin(histoList[i])->at(j);
844 std::cout << std::endl <<
">> estimated t0=" << idx << std::endl;
851 for (UInt_t i=1; i<histoList.size(); i++) {
852 for (UInt_t j=0; j<data.size(); j++) {
853 if ((j+t0[i]-t0[0] >= 0) && (j+t0[i]-t0[0] < rawRunData->
GetDataBin(histoList[i])->size())) {
854 data[j] += rawRunData->
GetDataBin(histoList[i])->at(j);
861 rd.
t0 =
static_cast<Int_t
>(t0[0]);
878 std::ofstream fout(param.
msrFlnOut.Data(), std::ofstream::out);
881 if (param.
title.Length() == 0) {
882 if (param.
dataFln.size() != 0) {
888 fout << param.
title << std::endl;
889 fout <<
"###############################################################" << std::endl;
892 fout <<
"GLOBAL" << std::endl;
893 fout <<
"fittype 0 (single histogram fit)" << std::endl;
894 if (param.
t0.size() == 1) {
895 fout <<
"t0 " << param.
t0[0] << std::endl;
900 fout <<
"packing " << param.
packing << std::endl;
902 fout <<
"###############################################################" << std::endl;
906 TString fileFormat(
"MUSR-ROOT");
907 for (UInt_t i=0; i<param.
dataFln.size(); i++) {
909 fileFormat = TString(
"PSI-BIN");
911 fileFormat = TString(
"PSI-MDU");
913 fileFormat = TString(
"NEXUS");
915 fileFormat = TString(
"MUD");
916 for (UInt_t j=0; j<param.
histo.size(); j++) {
917 fout <<
"RUN " << param.
dataFln[i] <<
" BXXX IXX " << fileFormat <<
" (name beamline institute data-file-format)" << std::endl;
918 fout <<
"forward " << param.
histo[j] << std::endl;
919 if ((param.
t0.size() > 1) && (j < param.
t0.size())) {
920 fout <<
"t0 " << param.
t0[j] << std::endl;
923 fout <<
"background " << param.
bkg_range[0] <<
" " << param.
bkg_range[1] << std::endl;
924 fout <<
"#--------------------------------------------------------------" << std::endl;
928 fout <<
"###############################################################" << std::endl;
931 fout <<
"PLOT 0 (single histo plot)" << std::endl;
932 if (param.
histo.size() == 0) {
933 fout <<
"runs 1" << std::endl;
936 for (UInt_t i=0; i<param.
histo.size(); i++)
941 fout <<
"range 0 10" << std::endl;
946 fout <<
"###############################################################" << std::endl;
949 fout <<
"FOURIER" << std::endl;
951 fout <<
"units MHz # units either 'Gauss', 'MHz', or 'Mc/s'" << std::endl;
953 fout <<
"units " << param.
fourierUnits <<
" # units either 'Gauss', 'MHz', or 'Mc/s'" << std::endl;
956 fout <<
"plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL" << std::endl;
958 fout <<
"plot " << param.
fourierOpt <<
" # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL" << std::endl;
961 fout <<
"fourier_power " << param.
fourierPower << std::endl;
963 fout <<
"apodization " << param.
apodization <<
" # NONE, WEAK, MEDIUM, STRONG" << std::endl;
980 gettimeofday(&now, 0);
982 return (
static_cast<Double_t
>(now.tv_sec) * 1.0e6 +
static_cast<Double_t
>(now.tv_usec))/1.0e3;
996Int_t
main(Int_t argc, Char_t *argv[])
1024 if (startupParam.
msrFlnOut.Length() > 0) {
1034 std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
1035 std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
1036 if (!startupHandler->StartupFileFound()) {
1037 std::cerr << std::endl <<
">> musrFT **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
1038 std::cerr << std::endl;
1041 saxParser->ConnectToHandler(
"PStartupHandler", startupHandler.get());
1048 std::cerr << std::endl <<
">> musrFT **WARNING** Reading/parsing musrfit_startup.xml failed.";
1049 std::cerr << std::endl;
1057 std::vector< std::unique_ptr<PMsrHandler> > msrHandler;
1058 msrHandler.resize(startupParam.
msrFln.size());
1059 for (UInt_t i=0; i<startupParam.
msrFln.size(); i++) {
1060 msrHandler[i] = std::make_unique<PMsrHandler>(startupParam.
msrFln[i].Data(), &startup_options,
true);
1061 status = msrHandler[i]->ReadMsrFile();
1065 std::cout << std::endl <<
">> musrFT **ERROR** couldn't find " << startupParam.
msrFln[i] << std::endl << std::endl;
1068 std::cout << std::endl <<
">> musrFT **SYNTAX ERROR** in file " << startupParam.
msrFln[i] <<
", full stop here." << std::endl << std::endl;
1071 std::cout << std::endl <<
">> musrFT **UNKOWN ERROR** when trying to read the msr-file" << std::endl << std::endl;
1080 for (UInt_t i=0; i<msrHandler.size(); i++) {
1081 PMsrRunList *runList = msrHandler[i]->GetMsrRunList();
1082 for (UInt_t j=0; j<runList->at(i).GetFileFormatSize(); j++) {
1083 ffstr = *(runList->at(i).GetFileFormat(j));
1084 if (!ffstr.CompareTo(
"ascii", TString::kIgnoreCase) || !ffstr.CompareTo(
"dat", TString::kIgnoreCase) || !ffstr.CompareTo(
"db", TString::kIgnoreCase)) {
1085 std::cout << std::endl;
1086 std::cout <<
"**ERROR** Currently file format's 'ASCII', 'DAT', nor 'DB' are NOT supported." << std::endl;
1087 std::cout << std::endl;
1093 std::vector< std::unique_ptr<PRunDataHandler> > runDataHandler;
1094 runDataHandler.resize(startupParam.
msrFln.size()+startupParam.
dataFln.size());
1096 for (UInt_t i=0; i<msrHandler.size(); i++) {
1099 runDataHandler[i] = std::make_unique<PRunDataHandler>(msrHandler[i].get(), startupHandler->GetDataPathList());
1101 runDataHandler[i] = std::make_unique<PRunDataHandler>(msrHandler[i].get());
1102 if (runDataHandler[i] ==
nullptr) {
1103 std::cerr <<
">> musrFT: **ERROR** couldn't allocate PRunDataHandler object." << std::endl;
1109 for (UInt_t i=msrHandler.size(); i<msrHandler.size()+startupParam.
dataFln.size(); i++) {
1112 runDataHandler[i] = std::make_unique<PRunDataHandler>(startupParam.
dataFln[i-msrHandler.size()], startupParam.
dataFileFormat[i-msrHandler.size()], startupHandler->GetDataPathList());
1114 runDataHandler[i] = std::make_unique<PRunDataHandler>(startupParam.
dataFln[i-msrHandler.size()], startupParam.
dataFileFormat[i-msrHandler.size()]);
1115 if (runDataHandler[i] ==
nullptr) {
1116 std::cerr <<
">> musrFT: **ERROR** couldn't allocate PRunDataHandler object." << std::endl;
1124 Int_t dataSetTagCounter = 0;
1125 TString prevDataSetPathName(
"");
1126 TString str(
""), fln(
"");
1129 for (UInt_t i=0; i<runDataHandler.size(); i++) {
1130 runDataHandler[i]->ReadData();
1132 if (!runDataHandler[i]->IsAllDataAvailable()) {
1133 if (i < msrHandler.size()) {
1134 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't read data from msr-file '" << startupParam.
msrFln[i] <<
"'." << std::endl;
1136 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't read data-file '" << startupParam.
dataFln[i] <<
"'." << std::endl;
1142 PRawRunData *rawRunData = runDataHandler[i]->GetRunData();
1143 if (rawRunData ==
nullptr) {
1144 if (i < msrHandler.size()) {
1145 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain the raw run data set from msr-file " << startupParam.
msrFln[i] << std::endl;
1147 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain the raw run data set for " << startupParam.
dataFln[i-msrHandler.size()] << std::endl;
1153 if (i >= msrHandler.size()) {
1154 for (UInt_t j=0; j<startupParam.
histo.size(); j++) {
1156 std::cerr << std::endl <<
">> musrFT **ERROR** found histo no " << startupParam.
histo[j] <<
" > # of histo in the file (";
1157 std::cerr << startupParam.
dataFln[i] <<
" // # histo: " << rawRunData->
GetNoOfHistos() <<
")." << std::endl;
1161 if (startupParam.
histo.size() == 0) {
1164 startupParam.
histo.push_back(j+1);
1169 if (i < msrHandler.size()) {
1171 if (startupParam.
title.Length() == 0)
1172 startupParam.
title = *(msrHandler[0]->GetMsrTitle());
1175 if (plot ==
nullptr) {
1176 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain PLOT block from msr-handler." << std::endl;
1180 PMsrRunList *runs = msrHandler[i]->GetMsrRunList();
1181 if (runs ==
nullptr) {
1182 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain RUN block(s) from msr-handler." << std::endl;
1187 if (global ==
nullptr) {
1188 std::cerr << std::endl <<
">> musrFT **ERROR** couldn't obtain GLOBAL block from msr-handler." << std::endl;
1193 if (fourierBlock ==
nullptr) {
1194 std::cerr << std::endl <<
">> msrFT **WARNING** couldn't obtain FOURIER block from msr-handler." << std::endl;
1199 unitTag = fourierBlock->
fUnits;
1244 if (startupParam.
fourierOpt.BeginsWith(
"??")) {
1245 fourierPlotTag = fourierBlock->
fPlotTag;
1254 for (UInt_t j=0; j<runList.size(); j++) {
1257 str = *(runs->at(runList[j]-1).GetRunName());
1258 if (prevDataSetPathName.CompareTo(str)) {
1260 prevDataSetPathName = str;
1265 for (UInt_t k=0; k<runs->at(runList[j]-1).GetForwardHistoNoSize(); k++) {
1266 histoList.push_back(runs->at(runList[j]-1).GetForwardHistoNo(k));
1270 fln = *(runs->at(runList[j]-1).GetRunName());
1273 hh = TString::Format(
"h%d", histoList[0]);
1274 for (UInt_t k=1; k<histoList.size(); k++)
1275 hh += TString::Format(
"/%d", histoList[k]);
1289 if (plot->at(0).fTmin.size() > 0) {
1297 if (
musrFT_groupHistos(runDataHandler[i].get(), global, runs->at(runList[j]-1), rd)) {
1308 if (runs->at(runList[j]-1).GetPacking() != -1) {
1309 pack = runs->at(runList[j]-1).GetPacking();
1316 Int_t bkgStart=-1, bkgEnd=-1;
1317 bkgStart = runs->at(runList[j]-1).GetBkgRange(0);
1318 bkgEnd = runs->at(runList[j]-1).GetBkgRange(1);
1319 if ((startupParam.
bkg_range[0] == -1) && (bkgStart != -1))
1321 if ((startupParam.
bkg_range[1] == -1) && (bkgEnd != -1))
1328 str = *(runDataHandler[i]->GetRunData()->GetFileName());
1329 if (prevDataSetPathName.CompareTo(str)) {
1331 prevDataSetPathName = str;
1335 for (UInt_t j=0; j<startupParam.
histo.size(); j++) {
1336 idx = startupParam.
histo[j];
1339 rd.
info = TString::Format(
"h%d:", idx);
1355 if (startupParam.
t0.size() == 1)
1356 rd.
t0 = startupParam.
t0[0];
1357 else if (j < startupParam.
t0.size())
1358 rd.
t0 = startupParam.
t0[j];
1376 if (!startupParam.
fourierOpt.CompareTo(
"real", TString::kIgnoreCase))
1378 else if (!startupParam.
fourierOpt.CompareTo(
"imag", TString::kIgnoreCase))
1380 else if (!startupParam.
fourierOpt.CompareTo(
"real+imag", TString::kIgnoreCase))
1382 else if (!startupParam.
fourierOpt.CompareTo(
"power", TString::kIgnoreCase))
1384 else if (!startupParam.
fourierOpt.CompareTo(
"phase", TString::kIgnoreCase))
1386 else if (!startupParam.
fourierOpt.CompareTo(
"phaseoptreal", TString::kIgnoreCase))
1403 std::vector<TH1F*> histo = data.
GetData();
1406 if (startupParam.
fourierUnits.BeginsWith(
"gauss", TString::kIgnoreCase))
1408 else if (startupParam.
fourierUnits.BeginsWith(
"tesla", TString::kIgnoreCase))
1410 else if (startupParam.
fourierUnits.BeginsWith(
"mhz", TString::kIgnoreCase))
1412 else if (startupParam.
fourierUnits.BeginsWith(
"mc/s", TString::kIgnoreCase))
1417 std::vector<PFourier*> fourier;
1418 fourier.resize(histo.size());
1419 for (UInt_t i=0; i<fourier.size(); i++) {
1421 if (fourier[i] ==
nullptr) {
1422 std::cerr <<
">> musrFT: **ERROR** couldn't invoke PFourier object" << std::endl;
1428 if (startupParam.
apodization.BeginsWith(
"weak", TString::kIgnoreCase))
1430 else if (startupParam.
apodization.BeginsWith(
"medium", TString::kIgnoreCase))
1432 else if (startupParam.
apodization.BeginsWith(
"strong", TString::kIgnoreCase))
1436 for (UInt_t i=0; i<fourier.size(); i++) {
1437 fourier[i]->Transform(apodTag);
1440 std::cout << std::endl <<
"info> after FFT. calculation time: " << (end-start)/1.0e3 <<
" (sec)." << std::endl;
1445 startupParam.
fourierRange[1] = fourier[0]->GetMaxFreq();
1448 std::unique_ptr<PFourierCanvas> fourierCanvas;
1451 if (startupParam.
dumpFln.Length() > 0) {
1456 Bool_t batch =
false;
1458 std::vector<char*> args;
1459 args.push_back(argv[0]);
1462 args.push_back((
char*)
"-b");
1464 int cc = args.size();
1466 TApplication app(
"App", &cc, args.data());
1468 if (startupHandler) {
1469 fourierCanvas = std::unique_ptr<PFourierCanvas>(
new PFourierCanvas(fourier, dataSetTag, startupParam.
title.Data(),
1473 startupHandler->GetMarkerList(),
1474 startupHandler->GetColorList(),
1477 fourierCanvas = std::unique_ptr<PFourierCanvas>(
new PFourierCanvas(fourier, dataSetTag, startupParam.
title.Data(),
1483 if (fourierCanvas ==
nullptr) {
1484 std::cerr <<
">> musrFT: **ERROR** couldn't invoke PFourierCanvas object." << std::endl;
1488 fourierCanvas->UpdateFourierPad();
1489 fourierCanvas->UpdateInfoPad();
1492 if (!fourierCanvas->IsValid()) {
1493 std::cerr << std::endl <<
">> musrFT **SEVERE ERROR** Couldn't invoke all necessary objects, will quit.";
1494 std::cerr << std::endl;
1498 TQObject::Connect(
"TCanvas",
"Closed()",
"PFourierCanvas", fourierCanvas.get(),
"LastCanvasClosed()");
1500 fourierCanvas->SetTimeout(startupParam.
timeout);
1502 fourierCanvas->Connect(
"Done(Int_t)",
"TApplication", &app,
"Terminate(Int_t)");
1505 TString fileName(
"");
1507 if (startupParam.
dataFln.size() > 0) {
1508 fileName = startupParam.
dataFln[0];
1510 if (startupParam.
msrFln.size() > 0) {
1511 fileName = startupParam.
msrFln[0];
1513 Ssiz_t idx = fileName.Last(
'.');
1514 fileName.Remove(idx, fileName.Length());
1517 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