64 PRunBase(msrInfo, rawData, runNo, tag), fTheoAsData(theoAsData)
69 std::cerr << std::endl <<
"PRunNonMusr::PRunNonMusr(): **ERROR** Couldn't get raw run data!";
70 std::cerr << std::endl;
102 Double_t chisq = 0.0;
134 std::cout << std::endl <<
"PRunNonMusr::CalcChiSquareExpected(): not implemented yet ..." << std::endl;
152 std::cout << std::endl <<
"PRunNonMusr::CalcMaxLikelihood(): not implemented yet ..." << std::endl;
200 Bool_t success =
true;
206 std::cerr << std::endl <<
">> PRunNonMusr::PrepareData(): **WARNING** ADDRUN NOT SUPPORTED FOR THIS FIT TYPE, WILL IGNORE IT." << std::endl;
215 std::cerr << std::endl <<
">> PRunNonMusr::PrepareData(): **ERROR** couldn't find any packing information." << std::endl;
249 Bool_t success =
true;
256 Double_t value = 0.0;
264 if ((i %
fPacking == 0) && (i != 0)) {
290 for (UInt_t i=0; i<xx->size(); i++) {
312 Bool_t success =
true;
320 Double_t value = 0.0;
328 if ((i %
fPacking == 0) && (i != 0)) {
346 std::vector<Double_t> par;
348 for (UInt_t i=0; i<paramList->size(); i++)
349 par.push_back((*paramList)[i].fValue);
366 Double_t xMin = 0.0, xMax = 0.0;
369 plotBlock = plotList->at(0);
370 if (plotBlock.
fTmin.size() == 0) {
372 xMin = runList->at(0).GetFitRange(0);
373 xMax = runList->at(0).GetFitRange(1);
374 for (UInt_t i=1; i<runList->size(); i++) {
375 if (runList->at(i).GetFitRange(0) < xMin)
376 xMin = runList->at(i).GetFitRange(0);
377 if (runList->at(i).GetFitRange(1) > xMax)
378 xMax = runList->at(i).GetFitRange(1);
380 }
else if (plotBlock.
fTmin.size() == 1) {
381 xMin = plotBlock.
fTmin[0];
382 xMax = plotBlock.
fTmax[0];
383 }
else if (plotBlock.
fTmin.size() > 1) {
384 xMin = plotBlock.
fTmin[0];
385 xMax = plotBlock.
fTmax[0];
386 for (UInt_t i=1; i<plotBlock.
fTmin.size(); i++) {
387 if (plotBlock.
fTmin[i] < xMin)
388 xMin = plotBlock.
fTmin[i];
389 if (plotBlock.
fTmax[i] > xMax)
390 xMax = plotBlock.
fTmax[i];
396 xMin = runList->at(0).GetFitRange(0);
397 xMax = runList->at(0).GetFitRange(1);
398 for (UInt_t i=1; i<runList->size(); i++) {
399 if (runList->at(i).GetFitRange(0) < xMin)
400 xMin = runList->at(i).GetFitRange(0);
401 if (runList->at(i).GetFitRange(1) > xMax)
402 xMax = runList->at(i).GetFitRange(1);
406 for (UInt_t i=1; i<plotList->size(); i++) {
407 plotBlock = plotList->at(i);
409 if (plotBlock.
fTmin.size() == 0) {
411 for (UInt_t i=0; i<runList->size(); i++) {
412 if (runList->at(i).GetFitRange(0) < xMin)
413 xMin = runList->at(i).GetFitRange(0);
414 if (runList->at(i).GetFitRange(1) > xMax)
415 xMax = runList->at(i).GetFitRange(1);
417 }
else if (plotBlock.
fTmin.size() == 1) {
418 if (plotBlock.
fTmin[0] < xMin)
419 xMin = plotBlock.
fTmin[0];
420 if (plotBlock.
fTmax[0] > xMax)
421 xMax = plotBlock.
fTmax[0];
422 }
else if (plotBlock.
fTmin.size() > 1) {
423 for (UInt_t i=0; i<plotBlock.
fTmin.size(); i++) {
424 if (plotBlock.
fTmin[i] < xMin)
425 xMin = plotBlock.
fTmin[i];
426 if (plotBlock.
fTmax[i] > xMax)
427 xMax = plotBlock.
fTmax[i];
433 for (UInt_t i=0; i<runList->size(); i++) {
434 if (runList->at(i).GetFitRange(0) < xMin)
435 xMin = runList->at(i).GetFitRange(0);
436 if (runList->at(i).GetFitRange(1) > xMax)
437 xMax = runList->at(i).GetFitRange(1);
445 xStep = (xMax-xMin)/
fData.
GetX()->size();
447 xStep = (xMax-xMin)/1000.0;
488 Bool_t found =
false;
509 std::cerr << std::endl <<
"PRunNonMusr::GetXIndex(): **ERROR** Couldn't obtain x-data index!";
510 std::cerr << std::endl;
529 Bool_t found =
false;
550 std::cerr << std::endl <<
"PRunNonMusr::GetYIndex(): **ERROR** Couldn't obtain y-data index!";
551 std::cerr << std::endl;
virtual Bool_t FromAscii()
Bool_t fValid
flag showing if the state of the class is valid
virtual Double_t CalcMaxLikelihood(const std::vector< Double_t > &par)
virtual const PDoubleVector * GetError()
virtual void AppendXValue(Double_t dval)
virtual Int_t GetNoOfFuncs()
virtual Bool_t PrepareViewData()
std::vector< PMsrRunBlock > PMsrRunList
virtual Int_t GetPacking()
PRunDataHandler * fRawData
holds the raw run data
PMsrHandler * fMsrInfo
msr-file handler
virtual const std::vector< PDoubleVector > * GetData()
PRawRunData * fRawRunData
raw run data handler
PMetaData fMetaData
keeps the meta data from the data file like field, temperature, energy, ...
virtual Int_t GetXDataIndex()
virtual PRawRunData * GetRunData(const TString &runName)
Bool_t fTheoAsData
true=only calculate the theory points at the data points, false=calculate more points for the theory ...
Int_t fEndTimeBin
bin at which the fit ends
virtual UInt_t GetNoOfFitBins()
std::vector< PMsrPlotStructure > PMsrPlotList
virtual void AppendErrorValue(Double_t dval)
virtual TString * GetYDataLabel()
virtual Double_t CalcChiSquare(const std::vector< Double_t > &par)
PRunData fData
data to be fitted, viewed, i.e. binned data
virtual Double_t CalcChiSquareExpected(const std::vector< Double_t > &par)
UInt_t fNoOfFitBins
number of bins to be be fitted
std::vector< PMsrParamStructure > PMsrParamList
std::vector< Double_t > PDoubleVector
virtual Bool_t PrepareData()
virtual PMsrRunList * GetMsrRunList()
virtual const PStringVector * GetDataTags()
Int_t fStartTimeBin
bin at which the fit starts
virtual Int_t GetYDataIndex()
virtual const PDoubleVector * GetX()
virtual void AppendTheoryValue(Double_t dval)
virtual PMsrGlobalBlock * GetMsrGlobal()
Int_t fPacking
packing for this particular run. Either given in the RUN- or GLOBAL-block.
virtual void AppendValue(Double_t dval)
virtual const PDoubleVector * GetValue()
virtual const std::vector< PDoubleVector > * GetErrData()
PDoubleVector fTmin
time minimum
PDoubleVector fTmax
time maximum
virtual UInt_t GetFuncNo(Int_t idx)
virtual TString * GetXDataLabel()
virtual PMsrPlotList * GetMsrPlotList()
EPMusrHandleTag fHandleTag
tag telling whether this is used for fit, view, ...
PMsrRunBlock * fRunInfo
run info used to filter out needed infos of a run
Bool_t fUseFitRanges
yes -> use the fit ranges to plot the data, no (default) -> use range information if present ...
Double_t fFitEndTime
fit end time
Double_t fFitStartTime
fit start time
virtual PMsrParamList * GetMsrParamList()
virtual void CalcTheory()
virtual PIntVector * GetMap()
virtual Double_t EvalFunc(UInt_t i, std::vector< Int_t > map, std::vector< Double_t > param, PMetaData metaData)
virtual UInt_t GetYIndex()
virtual UInt_t GetRunNameSize()
virtual void AppendXTheoryValue(Double_t dval)
PNonMusrRawRunData fDataNonMusr
keeps all ascii- or db-file info in case of nonMusr fit
std::unique_ptr< PTheory > fTheory
theory needed to calculate chi-square
virtual Int_t GetPacking()
virtual Double_t GetFitRange(UInt_t idx)
virtual UInt_t GetXIndex()
virtual Bool_t PrepareFitData()
virtual TString * GetRunName(UInt_t idx=0)
virtual Double_t GetFitRange(UInt_t idx)
PDoubleVector fFuncValues
is keeping the values of the functions from the FUNCTIONS block