replace RRF Asymmetry Fit dummy, by Mu Minus Single Histo Fit dummy
This commit is contained in:
parent
fe853c1025
commit
41c5d45d8b
@ -17,7 +17,7 @@ h_sources = \
|
|||||||
../include/PRunDataHandler.h \
|
../include/PRunDataHandler.h \
|
||||||
../include/PRunListCollection.h \
|
../include/PRunListCollection.h \
|
||||||
../include/PRunNonMusr.h \
|
../include/PRunNonMusr.h \
|
||||||
../include/PRunRRF.h \
|
../include/PRunMuMinus.h \
|
||||||
../include/PRunSingleHisto.h \
|
../include/PRunSingleHisto.h \
|
||||||
../include/PStartupHandler.h \
|
../include/PStartupHandler.h \
|
||||||
../include/PTheory.h \
|
../include/PTheory.h \
|
||||||
@ -51,7 +51,7 @@ cpp_sources = \
|
|||||||
PRunDataHandler.cpp \
|
PRunDataHandler.cpp \
|
||||||
PRunListCollection.cpp \
|
PRunListCollection.cpp \
|
||||||
PRunNonMusr.cpp \
|
PRunNonMusr.cpp \
|
||||||
PRunRRF.cpp \
|
PRunMuMinus.cpp \
|
||||||
PRunSingleHisto.cpp \
|
PRunSingleHisto.cpp \
|
||||||
PStartupHandler.cpp \
|
PStartupHandler.cpp \
|
||||||
PTheory.cpp \
|
PTheory.cpp \
|
||||||
|
@ -54,12 +54,11 @@ PFitterFcn::PFitterFcn(PRunListCollection *runList, Bool_t useChi2)
|
|||||||
|
|
||||||
fRunListCollection = runList;
|
fRunListCollection = runList;
|
||||||
|
|
||||||
// check if max likelihood is used together with asymmetry/RRF/nonMusr data.
|
// check if max likelihood is used together with asymmetry/nonMusr data.
|
||||||
// if yes place a warning since this option is not implemented and a fall back
|
// if yes place a warning since this option is not implemented and a fall back
|
||||||
// to chi2 will be used.
|
// to chi2 will be used.
|
||||||
if (!fUseChi2) {
|
if (!fUseChi2) {
|
||||||
if ((fRunListCollection->GetNoOfAsymmetry() > 0) ||
|
if ((fRunListCollection->GetNoOfAsymmetry() > 0) ||
|
||||||
(fRunListCollection->GetNoOfRRF() > 0) ||
|
|
||||||
(fRunListCollection->GetNoOfNonMusr() > 0)) {
|
(fRunListCollection->GetNoOfNonMusr() > 0)) {
|
||||||
cerr << endl << "**WARNING**: Maximum Log Likelihood Fit is only implemented for Single Histogram Fit";
|
cerr << endl << "**WARNING**: Maximum Log Likelihood Fit is only implemented for Single Histogram Fit";
|
||||||
cerr << endl << " Will fall back to Chi Square Fit.";
|
cerr << endl << " Will fall back to Chi Square Fit.";
|
||||||
@ -91,12 +90,12 @@ Double_t PFitterFcn::operator()(const std::vector<Double_t>& par) const
|
|||||||
if (fUseChi2) { // chi square
|
if (fUseChi2) { // chi square
|
||||||
value += fRunListCollection->GetSingleHistoChisq(par);
|
value += fRunListCollection->GetSingleHistoChisq(par);
|
||||||
value += fRunListCollection->GetAsymmetryChisq(par);
|
value += fRunListCollection->GetAsymmetryChisq(par);
|
||||||
value += fRunListCollection->GetRRFChisq(par);
|
value += fRunListCollection->GetMuMinusChisq(par);
|
||||||
value += fRunListCollection->GetNonMusrChisq(par);
|
value += fRunListCollection->GetNonMusrChisq(par);
|
||||||
} else { // max likelihood
|
} else { // max likelihood
|
||||||
value += fRunListCollection->GetSingleHistoMaximumLikelihood(par);
|
value += fRunListCollection->GetSingleHistoMaximumLikelihood(par);
|
||||||
value += fRunListCollection->GetAsymmetryMaximumLikelihood(par);
|
value += fRunListCollection->GetAsymmetryMaximumLikelihood(par);
|
||||||
value += fRunListCollection->GetRRFMaximumLikelihood(par);
|
value += fRunListCollection->GetMuMinusMaximumLikelihood(par);
|
||||||
value += fRunListCollection->GetNonMusrMaximumLikelihood(par);
|
value += fRunListCollection->GetNonMusrMaximumLikelihood(par);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -590,8 +590,8 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
|||||||
case MSR_FITTYPE_ASYM:
|
case MSR_FITTYPE_ASYM:
|
||||||
fout << left << "fittype" << MSR_FITTYPE_ASYM << " (asymmetry fit)" << endl ;
|
fout << left << "fittype" << MSR_FITTYPE_ASYM << " (asymmetry fit)" << endl ;
|
||||||
break;
|
break;
|
||||||
case MSR_FITTYPE_ASYM_RRF:
|
case MSR_FITTYPE_MU_MINUS:
|
||||||
fout << left << "fittype" << MSR_FITTYPE_ASYM_RRF << " (RRF asymmetry fit)" << endl ;
|
fout << left << "fittype" << MSR_FITTYPE_MU_MINUS << " (mu minus fit)" << endl ;
|
||||||
break;
|
break;
|
||||||
case MSR_FITTYPE_NON_MUSR:
|
case MSR_FITTYPE_NON_MUSR:
|
||||||
fout << left << "fittype" << MSR_FITTYPE_NON_MUSR << " (non muSR fit)" << endl ;
|
fout << left << "fittype" << MSR_FITTYPE_NON_MUSR << " (non muSR fit)" << endl ;
|
||||||
@ -837,8 +837,8 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
|||||||
case MSR_PLOT_ASYM:
|
case MSR_PLOT_ASYM:
|
||||||
fout << "PLOT " << fPlots[plotNo].fPlotType << " (asymmetry plot)" << endl;
|
fout << "PLOT " << fPlots[plotNo].fPlotType << " (asymmetry plot)" << endl;
|
||||||
break;
|
break;
|
||||||
case MSR_PLOT_ASYM_RRF:
|
case MSR_PLOT_MU_MINUS:
|
||||||
fout << "PLOT " << fPlots[plotNo].fPlotType << " (rotating reference frame plot)" << endl;
|
fout << "PLOT " << fPlots[plotNo].fPlotType << " (mu minus plot)" << endl;
|
||||||
break;
|
break;
|
||||||
case MSR_PLOT_NON_MUSR:
|
case MSR_PLOT_NON_MUSR:
|
||||||
fout << "PLOT " << fPlots[plotNo].fPlotType << " (non muSR plot)" << endl;
|
fout << "PLOT " << fPlots[plotNo].fPlotType << " (non muSR plot)" << endl;
|
||||||
@ -850,12 +850,8 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
|
|||||||
fout << "runs ";
|
fout << "runs ";
|
||||||
fout.precision(0);
|
fout.precision(0);
|
||||||
for (UInt_t j=0; j<fPlots[plotNo].fRuns.size(); j++) {
|
for (UInt_t j=0; j<fPlots[plotNo].fRuns.size(); j++) {
|
||||||
if (fPlots[plotNo].fPlotType != MSR_PLOT_ASYM_RRF) { // all but MSR_PLOT_ASYM_RRF
|
|
||||||
fout.width(4);
|
fout.width(4);
|
||||||
fout << fPlots[plotNo].fRuns[j].Re();
|
fout << fPlots[plotNo].fRuns[j];
|
||||||
} else { // MSR_PLOT_ASYM_RRF
|
|
||||||
fout << fPlots[plotNo].fRuns[j].Re() << "," << fPlots[plotNo].fRuns[j].Im() << " ";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
fout << endl;
|
fout << endl;
|
||||||
} else if (sstr.BeginsWith("range")) {
|
} else if (sstr.BeginsWith("range")) {
|
||||||
@ -1603,7 +1599,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
Int_t fittype = str.Atoi();
|
Int_t fittype = str.Atoi();
|
||||||
if ((fittype == MSR_FITTYPE_SINGLE_HISTO) ||
|
if ((fittype == MSR_FITTYPE_SINGLE_HISTO) ||
|
||||||
(fittype == MSR_FITTYPE_ASYM) ||
|
(fittype == MSR_FITTYPE_ASYM) ||
|
||||||
(fittype == MSR_FITTYPE_ASYM_RRF) ||
|
(fittype == MSR_FITTYPE_MU_MINUS) ||
|
||||||
(fittype == MSR_FITTYPE_NON_MUSR)) {
|
(fittype == MSR_FITTYPE_NON_MUSR)) {
|
||||||
param.SetFitType(fittype);
|
param.SetFitType(fittype);
|
||||||
} else {
|
} else {
|
||||||
@ -2434,7 +2430,7 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
tokens = 0;
|
tokens = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSR_PLOT_ASYM_RRF: // like: runs 1,1 1,2
|
case MSR_PLOT_MU_MINUS: // like: runs 1,1 1,2
|
||||||
tokens = iter1->fLine.Tokenize(" \t");
|
tokens = iter1->fLine.Tokenize(" \t");
|
||||||
if (!tokens) {
|
if (!tokens) {
|
||||||
cerr << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
cerr << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
||||||
@ -2798,14 +2794,9 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
cerr << endl;
|
cerr << endl;
|
||||||
cerr << endl << "where <plot_type> is: 0=single histo asym,";
|
cerr << endl << "where <plot_type> is: 0=single histo asym,";
|
||||||
cerr << endl << " 2=forward-backward asym,";
|
cerr << endl << " 2=forward-backward asym,";
|
||||||
cerr << endl << " 4=RRF asym (not implemented yet),";
|
cerr << endl << " 4=mu minus singhle histo (not implemented yet),";
|
||||||
cerr << endl << " 8=non muSR.";
|
cerr << endl << " 8=non muSR.";
|
||||||
cerr << endl << "<run_list> is the list of runs";
|
cerr << endl << "<run_list> is the list of runs, e.g. runs 1 3";
|
||||||
cerr << endl << " for <plot_type> 0,2,8 it is a list of run numbers, e.g. runs 1 3";
|
|
||||||
cerr << endl << " for <plot_type> 4 it is a list of 'complex' numbers, where";
|
|
||||||
cerr << endl << " the real part is the run number, and the";
|
|
||||||
cerr << endl << " imaginary one is 1=real part or 2=imag part, e.g.";
|
|
||||||
cerr << endl << " runs 1,1 1,2";
|
|
||||||
cerr << endl << "range is optional";
|
cerr << endl << "range is optional";
|
||||||
cerr << endl << "sub_ranges (if present) will plot the N given runs each on its own sub-range";
|
cerr << endl << "sub_ranges (if present) will plot the N given runs each on its own sub-range";
|
||||||
cerr << endl << "logx, logy (if present) will present the x-, y-axis in log-scale";
|
cerr << endl << "logx, logy (if present) will present the x-, y-axis in log-scale";
|
||||||
|
@ -435,14 +435,14 @@ void PMusrCanvas::UpdateDataTheoryPad()
|
|||||||
fPlotType = plotInfo.fPlotType;
|
fPlotType = plotInfo.fPlotType;
|
||||||
for (UInt_t i=0; i<plotInfo.fRuns.size(); i++) {
|
for (UInt_t i=0; i<plotInfo.fRuns.size(); i++) {
|
||||||
// first check that plot number is smaller than the maximal number of runs
|
// first check that plot number is smaller than the maximal number of runs
|
||||||
if ((Int_t)plotInfo.fRuns[i].Re() > (Int_t)runs.size()) {
|
if ((Int_t)plotInfo.fRuns[i] > (Int_t)runs.size()) {
|
||||||
fValid = false;
|
fValid = false;
|
||||||
cerr << endl << "PMusrCanvas::UpdateDataTheoryPad: **ERROR** run plot number " << (Int_t)plotInfo.fRuns[i].Re() << " is larger than the number of runs " << runs.size();
|
cerr << endl << "PMusrCanvas::UpdateDataTheoryPad: **ERROR** run plot number " << (Int_t)plotInfo.fRuns[i] << " is larger than the number of runs " << runs.size();
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// check that the plottype and the fittype do correspond
|
// check that the plottype and the fittype do correspond
|
||||||
runNo = (UInt_t)plotInfo.fRuns[i].Re()-1;
|
runNo = (UInt_t)plotInfo.fRuns[i]-1;
|
||||||
//cout << endl << ">> runNo = " << runNo;
|
//cout << endl << ">> runNo = " << runNo;
|
||||||
//cout << endl;
|
//cout << endl;
|
||||||
if (fPlotType != runs[runNo].GetFitType()) {
|
if (fPlotType != runs[runNo].GetFitType()) {
|
||||||
@ -457,7 +457,7 @@ void PMusrCanvas::UpdateDataTheoryPad()
|
|||||||
for (UInt_t i=0; i<plotInfo.fRuns.size(); i++) {
|
for (UInt_t i=0; i<plotInfo.fRuns.size(); i++) {
|
||||||
// get run data and create a histogram
|
// get run data and create a histogram
|
||||||
data = 0;
|
data = 0;
|
||||||
runNo = (UInt_t)plotInfo.fRuns[i].Re()-1;
|
runNo = (UInt_t)plotInfo.fRuns[i]-1;
|
||||||
// get data depending on the fittype
|
// get data depending on the fittype
|
||||||
switch (runs[runNo].GetFitType()) {
|
switch (runs[runNo].GetFitType()) {
|
||||||
case MSR_FITTYPE_SINGLE_HISTO:
|
case MSR_FITTYPE_SINGLE_HISTO:
|
||||||
@ -484,12 +484,12 @@ void PMusrCanvas::UpdateDataTheoryPad()
|
|||||||
// handle data
|
// handle data
|
||||||
HandleDataSet(i, runNo, data);
|
HandleDataSet(i, runNo, data);
|
||||||
break;
|
break;
|
||||||
case MSR_FITTYPE_ASYM_RRF:
|
case MSR_FITTYPE_MU_MINUS:
|
||||||
data = fRunList->GetRRF(runNo, PRunListCollection::kRunNo);
|
data = fRunList->GetMuMinus(runNo, PRunListCollection::kRunNo);
|
||||||
if (!data) { // something wrong
|
if (!data) { // something wrong
|
||||||
fValid = false;
|
fValid = false;
|
||||||
// error message
|
// error message
|
||||||
cerr << endl << "PMusrCanvas::UpdateDataTheoryPad: **ERROR** couldn't obtain run no " << runNo << " for a RRF plot";
|
cerr << endl << "PMusrCanvas::UpdateDataTheoryPad: **ERROR** couldn't obtain run no " << runNo << " for a mu minus single histogram plot";
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -583,7 +583,7 @@ void PMusrCanvas::UpdateInfoPad()
|
|||||||
PMsrRunList runs = *fMsrHandler->GetMsrRunList();
|
PMsrRunList runs = *fMsrHandler->GetMsrRunList();
|
||||||
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]-1;
|
||||||
if (runs[runNo].GetRunNameSize() > 1)
|
if (runs[runNo].GetRunNameSize() > 1)
|
||||||
tstr = "++" + *runs[runNo].GetRunName() + TString(","); // run_name
|
tstr = "++" + *runs[runNo].GetRunName() + TString(","); // run_name
|
||||||
else
|
else
|
||||||
@ -2569,9 +2569,11 @@ void PMusrCanvas::PlotData()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSR_PLOT_ASYM:
|
case MSR_PLOT_ASYM:
|
||||||
case MSR_PLOT_ASYM_RRF:
|
|
||||||
yAxisTitle = "asymmetry";
|
yAxisTitle = "asymmetry";
|
||||||
break;
|
break;
|
||||||
|
case MSR_PLOT_MU_MINUS:
|
||||||
|
yAxisTitle = "??";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
yAxisTitle = "??";
|
yAxisTitle = "??";
|
||||||
break;
|
break;
|
||||||
@ -2601,7 +2603,7 @@ void PMusrCanvas::PlotData()
|
|||||||
|
|
||||||
PMsrRunList runs = *fMsrHandler->GetMsrRunList();
|
PMsrRunList runs = *fMsrHandler->GetMsrRunList();
|
||||||
PMsrPlotStructure plotInfo = fMsrHandler->GetMsrPlotList()->at(fPlotNumber);
|
PMsrPlotStructure plotInfo = fMsrHandler->GetMsrPlotList()->at(fPlotNumber);
|
||||||
UInt_t runNo = (UInt_t)plotInfo.fRuns[0].Re()-1;
|
UInt_t runNo = (UInt_t)plotInfo.fRuns[0]-1;
|
||||||
TString xAxisTitle = fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
|
TString xAxisTitle = fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
|
||||||
TString yAxisTitle = fRunList->GetYAxisTitle(*runs[runNo].GetRunName(), runNo);
|
TString yAxisTitle = fRunList->GetYAxisTitle(*runs[runNo].GetRunName(), runNo);
|
||||||
|
|
||||||
@ -2660,7 +2662,7 @@ void PMusrCanvas::PlotData()
|
|||||||
assert(fMultiGraphLegend != 0);
|
assert(fMultiGraphLegend != 0);
|
||||||
PStringVector legendLabel;
|
PStringVector legendLabel;
|
||||||
for (UInt_t i=0; i<plotInfo.fRuns.size(); i++) {
|
for (UInt_t i=0; i<plotInfo.fRuns.size(); i++) {
|
||||||
runNo = (UInt_t)plotInfo.fRuns[i].Re()-1;
|
runNo = (UInt_t)plotInfo.fRuns[i]-1;
|
||||||
xAxisTitle = fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
|
xAxisTitle = fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
|
||||||
yAxisTitle = fRunList->GetYAxisTitle(*runs[runNo].GetRunName(), runNo);
|
yAxisTitle = fRunList->GetYAxisTitle(*runs[runNo].GetRunName(), runNo);
|
||||||
legendLabel.push_back(xAxisTitle + " vs. " + yAxisTitle);
|
legendLabel.push_back(xAxisTitle + " vs. " + yAxisTitle);
|
||||||
@ -2724,7 +2726,7 @@ void PMusrCanvas::PlotDifference()
|
|||||||
|
|
||||||
PMsrRunList runs = *fMsrHandler->GetMsrRunList();
|
PMsrRunList runs = *fMsrHandler->GetMsrRunList();
|
||||||
PMsrPlotStructure plotInfo = fMsrHandler->GetMsrPlotList()->at(fPlotNumber);
|
PMsrPlotStructure plotInfo = fMsrHandler->GetMsrPlotList()->at(fPlotNumber);
|
||||||
UInt_t runNo = (UInt_t)plotInfo.fRuns[0].Re()-1;
|
UInt_t runNo = (UInt_t)plotInfo.fRuns[0]-1;
|
||||||
TString xAxisTitle = fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
|
TString xAxisTitle = fRunList->GetXAxisTitle(*runs[runNo].GetRunName(), runNo);
|
||||||
|
|
||||||
// if fMultiGraphDiff is not present create it and add the diff data
|
// if fMultiGraphDiff is not present create it and add the diff data
|
||||||
@ -3491,7 +3493,7 @@ void PMusrCanvas::SaveDataAscii()
|
|||||||
switch (fPlotType) {
|
switch (fPlotType) {
|
||||||
case MSR_PLOT_SINGLE_HISTO:
|
case MSR_PLOT_SINGLE_HISTO:
|
||||||
case MSR_PLOT_ASYM:
|
case MSR_PLOT_ASYM:
|
||||||
case MSR_PLOT_ASYM_RRF:
|
case MSR_PLOT_MU_MINUS:
|
||||||
if (fDifferenceView) { // difference view plot
|
if (fDifferenceView) { // difference view plot
|
||||||
switch (fCurrentPlotView) {
|
switch (fCurrentPlotView) {
|
||||||
case PV_DATA:
|
case PV_DATA:
|
||||||
|
@ -256,8 +256,8 @@ void PMusrT0::InitDataAndBkg()
|
|||||||
fAddRunOffset = 2;
|
fAddRunOffset = 2;
|
||||||
} else if (fitType == MSR_FITTYPE_ASYM) {
|
} else if (fitType == MSR_FITTYPE_ASYM) {
|
||||||
fAddRunOffset = 4;
|
fAddRunOffset = 4;
|
||||||
} else if (fitType == MSR_FITTYPE_ASYM_RRF) {
|
} else if (fitType == MSR_FITTYPE_MU_MINUS) {
|
||||||
fAddRunOffset = 8;
|
fAddRunOffset = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// feed data range histo
|
// feed data range histo
|
||||||
|
@ -71,12 +71,12 @@ PRunListCollection::~PRunListCollection()
|
|||||||
}
|
}
|
||||||
fRunAsymmetryList.clear();
|
fRunAsymmetryList.clear();
|
||||||
|
|
||||||
//cout << endl << ">> fRunRRFList.size() = " << fRunRRFList.size();
|
//cout << endl << ">> fRunMuMinusList.size() = " << fRunMuMinusList.size();
|
||||||
for (UInt_t i=0; i<fRunRRFList.size(); i++) {
|
for (UInt_t i=0; i<fRunMuMinusList.size(); i++) {
|
||||||
fRunRRFList[i]->CleanUp();
|
fRunMuMinusList[i]->CleanUp();
|
||||||
fRunRRFList[i]->~PRunRRF();
|
fRunMuMinusList[i]->~PRunMuMinus();
|
||||||
}
|
}
|
||||||
fRunRRFList.clear();
|
fRunMuMinusList.clear();
|
||||||
|
|
||||||
//cout << endl << ">> fRunNonMusrList.size() = " << fRunNonMusrList.size();
|
//cout << endl << ">> fRunNonMusrList.size() = " << fRunNonMusrList.size();
|
||||||
for (UInt_t i=0; i<fRunNonMusrList.size(); i++) {
|
for (UInt_t i=0; i<fRunNonMusrList.size(); i++) {
|
||||||
@ -118,9 +118,9 @@ Bool_t PRunListCollection::Add(Int_t runNo, EPMusrHandleTag tag)
|
|||||||
if (!fRunAsymmetryList[fRunAsymmetryList.size()-1]->IsValid())
|
if (!fRunAsymmetryList[fRunAsymmetryList.size()-1]->IsValid())
|
||||||
success = false;
|
success = false;
|
||||||
break;
|
break;
|
||||||
case PRUN_RRF:
|
case PRUN_MU_MINUS:
|
||||||
fRunRRFList.push_back(new PRunRRF(fMsrInfo, fData, runNo, tag));
|
fRunMuMinusList.push_back(new PRunMuMinus(fMsrInfo, fData, runNo, tag));
|
||||||
if (!fRunRRFList[fRunRRFList.size()-1]->IsValid())
|
if (!fRunMuMinusList[fRunMuMinusList.size()-1]->IsValid())
|
||||||
success = false;
|
success = false;
|
||||||
break;
|
break;
|
||||||
case PRUN_NON_MUSR:
|
case PRUN_NON_MUSR:
|
||||||
@ -169,17 +169,17 @@ Double_t PRunListCollection::GetAsymmetryChisq(const std::vector<Double_t>& par)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// GetRRFChisq
|
// GetMuMinusChisq
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*/
|
*/
|
||||||
Double_t PRunListCollection::GetRRFChisq(const std::vector<Double_t>& par) const
|
Double_t PRunListCollection::GetMuMinusChisq(const std::vector<Double_t>& par) const
|
||||||
{
|
{
|
||||||
Double_t chisq = 0.0;
|
Double_t chisq = 0.0;
|
||||||
|
|
||||||
for (UInt_t i=0; i<fRunRRFList.size(); i++)
|
for (UInt_t i=0; i<fRunMuMinusList.size(); i++)
|
||||||
chisq += fRunRRFList[i]->CalcChiSquare(par);
|
chisq += fRunMuMinusList[i]->CalcChiSquare(par);
|
||||||
|
|
||||||
return chisq;
|
return chisq;
|
||||||
}
|
}
|
||||||
@ -234,18 +234,17 @@ Double_t PRunListCollection::GetAsymmetryMaximumLikelihood(const std::vector<Dou
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// GetRRFMaximumLikelihood
|
// GetMuMinusMaximumLikelihood
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p> Since it is not clear yet how to handle RRF fits with max likelihood
|
* <p>
|
||||||
* the chi square will be used!
|
|
||||||
*/
|
*/
|
||||||
Double_t PRunListCollection::GetRRFMaximumLikelihood(const std::vector<Double_t>& par) const
|
Double_t PRunListCollection::GetMuMinusMaximumLikelihood(const std::vector<Double_t>& par) const
|
||||||
{
|
{
|
||||||
Double_t mlh = 0.0;
|
Double_t mlh = 0.0;
|
||||||
|
|
||||||
for (UInt_t i=0; i<fRunRRFList.size(); i++)
|
for (UInt_t i=0; i<fRunMuMinusList.size(); i++)
|
||||||
mlh += fRunRRFList[i]->CalcChiSquare(par);
|
mlh += fRunMuMinusList[i]->CalcMaxLikelihood(par);
|
||||||
|
|
||||||
return mlh;
|
return mlh;
|
||||||
}
|
}
|
||||||
@ -283,8 +282,8 @@ UInt_t PRunListCollection::GetTotalNoOfBinsFitted() const
|
|||||||
for (UInt_t i=0; i<fRunAsymmetryList.size(); i++)
|
for (UInt_t i=0; i<fRunAsymmetryList.size(); i++)
|
||||||
counts += fRunAsymmetryList[i]->GetNoOfFitBins();
|
counts += fRunAsymmetryList[i]->GetNoOfFitBins();
|
||||||
|
|
||||||
for (UInt_t i=0; i<fRunRRFList.size(); i++)
|
for (UInt_t i=0; i<fRunMuMinusList.size(); i++)
|
||||||
counts += fRunRRFList[i]->GetNoOfFitBins();
|
counts += fRunMuMinusList[i]->GetNoOfFitBins();
|
||||||
|
|
||||||
for (UInt_t i=0; i<fRunNonMusrList.size(); i++)
|
for (UInt_t i=0; i<fRunNonMusrList.size(); i++)
|
||||||
counts += fRunNonMusrList[i]->GetNoOfFitBins();
|
counts += fRunNonMusrList[i]->GetNoOfFitBins();
|
||||||
@ -372,7 +371,7 @@ PRunData* PRunListCollection::GetAsymmetry(UInt_t index, EDataSwitch tag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// GetRRF
|
// GetMuMinus
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -380,19 +379,25 @@ PRunData* PRunListCollection::GetAsymmetry(UInt_t index, EDataSwitch tag)
|
|||||||
* \param index
|
* \param index
|
||||||
* \param tag kIndex -> data at index, kRunNo -> data of given run no
|
* \param tag kIndex -> data at index, kRunNo -> data of given run no
|
||||||
*/
|
*/
|
||||||
PRunData* PRunListCollection::GetRRF(UInt_t index, EDataSwitch tag)
|
PRunData* PRunListCollection::GetMuMinus(UInt_t index, EDataSwitch tag)
|
||||||
{
|
{
|
||||||
PRunData *data = 0;
|
PRunData *data = 0;
|
||||||
|
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case kIndex:
|
case kIndex:
|
||||||
if ((index < 0) || (index > fRunRRFList.size())) {
|
if ((index < 0) || (index > fRunMuMinusList.size())) {
|
||||||
cerr << endl << "PRunListCollection::GetRRF: **ERROR** index = " << index << " out of bounds";
|
cerr << endl << "PRunListCollection::GetMuMinus: **ERROR** index = " << index << " out of bounds";
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kRunNo:
|
case kRunNo:
|
||||||
|
for (UInt_t i=0; i<fRunMuMinusList.size(); i++) {
|
||||||
|
if (fRunMuMinusList[i]->GetRunNo() == index) {
|
||||||
|
data = fRunMuMinusList[i]->GetData();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default: // error
|
default: // error
|
||||||
break;
|
break;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
|
||||||
PRunRRF.cpp
|
PRunMuMinus.cpp
|
||||||
|
|
||||||
Author: Andreas Suter
|
Author: Andreas Suter
|
||||||
e-mail: andreas.suter@psi.ch
|
e-mail: andreas.suter@psi.ch
|
||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "PRunRRF.h"
|
#include "PRunMuMinus.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// Constructor
|
// Constructor
|
||||||
@ -40,7 +40,7 @@
|
|||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
PRunRRF::PRunRRF() : PRunBase()
|
PRunMuMinus::PRunMuMinus() : PRunBase()
|
||||||
{
|
{
|
||||||
fFitStartTime = 0.0;
|
fFitStartTime = 0.0;
|
||||||
fFitStopTime = 0.0;
|
fFitStopTime = 0.0;
|
||||||
@ -58,7 +58,7 @@ PRunRRF::PRunRRF() : PRunBase()
|
|||||||
* \param msrInfo pointer to the msr info structure
|
* \param msrInfo pointer to the msr info structure
|
||||||
* \param runNo number of the run of the msr-file
|
* \param runNo number of the run of the msr-file
|
||||||
*/
|
*/
|
||||||
PRunRRF::PRunRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag) : PRunBase(msrInfo, rawData, runNo, tag)
|
PRunMuMinus::PRunMuMinus(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag) : PRunBase(msrInfo, rawData, runNo, tag)
|
||||||
{
|
{
|
||||||
Bool_t success;
|
Bool_t success;
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ PRunRRF::PRunRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, E
|
|||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
PRunRRF::~PRunRRF()
|
PRunMuMinus::~PRunMuMinus()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ PRunRRF::~PRunRRF()
|
|||||||
*
|
*
|
||||||
* \param par parameter vector iterated by minuit
|
* \param par parameter vector iterated by minuit
|
||||||
*/
|
*/
|
||||||
Double_t PRunRRF::CalcChiSquare(const std::vector<Double_t>& par)
|
Double_t PRunMuMinus::CalcChiSquare(const std::vector<Double_t>& par)
|
||||||
{
|
{
|
||||||
Double_t chisq = 0.0;
|
Double_t chisq = 0.0;
|
||||||
Double_t diff = 0.0;
|
Double_t diff = 0.0;
|
||||||
@ -103,7 +103,7 @@ Double_t PRunRRF::CalcChiSquare(const std::vector<Double_t>& par)
|
|||||||
*
|
*
|
||||||
* \param par parameter vector iterated by minuit
|
* \param par parameter vector iterated by minuit
|
||||||
*/
|
*/
|
||||||
Double_t PRunRRF::CalcMaxLikelihood(const std::vector<Double_t>& par)
|
Double_t PRunMuMinus::CalcMaxLikelihood(const std::vector<Double_t>& par)
|
||||||
{
|
{
|
||||||
cout << endl << "PRunSingleHisto::CalcMaxLikelihood(): not implemented yet ..." << endl;
|
cout << endl << "PRunSingleHisto::CalcMaxLikelihood(): not implemented yet ..." << endl;
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ Double_t PRunRRF::CalcMaxLikelihood(const std::vector<Double_t>& par)
|
|||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void PRunRRF::CalcTheory()
|
void PRunMuMinus::CalcTheory()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,11 +128,11 @@ void PRunRRF::CalcTheory()
|
|||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Bool_t PRunRRF::PrepareData()
|
Bool_t PRunMuMinus::PrepareData()
|
||||||
{
|
{
|
||||||
Bool_t success = true;
|
Bool_t success = true;
|
||||||
|
|
||||||
cout << endl << "in PRunRRF::PrepareData(): will feed fData";
|
cout << endl << "in PRunMuMinus::PrepareData(): will feed fData";
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
@ -313,9 +313,9 @@ Bool_t PRunNonMusr::PrepareViewData()
|
|||||||
for (UInt_t j=0; j<plotBlock.fRuns.size(); j++) {
|
for (UInt_t j=0; j<plotBlock.fRuns.size(); j++) {
|
||||||
// cout << endl << ">> j=" << j;
|
// cout << endl << ">> j=" << j;
|
||||||
// cout << endl << ">> fRunNo=" << fRunNo;
|
// cout << endl << ">> fRunNo=" << fRunNo;
|
||||||
// cout << endl << ">> plotBlock.fRuns[j].Re()=" << plotBlock.fRuns[j].Re();
|
// cout << endl << ">> plotBlock.fRuns[j]=" << plotBlock.fRuns[j];
|
||||||
// cout << endl;
|
// cout << endl;
|
||||||
if (fRunNo == plotBlock.fRuns[j].Re()-1) { // run found
|
if (fRunNo == plotBlock.fRuns[j]-1) { // run found
|
||||||
if (first) {
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
xMin = plotBlock.fTmin[0];
|
xMin = plotBlock.fTmin[0];
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include <TComplex.h>
|
|
||||||
#include <TString.h>
|
#include <TString.h>
|
||||||
|
|
||||||
#define PMUSR_SUCCESS 0
|
#define PMUSR_SUCCESS 0
|
||||||
@ -48,7 +47,7 @@ using namespace std;
|
|||||||
|
|
||||||
#define PRUN_SINGLE_HISTO 0
|
#define PRUN_SINGLE_HISTO 0
|
||||||
#define PRUN_ASYMMETRY 2
|
#define PRUN_ASYMMETRY 2
|
||||||
#define PRUN_RRF 4
|
#define PRUN_MU_MINUS 4
|
||||||
#define PRUN_NON_MUSR 8
|
#define PRUN_NON_MUSR 8
|
||||||
|
|
||||||
// muon life time in (us), see PRL99, 032001 (2007)
|
// muon life time in (us), see PRL99, 032001 (2007)
|
||||||
@ -81,14 +80,14 @@ using namespace std;
|
|||||||
// msr fit type tags
|
// msr fit type tags
|
||||||
#define MSR_FITTYPE_SINGLE_HISTO 0
|
#define MSR_FITTYPE_SINGLE_HISTO 0
|
||||||
#define MSR_FITTYPE_ASYM 2
|
#define MSR_FITTYPE_ASYM 2
|
||||||
#define MSR_FITTYPE_ASYM_RRF 4
|
#define MSR_FITTYPE_MU_MINUS 4
|
||||||
#define MSR_FITTYPE_NON_MUSR 8
|
#define MSR_FITTYPE_NON_MUSR 8
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
// msr plot type tags
|
// msr plot type tags
|
||||||
#define MSR_PLOT_SINGLE_HISTO 0
|
#define MSR_PLOT_SINGLE_HISTO 0
|
||||||
#define MSR_PLOT_ASYM 2
|
#define MSR_PLOT_ASYM 2
|
||||||
#define MSR_PLOT_ASYM_RRF 4
|
#define MSR_PLOT_MU_MINUS 4
|
||||||
#define MSR_PLOT_NON_MUSR 8
|
#define MSR_PLOT_NON_MUSR 8
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
@ -160,12 +159,6 @@ typedef vector<Double_t> PDoubleVector;
|
|||||||
*/
|
*/
|
||||||
typedef vector< pair<Double_t, Double_t> > PDoublePairVector;
|
typedef vector< pair<Double_t, Double_t> > PDoublePairVector;
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p> typedef to make to code more readable.
|
|
||||||
*/
|
|
||||||
typedef vector<TComplex> PComplexVector;
|
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p> typedef to make to code more readable.
|
* <p> typedef to make to code more readable.
|
||||||
@ -459,7 +452,7 @@ class PMsrRunBlock {
|
|||||||
PStringVector fBeamline; ///< e.g. mue4, mue1, pim3, emu, m15, ... (former: run type)
|
PStringVector fBeamline; ///< e.g. mue4, mue1, pim3, emu, m15, ... (former: run type)
|
||||||
PStringVector fInstitute; ///< e.g. psi, ral, triumf (former: run format)
|
PStringVector fInstitute; ///< e.g. psi, ral, triumf (former: run format)
|
||||||
PStringVector fFileFormat; ///< e.g. root, nexus, psi-bin, mud, ascii, db
|
PStringVector fFileFormat; ///< e.g. root, nexus, psi-bin, mud, ascii, db
|
||||||
Int_t fFitType; ///< fit type: 0=single histo fit, 2=asymmetry fit, 4=asymmetry in RRF, 8=non muSR
|
Int_t fFitType; ///< fit type: 0=single histo fit, 2=asymmetry fit, 4=mu^- single histo fit, 8=non muSR fit
|
||||||
Int_t fAlphaParamNo; ///< alpha parameter number (fit type 2, 4)
|
Int_t fAlphaParamNo; ///< alpha parameter number (fit type 2, 4)
|
||||||
Int_t fBetaParamNo; ///< beta parameter number (fit type 2, 4)
|
Int_t fBetaParamNo; ///< beta parameter number (fit type 2, 4)
|
||||||
Int_t fNormParamNo; ///< N0 parameter number (fit type 0)
|
Int_t fNormParamNo; ///< N0 parameter number (fit type 0)
|
||||||
@ -513,7 +506,7 @@ typedef struct {
|
|||||||
Bool_t fLogX; ///< yes -> x-axis in log-scale, no (default) -> x-axis in lin-scale
|
Bool_t fLogX; ///< yes -> x-axis in log-scale, no (default) -> x-axis in lin-scale
|
||||||
Bool_t fLogY; ///< yes -> y-axis in log-scale, no (default) -> y-axis in lin-scale
|
Bool_t fLogY; ///< yes -> y-axis in log-scale, no (default) -> y-axis in lin-scale
|
||||||
Int_t fViewPacking; ///< -1 -> use the run packing to generate the view, otherwise is fViewPacking for the binning of ALL runs.
|
Int_t fViewPacking; ///< -1 -> use the run packing to generate the view, otherwise is fViewPacking for the binning of ALL runs.
|
||||||
PComplexVector fRuns; ///< list of runs to be plotted
|
PIntVector fRuns; ///< list of runs to be plotted
|
||||||
PDoubleVector fTmin; ///< time minimum
|
PDoubleVector fTmin; ///< time minimum
|
||||||
PDoubleVector fTmax; ///< time maximum
|
PDoubleVector fTmax; ///< time maximum
|
||||||
PDoubleVector fYmin; ///< asymmetry/counts minimum
|
PDoubleVector fYmin; ///< asymmetry/counts minimum
|
||||||
|
@ -40,7 +40,7 @@ using namespace std;
|
|||||||
#include "PRunDataHandler.h"
|
#include "PRunDataHandler.h"
|
||||||
#include "PRunSingleHisto.h"
|
#include "PRunSingleHisto.h"
|
||||||
#include "PRunAsymmetry.h"
|
#include "PRunAsymmetry.h"
|
||||||
#include "PRunRRF.h"
|
#include "PRunMuMinus.h"
|
||||||
#include "PRunNonMusr.h"
|
#include "PRunNonMusr.h"
|
||||||
|
|
||||||
class PRunListCollection
|
class PRunListCollection
|
||||||
@ -55,24 +55,24 @@ class PRunListCollection
|
|||||||
|
|
||||||
virtual Double_t GetSingleHistoChisq(const std::vector<Double_t>& par) const;
|
virtual Double_t GetSingleHistoChisq(const std::vector<Double_t>& par) const;
|
||||||
virtual Double_t GetAsymmetryChisq(const std::vector<Double_t>& par) const;
|
virtual Double_t GetAsymmetryChisq(const std::vector<Double_t>& par) const;
|
||||||
virtual Double_t GetRRFChisq(const std::vector<Double_t>& par) const;
|
virtual Double_t GetMuMinusChisq(const std::vector<Double_t>& par) const;
|
||||||
virtual Double_t GetNonMusrChisq(const std::vector<Double_t>& par) const;
|
virtual Double_t GetNonMusrChisq(const std::vector<Double_t>& par) const;
|
||||||
|
|
||||||
virtual Double_t GetSingleHistoMaximumLikelihood(const std::vector<Double_t>& par) const;
|
virtual Double_t GetSingleHistoMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||||
virtual Double_t GetAsymmetryMaximumLikelihood(const std::vector<Double_t>& par) const;
|
virtual Double_t GetAsymmetryMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||||
virtual Double_t GetRRFMaximumLikelihood(const std::vector<Double_t>& par) const;
|
virtual Double_t GetMuMinusMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||||
virtual Double_t GetNonMusrMaximumLikelihood(const std::vector<Double_t>& par) const;
|
virtual Double_t GetNonMusrMaximumLikelihood(const std::vector<Double_t>& par) const;
|
||||||
|
|
||||||
virtual UInt_t GetTotalNoOfBinsFitted() const;
|
virtual UInt_t GetTotalNoOfBinsFitted() const;
|
||||||
|
|
||||||
virtual UInt_t GetNoOfSingleHisto() const { return fRunSingleHistoList.size(); }
|
virtual UInt_t GetNoOfSingleHisto() const { return fRunSingleHistoList.size(); }
|
||||||
virtual UInt_t GetNoOfAsymmetry() const { return fRunAsymmetryList.size(); }
|
virtual UInt_t GetNoOfAsymmetry() const { return fRunAsymmetryList.size(); }
|
||||||
virtual UInt_t GetNoOfRRF() const { return fRunRRFList.size(); }
|
virtual UInt_t GetNoOfMuMinus() const { return fRunMuMinusList.size(); }
|
||||||
virtual UInt_t GetNoOfNonMusr() const { return fRunNonMusrList.size(); }
|
virtual UInt_t GetNoOfNonMusr() const { return fRunNonMusrList.size(); }
|
||||||
|
|
||||||
virtual PRunData* GetSingleHisto(UInt_t index, EDataSwitch tag=kIndex);
|
virtual PRunData* GetSingleHisto(UInt_t index, EDataSwitch tag=kIndex);
|
||||||
virtual PRunData* GetAsymmetry(UInt_t index, EDataSwitch tag=kIndex);
|
virtual PRunData* GetAsymmetry(UInt_t index, EDataSwitch tag=kIndex);
|
||||||
virtual PRunData* GetRRF(UInt_t index, EDataSwitch tag=kIndex);
|
virtual PRunData* GetMuMinus(UInt_t index, EDataSwitch tag=kIndex);
|
||||||
virtual PRunData* GetNonMusr(UInt_t index, EDataSwitch tag=kIndex);
|
virtual PRunData* GetNonMusr(UInt_t index, EDataSwitch tag=kIndex);
|
||||||
|
|
||||||
virtual const PDoublePairVector *GetTemp(const TString &runName) const;
|
virtual const PDoublePairVector *GetTemp(const TString &runName) const;
|
||||||
@ -88,7 +88,7 @@ class PRunListCollection
|
|||||||
|
|
||||||
vector<PRunSingleHisto*> fRunSingleHistoList;
|
vector<PRunSingleHisto*> fRunSingleHistoList;
|
||||||
vector<PRunAsymmetry*> fRunAsymmetryList;
|
vector<PRunAsymmetry*> fRunAsymmetryList;
|
||||||
vector<PRunRRF*> fRunRRFList;
|
vector<PRunMuMinus*> fRunMuMinusList;
|
||||||
vector<PRunNonMusr*> fRunNonMusrList;
|
vector<PRunNonMusr*> fRunNonMusrList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
|
||||||
PRunRRF.h
|
PRunMuMinus.h
|
||||||
|
|
||||||
Author: Andreas Suter
|
Author: Andreas Suter
|
||||||
e-mail: andreas.suter@psi.ch
|
e-mail: andreas.suter@psi.ch
|
||||||
@ -29,17 +29,17 @@
|
|||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef _PRUNRRF_H_
|
#ifndef _PRUNMUMINUS_H_
|
||||||
#define _PRUNRRF_H_
|
#define _PRUNMUMINUS_H_
|
||||||
|
|
||||||
#include "PRunBase.h"
|
#include "PRunBase.h"
|
||||||
|
|
||||||
class PRunRRF : public PRunBase
|
class PRunMuMinus : public PRunBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PRunRRF();
|
PRunMuMinus();
|
||||||
PRunRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag);
|
PRunMuMinus(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag);
|
||||||
virtual ~PRunRRF();
|
virtual ~PRunMuMinus();
|
||||||
|
|
||||||
virtual Double_t CalcChiSquare(const std::vector<Double_t>& par);
|
virtual Double_t CalcChiSquare(const std::vector<Double_t>& par);
|
||||||
virtual Double_t CalcMaxLikelihood(const std::vector<Double_t>& par);
|
virtual Double_t CalcMaxLikelihood(const std::vector<Double_t>& par);
|
||||||
@ -56,4 +56,4 @@ class PRunRRF : public PRunBase
|
|||||||
UInt_t fNoOfFitBins;
|
UInt_t fNoOfFitBins;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _PRUNRRF_H_
|
#endif // _PRUNMUMINUS_H_
|
@ -165,10 +165,10 @@ void musrfit_dump_ascii(char *fileName, PRunListCollection *runList)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// rrf
|
// rrf
|
||||||
size = runList->GetNoOfRRF();
|
size = runList->GetNoOfMuMinus();
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
for (unsigned int i=0; i<size; i++) {
|
for (unsigned int i=0; i<size; i++) {
|
||||||
data = runList->GetRRF(i);
|
data = runList->GetMuMinus(i);
|
||||||
if (data) {
|
if (data) {
|
||||||
// dump data
|
// dump data
|
||||||
musrfit_write_ascii(fln, data, runCounter);
|
musrfit_write_ascii(fln, data, runCounter);
|
||||||
@ -295,10 +295,10 @@ void musrfit_dump_root(char *fileName, PRunListCollection *runList)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// rrf
|
// rrf
|
||||||
size = runList->GetNoOfRRF();
|
size = runList->GetNoOfMuMinus();
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
for (unsigned int i=0; i<size; i++) {
|
for (unsigned int i=0; i<size; i++) {
|
||||||
data = runList->GetRRF(i);
|
data = runList->GetMuMinus(i);
|
||||||
if (data) {
|
if (data) {
|
||||||
// dump data
|
// dump data
|
||||||
musrfit_write_root(f, fln, data, runCounter);
|
musrfit_write_root(f, fln, data, runCounter);
|
||||||
|
@ -275,7 +275,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSR_FITTYPE_ASYM_RRF:
|
case MSR_FITTYPE_MU_MINUS:
|
||||||
/*
|
/*
|
||||||
for (unsigned int j=0; j<runList->at(i).GetRunNameSize(); 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)) {
|
||||||
|
@ -204,13 +204,13 @@ int main(int argc, char *argv[])
|
|||||||
// check that run is not already in the plotList
|
// check that run is not already in the plotList
|
||||||
runPresent = false;
|
runPresent = false;
|
||||||
for (unsigned int k=0; k<plotList.size(); k++) {
|
for (unsigned int k=0; k<plotList.size(); k++) {
|
||||||
if (msrPlotList->at(i).fRuns[j].Re() == static_cast<int>(plotList[k])) {
|
if (msrPlotList->at(i).fRuns[j] == static_cast<int>(plotList[k])) {
|
||||||
runPresent = true;
|
runPresent = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!runPresent) {
|
if (!runPresent) {
|
||||||
plotList.push_back(static_cast<int>(msrPlotList->at(i).fRuns[j].Re()));
|
plotList.push_back(static_cast<int>(msrPlotList->at(i).fRuns[j]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user