43 #include <TObjArray.h> 44 #include <TObjString.h> 84 PRunBase(msrInfo, rawData, runNo, tag), fTheoAsData(theoAsData)
95 std::cerr << std::endl <<
">> PRunSingleHisto::PRunSingleHisto: **SEVERE ERROR**: Couldn't find any packing information!";
96 std::cerr << std::endl <<
">> This is very bad :-(, will quit ...";
97 std::cerr << std::endl;
111 std::cerr << std::endl <<
">> PRunSingleHisto::PRunSingleHisto: **SEVERE ERROR**: Couldn't prepare data for fitting!";
112 std::cerr << std::endl <<
">> This is very bad :-(, will quit ...";
113 std::cerr << std::endl;
142 Double_t chisq = 0.0;
196 #pragma omp parallel for default(shared) private(i,time,diff) schedule(dynamic,chunk) reduction(+:chisq) 226 Double_t chisq = 0.0;
281 #pragma omp parallel for default(shared) private(i,time,theo,diff) schedule(dynamic,chunk) reduction(+:chisq) 287 chisq += diff*diff / theo;
357 Double_t normalizer = 1.0;
372 #pragma omp parallel for default(shared) private(i,time,theo,data) schedule(dynamic,chunk) reduction(-:mllh) 382 std::cerr <<
">> PRunSingleHisto::CalcMaxLikelihood: **WARNING** NEGATIVE theory!!" << std::endl;
387 mllh += (theo-data) + data*log(data/theo);
393 return normalizer*2.0*mllh;
455 Double_t normalizer = 1.0;
470 #pragma omp parallel for default(shared) private(i,time,theo,data) schedule(dynamic,chunk) reduction(-:mllh) 480 std::cerr <<
">> PRunSingleHisto::CalcMaxLikelihood: **WARNING** NEGATIVE theory!!" << std::endl;
485 mllh += data*log(data/theo);
489 return normalizer*2.0*mllh;
501 std::vector<Double_t> par;
503 for (UInt_t i=0; i<paramList->size(); i++)
504 par.push_back((*paramList)[i].fValue);
547 for (UInt_t i=0; i<size; i++) {
548 time = start +
static_cast<Double_t
>(i)*resolution;
587 TObjArray *tok =
nullptr;
588 TObjString *ostr =
nullptr;
593 tok = fitRange.Tokenize(
" \t");
595 if (tok->GetEntries() == 3) {
597 ostr =
dynamic_cast<TObjString*
>(tok->At(1));
598 str = ostr->GetString();
600 idx = str.First(
"+");
602 str.Remove(0, idx+1);
609 ostr =
dynamic_cast<TObjString*
>(tok->At(2));
610 str = ostr->GetString();
612 idx = str.First(
"-");
614 str.Remove(0, idx+1);
619 }
else if ((tok->GetEntries() > 3) && (tok->GetEntries() % 2 == 1)) {
620 Int_t pos = 2*(
fRunNo+1)-1;
622 if (pos + 1 >= tok->GetEntries()) {
623 std::cerr << std::endl <<
">> PRunSingleHisto::SetFitRangeBin(): **ERROR** invalid FIT_RANGE command found: '" << fitRange <<
"'";
624 std::cerr << std::endl <<
">> will ignore it. Sorry ..." << std::endl;
627 ostr =
dynamic_cast<TObjString*
>(tok->At(pos));
628 str = ostr->GetString();
630 idx = str.First(
"+");
632 str.Remove(0, idx+1);
639 ostr =
dynamic_cast<TObjString*
>(tok->At(pos+1));
640 str = ostr->GetString();
642 idx = str.First(
"-");
644 str.Remove(0, idx+1);
651 std::cerr << std::endl <<
">> PRunSingleHisto::SetFitRangeBin(): **ERROR** invalid FIT_RANGE command found: '" << fitRange <<
"'";
652 std::cerr << std::endl <<
">> will ignore it. Sorry ..." << std::endl;
701 Bool_t success =
true;
712 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareData(): **ERROR** Couldn't get run " <<
fRunInfo->
GetRunName()->Data() <<
"!";
713 std::cerr << std::endl;
733 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareData(): **PANIC ERROR**:";
734 std::cerr << std::endl <<
">> histoNo found = " << histoNo[i] <<
", which is NOT present in the data file!?!?";
735 std::cerr << std::endl <<
">> Will quit :-(";
736 std::cerr << std::endl;
744 std::cout.precision(10);
745 std::cout << std::endl <<
">> PRunSingleHisto::PrepareData(): time resolution=" << std::fixed << runData->
GetTimeResolution() <<
"(ns)" << std::endl;
753 std::vector<PDoubleVector> forward;
754 forward.resize(histoNo.size());
755 for (UInt_t i=0; i<histoNo.size(); i++) {
756 forward[i].resize(runData->
GetDataBin(histoNo[i])->size());
757 forward[i] = *runData->
GetDataBin(histoNo[i]);
767 if (addRunData ==
nullptr) {
768 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareData(): **ERROR** Couldn't get addrun " <<
fRunInfo->
GetRunName(i)->Data() <<
"!";
769 std::cerr << std::endl;
775 for (UInt_t k=0; k<histoNo.size(); k++) {
776 addRunSize = addRunData->
GetDataBin(histoNo[k])->size();
777 for (UInt_t j=0; j<addRunData->
GetDataBin(histoNo[k])->size(); j++) {
779 if ((static_cast<Int_t>(j)+static_cast<Int_t>(
fAddT0s[i-1][k])-static_cast<Int_t>(
fT0s[k]) >= 0) &&
780 (j+
static_cast<Int_t
>(
fAddT0s[i-1][k])-static_cast<Int_t>(
fT0s[k]) < addRunSize)) {
781 forward[k][j] += addRunData->
GetDataBin(histoNo[k])->at(j+static_cast<Int_t>(
fAddT0s[i-1][k])-static_cast<Int_t>(
fT0s[k]));
790 for (UInt_t i=0; i<
fForward.size(); i++) {
795 for (UInt_t i=1; i<histoNo.size(); i++) {
796 for (UInt_t j=0; j<runData->
GetDataBin(histoNo[i])->size(); j++) {
799 fForward[j] += forward[i][j+
static_cast<Int_t
>(
fT0s[i])-static_cast<Int_t>(
fT0s[0])];
813 Bool_t lifetimecorrection =
false;
815 lifetimecorrection = plot->at(0).fLifeTimeCorrection;
870 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareFitData(): **WARNING** Neither fix background nor background bins are given!";
872 std::cerr << std::endl <<
">> NO WARRANTY THAT THIS MAKES ANY SENSE! Better check ...";
873 std::cerr << std::endl;
878 for (UInt_t i=0; i<
fForward.size(); i++) {
885 Int_t t0 =
static_cast<Int_t
>(
fT0s[0]);
886 Double_t value = 0.0;
887 Double_t normalizer = 1.0;
953 Double_t dataNorm = 1.0, theoryNorm = 1.0;
964 Int_t end = start + ((
fForward.size()-start)/packing)*packing;
968 start = (
static_cast<Int_t
>(
fT0s[0])+offset) - ((
static_cast<Int_t
>(
fT0s[0])+offset)/packing)*packing;
969 end = start + ((
fForward.size()-start)/packing)*packing;
970 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareRawViewData(): **WARNING** data range was not provided, will try data range start = " << start <<
".";
971 std::cerr << std::endl <<
">> NO WARRANTY THAT THIS DOES MAKE ANY SENSE.";
972 std::cerr << std::endl;
982 if ((start < 0) || (start >
static_cast<Int_t
>(
fForward.size()))) {
983 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareRawViewData(): **ERROR** start data bin doesn't make any sense!";
984 std::cerr << std::endl;
988 if ((end < 0) || (end >
static_cast<Int_t
>(
fForward.size()))) {
989 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareRawViewData(): **ERROR** end data bin doesn't make any sense!";
990 std::cerr << std::endl;
995 Int_t t0 =
static_cast<Int_t
>(
fT0s[0]);
996 Double_t value = 0.0;
1001 for (Int_t i=start; i<end; i++) {
1002 if (((i-start) % packing == 0) && (i != start)) {
1019 std::vector<Double_t> par;
1021 for (UInt_t i=0; i<paramList->size(); i++)
1022 par.push_back((*paramList)[i].fValue);
1054 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareRawViewData(): **WARNING** Neither fix background nor background bins are given!";
1056 std::cerr << std::endl <<
">> NO WARRANTY THAT THIS MAKES ANY SENSE! Better check ...";
1057 std::cerr << std::endl;
1088 Double_t theoryValue;
1089 for (UInt_t i=0; i<size; i++) {
1092 if (fabs(theoryValue) > 1.0e10) {
1146 Double_t dataNorm = 1.0, theoryNorm = 1.0;
1156 Int_t t0 =
static_cast<Int_t
>(
fT0s[0]);
1161 Int_t end = start + ((
fForward.size()-start)/packing)*packing;
1166 start = (
static_cast<Int_t
>(
fT0s[0])+offset) - ((
static_cast<Int_t
>(
fT0s[0])+offset)/packing)*packing;
1167 end = start + ((
fForward.size()-start)/packing)*packing;
1168 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareViewData(): **WARNING** data range was not provided, will try data range start = " << start <<
".";
1169 std::cerr << std::endl <<
">> NO WARRANTY THAT THIS DOES MAKE ANY SENSE.";
1170 std::cerr << std::endl;
1181 if ((start < 0) || (start >
static_cast<Int_t
>(
fForward.size()))) {
1182 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareViewData(): **ERROR** start data bin doesn't make any sense!";
1183 std::cerr << std::endl;
1187 if ((end < 0) || (end >
static_cast<Int_t
>(
fForward.size()))) {
1188 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareViewData(): **ERROR** end data bin doesn't make any sense!";
1189 std::cerr << std::endl;
1196 std::vector<Double_t> par;
1198 for (UInt_t i=0; i<paramList->size(); i++)
1199 par.push_back((*paramList)[i].fValue);
1231 std::cerr << std::endl <<
">> PRunSingleHisto::PrepareViewData(): **WARNING** Neither fix background nor background bins are given!";
1233 std::cerr << std::endl <<
">> NO WARRANTY THAT THIS MAKES ANY SENSE! Better check ...";
1234 std::cerr << std::endl;
1247 Double_t value = 0.0;
1248 Double_t expval = 0.0;
1249 Double_t rrf_val = 0.0;
1250 Double_t time = 0.0;
1257 Double_t gammaRRF = 0.0, wRRF = 0.0, phaseRRF = 0.0;
1259 for (Int_t i=start; i<end; i++) {
1260 if (((i-start) % packing == 0) && (i != start)) {
1263 time = (((
static_cast<Double_t
>(i)-0.5) +
static_cast<Double_t
>(packing)/2.0 - static_cast<Double_t>(t0)))*
fTimeResolution -
static_cast<Double_t
>(packing)*
fTimeResolution;
1264 expval = TMath::Exp(+time/tau)/N0;
1275 gammaRRF = TMath::TwoPi()*1.0e-3;
1278 gammaRRF = TMath::TwoPi();
1290 gammaRRF = TMath::TwoPi();
1296 Double_t error = 0.0;
1297 for (Int_t i=start; i<end; i++) {
1298 if (((i-start) % packing == 0) && (i != start)) {
1305 expval = TMath::Exp(+time/tau)/N0;
1320 Double_t theoryValue;
1321 UInt_t size =
fForward.size()/packing;
1322 const Int_t factor = 8;
1323 UInt_t rebinRRF = 0;
1335 rebinRRF =
static_cast<UInt_t
>((TMath::Pi()/2.0/wRRF)/
fTimeResolution);
1340 for (UInt_t i=0; i<size; i++) {
1344 theoryValue *= 2.0*TMath::Cos(wRRF * time + phaseRRF);
1346 if (fabs(theoryValue) > 10.0) {
1355 if (rebinRRF != 0) {
1356 Double_t dval = 0.0;
1359 if ((i % rebinRRF == 0) && (i != 0)) {
1360 theo.push_back(dval/rebinRRF);
1407 fT0s.resize(histoNo.size());
1408 for (UInt_t i=0; i<
fT0s.size(); i++) {
1419 if (
fT0s[i] == -1.0) {
1425 for (UInt_t i=0; i<histoNo.size(); i++) {
1426 if (
fT0s[i] == -1.0) {
1427 if (runData->
GetT0Bin(histoNo[i]) > 0.0) {
1435 for (UInt_t i=0; i<histoNo.size(); i++) {
1436 if (
fT0s[i] == -1.0) {
1440 std::cerr << std::endl <<
">> PRunSingleHisto::GetProperT0(): **WARRNING** NO t0's found, neither in the run data nor in the msr-file!";
1442 std::cerr << std::endl <<
">> will try the estimated one: forward t0 = " << runData->
GetT0BinEstimated(histoNo[i]);
1443 std::cerr << std::endl <<
">> NO WARRANTY THAT THIS OK!! For instance for LEM this is almost for sure rubbish!";
1444 std::cerr << std::endl;
1450 if ((
fT0s[i] < 0.0) || (
fT0s[i] >
static_cast<Int_t
>(runData->
GetDataBin(histoNo[i])->size()))) {
1451 std::cerr << std::endl <<
">> PRunSingleHisto::GetProperT0(): **ERROR** t0 data bin (" <<
fT0s[i] <<
") doesn't make any sense!";
1452 std::cerr << std::endl;
1465 if (addRunData ==
nullptr) {
1466 std::cerr << std::endl <<
">> PRunSingleHisto::GetProperT0(): **ERROR** Couldn't get addrun " <<
fRunInfo->
GetRunName(i)->Data() <<
"!";
1467 std::cerr << std::endl;
1473 fAddT0s[i-1].resize(histoNo.size());
1474 for (UInt_t j=0; j<
fAddT0s[i-1].size(); j++) {
1484 for (UInt_t j=0; j<histoNo.size(); j++) {
1486 if (addRunData->
GetT0Bin(histoNo[j]) > 0.0) {
1493 for (UInt_t j=0; j<histoNo.size(); j++) {
1494 if (
fAddT0s[i-1][j] == -1.0) {
1498 std::cerr << std::endl <<
">> PRunSingleHisto::GetProperT0(): **WARRNING** NO t0's found, neither in the run data nor in the msr-file!";
1500 std::cerr << std::endl <<
">> will try the estimated one: forward t0 = " << addRunData->
GetT0BinEstimated(histoNo[j]);
1501 std::cerr << std::endl <<
">> NO WARRANTY THAT THIS OK!! For instance for LEM this is almost for sure rubbish!";
1502 std::cerr << std::endl;
1508 if ((
fAddT0s[i-1][j] < 0.0) || (
fAddT0s[i-1][j] >
static_cast<Int_t
>(addRunData->
GetDataBin(histoNo[j])->size()))) {
1509 std::cerr << std::endl <<
">> PRunSingleHisto::GetProperT0(): **ERROR** addt0 data bin (" <<
fAddT0s[i-1][j] <<
") doesn't make any sense!";
1510 std::cerr << std::endl;
1552 start =
static_cast<Int_t
>(
fT0s[0])+offset;
1554 std::cerr << std::endl <<
">> PRunSingleHisto::GetProperDataRange(): **WARNING** data range was not provided, will try data range start = t0+" << offset <<
"(=10ns) = " << start <<
".";
1555 std::cerr << std::endl <<
">> NO WARRANTY THAT THIS DOES MAKE ANY SENSE.";
1556 std::cerr << std::endl;
1561 std::cerr << std::endl <<
">> PRunSingleHisto::GetProperDataRange(): **WARNING** data range was not provided, will try data range end = " << end <<
".";
1562 std::cerr << std::endl <<
">> NO WARRANTY THAT THIS DOES MAKE ANY SENSE.";
1563 std::cerr << std::endl;
1574 if ((start < 0) || (start > static_cast<Int_t>(
fForward.size()))) {
1575 std::cerr << std::endl <<
">> PRunSingleHisto::GetProperDataRange(): **ERROR** start data bin (" << start <<
") doesn't make any sense!";
1576 std::cerr << std::endl;
1581 std::cerr << std::endl <<
">> PRunSingleHisto::GetProperDataRange(): **ERROR** end data bin (" << end <<
") doesn't make any sense!";
1582 std::cerr << std::endl;
1585 if (end > static_cast<Int_t>(
fForward.size())) {
1586 std::cerr << std::endl <<
">> PRunSingleHisto::GetProperDataRange(): **WARNING** end data bin (" << end <<
") > histo length (" <<
fForward.size() <<
").";
1587 std::cerr << std::endl <<
">> Will set end = (histo length - 1). Consider to change it in the msr-file." << std::endl;
1588 std::cerr << std::endl;
1589 end =
static_cast<Int_t
>(
fForward.size())-1;
1642 std::cerr <<
">> PRunSingleHisto::GetProperFitRange(): **WARNING** Couldn't get fit start/end time!" << std::endl;
1643 std::cerr <<
">> Will set it to fgb/lgb which given in time is: " <<
fFitStartTime <<
"..." <<
fFitEndTime <<
" (usec)" << std::endl;
1658 if (paramNo > 10000)
1665 if (paramNo > param->size()) {
1666 std::cerr << std::endl <<
">> PRunSingleHisto::EstimateN0: **ERROR** found parameter number " << paramNo <<
", which is larger than the number of parameters = " << param->size() << std::endl;
1671 if (param->at(paramNo-1).fStep == 0.0)
1678 Bool_t scaleBkg =
true;
1679 Double_t bkg=0.0, errBkg=1.0;
1680 if ((paramNoBkg > 10000) || (paramNoBkg == -1)) {
1683 if (paramNoBkg-1 < static_cast<Int_t>(param->size())) {
1684 bkg = param->at(paramNoBkg-1).fValue;
1685 errBkg = param->at(paramNoBkg-1).fStep;
1693 UInt_t t0 =
static_cast<UInt_t
>(round(
fT0s[0]));
1694 Double_t dval = 0.0;
1696 Double_t denom = 0.0;
1700 for (UInt_t i=t0; i<
fForward.size(); i++) {
1701 xx = exp(-dt*static_cast<Double_t>(i-t0)/tau);
1706 for (UInt_t i=t0; i<
fForward.size(); i++) {
1707 xx = exp(-dt*static_cast<Double_t>(i-t0)/tau);
1710 denom += xx*xx/dval;
1712 Double_t N0 = nom/denom;
1720 Double_t rescale = 1;
1721 if ((param->at(paramNo-1).fValue != 0.0) && scaleBkg) {
1722 rescale = N0 / param->at(paramNo-1).fValue;
1727 std::cout <<
">> PRunSingleHisto::EstimateN0: found N0=" << param->at(paramNo-1).fValue <<
", will set it to N0=" << N0 << std::endl;
1729 std::cout <<
">> PRunSingleHisto::EstimateN0: found Bkg=" << param->at(paramNoBkg-1).fValue <<
", will set it to Bkg=" << bkg << std::endl;
1752 Double_t beamPeriod = 0.0;
1768 std::cout << std::endl <<
"PRunSingleHisto::EstimatBkg(): end = " << end <<
" > start = " << start <<
"! Will swap them!";
1775 if (beamPeriod != 0.0) {
1777 UInt_t fullCycles =
static_cast<UInt_t
>(timeBkg/beamPeriod);
1780 std::cout << std::endl <<
"PRunSingleHisto::EstimatBkg(): Background " << start <<
", " << end;
1787 std::cerr << std::endl <<
">> PRunSingleHisto::EstimatBkg(): **ERROR** background bin values out of bound!";
1788 std::cerr << std::endl <<
">> histo lengths = " <<
fForward.size();
1789 std::cerr << std::endl <<
">> background start = " << start;
1790 std::cerr << std::endl;
1796 std::cerr << std::endl <<
">> PRunSingleHisto::EstimatBkg(): **ERROR** background bin values out of bound!";
1797 std::cerr << std::endl <<
">> histo lengths = " <<
fForward.size();
1798 std::cerr << std::endl <<
">> background end = " << end;
1799 std::cerr << std::endl;
1807 for (UInt_t i=start; i<end; i++)
1809 bkg /=
static_cast<Double_t
>(end - start + 1);
1836 Bool_t willScale =
true;
1839 for (UInt_t i=0; i<cmd->size(); i++) {
1840 if (cmd->at(i).fLine.Contains(
"SCALE_N0_BKG", TString::kIgnoreCase)) {
1841 TObjArray *tokens =
nullptr;
1842 TObjString *ostr =
nullptr;
1844 tokens = cmd->at(i).fLine.Tokenize(
" \t");
1845 if (tokens->GetEntries() != 2) {
1846 std::cerr << std::endl <<
">> PRunSingleHisto::IsScaleN0AndBkg(): **WARNING** Found uncorrect 'SCALE_N0_BKG' command, will ignore it.";
1847 std::cerr << std::endl <<
">> Allowed commands: SCALE_N0_BKG TRUE | FALSE" << std::endl;
1850 ostr =
dynamic_cast<TObjString*
>(tokens->At(1));
1851 str = ostr->GetString();
1852 if (!str.CompareTo(
"FALSE", TString::kIgnoreCase)) {
virtual UInt_t GetNoOfFitBins()
virtual UInt_t GetT0BinSize()
Bool_t fValid
flag showing if the state of the class is valid
virtual void SetDataRange(Int_t ival, Int_t idx)
virtual const PDoubleVector * GetError()
virtual Bool_t EstimateBkg(UInt_t histoNo)
virtual Double_t CalcMaxLikelihoodExpected(const std::vector< Double_t > &par)
virtual Int_t GetNormParamNo()
virtual Int_t GetNoOfFuncs()
virtual Int_t GetDataRange(UInt_t idx)
virtual Double_t GetT0Bin(UInt_t idx=0)
virtual const Double_t GetTimeResolution()
Int_t fPacking
packing for this particular run. Either given in the RUN- or GLOBAL-block.
virtual void CalcNoOfFitBins()
virtual Int_t GetPacking()
virtual Bool_t PrepareViewData(PRawRunData *runData, const UInt_t histoNo)
virtual Bool_t GetProperDataRange()
PRunDataHandler * fRawData
holds the raw run data
std::vector< PDoubleVector > fAddT0s
all t0 bins of all addrun's of a run! The derived classes will handle it.
virtual void SetBkgEstimated(Double_t dval, Int_t idx)
virtual Int_t GetFitRangeOffset(UInt_t idx)
virtual void SetTheoryTimeStart(Double_t dval)
virtual Int_t GetBkgFitParamNo()
PMsrHandler * fMsrInfo
msr-file handler
virtual Bool_t IsFitRangeInBin()
virtual const PDoublePairVector * GetTemperature() const
UInt_t fNoOfFitBins
number of bins to be fitted
Double_t fTimeResolution
time resolution in (us)
virtual const PDoubleVector * GetTheory()
PMetaData fMetaData
keeps the meta data from the data file like field, temperature, energy, ...
virtual PRawRunData * GetRunData(const TString &runName)
virtual Double_t GetAddT0Bin(UInt_t addRunIdx, UInt_t histoIdx)
virtual UInt_t GetT0BinSize()
virtual void EstimateN0()
std::vector< PMsrPlotStructure > PMsrPlotList
virtual void AppendErrorValue(Double_t dval)
virtual Bool_t IsFitRangeInBin()
virtual Double_t GetTheoryTimeStep()
std::vector< UInt_t > PUIntVector
PRunData fData
data to be fitted, viewed, i.e. binned data
virtual void SetDataTimeStep(Double_t dval)
virtual Double_t GetTheoryTimeStart()
virtual Double_t GetT0Bin(UInt_t idx=0)
std::vector< PMsrParamStructure > PMsrParamList
std::vector< Double_t > PDoubleVector
virtual const Bool_t IsPresent(UInt_t histoNo)
#define MSR_PARAM_FUN_OFFSET
#define ACCEL_PERIOD_TRIUMF
virtual const Double_t GetT0Bin(const UInt_t histoNo)
virtual Double_t CalcChiSquareExpected(const std::vector< Double_t > &par)
Int_t fGoodBins[2]
keep first/last good bins. 0=fgb, 1=lgb
virtual Bool_t IsScaleN0AndBkg()
virtual void SetT0Bin(Double_t dval, Int_t idx=-1)
virtual void AppendTheoryValue(Double_t dval)
virtual PMsrGlobalBlock * GetMsrGlobal()
virtual Int_t GetLifetimeParamNo()
std::vector< PMsrLineStructure > PMsrLines
virtual void SetDataTimeStart(Double_t dval)
virtual Int_t GetFitRangeOffset(UInt_t idx)
virtual void AppendValue(Double_t dval)
virtual const PDoubleVector * GetValue()
virtual const Double_t GetField()
virtual Bool_t PrepareData()
virtual void SetAddT0Bin(Double_t dval, UInt_t addRunIdx, UInt_t histoNoIdx)
virtual Bool_t SetMsrParamStep(UInt_t i, Double_t value)
virtual void CalculateKaiserFilterCoeff(Double_t wc, Double_t A, Double_t dw)
virtual Double_t GetBkgFix(UInt_t idx)
virtual UInt_t GetFuncNo(Int_t idx)
virtual Bool_t GetProperT0(PRawRunData *runData, PMsrGlobalBlock *globalBlock, PUIntVector &histoNo)
virtual ~PRunSingleHisto()
virtual const UInt_t GetNoOfTemperatures()
virtual Int_t GetForwardHistoNo(UInt_t idx=0)
PDoubleVector fT0s
all t0 bins of a run! The derived classes will handle it.
virtual PMsrPlotList * GetMsrPlotList()
virtual Int_t GetBkgRange(UInt_t idx)
EPMusrHandleTag fHandleTag
tag telling whether this is used for fit, view, ...
virtual UInt_t GetForwardHistoNoSize()
virtual void GetProperFitRange(PMsrGlobalBlock *globalBlock)
Int_t fStartTimeBin
bin at which the fit starts
virtual Bool_t PrepareRawViewData(PRawRunData *runData, const UInt_t histoNo)
PMsrRunBlock * fRunInfo
run info used to filter out needed infos of a run
virtual const Double_t GetEnergy()
Int_t fEndTimeBin
bin at which the fit ends
virtual Bool_t SetMsrParamValue(UInt_t i, Double_t value)
virtual void SetBkgRange(Int_t ival, Int_t idx)
virtual void SetFitRange(Double_t dval, UInt_t idx)
virtual Double_t CalcChiSquare(const std::vector< Double_t > &par)
Double_t fFitEndTime
fit end time
virtual void SetTheoryTimeStep(Double_t dval)
virtual TString * GetInstitute(UInt_t idx=0)
Double_t fBackground
needed if background range is given (units: 1/bin)
virtual void SetFitRange(Double_t dval, UInt_t idx)
Double_t fFitStartTime
fit start time
virtual PMsrParamList * GetMsrParamList()
Bool_t fScaleN0AndBkg
true=scale N0 and background to 1/ns, otherwise 1/bin
virtual PIntVector * GetMap()
virtual Double_t EvalFunc(UInt_t i, std::vector< Int_t > map, std::vector< Double_t > param, PMetaData metaData)
virtual const PDoubleVector * GetDataBin(const UInt_t histoNo)
virtual Double_t GetDataTimeStart()
virtual UInt_t GetRunNameSize()
virtual Int_t GetDataRange(UInt_t idx)
virtual PMsrLines * GetMsrCommands()
virtual const Double_t GetT0BinEstimated(const UInt_t histoNo)
virtual void FilterTheo()
PDoubleVector fForward
forward histo data
std::unique_ptr< PTheory > fTheory
theory needed to calculate chi-square
virtual Bool_t EstimateN0()
virtual void SetFitRangeBin(const TString fitRange)
virtual Int_t GetPacking()
virtual Double_t GetFitRange(UInt_t idx)
Bool_t fTheoAsData
true=only calculate the theory points at the data points, false=calculate more points for the theory ...
virtual void ReplaceTheory(const PDoubleVector &theo)
virtual Double_t GetDataTimeStep()
Int_t fRunNo
number of the run within the msr-file
virtual Double_t CalcMaxLikelihood(const std::vector< Double_t > &par)
virtual TString * GetRunName(UInt_t idx=0)
virtual Double_t GetFitRange(UInt_t idx)
virtual Bool_t PrepareFitData(PRawRunData *runData, const UInt_t histoNo)
PDoubleVector fFuncValues
is keeping the values of the functions from the FUNCTIONS block
virtual void CalcTheory()