some more work towards a full encapsulation
This commit is contained in:
parent
e6f62ff445
commit
208e6b97c2
@ -638,7 +638,7 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
|||||||
} else if (sstr.BeginsWith("backgr.fix")) {
|
} else if (sstr.BeginsWith("backgr.fix")) {
|
||||||
fout.width(15);
|
fout.width(15);
|
||||||
fout << left << "backgr.fix";
|
fout << left << "backgr.fix";
|
||||||
for (UInt_t j=0; j<fRuns[runNo].GetBkgsFix().size(); j++) {
|
for (UInt_t j=0; j<fRuns[runNo].GetBkgFixSize(); j++) {
|
||||||
fout.precision(prec);
|
fout.precision(prec);
|
||||||
fout.width(12);
|
fout.width(12);
|
||||||
fout << left << fRuns[runNo].GetBkgFix(j);
|
fout << left << fRuns[runNo].GetBkgFix(j);
|
||||||
@ -647,7 +647,7 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
|||||||
} else if (sstr.BeginsWith("background")) {
|
} else if (sstr.BeginsWith("background")) {
|
||||||
fout.width(16);
|
fout.width(16);
|
||||||
fout << left << "background";
|
fout << left << "background";
|
||||||
for (UInt_t j=0; j<fRuns[runNo].GetBkgRanges().size(); j++) {
|
for (UInt_t j=0; j<fRuns[runNo].GetBkgRangeSize(); j++) {
|
||||||
fout.width(8);
|
fout.width(8);
|
||||||
fout << left << fRuns[runNo].GetBkgRange(j);
|
fout << left << fRuns[runNo].GetBkgRange(j);
|
||||||
}
|
}
|
||||||
@ -655,7 +655,7 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
|||||||
} else if (sstr.BeginsWith("data")) {
|
} else if (sstr.BeginsWith("data")) {
|
||||||
fout.width(16);
|
fout.width(16);
|
||||||
fout << left << "data";
|
fout << left << "data";
|
||||||
for (UInt_t j=0; j<fRuns[runNo].GetDataRanges().size(); j++) {
|
for (UInt_t j=0; j<fRuns[runNo].GetDataRangeSize(); j++) {
|
||||||
fout.width(8);
|
fout.width(8);
|
||||||
fout << left << fRuns[runNo].GetDataRange(j);
|
fout << left << fRuns[runNo].GetDataRange(j);
|
||||||
}
|
}
|
||||||
@ -663,9 +663,9 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
|||||||
} else if (sstr.BeginsWith("t0")) {
|
} else if (sstr.BeginsWith("t0")) {
|
||||||
fout.width(16);
|
fout.width(16);
|
||||||
fout << left << "t0";
|
fout << left << "t0";
|
||||||
for (UInt_t j=0; j<fRuns[runNo].fT0.size(); j++) {
|
for (UInt_t j=0; j<fRuns[runNo].GetT0Size(); j++) {
|
||||||
fout.width(8);
|
fout.width(8);
|
||||||
fout << left << fRuns[runNo].fT0[j];
|
fout << left << fRuns[runNo].GetT0(j);
|
||||||
}
|
}
|
||||||
fout << endl;
|
fout << endl;
|
||||||
} else if (sstr.BeginsWith("xy-data")) {
|
} else if (sstr.BeginsWith("xy-data")) {
|
||||||
@ -697,11 +697,11 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
|||||||
fout.width(16);
|
fout.width(16);
|
||||||
fout << left << "fit";
|
fout << left << "fit";
|
||||||
for (UInt_t j=0; j<2; j++) {
|
for (UInt_t j=0; j<2; j++) {
|
||||||
if (fRuns[runNo].fFitRange[j] == -1)
|
if (fRuns[runNo].GetFitRange(j) == -1)
|
||||||
break;
|
break;
|
||||||
fout.width(8);
|
fout.width(8);
|
||||||
fout.precision(2);
|
fout.precision(2);
|
||||||
fout << left << fixed << fRuns[runNo].fFitRange[j];
|
fout << left << fixed << fRuns[runNo].GetFitRange(j);
|
||||||
}
|
}
|
||||||
fout << endl;
|
fout << endl;
|
||||||
} else if (sstr.BeginsWith("packing")) {
|
} else if (sstr.BeginsWith("packing")) {
|
||||||
@ -1087,13 +1087,13 @@ void PMsrHandler::SetMsrT0Entry(UInt_t runNo, UInt_t idx, Int_t bin)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((idx < 0) || (idx > fRuns[runNo].fT0.size())) { // error
|
if ((idx < 0) || (idx > fRuns[runNo].GetT0Size())) { // error
|
||||||
cerr << endl << "PMsrHandler::SetMsrT0Entry: **ERROR** idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].fT0.size();
|
cerr << endl << "PMsrHandler::SetMsrT0Entry: **ERROR** idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].GetT0Size();
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fRuns[runNo].fT0[idx] = bin;
|
fRuns[runNo].SetT0(bin, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -1114,8 +1114,8 @@ void PMsrHandler::SetMsrDataRangeEntry(UInt_t runNo, UInt_t idx, Int_t bin)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((idx < 0) || (idx > fRuns[runNo].GetDataRanges().size())) { // error
|
if ((idx < 0) || (idx > fRuns[runNo].GetDataRangeSize())) { // error
|
||||||
cerr << endl << "PMsrHandler::SetMsrDataRangeEntry: **ERROR** idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].GetDataRanges().size();
|
cerr << endl << "PMsrHandler::SetMsrDataRangeEntry: **ERROR** idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].GetDataRangeSize();
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1141,8 +1141,8 @@ void PMsrHandler::SetMsrBkgRangeEntry(UInt_t runNo, UInt_t idx, Int_t bin)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((idx < 0) || (idx > fRuns[runNo].GetBkgRanges().size())) { // error
|
if ((idx < 0) || (idx > fRuns[runNo].GetBkgRangeSize())) { // error
|
||||||
cerr << endl << "PMsrHandler::SetMsrBkgRangeEntry: idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].GetBkgRanges().size();
|
cerr << endl << "PMsrHandler::SetMsrBkgRangeEntry: idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].GetBkgRangeSize();
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1727,7 +1727,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
ostr = dynamic_cast<TObjString*>(tokens->At(i));
|
ostr = dynamic_cast<TObjString*>(tokens->At(i));
|
||||||
str = ostr->GetString();
|
str = ostr->GetString();
|
||||||
if (str.IsDigit())
|
if (str.IsDigit())
|
||||||
param.fT0.push_back(str.Atoi());
|
param.AppendT0(str.Atoi());
|
||||||
else
|
else
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
@ -1743,7 +1743,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
ostr = dynamic_cast<TObjString*>(tokens->At(i));
|
ostr = dynamic_cast<TObjString*>(tokens->At(i));
|
||||||
str = ostr->GetString();
|
str = ostr->GetString();
|
||||||
if (str.IsFloat())
|
if (str.IsFloat())
|
||||||
param.fFitRange[i-1] = str.Atof();
|
param.SetFitRange(str.Atof(), i-1);
|
||||||
else
|
else
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
@ -1899,9 +1899,9 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
Bool_t found;
|
Bool_t found;
|
||||||
if (fRuns[i].GetBkgFitParamNo() >= 0) { // check if backgr.fit is given
|
if (fRuns[i].GetBkgFitParamNo() >= 0) { // check if backgr.fit is given
|
||||||
found = true;
|
found = true;
|
||||||
} else if (fRuns[i].GetBkgsFix().size() > 0) { // check if backgr.fix is given
|
} else if (fRuns[i].GetBkgFixSize() > 0) { // check if backgr.fix is given
|
||||||
found = true;
|
found = true;
|
||||||
} else if (fRuns[i].GetBkgRanges().size() > 0) { // check if background window is given
|
} else if (fRuns[i].GetBkgRangeSize() > 0) { // check if background window is given
|
||||||
found = true;
|
found = true;
|
||||||
} else {
|
} else {
|
||||||
found = false;
|
found = false;
|
||||||
|
@ -810,3 +810,67 @@ void PMsrRunBlock::SetDataRange(Int_t ival, UInt_t idx)
|
|||||||
|
|
||||||
fDataRange[idx] = ival;
|
fDataRange[idx] = ival;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// GetT0
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p> get T0 value at position i
|
||||||
|
*
|
||||||
|
* \param i index of the T0 value to be returned
|
||||||
|
*/
|
||||||
|
Int_t PMsrRunBlock::GetT0(UInt_t i)
|
||||||
|
{
|
||||||
|
if (i>fT0.size())
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return fT0[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// SetT0
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p> set T0 value at position i
|
||||||
|
*
|
||||||
|
* \param i index of the T0 value to be set
|
||||||
|
*/
|
||||||
|
void PMsrRunBlock::SetT0(Int_t ival, UInt_t idx)
|
||||||
|
{
|
||||||
|
if (idx>fT0.size())
|
||||||
|
fT0.resize(idx+1);
|
||||||
|
|
||||||
|
fT0[idx] = ival;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// GetFitRange
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p> get fit range value at position i
|
||||||
|
*
|
||||||
|
* \param i index of the fit range value to be returned
|
||||||
|
*/
|
||||||
|
Double_t PMsrRunBlock::GetFitRange(UInt_t i)
|
||||||
|
{
|
||||||
|
if (i>2)
|
||||||
|
return PMUSR_UNDEFINED;
|
||||||
|
|
||||||
|
return fFitRange[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// SetFitRange
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p> set fit range value at position i
|
||||||
|
*
|
||||||
|
* \param i index of the fit range value to be set
|
||||||
|
*/
|
||||||
|
void PMsrRunBlock::SetFitRange(Double_t dval, UInt_t idx)
|
||||||
|
{
|
||||||
|
if (idx>=2)
|
||||||
|
return;
|
||||||
|
|
||||||
|
fFitRange[idx] = dval;
|
||||||
|
}
|
||||||
|
@ -529,7 +529,7 @@ void PMusrCanvas::UpdateInfoPad()
|
|||||||
for (UInt_t i=0; i<fData.size(); i++) {
|
for (UInt_t i=0; i<fData.size(); i++) {
|
||||||
// run label = run_name/histo/T=0K/B=0G/E=0keV/...
|
// run label = run_name/histo/T=0K/B=0G/E=0keV/...
|
||||||
runNo = (UInt_t)plotInfo.fRuns[i].Re()-1;
|
runNo = (UInt_t)plotInfo.fRuns[i].Re()-1;
|
||||||
if (runs[runNo].GetRunNames().size() > 1)
|
if (runs[runNo].GetRunNameSize() > 1)
|
||||||
tstr = "++" + *runs[runNo].GetRunName() + TString(","); // run_name
|
tstr = "++" + *runs[runNo].GetRunName() + TString(","); // run_name
|
||||||
else
|
else
|
||||||
tstr = *runs[runNo].GetRunName() + TString(","); // run_name
|
tstr = *runs[runNo].GetRunName() + TString(","); // run_name
|
||||||
@ -1402,11 +1402,11 @@ void PMusrCanvas::HandleDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
|
|||||||
|
|
||||||
// check if 'use_fit_range' plotting is whished
|
// check if 'use_fit_range' plotting is whished
|
||||||
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fUseFitRanges) {
|
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fUseFitRanges) {
|
||||||
start = fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0]; // needed to estimate size
|
start = fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0); // needed to estimate size
|
||||||
end = fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[1]; // needed to estimate size
|
end = fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1); // needed to estimate size
|
||||||
size = (Int_t) ((end - start) / data->GetDataTimeStep()) + 1;
|
size = (Int_t) ((end - start) / data->GetDataTimeStep()) + 1;
|
||||||
start = data->GetDataTimeStart() +
|
start = data->GetDataTimeStart() +
|
||||||
(Int_t)((fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0] - data->GetDataTimeStart())/data->GetDataTimeStep()) * data->GetDataTimeStep() -
|
(Int_t)((fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0) - data->GetDataTimeStart())/data->GetDataTimeStep()) * data->GetDataTimeStep() -
|
||||||
data->GetDataTimeStep()/2.0; // closesd start value compatible with the user given
|
data->GetDataTimeStep()/2.0; // closesd start value compatible with the user given
|
||||||
end = start + size * data->GetDataTimeStep(); // closesd end value compatible with the user given
|
end = start + size * data->GetDataTimeStep(); // closesd end value compatible with the user given
|
||||||
}
|
}
|
||||||
@ -1434,8 +1434,8 @@ void PMusrCanvas::HandleDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
|
|||||||
|
|
||||||
// check if 'use_fit_range' plotting is whished
|
// check if 'use_fit_range' plotting is whished
|
||||||
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fUseFitRanges) {
|
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fUseFitRanges) {
|
||||||
startBin = (UInt_t)((fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0] - data->GetDataTimeStart())/data->GetDataTimeStep());
|
startBin = (UInt_t)((fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0) - data->GetDataTimeStart())/data->GetDataTimeStep());
|
||||||
endBin = (UInt_t)((fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[1] - data->GetDataTimeStart())/data->GetDataTimeStep());
|
endBin = (UInt_t)((fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1) - data->GetDataTimeStart())/data->GetDataTimeStep());
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if 'sub_ranges' plotting is whished
|
// check if 'sub_ranges' plotting is whished
|
||||||
@ -1482,11 +1482,11 @@ void PMusrCanvas::HandleDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
|
|||||||
|
|
||||||
// check if 'use_fit_range' plotting is whished
|
// check if 'use_fit_range' plotting is whished
|
||||||
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fUseFitRanges) {
|
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fUseFitRanges) {
|
||||||
start = fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0]; // needed to estimate size
|
start = fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0); // needed to estimate size
|
||||||
end = fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[1]; // needed to estimate size
|
end = fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1); // needed to estimate size
|
||||||
size = (Int_t) ((end - start) / data->GetTheoryTimeStep()) + 1;
|
size = (Int_t) ((end - start) / data->GetTheoryTimeStep()) + 1;
|
||||||
start = data->GetTheoryTimeStart() +
|
start = data->GetTheoryTimeStart() +
|
||||||
(Int_t)((fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0] - data->GetTheoryTimeStart())/data->GetTheoryTimeStep()) * data->GetTheoryTimeStep() -
|
(Int_t)((fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0) - data->GetTheoryTimeStart())/data->GetTheoryTimeStep()) * data->GetTheoryTimeStep() -
|
||||||
data->GetTheoryTimeStep()/2.0; // closesd start value compatible with the user given
|
data->GetTheoryTimeStep()/2.0; // closesd start value compatible with the user given
|
||||||
end = start + size * data->GetTheoryTimeStep(); // closesd end value compatible with the user given
|
end = start + size * data->GetTheoryTimeStep(); // closesd end value compatible with the user given
|
||||||
}
|
}
|
||||||
@ -1513,8 +1513,8 @@ void PMusrCanvas::HandleDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
|
|||||||
|
|
||||||
// check if 'use_fit_range' plotting is whished
|
// check if 'use_fit_range' plotting is whished
|
||||||
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fUseFitRanges) {
|
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fUseFitRanges) {
|
||||||
startBin = (UInt_t)((fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0] - data->GetDataTimeStart())/data->GetTheoryTimeStep());
|
startBin = (UInt_t)((fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(0) - data->GetDataTimeStart())/data->GetTheoryTimeStep());
|
||||||
endBin = (UInt_t)((fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[1] - data->GetDataTimeStart())/data->GetTheoryTimeStep());
|
endBin = (UInt_t)((fMsrHandler->GetMsrRunList()->at(runNo).GetFitRange(1) - data->GetDataTimeStart())/data->GetTheoryTimeStep());
|
||||||
}
|
}
|
||||||
//cout << endl << ">> PMusrCanvas::HandleDataSet(): theory: startBin = " << startBin << ", endBin = " << endBin << endl;
|
//cout << endl << ">> PMusrCanvas::HandleDataSet(): theory: startBin = " << startBin << ", endBin = " << endBin << endl;
|
||||||
|
|
||||||
|
@ -325,10 +325,10 @@ void PMusrT0::InitDataAndBkg()
|
|||||||
Int_t t0Bin = 0;
|
Int_t t0Bin = 0;
|
||||||
switch (fDetectorTag) {
|
switch (fDetectorTag) {
|
||||||
case DETECTOR_TAG_FORWARD:
|
case DETECTOR_TAG_FORWARD:
|
||||||
t0Bin = fMsrHandler->GetMsrRunList()->at(fRunNo).fT0[0 + fAddRunNo * fAddRunOffset/2];
|
t0Bin = fMsrHandler->GetMsrRunList()->at(fRunNo).GetT0(0 + fAddRunNo * fAddRunOffset/2);
|
||||||
break;
|
break;
|
||||||
case DETECTOR_TAG_BACKWARD:
|
case DETECTOR_TAG_BACKWARD:
|
||||||
t0Bin = fMsrHandler->GetMsrRunList()->at(fRunNo).fT0[1 + fAddRunNo * fAddRunOffset/2];
|
t0Bin = fMsrHandler->GetMsrRunList()->at(fRunNo).GetT0(1 + fAddRunNo * fAddRunOffset/2);
|
||||||
break;
|
break;
|
||||||
case DETECTOR_TAG_RIGHT:
|
case DETECTOR_TAG_RIGHT:
|
||||||
// not clear yet what to be done
|
// not clear yet what to be done
|
||||||
|
@ -294,13 +294,13 @@ Bool_t PRunAsymmetry::PrepareData()
|
|||||||
fTimeResolution = runData->GetTimeResolution()/1.0e3;
|
fTimeResolution = runData->GetTimeResolution()/1.0e3;
|
||||||
|
|
||||||
// keep start/stop time for fit
|
// keep start/stop time for fit
|
||||||
fFitStartTime = fRunInfo->fFitRange[0];
|
fFitStartTime = fRunInfo->GetFitRange(0);
|
||||||
fFitStopTime = fRunInfo->fFitRange[1];
|
fFitStopTime = fRunInfo->GetFitRange(1);
|
||||||
//cout << endl << "start/stop (fit): " << fFitStartTime << ", " << fFitStopTime << endl;
|
//cout << endl << "start/stop (fit): " << fFitStartTime << ", " << fFitStopTime << endl;
|
||||||
|
|
||||||
|
|
||||||
// check if the t0's are given in the msr-file
|
// check if the t0's are given in the msr-file
|
||||||
if (fRunInfo->fT0.size() == 0) { // t0's are NOT in the msr-file
|
if (fRunInfo->GetT0Size() == 0) { // t0's are NOT in the msr-file
|
||||||
// check if the t0's are in the data file
|
// check if the t0's are in the data file
|
||||||
if (runData->GetT0s().size() != 0) { // t0's in the run data
|
if (runData->GetT0s().size() != 0) { // t0's in the run data
|
||||||
// keep the proper t0's. For asymmetry runs, forward/backward are holding the histo no
|
// keep the proper t0's. For asymmetry runs, forward/backward are holding the histo no
|
||||||
@ -316,23 +316,23 @@ Bool_t PRunAsymmetry::PrepareData()
|
|||||||
// check if t0's are given in the data file
|
// check if t0's are given in the data file
|
||||||
if (runData->GetT0s().size() != 0) {
|
if (runData->GetT0s().size() != 0) {
|
||||||
// compare t0's of the msr-file with the one in the data file
|
// compare t0's of the msr-file with the one in the data file
|
||||||
if (fabs(fRunInfo->fT0[0]-runData->GetT0(fRunInfo->GetForwardHistoNo()-1))>5.0) { // given in bins!!
|
if (fabs(fRunInfo->GetT0(0)-runData->GetT0(fRunInfo->GetForwardHistoNo()-1))>5.0) { // given in bins!!
|
||||||
cerr << endl << "PRunAsymmetry::PrepareData(): **WARNING**: forward histo";
|
cerr << endl << "PRunAsymmetry::PrepareData(): **WARNING**: forward histo";
|
||||||
cerr << endl << " t0 from the msr-file is " << fRunInfo->fT0[0];
|
cerr << endl << " t0 from the msr-file is " << fRunInfo->GetT0(0);
|
||||||
cerr << endl << " t0 from the data file is " << runData->GetT0(fRunInfo->GetForwardHistoNo()-1);
|
cerr << endl << " t0 from the data file is " << runData->GetT0(fRunInfo->GetForwardHistoNo()-1);
|
||||||
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
}
|
}
|
||||||
if (fabs(fRunInfo->fT0[1]-runData->GetT0(fRunInfo->GetBackwardHistoNo()-1))>5.0) { // given in bins!!
|
if (fabs(fRunInfo->GetT0(1)-runData->GetT0(fRunInfo->GetBackwardHistoNo()-1))>5.0) { // given in bins!!
|
||||||
cerr << endl << "PRunAsymmetry::PrepareData(): **WARNING**: backward histo";
|
cerr << endl << "PRunAsymmetry::PrepareData(): **WARNING**: backward histo";
|
||||||
cerr << endl << " t0 from the msr-file is " << fRunInfo->fT0[1];
|
cerr << endl << " t0 from the msr-file is " << fRunInfo->GetT0(1);
|
||||||
cerr << endl << " t0 from the data file is " << runData->GetT0(fRunInfo->GetBackwardHistoNo()-1);
|
cerr << endl << " t0 from the data file is " << runData->GetT0(fRunInfo->GetBackwardHistoNo()-1);
|
||||||
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fT0s.push_back(fRunInfo->fT0[0]); // forward t0
|
fT0s.push_back(fRunInfo->GetT0(0)); // forward t0
|
||||||
fT0s.push_back(fRunInfo->fT0[1]); // backward t0
|
fT0s.push_back(fRunInfo->GetT0(1)); // backward t0
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if post pile up data shall be used
|
// check if post pile up data shall be used
|
||||||
@ -358,9 +358,9 @@ Bool_t PRunAsymmetry::PrepareData()
|
|||||||
|
|
||||||
// check if addrun's are present, and if yes add data
|
// check if addrun's are present, and if yes add data
|
||||||
// check if there are runs to be added to the current one
|
// check if there are runs to be added to the current one
|
||||||
if (fRunInfo->GetRunNames().size() > 1) { // runs to be added present
|
if (fRunInfo->GetRunNameSize() > 1) { // runs to be added present
|
||||||
PRawRunData *addRunData;
|
PRawRunData *addRunData;
|
||||||
for (UInt_t i=1; i<fRunInfo->GetRunNames().size(); i++) {
|
for (UInt_t i=1; i<fRunInfo->GetRunNameSize(); i++) {
|
||||||
// get run to be added to the main one
|
// get run to be added to the main one
|
||||||
addRunData = fRawData->GetRunData(*(fRunInfo->GetRunName(i)));
|
addRunData = fRawData->GetRunData(*(fRunInfo->GetRunName(i)));
|
||||||
if (addRunData == 0) { // couldn't get run
|
if (addRunData == 0) { // couldn't get run
|
||||||
@ -372,7 +372,7 @@ Bool_t PRunAsymmetry::PrepareData()
|
|||||||
// get T0's of the to be added run
|
// get T0's of the to be added run
|
||||||
Int_t t0Add[2] = {0, 0};
|
Int_t t0Add[2] = {0, 0};
|
||||||
// check if the t0's are given in the msr-file
|
// check if the t0's are given in the msr-file
|
||||||
if (2*i+1 >= fRunInfo->fT0.size()) { // t0's are NOT in the msr-file
|
if (2*i+1 >= fRunInfo->GetT0Size()) { // t0's are NOT in the msr-file
|
||||||
// check if the t0's are in the data file
|
// check if the t0's are in the data file
|
||||||
if (addRunData->GetT0s().size() != 0) { // t0's in the run data
|
if (addRunData->GetT0s().size() != 0) { // t0's in the run data
|
||||||
// keep the proper t0's. For asymmetry runs, forward/backward are holding the histo no
|
// keep the proper t0's. For asymmetry runs, forward/backward are holding the histo no
|
||||||
@ -386,23 +386,23 @@ Bool_t PRunAsymmetry::PrepareData()
|
|||||||
}
|
}
|
||||||
} else { // t0's in the msr-file
|
} else { // t0's in the msr-file
|
||||||
// check if t0's are given in the data file
|
// check if t0's are given in the data file
|
||||||
if (2*i+1 < fRunInfo->fT0.size()) {
|
if (2*i+1 < fRunInfo->GetT0Size()) {
|
||||||
t0Add[0] = fRunInfo->fT0[2*i];
|
t0Add[0] = fRunInfo->GetT0(2*i);
|
||||||
t0Add[1] = fRunInfo->fT0[2*i+1];
|
t0Add[1] = fRunInfo->GetT0(2*i+1);
|
||||||
} else {
|
} else {
|
||||||
cerr << endl << "PRunAsymmetry::PrepareData(): **WARNING** NO t0's found, neither in the addrun data (";
|
cerr << endl << "PRunAsymmetry::PrepareData(): **WARNING** NO t0's found, neither in the addrun data (";
|
||||||
cerr << fRunInfo->GetRunName(i)->Data();
|
cerr << fRunInfo->GetRunName(i)->Data();
|
||||||
cerr << "), nor in the msr-file! Will try to use the T0 of the run data (";
|
cerr << "), nor in the msr-file! Will try to use the T0 of the run data (";
|
||||||
cerr << fRunInfo->GetRunName(i)->Data();
|
cerr << fRunInfo->GetRunName(i)->Data();
|
||||||
cerr << ") without any warranty!";
|
cerr << ") without any warranty!";
|
||||||
t0Add[0] = fRunInfo->fT0[0];
|
t0Add[0] = fRunInfo->GetT0(0);
|
||||||
t0Add[1] = fRunInfo->fT0[1];
|
t0Add[1] = fRunInfo->GetT0(1);
|
||||||
}
|
}
|
||||||
if (addRunData->GetT0s().size() != 0) {
|
if (addRunData->GetT0s().size() != 0) {
|
||||||
// compare t0's of the msr-file with the one in the data file
|
// compare t0's of the msr-file with the one in the data file
|
||||||
if (fabs(t0Add[0]-addRunData->GetT0(fRunInfo->GetForwardHistoNo()-1))>5.0) { // given in bins!!
|
if (fabs(t0Add[0]-addRunData->GetT0(fRunInfo->GetForwardHistoNo()-1))>5.0) { // given in bins!!
|
||||||
cerr << endl << "PRunAsymmetry::PrepareData(): **WARNING**: forward histo";
|
cerr << endl << "PRunAsymmetry::PrepareData(): **WARNING**: forward histo";
|
||||||
cerr << endl << " t0 from the msr-file is " << fRunInfo->fT0[2*i];
|
cerr << endl << " t0 from the msr-file is " << fRunInfo->GetT0(2*i);
|
||||||
cerr << endl << " t0 from the data file is " << addRunData->GetT0(fRunInfo->GetForwardHistoNo()-1);
|
cerr << endl << " t0 from the data file is " << addRunData->GetT0(fRunInfo->GetForwardHistoNo()-1);
|
||||||
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
||||||
cerr << endl << " addrun: " << fRunInfo->GetRunName(i)->Data();
|
cerr << endl << " addrun: " << fRunInfo->GetRunName(i)->Data();
|
||||||
@ -410,7 +410,7 @@ Bool_t PRunAsymmetry::PrepareData()
|
|||||||
}
|
}
|
||||||
if (fabs(t0Add[1]-addRunData->GetT0(fRunInfo->GetBackwardHistoNo()-1))>5.0) { // given in bins!!
|
if (fabs(t0Add[1]-addRunData->GetT0(fRunInfo->GetBackwardHistoNo()-1))>5.0) { // given in bins!!
|
||||||
cerr << endl << "PRunAsymmetry::PrepareData(): **WARNING**: backward histo";
|
cerr << endl << "PRunAsymmetry::PrepareData(): **WARNING**: backward histo";
|
||||||
cerr << endl << " t0 from the msr-file is " << fRunInfo->fT0[2*i+1];
|
cerr << endl << " t0 from the msr-file is " << fRunInfo->GetT0(2*i+1);
|
||||||
cerr << endl << " t0 from the data file is " << addRunData->GetT0(fRunInfo->GetBackwardHistoNo()-1);
|
cerr << endl << " t0 from the data file is " << addRunData->GetT0(fRunInfo->GetBackwardHistoNo()-1);
|
||||||
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
||||||
cerr << endl << " addrun: " << fRunInfo->GetRunName(i)->Data();
|
cerr << endl << " addrun: " << fRunInfo->GetRunName(i)->Data();
|
||||||
@ -440,8 +440,8 @@ Bool_t PRunAsymmetry::PrepareData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// subtract background from histogramms ------------------------------------------
|
// subtract background from histogramms ------------------------------------------
|
||||||
if (fRunInfo->GetBkgsFix().size() == 0) { // no fixed background given
|
if (fRunInfo->GetBkgFixSize() == 0) { // no fixed background given
|
||||||
if (fRunInfo->GetBkgRanges().size() != 0) {
|
if (fRunInfo->GetBkgRangeSize() != 0) {
|
||||||
if (!SubtractEstimatedBkg())
|
if (!SubtractEstimatedBkg())
|
||||||
return false;
|
return false;
|
||||||
} else { // no background given to do the job
|
} else { // no background given to do the job
|
||||||
|
@ -144,7 +144,7 @@ Bool_t PRunDataHandler::ReadFile()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (UInt_t i=0; i<runList->size(); i++) {
|
for (UInt_t i=0; i<runList->size(); i++) {
|
||||||
for (UInt_t j=0; j<runList->at(i).GetRunNames().size(); j++) {
|
for (UInt_t j=0; j<runList->at(i).GetRunNameSize(); j++) {
|
||||||
fRunName = *(runList->at(i).GetRunName(j));
|
fRunName = *(runList->at(i).GetRunName(j));
|
||||||
// check is file is already read
|
// check is file is already read
|
||||||
if (FileAlreadyRead(*(runList->at(i).GetRunName(j))))
|
if (FileAlreadyRead(*(runList->at(i).GetRunName(j))))
|
||||||
|
@ -158,7 +158,7 @@ Bool_t PRunNonMusr::PrepareData()
|
|||||||
|
|
||||||
//cout << endl << "in PRunNonMusr::PrepareData(): will feed fFitData";
|
//cout << endl << "in PRunNonMusr::PrepareData(): will feed fFitData";
|
||||||
|
|
||||||
if (fRunInfo->GetRunNames().size() > 1) { // ADDRUN present which is not supported for NonMusr
|
if (fRunInfo->GetRunNameSize() > 1) { // ADDRUN present which is not supported for NonMusr
|
||||||
cerr << endl << ">> PRunNonMusr::PrepareData(): **WARNING** ADDRUN NOT SUPPORTED FOR THIS FIT TYPE, WILL IGNORE IT." << endl;
|
cerr << endl << ">> PRunNonMusr::PrepareData(): **WARNING** ADDRUN NOT SUPPORTED FOR THIS FIT TYPE, WILL IGNORE IT." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,8 +184,8 @@ Bool_t PRunNonMusr::PrepareFitData()
|
|||||||
Bool_t success = true;
|
Bool_t success = true;
|
||||||
|
|
||||||
// keep start/stop time for fit: here the meaning is of course start x, stop x
|
// keep start/stop time for fit: here the meaning is of course start x, stop x
|
||||||
fFitStartTime = fRunInfo->fFitRange[0];
|
fFitStartTime = fRunInfo->GetFitRange(0);
|
||||||
fFitStopTime = fRunInfo->fFitRange[1];
|
fFitStopTime = fRunInfo->GetFitRange(1);
|
||||||
|
|
||||||
// get x-, y-index
|
// get x-, y-index
|
||||||
UInt_t xIndex = GetXIndex();
|
UInt_t xIndex = GetXIndex();
|
||||||
|
@ -120,7 +120,7 @@ Double_t PRunSingleHisto::CalcChiSquare(const std::vector<Double_t>& par)
|
|||||||
// get background
|
// get background
|
||||||
Double_t bkg;
|
Double_t bkg;
|
||||||
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg not fitted
|
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg not fitted
|
||||||
if (fRunInfo->GetBkgsFix().size() == 0) { // no fixed background given (background interval)
|
if (fRunInfo->GetBkgFixSize() == 0) { // no fixed background given (background interval)
|
||||||
bkg = fBackground;
|
bkg = fBackground;
|
||||||
} else { // fixed bkg given
|
} else { // fixed bkg given
|
||||||
bkg = fRunInfo->GetBkgFix(0);
|
bkg = fRunInfo->GetBkgFix(0);
|
||||||
@ -184,7 +184,7 @@ Double_t PRunSingleHisto::CalcMaxLikelihood(const std::vector<Double_t>& par)
|
|||||||
// get background
|
// get background
|
||||||
Double_t bkg;
|
Double_t bkg;
|
||||||
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg not fitted
|
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg not fitted
|
||||||
if (fRunInfo->GetBkgsFix().size() == 0) { // no fixed background given (background interval)
|
if (fRunInfo->GetBkgFixSize() == 0) { // no fixed background given (background interval)
|
||||||
bkg = fBackground;
|
bkg = fBackground;
|
||||||
} else { // fixed bkg given
|
} else { // fixed bkg given
|
||||||
bkg = fRunInfo->GetBkgFix(0);
|
bkg = fRunInfo->GetBkgFix(0);
|
||||||
@ -258,7 +258,7 @@ void PRunSingleHisto::CalcTheory()
|
|||||||
// get background
|
// get background
|
||||||
Double_t bkg;
|
Double_t bkg;
|
||||||
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg not fitted
|
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg not fitted
|
||||||
if (fRunInfo->GetBkgsFix().size() == 0) { // no fixed background given (background interval)
|
if (fRunInfo->GetBkgFixSize() == 0) { // no fixed background given (background interval)
|
||||||
bkg = fBackground;
|
bkg = fBackground;
|
||||||
} else { // fixed bkg given
|
} else { // fixed bkg given
|
||||||
bkg = fRunInfo->GetBkgFix(0);
|
bkg = fRunInfo->GetBkgFix(0);
|
||||||
@ -319,7 +319,7 @@ Bool_t PRunSingleHisto::PrepareData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check if the t0's are given in the msr-file
|
// check if the t0's are given in the msr-file
|
||||||
if (fRunInfo->fT0.size() == 0) { // t0's are NOT in the msr-file
|
if (fRunInfo->GetT0Size() == 0) { // t0's are NOT in the msr-file
|
||||||
// check if the t0's are in the data file
|
// check if the t0's are in the data file
|
||||||
if (runData->GetT0s().size() != 0) { // t0's in the run data
|
if (runData->GetT0s().size() != 0) { // t0's in the run data
|
||||||
// keep the proper t0's. For single histo runs, forward is holding the histo no
|
// keep the proper t0's. For single histo runs, forward is holding the histo no
|
||||||
@ -335,15 +335,15 @@ Bool_t PRunSingleHisto::PrepareData()
|
|||||||
// check if t0's are given in the data file
|
// check if t0's are given in the data file
|
||||||
if (runData->GetT0s().size() != 0) {
|
if (runData->GetT0s().size() != 0) {
|
||||||
// compare t0's of the msr-file with the one in the data file
|
// compare t0's of the msr-file with the one in the data file
|
||||||
if (fabs(fRunInfo->fT0[0]-runData->GetT0(fRunInfo->GetForwardHistoNo()-1))>5.0) { // given in bins!!
|
if (fabs(fRunInfo->GetT0(0)-runData->GetT0(fRunInfo->GetForwardHistoNo()-1))>5.0) { // given in bins!!
|
||||||
cerr << endl << "PRunSingleHisto::PrepareData(): **WARNING**:";
|
cerr << endl << "PRunSingleHisto::PrepareData(): **WARNING**:";
|
||||||
cerr << endl << " t0 from the msr-file is " << fRunInfo->fT0[0];
|
cerr << endl << " t0 from the msr-file is " << fRunInfo->GetT0(0);
|
||||||
cerr << endl << " t0 from the data file is " << runData->GetT0(fRunInfo->GetForwardHistoNo()-1);
|
cerr << endl << " t0 from the data file is " << runData->GetT0(fRunInfo->GetForwardHistoNo()-1);
|
||||||
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fT0s.push_back(fRunInfo->fT0[0]);
|
fT0s.push_back(fRunInfo->GetT0(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if t0 is within proper bounds
|
// check if t0 is within proper bounds
|
||||||
@ -355,9 +355,9 @@ Bool_t PRunSingleHisto::PrepareData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check if there are runs to be added to the current one
|
// check if there are runs to be added to the current one
|
||||||
if (fRunInfo->GetRunNames().size() > 1) { // runs to be added present
|
if (fRunInfo->GetRunNameSize() > 1) { // runs to be added present
|
||||||
PRawRunData *addRunData;
|
PRawRunData *addRunData;
|
||||||
for (UInt_t i=1; i<fRunInfo->GetRunNames().size(); i++) {
|
for (UInt_t i=1; i<fRunInfo->GetRunNameSize(); i++) {
|
||||||
|
|
||||||
// get run to be added to the main one
|
// get run to be added to the main one
|
||||||
addRunData = fRawData->GetRunData(*fRunInfo->GetRunName(i));
|
addRunData = fRawData->GetRunData(*fRunInfo->GetRunName(i));
|
||||||
@ -370,7 +370,7 @@ Bool_t PRunSingleHisto::PrepareData()
|
|||||||
// get T0's of the to be added run
|
// get T0's of the to be added run
|
||||||
Int_t t0Add;
|
Int_t t0Add;
|
||||||
// check if the t0's are given in the msr-file
|
// check if the t0's are given in the msr-file
|
||||||
if (i >= fRunInfo->fT0.size()) { // t0's are NOT in the msr-file
|
if (i >= fRunInfo->GetT0Size()) { // t0's are NOT in the msr-file
|
||||||
// check if the t0's are in the data file
|
// check if the t0's are in the data file
|
||||||
if (addRunData->GetT0s().size() != 0) { // t0's in the run data
|
if (addRunData->GetT0s().size() != 0) { // t0's in the run data
|
||||||
// keep the proper t0's. For single histo runs, forward is holding the histo no
|
// keep the proper t0's. For single histo runs, forward is holding the histo no
|
||||||
@ -386,17 +386,17 @@ Bool_t PRunSingleHisto::PrepareData()
|
|||||||
// check if t0's are given in the data file
|
// check if t0's are given in the data file
|
||||||
if (addRunData->GetT0s().size() != 0) {
|
if (addRunData->GetT0s().size() != 0) {
|
||||||
// compare t0's of the msr-file with the one in the data file
|
// compare t0's of the msr-file with the one in the data file
|
||||||
if (fabs(fRunInfo->fT0[i]-addRunData->GetT0(fRunInfo->GetForwardHistoNo()-1))>5.0) { // given in bins!!
|
if (fabs(fRunInfo->GetT0(i)-addRunData->GetT0(fRunInfo->GetForwardHistoNo()-1))>5.0) { // given in bins!!
|
||||||
cerr << endl << "PRunSingleHisto::PrepareData(): **WARNING**:";
|
cerr << endl << "PRunSingleHisto::PrepareData(): **WARNING**:";
|
||||||
cerr << endl << " t0 from the msr-file is " << fRunInfo->fT0[i];
|
cerr << endl << " t0 from the msr-file is " << fRunInfo->GetT0(i);
|
||||||
cerr << endl << " t0 from the data file is " << addRunData->GetT0(fRunInfo->GetForwardHistoNo()-1);
|
cerr << endl << " t0 from the data file is " << addRunData->GetT0(fRunInfo->GetForwardHistoNo()-1);
|
||||||
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
cerr << endl << " This is quite a deviation! Is this done intentionally??";
|
||||||
cerr << endl << " addrun: " << fRunInfo->GetRunName(i)->Data();
|
cerr << endl << " addrun: " << fRunInfo->GetRunName(i)->Data();
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i < fRunInfo->fT0.size()) {
|
if (i < fRunInfo->GetT0Size()) {
|
||||||
t0Add = fRunInfo->fT0[i];
|
t0Add = fRunInfo->GetT0(i);
|
||||||
} else {
|
} else {
|
||||||
cerr << endl << "PRunSingleHisto::PrepareData(): **WARNING** NO t0's found, neither in the addrun data (";
|
cerr << endl << "PRunSingleHisto::PrepareData(): **WARNING** NO t0's found, neither in the addrun data (";
|
||||||
cerr << fRunInfo->GetRunName(i)->Data();
|
cerr << fRunInfo->GetRunName(i)->Data();
|
||||||
@ -404,7 +404,7 @@ Bool_t PRunSingleHisto::PrepareData()
|
|||||||
cerr << fRunInfo->GetRunName(i)->Data();
|
cerr << fRunInfo->GetRunName(i)->Data();
|
||||||
cerr << ") without any warranty!";
|
cerr << ") without any warranty!";
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
t0Add = fRunInfo->fT0[0];
|
t0Add = fRunInfo->GetT0(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,8 +443,8 @@ Bool_t PRunSingleHisto::PrepareData()
|
|||||||
Bool_t PRunSingleHisto::PrepareFitData(PRawRunData* runData, const UInt_t histoNo)
|
Bool_t PRunSingleHisto::PrepareFitData(PRawRunData* runData, const UInt_t histoNo)
|
||||||
{
|
{
|
||||||
// keep start/stop time for fit
|
// keep start/stop time for fit
|
||||||
fFitStartTime = fRunInfo->fFitRange[0];
|
fFitStartTime = fRunInfo->GetFitRange(0);
|
||||||
fFitStopTime = fRunInfo->fFitRange[1];
|
fFitStopTime = fRunInfo->GetFitRange(1);
|
||||||
//cout << endl << "start/stop (fit): " << fFitStartTime << ", " << fFitStopTime;
|
//cout << endl << "start/stop (fit): " << fFitStartTime << ", " << fFitStopTime;
|
||||||
|
|
||||||
// transform raw histo data. This is done the following way (for details see the manual):
|
// transform raw histo data. This is done the following way (for details see the manual):
|
||||||
@ -478,8 +478,8 @@ Bool_t PRunSingleHisto::PrepareFitData(PRawRunData* runData, const UInt_t histoN
|
|||||||
// check how the background shall be handled
|
// check how the background shall be handled
|
||||||
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg shall **NOT** be fitted
|
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg shall **NOT** be fitted
|
||||||
// subtract background from histogramms ------------------------------------------
|
// subtract background from histogramms ------------------------------------------
|
||||||
if (fRunInfo->GetBkgsFix().size() == 0) { // no fixed background given
|
if (fRunInfo->GetBkgFixSize() == 0) { // no fixed background given
|
||||||
if (fRunInfo->GetBkgRanges().size() != 0) {
|
if (fRunInfo->GetBkgRangeSize() != 0) {
|
||||||
if (!EstimateBkg(histoNo))
|
if (!EstimateBkg(histoNo))
|
||||||
return false;
|
return false;
|
||||||
} else { // no background given to do the job
|
} else { // no background given to do the job
|
||||||
@ -651,7 +651,7 @@ cout << endl << ">> data start time = " << fData.GetDataTimeStart();
|
|||||||
// get background
|
// get background
|
||||||
Double_t bkg;
|
Double_t bkg;
|
||||||
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg not fitted
|
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg not fitted
|
||||||
if (fRunInfo->GetBkgsFix().size() == 0) { // no fixed background given (background interval)
|
if (fRunInfo->GetBkgFixSize() == 0) { // no fixed background given (background interval)
|
||||||
if (!EstimateBkg(histoNo))
|
if (!EstimateBkg(histoNo))
|
||||||
return false;
|
return false;
|
||||||
bkg = fBackground;
|
bkg = fBackground;
|
||||||
@ -776,7 +776,7 @@ Bool_t PRunSingleHisto::PrepareViewData(PRawRunData* runData, const UInt_t histo
|
|||||||
// get background
|
// get background
|
||||||
Double_t bkg;
|
Double_t bkg;
|
||||||
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg not fitted
|
if (fRunInfo->GetBkgFitParamNo() == -1) { // bkg not fitted
|
||||||
if (fRunInfo->GetBkgsFix().size() == 0) { // no fixed background given (background interval)
|
if (fRunInfo->GetBkgFixSize() == 0) { // no fixed background given (background interval)
|
||||||
if (!EstimateBkg(histoNo))
|
if (!EstimateBkg(histoNo))
|
||||||
return false;
|
return false;
|
||||||
bkg = fBackground;
|
bkg = fBackground;
|
||||||
|
@ -363,13 +363,13 @@ class PMsrRunBlock {
|
|||||||
virtual ~PMsrRunBlock();
|
virtual ~PMsrRunBlock();
|
||||||
virtual void CleanUp();
|
virtual void CleanUp();
|
||||||
|
|
||||||
virtual PStringVector GetRunNames() { return fRunName; }
|
virtual UInt_t GetRunNameSize() { return fRunName.size(); }
|
||||||
virtual TString *GetRunName(UInt_t i=0);
|
virtual TString *GetRunName(UInt_t i=0);
|
||||||
virtual PStringVector GetBeamlines() { return fBeamline; }
|
virtual UInt_t GetBeamlineSize() { return fBeamline.size(); }
|
||||||
virtual TString *GetBeamline(UInt_t i=0);
|
virtual TString *GetBeamline(UInt_t i=0);
|
||||||
virtual PStringVector GetInstitutes() { return fInstitute; }
|
virtual UInt_t GetInstituteSize() { return fInstitute.size(); }
|
||||||
virtual TString *GetInstitute(UInt_t i=0);
|
virtual TString *GetInstitute(UInt_t i=0);
|
||||||
virtual PStringVector GetFileFormats() { return fFileFormat; }
|
virtual UInt_t GetFileFormatSize() { return fFileFormat.size(); }
|
||||||
virtual TString *GetFileFormat(UInt_t i=0);
|
virtual TString *GetFileFormat(UInt_t i=0);
|
||||||
virtual Int_t GetFitType() { return fFitType; }
|
virtual Int_t GetFitType() { return fFitType; }
|
||||||
virtual Int_t GetAlphaParamNo() { return fAlphaParamNo; }
|
virtual Int_t GetAlphaParamNo() { return fAlphaParamNo; }
|
||||||
@ -383,15 +383,15 @@ class PMsrRunBlock {
|
|||||||
virtual Int_t GetMap(UInt_t idx);
|
virtual Int_t GetMap(UInt_t idx);
|
||||||
virtual Int_t GetForwardHistoNo() { return fForwardHistoNo; }
|
virtual Int_t GetForwardHistoNo() { return fForwardHistoNo; }
|
||||||
virtual Int_t GetBackwardHistoNo() { return fBackwardHistoNo; }
|
virtual Int_t GetBackwardHistoNo() { return fBackwardHistoNo; }
|
||||||
virtual PDoubleVector GetBkgsFix() { return fBkgFix; }
|
virtual UInt_t GetBkgFixSize() { return fBkgFix.size(); }
|
||||||
virtual Double_t GetBkgFix(UInt_t i=0);
|
virtual Double_t GetBkgFix(UInt_t i=0);
|
||||||
virtual PIntVector GetBkgRanges() { return fBkgRange; }
|
virtual UInt_t GetBkgRangeSize() { return fBkgRange.size(); }
|
||||||
virtual Int_t GetBkgRange(UInt_t i=0);
|
virtual Int_t GetBkgRange(UInt_t i=0);
|
||||||
virtual PIntVector GetDataRanges() { return fDataRange; }
|
virtual UInt_t GetDataRangeSize() { return fDataRange.size(); }
|
||||||
virtual Int_t GetDataRange(UInt_t i=0);
|
virtual Int_t GetDataRange(UInt_t i=0);
|
||||||
// virtual Int_t GetT0(UInt_t i=0);
|
virtual UInt_t GetT0Size() { return fT0.size(); }
|
||||||
// virtual Double_t GetFitRangeFirst() { return fFitRange[0]; }
|
virtual Int_t GetT0(UInt_t i=0);
|
||||||
// virtual Double_t GetFitRangeLast() { return fFitRange[1]; }
|
virtual Double_t GetFitRange(UInt_t i);
|
||||||
// virtual Int_t GetPacking() { return fPacking; }
|
// virtual Int_t GetPacking() { return fPacking; }
|
||||||
// virtual Double_t GetRRFFreq() { return fRRFFreq; }
|
// virtual Double_t GetRRFFreq() { return fRRFFreq; }
|
||||||
// virtual Int_t GetAlpha2ParamNo() { return fAlpha2ParamNo; }
|
// virtual Int_t GetAlpha2ParamNo() { return fAlpha2ParamNo; }
|
||||||
@ -429,10 +429,9 @@ class PMsrRunBlock {
|
|||||||
virtual void SetBkgRange(Int_t ival, UInt_t idx);
|
virtual void SetBkgRange(Int_t ival, UInt_t idx);
|
||||||
virtual void AppendDataRange(Int_t ival) { fDataRange.push_back(ival); }
|
virtual void AppendDataRange(Int_t ival) { fDataRange.push_back(ival); }
|
||||||
virtual void SetDataRange(Int_t ival, UInt_t idx);
|
virtual void SetDataRange(Int_t ival, UInt_t idx);
|
||||||
// virtual void AppendT0(Int_t ival) { fT0.push_back(ival); }
|
virtual void AppendT0(Int_t ival) { fT0.push_back(ival); }
|
||||||
// virtual void SetT0(Int_t ival, UInt_t idx);
|
virtual void SetT0(Int_t ival, UInt_t idx);
|
||||||
// virtual void SetFitRangeFirst(Double_t dval) { fFitRange[0] = dval; }
|
virtual void SetFitRange(Double_t dval, UInt_t idx);
|
||||||
// virtual void SetFitRangeLast(Double_t dval) { fFitRange[1] = dval; }
|
|
||||||
// virtual void SetPacking(Int_t ival) { fPacking = ival; }
|
// virtual void SetPacking(Int_t ival) { fPacking = ival; }
|
||||||
// virtual void SetRRFFreq(Double_t dval) { fRRFFreq = dval; }
|
// virtual void SetRRFFreq(Double_t dval) { fRRFFreq = dval; }
|
||||||
// virtual void SetAlpha2ParamNo(Int_t ival) { fAlpha2ParamNo = ival; }
|
// virtual void SetAlpha2ParamNo(Int_t ival) { fAlpha2ParamNo = ival; }
|
||||||
@ -444,8 +443,6 @@ class PMsrRunBlock {
|
|||||||
// virtual void SetXDataLabel(TString& str) { fXYDataLabel[0] = str; }
|
// virtual void SetXDataLabel(TString& str) { fXYDataLabel[0] = str; }
|
||||||
// virtual void SetYDataLabel(TString& str) { fXYDataLabel[1] = str; }
|
// virtual void SetYDataLabel(TString& str) { fXYDataLabel[1] = str; }
|
||||||
|
|
||||||
PIntVector fT0; ///< t0 bins (fit type 0, 2, 4). if fit type 0 -> f0, f1, f2, ...; if fit type 2, 4 -> f0, b0, f1, b1, ...
|
|
||||||
Double_t fFitRange[2]; ///< fit range in (us)
|
|
||||||
Int_t fPacking; ///< packing/rebinning
|
Int_t fPacking; ///< packing/rebinning
|
||||||
Double_t fRRFFreq; ///< rotating reference frequency (fit type 4)
|
Double_t fRRFFreq; ///< rotating reference frequency (fit type 4)
|
||||||
Int_t fRRFPacking; ///< rotating reference packing (fit type 4)
|
Int_t fRRFPacking; ///< rotating reference packing (fit type 4)
|
||||||
@ -475,8 +472,17 @@ class PMsrRunBlock {
|
|||||||
PDoubleVector fBkgFix; ///< fixed background in (1/ns) (fit type 0, 2, 4)
|
PDoubleVector fBkgFix; ///< fixed background in (1/ns) (fit type 0, 2, 4)
|
||||||
PIntVector fBkgRange; ///< background bin range (fit type 0, 2, 4)
|
PIntVector fBkgRange; ///< background bin range (fit type 0, 2, 4)
|
||||||
PIntVector fDataRange; ///< data bin range (fit type 0, 2, 4)
|
PIntVector fDataRange; ///< data bin range (fit type 0, 2, 4)
|
||||||
// PIntVector fT0; ///< t0 bins (fit type 0, 2, 4). if fit type 0 -> f0, f1, f2, ...; if fit type 2, 4 -> f0, b0, f1, b1, ...
|
PIntVector fT0; ///< t0 bins (fit type 0, 2, 4). if fit type 0 -> f0, f1, f2, ...; if fit type 2, 4 -> f0, b0, f1, b1, ...
|
||||||
// PDoublePair fFitRange; ///< fit range in (us)
|
Double_t fFitRange[2]; ///< fit range in (us)
|
||||||
|
// Int_t fPacking; ///< packing/rebinning
|
||||||
|
// Double_t fRRFFreq; ///< rotating reference frequency (fit type 4)
|
||||||
|
// Int_t fRRFPacking; ///< rotating reference packing (fit type 4)
|
||||||
|
// Int_t fAlpha2ParamNo; ///< rotating reference alpha2 (fit type 4)
|
||||||
|
// Int_t fBeta2ParamNo; ///< rotating reference beta2 (fit type 4)
|
||||||
|
// Int_t fRightHistoNo; ///< rotating reference right histogram number (fit type 4)
|
||||||
|
// Int_t fLeftHistoNo; ///< rotating reference left histogram number (fit type 4)
|
||||||
|
// Int_t fXYDataIndex[2]; ///< used to get the data indices when using db-files (fit type 8)
|
||||||
|
// TString fXYDataLabel[2]; ///< used to get the indices via labels when using db-files (fit type 8)
|
||||||
};
|
};
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
|
@ -245,7 +245,7 @@ int main(int argc, char *argv[])
|
|||||||
for (unsigned int i=0; i<runList->size(); i++) {
|
for (unsigned int i=0; i<runList->size(); i++) {
|
||||||
switch (runList->at(i).GetFitType()) {
|
switch (runList->at(i).GetFitType()) {
|
||||||
case MSR_FITTYPE_SINGLE_HISTO:
|
case MSR_FITTYPE_SINGLE_HISTO:
|
||||||
for (unsigned int j=0; j<runList->at(i).GetRunNames().size(); j++) { // necessary in case of ADDRUN
|
for (unsigned int j=0; j<runList->at(i).GetRunNameSize(); j++) { // necessary in case of ADDRUN
|
||||||
if (!musrt0_item(app, msrHandler, dataHandler->GetRunData(*(runList->at(i).GetRunName(j))), i, runList->at(i).GetForwardHistoNo(), 0, j)) {
|
if (!musrt0_item(app, msrHandler, dataHandler->GetRunData(*(runList->at(i).GetRunName(j))), i, runList->at(i).GetForwardHistoNo(), 0, j)) {
|
||||||
musrt0_cleanup(saxParser, startupHandler, msrHandler, dataHandler);
|
musrt0_cleanup(saxParser, startupHandler, msrHandler, dataHandler);
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -253,7 +253,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSR_FITTYPE_ASYM:
|
case MSR_FITTYPE_ASYM:
|
||||||
for (unsigned int j=0; j<runList->at(i).GetRunNames().size(); j++) { // necessary in case of ADDRUN
|
for (unsigned int j=0; j<runList->at(i).GetRunNameSize(); j++) { // necessary in case of ADDRUN
|
||||||
if (!musrt0_item(app, msrHandler, dataHandler->GetRunData(*(runList->at(i).GetRunName(j))), i, runList->at(i).GetForwardHistoNo(), 0, j)) {
|
if (!musrt0_item(app, msrHandler, dataHandler->GetRunData(*(runList->at(i).GetRunName(j))), i, runList->at(i).GetForwardHistoNo(), 0, j)) {
|
||||||
musrt0_cleanup(saxParser, startupHandler, msrHandler, dataHandler);
|
musrt0_cleanup(saxParser, startupHandler, msrHandler, dataHandler);
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -265,7 +265,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSR_FITTYPE_ASYM_RRF:
|
case MSR_FITTYPE_ASYM_RRF:
|
||||||
for (unsigned int j=0; j<runList->at(i).GetRunNames().size(); j++) { // necessary in case of ADDRUN
|
for (unsigned int j=0; j<runList->at(i).GetRunNameSize(); j++) { // necessary in case of ADDRUN
|
||||||
if (!musrt0_item(app, msrHandler, dataHandler->GetRunData(*(runList->at(i).GetRunName(j))), i, runList->at(i).GetForwardHistoNo(), 0, j)) {
|
if (!musrt0_item(app, msrHandler, dataHandler->GetRunData(*(runList->at(i).GetRunName(j))), i, runList->at(i).GetForwardHistoNo(), 0, j)) {
|
||||||
musrt0_cleanup(saxParser, startupHandler, msrHandler, dataHandler);
|
musrt0_cleanup(saxParser, startupHandler, msrHandler, dataHandler);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user