some more work towards musrt0. Furthermore improved data structure
This commit is contained in:
parent
f632aa5ba9
commit
41264e9eee
@ -80,6 +80,17 @@ PMsrHandler::~PMsrHandler()
|
|||||||
fParam.clear();
|
fParam.clear();
|
||||||
fTheory.clear();
|
fTheory.clear();
|
||||||
fFunctions.clear();
|
fFunctions.clear();
|
||||||
|
for (unsigned int i=0; i<fRuns.size(); i++) {
|
||||||
|
fRuns[i].fRunName.clear();
|
||||||
|
fRuns[i].fBeamline.clear();
|
||||||
|
fRuns[i].fInstitute.clear();
|
||||||
|
fRuns[i].fFileFormat.clear();
|
||||||
|
fRuns[i].fMap.clear();
|
||||||
|
fRuns[i].fBkgFix.clear();
|
||||||
|
fRuns[i].fBkgRange.clear();
|
||||||
|
fRuns[i].fDataRange.clear();
|
||||||
|
fRuns[i].fT0.clear();
|
||||||
|
}
|
||||||
fRuns.clear();
|
fRuns.clear();
|
||||||
fCommands.clear();
|
fCommands.clear();
|
||||||
fPlots.clear();
|
fPlots.clear();
|
||||||
@ -586,38 +597,31 @@ int PMsrHandler::WriteMsrLogFile()
|
|||||||
CheckAndWriteComment(f, ++lineNo);
|
CheckAndWriteComment(f, ++lineNo);
|
||||||
}
|
}
|
||||||
// backgr.fix
|
// backgr.fix
|
||||||
if (fRuns[i].fBkgFixPresent[0]) {
|
if (fRuns[i].fBkgFix.size() > 0) {
|
||||||
f.width(15);
|
f.width(15);
|
||||||
f << endl << left << "backgr.fix";
|
f << endl << left << "backgr.fix";
|
||||||
|
for (unsigned int j=0; j<fRuns[i].fBkgFix.size(); j++) {
|
||||||
f.precision(prec);
|
f.precision(prec);
|
||||||
f.width(12);
|
f.width(12);
|
||||||
f << left << fRuns[i].fBkgFix[0];
|
f << left << fRuns[i].fBkgFix[j];
|
||||||
if (fRuns[i].fBkgFixPresent[1]) {
|
|
||||||
f.precision(prec);
|
|
||||||
f.width(12);
|
|
||||||
f << left << fRuns[i].fBkgFix[1];
|
|
||||||
}
|
}
|
||||||
CheckAndWriteComment(f, ++lineNo);
|
CheckAndWriteComment(f, ++lineNo);
|
||||||
}
|
}
|
||||||
// background
|
// background
|
||||||
if (fRuns[i].fBkgRange[0] != -1) {
|
if (fRuns[i].fBkgRange.size() > 0) {
|
||||||
f.width(16);
|
f.width(16);
|
||||||
f << endl << left << "background";
|
f << endl << left << "background";
|
||||||
for (unsigned int j=0; j<4; j++) {
|
for (unsigned int j=0; j<fRuns[i].fBkgRange.size(); j++) {
|
||||||
if (fRuns[i].fBkgRange[j] == -1)
|
|
||||||
break;
|
|
||||||
f.width(8);
|
f.width(8);
|
||||||
f << left << fRuns[i].fBkgRange[j];
|
f << left << fRuns[i].fBkgRange[j];
|
||||||
}
|
}
|
||||||
CheckAndWriteComment(f, ++lineNo);
|
CheckAndWriteComment(f, ++lineNo);
|
||||||
}
|
}
|
||||||
// data
|
// data
|
||||||
if (fRuns[i].fDataRange[0] != -1) {
|
if (fRuns[i].fDataRange.size() > 0) {
|
||||||
f.width(16);
|
f.width(16);
|
||||||
f << endl << left << "data";
|
f << endl << left << "data";
|
||||||
for (unsigned int j=0; j<4; j++) {
|
for (unsigned int j=0; j<fRuns[i].fDataRange.size(); j++) {
|
||||||
if (fRuns[i].fDataRange[j] == -1)
|
|
||||||
break;
|
|
||||||
f.width(8);
|
f.width(8);
|
||||||
f << left << fRuns[i].fDataRange[j];
|
f << left << fRuns[i].fDataRange[j];
|
||||||
}
|
}
|
||||||
@ -943,6 +947,60 @@ bool PMsrHandler::SetMsrParamPosError(unsigned int i, double value)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// SetMsrDataRangeEntry (public)
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* \param runNo
|
||||||
|
* \param idx
|
||||||
|
* \param bin
|
||||||
|
*/
|
||||||
|
void PMsrHandler::SetMsrDataRangeEntry(unsigned int runNo, unsigned int idx, int bin)
|
||||||
|
{
|
||||||
|
if ((runNo < 0) || (runNo > fRuns.size())) { // error
|
||||||
|
cout << endl << "**ERROR** in PMsrHandler::SetMsrDataRangeEntry: runNo = " << runNo << ", is out of valid range 0.." << fRuns.size();
|
||||||
|
cout << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((idx < 0) || (idx > fRuns[runNo].fDataRange.size())) { // error
|
||||||
|
cout << endl << "**ERROR** in PMsrHandler::SetMsrDataRangeEntry: idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].fDataRange.size();
|
||||||
|
cout << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fRuns[runNo].fDataRange[idx] = bin;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// SetMsrBkgRangeEntry (public)
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* \param runNo
|
||||||
|
* \param idx
|
||||||
|
* \param bin
|
||||||
|
*/
|
||||||
|
void PMsrHandler::SetMsrBkgRangeEntry(unsigned int runNo, unsigned int idx, int bin)
|
||||||
|
{
|
||||||
|
if ((runNo < 0) || (runNo > fRuns.size())) { // error
|
||||||
|
cout << endl << "**ERROR** in PMsrHandler::SetMsrBkgRangeEntry: runNo = " << runNo << ", is out of valid range 0.." << fRuns.size();
|
||||||
|
cout << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((idx < 0) || (idx > fRuns[runNo].fBkgRange.size())) { // error
|
||||||
|
cout << endl << "**ERROR** in PMsrHandler::SetMsrBkgRangeEntry: idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].fBkgRange.size();
|
||||||
|
cout << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fRuns[runNo].fBkgRange[idx] = bin;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// ParameterInUse (public)
|
// ParameterInUse (public)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -1464,14 +1522,14 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
|
|
||||||
// backgr.fix ----------------------------------------------
|
// backgr.fix ----------------------------------------------
|
||||||
if (iter->fLine.BeginsWith("backgr.fix", TString::kIgnoreCase)) {
|
if (iter->fLine.BeginsWith("backgr.fix", TString::kIgnoreCase)) {
|
||||||
if ((tokens->GetEntries() != 2) && (tokens->GetEntries() != 3)) {
|
if (tokens->GetEntries() < 2) {
|
||||||
error = true;
|
error = true;
|
||||||
} else {
|
} else {
|
||||||
for (int i=1; i<tokens->GetEntries(); i++) {
|
for (int i=1; i<tokens->GetEntries(); i++) {
|
||||||
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.fBkgFix[i-1] = str.Atof();
|
param.fBkgFix.push_back(str.Atof());
|
||||||
else
|
else
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
@ -1480,14 +1538,14 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
|
|
||||||
// background ---------------------------------------------
|
// background ---------------------------------------------
|
||||||
if (iter->fLine.BeginsWith("background", TString::kIgnoreCase)) {
|
if (iter->fLine.BeginsWith("background", TString::kIgnoreCase)) {
|
||||||
if ((tokens->GetEntries() != 3) && (tokens->GetEntries() != 5)) {
|
if ((tokens->GetEntries() < 3) || (tokens->GetEntries() % 2 != 1)) { // odd number (>=3) of entries needed
|
||||||
error = true;
|
error = true;
|
||||||
} else {
|
} else {
|
||||||
for (int i=1; i<tokens->GetEntries(); i++) {
|
for (int i=1; i<tokens->GetEntries(); i++) {
|
||||||
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.fBkgRange[i-1] = str.Atoi();
|
param.fBkgRange.push_back(str.Atoi());
|
||||||
else
|
else
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
@ -1496,14 +1554,14 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
|
|
||||||
// data --------------------------------------------------
|
// data --------------------------------------------------
|
||||||
if (iter->fLine.BeginsWith("data", TString::kIgnoreCase)) {
|
if (iter->fLine.BeginsWith("data", TString::kIgnoreCase)) {
|
||||||
if ((tokens->GetEntries() != 3) && (tokens->GetEntries() != 5)) {
|
if ((tokens->GetEntries() < 3) || (tokens->GetEntries() % 2 != 1)) { // odd number (>=3) of entries needed
|
||||||
error = true;
|
error = true;
|
||||||
} else {
|
} else {
|
||||||
for (int i=1; i<tokens->GetEntries(); i++) {
|
for (int i=1; i<tokens->GetEntries(); i++) {
|
||||||
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.fDataRange[i-1] = str.Atoi();
|
param.fDataRange.push_back(str.Atoi());
|
||||||
else
|
else
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
@ -1690,9 +1748,9 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
bool found;
|
bool found;
|
||||||
if (fRuns[i].fBkgFitParamNo >= 0) { // check if backgr.fit is given
|
if (fRuns[i].fBkgFitParamNo >= 0) { // check if backgr.fit is given
|
||||||
found = true;
|
found = true;
|
||||||
} else if (fRuns[i].fBkgFixPresent[0]) { // check if backgr.fix is given
|
} else if (fRuns[i].fBkgFix.size() > 0) { // check if backgr.fix is given
|
||||||
found = true;
|
found = true;
|
||||||
} else if (fRuns[i].fBkgRange[0] >= 0) { // check if background window is given
|
} else if (fRuns[i].fBkgRange.size() > 0) { // check if background window is given
|
||||||
found = true;
|
found = true;
|
||||||
} else {
|
} else {
|
||||||
found = false;
|
found = false;
|
||||||
@ -1736,14 +1794,9 @@ void PMsrHandler::InitRunParameterStructure(PMsrRunStructure ¶m)
|
|||||||
param.fMap.clear(); // empty list
|
param.fMap.clear(); // empty list
|
||||||
param.fForwardHistoNo = -1;
|
param.fForwardHistoNo = -1;
|
||||||
param.fBackwardHistoNo = -1;
|
param.fBackwardHistoNo = -1;
|
||||||
for (int i=0; i<2; i++) {
|
param.fBkgFix.clear();
|
||||||
param.fBkgFixPresent[i] = false;
|
param.fBkgRange.clear();
|
||||||
param.fBkgFix[i] = 0.0;
|
param.fDataRange.clear();
|
||||||
}
|
|
||||||
for (int i=0; i<4; i++)
|
|
||||||
param.fBkgRange[i] = -1;
|
|
||||||
for (int i=0; i<4; i++)
|
|
||||||
param.fDataRange[i] = -1;
|
|
||||||
param.fT0.clear();
|
param.fT0.clear();
|
||||||
for (int i=0; i<4; i++)
|
for (int i=0; i<4; i++)
|
||||||
param.fFitRange[i] = -1;
|
param.fFitRange[i] = -1;
|
||||||
|
@ -420,6 +420,24 @@ void PMusrT0::SetDataFirstChannel()
|
|||||||
fDataRange[0] = fHisto->GetXaxis()->FindFixBin(x);
|
fDataRange[0] = fHisto->GetXaxis()->FindFixBin(x);
|
||||||
|
|
||||||
// set the data first bin in msr-Handler
|
// set the data first bin in msr-Handler
|
||||||
|
unsigned int idx = 0;
|
||||||
|
switch(fDetectorTag) {
|
||||||
|
case DETECTOR_TAG_FORWARD:
|
||||||
|
idx = fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_BACKWARD:
|
||||||
|
idx = 2 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_LEFT:
|
||||||
|
idx = 4 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_RIGHT:
|
||||||
|
idx = 6 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fMsrHandler->SetMsrDataRangeEntry(fRunNo, idx, fDataRange[0]);
|
||||||
|
|
||||||
// shift line to the proper position
|
// shift line to the proper position
|
||||||
fFirstDataLine->SetX1(x);
|
fFirstDataLine->SetX1(x);
|
||||||
@ -461,7 +479,25 @@ void PMusrT0::SetDataLastChannel()
|
|||||||
// get binx to set the data last channel corresponding to fPx
|
// get binx to set the data last channel corresponding to fPx
|
||||||
fDataRange[1] = fHisto->GetXaxis()->FindFixBin(x);
|
fDataRange[1] = fHisto->GetXaxis()->FindFixBin(x);
|
||||||
|
|
||||||
// set the data last bin in msr-Handler
|
// set the data first bin in msr-Handler
|
||||||
|
unsigned int idx = 0;
|
||||||
|
switch(fDetectorTag) {
|
||||||
|
case DETECTOR_TAG_FORWARD:
|
||||||
|
idx = 1 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_BACKWARD:
|
||||||
|
idx = 3 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_LEFT:
|
||||||
|
idx = 5 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_RIGHT:
|
||||||
|
idx = 7 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fMsrHandler->SetMsrDataRangeEntry(fRunNo, idx, fDataRange[1]);
|
||||||
|
|
||||||
// shift line to the proper position
|
// shift line to the proper position
|
||||||
fLastDataLine->SetX1(x);
|
fLastDataLine->SetX1(x);
|
||||||
@ -504,6 +540,24 @@ void PMusrT0::SetBkgFirstChannel()
|
|||||||
fBkgRange[0] = fHisto->GetXaxis()->FindFixBin(x);
|
fBkgRange[0] = fHisto->GetXaxis()->FindFixBin(x);
|
||||||
|
|
||||||
// set the background first bin in msr-Handler
|
// set the background first bin in msr-Handler
|
||||||
|
unsigned int idx = 0;
|
||||||
|
switch(fDetectorTag) {
|
||||||
|
case DETECTOR_TAG_FORWARD:
|
||||||
|
idx = fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_BACKWARD:
|
||||||
|
idx = 2 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_LEFT:
|
||||||
|
idx = 4 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_RIGHT:
|
||||||
|
idx = 6 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fMsrHandler->SetMsrBkgRangeEntry(fRunNo, idx, fBkgRange[0]);
|
||||||
|
|
||||||
// shift line to the proper position
|
// shift line to the proper position
|
||||||
fFirstBkgLine->SetX1(x);
|
fFirstBkgLine->SetX1(x);
|
||||||
@ -545,7 +599,25 @@ void PMusrT0::SetBkgLastChannel()
|
|||||||
// get binx to set the background last channel corresponding to fPx
|
// get binx to set the background last channel corresponding to fPx
|
||||||
fBkgRange[1] = fHisto->GetXaxis()->FindFixBin(x);
|
fBkgRange[1] = fHisto->GetXaxis()->FindFixBin(x);
|
||||||
|
|
||||||
// set the background last bin in msr-Handler
|
// set the background first bin in msr-Handler
|
||||||
|
unsigned int idx = 0;
|
||||||
|
switch(fDetectorTag) {
|
||||||
|
case DETECTOR_TAG_FORWARD:
|
||||||
|
idx = 1 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_BACKWARD:
|
||||||
|
idx = 3 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_LEFT:
|
||||||
|
idx = 5 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
case DETECTOR_TAG_RIGHT:
|
||||||
|
idx = 7 + fAddRunNo * fAddRunOffset;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fMsrHandler->SetMsrBkgRangeEntry(fRunNo, idx, fBkgRange[1]);
|
||||||
|
|
||||||
// shift line to the proper position
|
// shift line to the proper position
|
||||||
fLastBkgLine->SetX1(x);
|
fLastBkgLine->SetX1(x);
|
||||||
|
@ -436,8 +436,9 @@ bool PRunAsymmetry::PrepareData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// subtract background from histogramms ------------------------------------------
|
// subtract background from histogramms ------------------------------------------
|
||||||
if (!fRunInfo->fBkgFixPresent[0]) { // no fixed background given
|
cout << endl << ">> fBkgFix.size() = " << fRunInfo->fBkgFix.size() << ", fBkgRange.size() = " << fRunInfo->fBkgRange.size() << endl;
|
||||||
if (fRunInfo->fBkgRange[0] != 0) {
|
if (fRunInfo->fBkgFix.size() == 0) { // no fixed background given
|
||||||
|
if (fRunInfo->fBkgRange.size() != 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
|
||||||
|
@ -119,7 +119,7 @@ double PRunSingleHisto::CalcChiSquare(const std::vector<double>& par)
|
|||||||
// get background
|
// get background
|
||||||
double bkg;
|
double bkg;
|
||||||
if (fRunInfo->fBkgFitParamNo == -1) { // bkg not fitted
|
if (fRunInfo->fBkgFitParamNo == -1) { // bkg not fitted
|
||||||
if (!fRunInfo->fBkgFixPresent[0]) { // no fixed background given (background interval)
|
if (fRunInfo->fBkgFix.size() == 0) { // no fixed background given (background interval)
|
||||||
bkg = fBackground;
|
bkg = fBackground;
|
||||||
} else { // fixed bkg given
|
} else { // fixed bkg given
|
||||||
bkg = fRunInfo->fBkgFix[0];
|
bkg = fRunInfo->fBkgFix[0];
|
||||||
@ -193,7 +193,7 @@ double PRunSingleHisto::CalcMaxLikelihood(const std::vector<double>& par)
|
|||||||
// get background
|
// get background
|
||||||
double bkg;
|
double bkg;
|
||||||
if (fRunInfo->fBkgFitParamNo == -1) { // bkg not fitted
|
if (fRunInfo->fBkgFitParamNo == -1) { // bkg not fitted
|
||||||
if (!fRunInfo->fBkgFixPresent[0]) { // no fixed background given (background interval)
|
if (fRunInfo->fBkgFix.size() == 0) { // no fixed background given (background interval)
|
||||||
bkg = fBackground;
|
bkg = fBackground;
|
||||||
} else { // fixed bkg given
|
} else { // fixed bkg given
|
||||||
bkg = fRunInfo->fBkgFix[0];
|
bkg = fRunInfo->fBkgFix[0];
|
||||||
@ -267,7 +267,7 @@ void PRunSingleHisto::CalcTheory()
|
|||||||
// get background
|
// get background
|
||||||
double bkg;
|
double bkg;
|
||||||
if (fRunInfo->fBkgFitParamNo == -1) { // bkg not fitted
|
if (fRunInfo->fBkgFitParamNo == -1) { // bkg not fitted
|
||||||
if (!fRunInfo->fBkgFixPresent[0]) { // no fixed background given (background interval)
|
if (fRunInfo->fBkgFix.size() == 0) { // no fixed background given (background interval)
|
||||||
bkg = fBackground;
|
bkg = fBackground;
|
||||||
} else { // fixed bkg given
|
} else { // fixed bkg given
|
||||||
bkg = fRunInfo->fBkgFix[0];
|
bkg = fRunInfo->fBkgFix[0];
|
||||||
@ -605,8 +605,8 @@ bool PRunSingleHisto::PrepareFitData(PRawRunData* runData, const unsigned int hi
|
|||||||
// check how the background shall be handled
|
// check how the background shall be handled
|
||||||
if (fRunInfo->fBkgFitParamNo == -1) { // bkg shall **NOT** be fitted
|
if (fRunInfo->fBkgFitParamNo == -1) { // bkg shall **NOT** be fitted
|
||||||
// subtract background from histogramms ------------------------------------------
|
// subtract background from histogramms ------------------------------------------
|
||||||
if (!fRunInfo->fBkgFixPresent[0]) { // no fixed background given
|
if (fRunInfo->fBkgFix.size() == 0) { // no fixed background given
|
||||||
if (fRunInfo->fBkgRange[0] != 0) {
|
if (fRunInfo->fBkgRange.size() != 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
|
||||||
@ -771,7 +771,7 @@ cout << endl << ">> data start time = " << fData.fDataTimeStart;
|
|||||||
// get background
|
// get background
|
||||||
double bkg;
|
double bkg;
|
||||||
if (fRunInfo->fBkgFitParamNo == -1) { // bkg not fitted
|
if (fRunInfo->fBkgFitParamNo == -1) { // bkg not fitted
|
||||||
if (!fRunInfo->fBkgFixPresent[0]) { // no fixed background given (background interval)
|
if (fRunInfo->fBkgFix.size() == 0) { // no fixed background given (background interval)
|
||||||
if (!EstimateBkg(histoNo))
|
if (!EstimateBkg(histoNo))
|
||||||
return false;
|
return false;
|
||||||
bkg = fBackground;
|
bkg = fBackground;
|
||||||
@ -885,7 +885,7 @@ bool PRunSingleHisto::PrepareViewData(PRawRunData* runData, const unsigned int h
|
|||||||
// get background
|
// get background
|
||||||
double bkg;
|
double bkg;
|
||||||
if (fRunInfo->fBkgFitParamNo == -1) { // bkg not fitted
|
if (fRunInfo->fBkgFitParamNo == -1) { // bkg not fitted
|
||||||
if (!fRunInfo->fBkgFixPresent[0]) { // no fixed background given (background interval)
|
if (fRunInfo->fBkgFix.size() == 0) { // no fixed background given (background interval)
|
||||||
if (!EstimateBkg(histoNo))
|
if (!EstimateBkg(histoNo))
|
||||||
return false;
|
return false;
|
||||||
bkg = fBackground;
|
bkg = fBackground;
|
||||||
|
@ -71,6 +71,9 @@ class PMsrHandler
|
|||||||
virtual bool SetMsrParamPosErrorPresent(unsigned int i, bool value);
|
virtual bool SetMsrParamPosErrorPresent(unsigned int i, bool value);
|
||||||
virtual bool SetMsrParamPosError(unsigned int i, double value);
|
virtual bool SetMsrParamPosError(unsigned int i, double value);
|
||||||
|
|
||||||
|
virtual void SetMsrDataRangeEntry(unsigned int runNo, unsigned int idx, int bin);
|
||||||
|
virtual void SetMsrBkgRangeEntry(unsigned int runNo, unsigned int idx, int bin);
|
||||||
|
|
||||||
virtual void SetMsrStatisticMin(double min) { fStatistic.fMin = min; }
|
virtual void SetMsrStatisticMin(double min) { fStatistic.fMin = min; }
|
||||||
virtual void SetMsrStatisticNdf(unsigned int ndf) { fStatistic.fNdf = ndf; }
|
virtual void SetMsrStatisticNdf(unsigned int ndf) { fStatistic.fNdf = ndf; }
|
||||||
|
|
||||||
|
@ -257,10 +257,9 @@ typedef struct {
|
|||||||
PIntVector fMap; ///< map vector needed to switch parameters for different runs within a single theory
|
PIntVector fMap; ///< map vector needed to switch parameters for different runs within a single theory
|
||||||
int fForwardHistoNo; ///< forward histogram number (fit type 0, 2, 4)
|
int fForwardHistoNo; ///< forward histogram number (fit type 0, 2, 4)
|
||||||
int fBackwardHistoNo; ///< backward histogram number (fit type 2, 4)
|
int fBackwardHistoNo; ///< backward histogram number (fit type 2, 4)
|
||||||
bool fBkgFixPresent[2]; ///< flag showing if a fixed background is present (fit type 0, 2, 4).
|
PDoubleVector fBkgFix; ///< fixed background in (1/ns) (fit type 0, 2, 4)
|
||||||
double fBkgFix[2]; ///< fixed background in (1/ns) (fit type 0, 2, 4)
|
PIntVector fBkgRange; ///< background bin range (fit type 0, 2, 4)
|
||||||
int fBkgRange[4]; ///< background bin range (fit type 0, 2, 4)
|
PIntVector fDataRange; ///< data bin range (fit type 0, 2, 4)
|
||||||
int fDataRange[4]; ///< 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, ...
|
||||||
double fFitRange[2]; ///< fit range in (us)
|
double fFitRange[2]; ///< fit range in (us)
|
||||||
int fPacking; ///< packing/rebinning
|
int fPacking; ///< packing/rebinning
|
||||||
|
Loading…
x
Reference in New Issue
Block a user