musrview gets the new feature: calculate theory points only at data points.
This commit is contained in:
@ -187,8 +187,9 @@ PMusrCanvas::PMusrCanvas()
|
||||
*/
|
||||
PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
|
||||
const Bool_t batch, const Bool_t fourier, const Bool_t avg) :
|
||||
fStartWithFourier(fourier), fStartWithAvg(avg),
|
||||
const Bool_t batch, const Bool_t fourier, const Bool_t avg,
|
||||
const Bool_t theoAsData) :
|
||||
fTheoAsData(theoAsData), fStartWithFourier(fourier), fStartWithAvg(avg),
|
||||
fBatchMode(batch), fPlotNumber(number)
|
||||
{
|
||||
fTimeout = 0;
|
||||
@ -244,8 +245,9 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
|
||||
PMsrFourierStructure fourierDefault,
|
||||
const PIntVector markerList, const PIntVector colorList,
|
||||
const Bool_t batch, const Bool_t fourier, const Bool_t avg) :
|
||||
fStartWithFourier(fourier), fStartWithAvg(avg), fBatchMode(batch),
|
||||
const Bool_t batch, const Bool_t fourier, const Bool_t avg,
|
||||
const Bool_t theoAsData) :
|
||||
fTheoAsData(theoAsData), fStartWithFourier(fourier), fStartWithAvg(avg), fBatchMode(batch),
|
||||
fPlotNumber(number), fFourier(fourierDefault),
|
||||
fMarkerList(markerList), fColorList(colorList)
|
||||
{
|
||||
@ -3467,22 +3469,30 @@ void PMusrCanvas::HandleFourier()
|
||||
fData[i].dataFourierPhase->SetMarkerStyle(fData[i].data->GetMarkerStyle());
|
||||
|
||||
// calculate fourier transform of the theory
|
||||
Int_t powerPad = (Int_t)round(log((endTime-startTime)/fData[i].theory->GetBinWidth(1))/log(2))+3;
|
||||
PFourier fourierTheory(fData[i].theory, fFourier.fUnits, startTime, endTime, fFourier.fDCCorrected, powerPad);
|
||||
if (!fourierTheory.IsValid()) {
|
||||
PFourier *fourierTheory = nullptr;
|
||||
if (fTheoAsData) { // theory only at the data points
|
||||
fourierTheory = new PFourier(fData[i].theory, fFourier.fUnits, startTime, endTime, fFourier.fDCCorrected, fFourier.fFourierPower);
|
||||
} else {
|
||||
Int_t powerPad = fFourier.fFourierPower+5; // +5 means 8 times more points on theo (+3) + 4 times more points in fourier (+2)
|
||||
fourierTheory = new PFourier(fData[i].theory, fFourier.fUnits, startTime, endTime, fFourier.fDCCorrected, powerPad);
|
||||
}
|
||||
if (!fourierTheory->IsValid()) {
|
||||
std::cerr << std::endl << ">> PMusrCanvas::HandleFourier(): **SEVERE ERROR** couldn't invoke PFourier to calculate the Fourier theory ..." << std::endl;
|
||||
return;
|
||||
}
|
||||
fourierTheory.Transform(fFourier.fApodization);
|
||||
fourierTheory->Transform(fFourier.fApodization);
|
||||
scale = sqrt(fData[0].theory->GetBinWidth(1)/(endTime-startTime)*fData[0].theory->GetBinWidth(1)/fData[0].data->GetBinWidth(1));
|
||||
// get real part of the data
|
||||
fData[i].theoryFourierRe = fourierTheory.GetRealFourier(scale);
|
||||
fData[i].theoryFourierRe = fourierTheory->GetRealFourier(scale);
|
||||
// get imaginary part of the data
|
||||
fData[i].theoryFourierIm = fourierTheory.GetImaginaryFourier(scale);
|
||||
fData[i].theoryFourierIm = fourierTheory->GetImaginaryFourier(scale);
|
||||
// get power part of the data
|
||||
fData[i].theoryFourierPwr = fourierTheory.GetPowerFourier(scale);
|
||||
fData[i].theoryFourierPwr = fourierTheory->GetPowerFourier(scale);
|
||||
// get phase part of the data
|
||||
fData[i].theoryFourierPhase = fourierTheory.GetPhaseFourier();
|
||||
fData[i].theoryFourierPhase = fourierTheory->GetPhaseFourier();
|
||||
|
||||
// clean up
|
||||
delete fourierTheory;
|
||||
|
||||
// set line colors for the theory
|
||||
fData[i].theoryFourierRe->SetLineColor(fData[i].theory->GetLineColor());
|
||||
|
@ -56,6 +56,7 @@ PRunAsymmetry::PRunAsymmetry() : PRunBase()
|
||||
{
|
||||
fNoOfFitBins = 0;
|
||||
fPacking = -1;
|
||||
fTheoAsData = false;
|
||||
|
||||
// the 2 following variables are need in case fit range is given in bins, and since
|
||||
// the fit range can be changed in the command block, these variables need to be accessible
|
||||
@ -77,7 +78,8 @@ PRunAsymmetry::PRunAsymmetry() : PRunBase()
|
||||
* \param runNo number of the run within the msr-file
|
||||
* \param tag tag showing what shall be done: kFit == fitting, kView == viewing
|
||||
*/
|
||||
PRunAsymmetry::PRunAsymmetry(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag) : PRunBase(msrInfo, rawData, runNo, tag)
|
||||
PRunAsymmetry::PRunAsymmetry(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData) :
|
||||
PRunBase(msrInfo, rawData, runNo, tag), fTheoAsData(theoAsData)
|
||||
{
|
||||
// the 2 following variables are need in case fit range is given in bins, and since
|
||||
// the fit range can be changed in the command block, these variables need to be accessible
|
||||
@ -1296,15 +1298,19 @@ Bool_t PRunAsymmetry::PrepareViewData(PRawRunData* runData, UInt_t histoNo[2])
|
||||
// calculate theory
|
||||
Double_t time;
|
||||
UInt_t size = runData->GetDataBin(histoNo[0])->size();
|
||||
Double_t factor = 1.0;
|
||||
if (fData.GetValue()->size() * 10 > runData->GetDataBin(histoNo[0])->size()) {
|
||||
size = fData.GetValue()->size() * 10;
|
||||
factor = static_cast<Double_t>(runData->GetDataBin(histoNo[0])->size()) / static_cast<Double_t>(size);
|
||||
}
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
fData.SetTheoryTimeStep(fTimeResolution*factor);
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
size *= factor;
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep()/(Double_t)factor);
|
||||
}
|
||||
|
||||
for (UInt_t i=0; i<size; i++) {
|
||||
time = fData.GetTheoryTimeStart() + static_cast<Double_t>(i)*fTimeResolution*factor;
|
||||
time = fData.GetTheoryTimeStart() + static_cast<Double_t>(i)*fData.GetTheoryTimeStep();
|
||||
value = fTheory->Func(time, par, fFuncValues);
|
||||
if (fabs(value) > 10.0) { // dirty hack needs to be fixed!!
|
||||
value = 0.0;
|
||||
|
@ -57,6 +57,7 @@ PRunAsymmetryBNMR::PRunAsymmetryBNMR() : PRunBase()
|
||||
{
|
||||
fNoOfFitBins = 0;
|
||||
fPacking = -1;
|
||||
fTheoAsData = false;
|
||||
|
||||
// the 2 following variables are need in case fit range is given in bins, and since
|
||||
// the fit range can be changed in the command block, these variables need to be accessible
|
||||
@ -78,7 +79,8 @@ PRunAsymmetryBNMR::PRunAsymmetryBNMR() : PRunBase()
|
||||
* \param runNo number of the run within the msr-file
|
||||
* \param tag tag showing what shall be done: kFit == fitting, kView == viewing
|
||||
*/
|
||||
PRunAsymmetryBNMR::PRunAsymmetryBNMR(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag) : PRunBase(msrInfo, rawData, runNo, tag)
|
||||
PRunAsymmetryBNMR::PRunAsymmetryBNMR(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData) :
|
||||
PRunBase(msrInfo, rawData, runNo, tag), fTheoAsData(theoAsData)
|
||||
{
|
||||
// the 2 following variables are need in case fit range is given in bins, and since
|
||||
// the fit range can be changed in the command block, these variables need to be accessible
|
||||
@ -1472,17 +1474,21 @@ Bool_t PRunAsymmetryBNMR::PrepareViewData(PRawRunData* runData, UInt_t histoNo[2
|
||||
}
|
||||
|
||||
// calculate theory
|
||||
Double_t time;
|
||||
UInt_t size = runData->GetDataBin(histoNo[0])->size();
|
||||
Double_t factor = 1.0;
|
||||
if (fData.GetValue()->size() * 10 > runData->GetDataBin(histoNo[0])->size()) {
|
||||
size = fData.GetValue()->size() * 10;
|
||||
factor = static_cast<Double_t>(runData->GetDataBin(histoNo[0])->size()) / static_cast<Double_t>(size);
|
||||
}
|
||||
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
fData.SetTheoryTimeStep(fTimeResolution*factor);
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
size *= factor;
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep()/(Double_t)factor);
|
||||
}
|
||||
|
||||
Double_t time;
|
||||
for (UInt_t i=0; i<size; i++) {
|
||||
time = fData.GetTheoryTimeStart() + static_cast<Double_t>(i)*fTimeResolution*factor;
|
||||
time = fData.GetTheoryTimeStart() + static_cast<Double_t>(i)*fData.GetTheoryTimeStep();
|
||||
value = fTheory->Func(time, par, fFuncValues);
|
||||
if (fabs(value) > 10.0) { // dirty hack needs to be fixed!!
|
||||
value = 0.0;
|
||||
|
@ -57,6 +57,7 @@ PRunAsymmetryRRF::PRunAsymmetryRRF() : PRunBase()
|
||||
{
|
||||
fNoOfFitBins = 0;
|
||||
fRRFPacking = -1;
|
||||
fTheoAsData = false;
|
||||
|
||||
// the 2 following variables are need in case fit range is given in bins, and since
|
||||
// the fit range can be changed in the command block, these variables need to be accessible
|
||||
@ -75,7 +76,8 @@ PRunAsymmetryRRF::PRunAsymmetryRRF() : PRunBase()
|
||||
* \param runNo number of the run within the msr-file
|
||||
* \param tag tag showing what shall be done: kFit == fitting, kView == viewing
|
||||
*/
|
||||
PRunAsymmetryRRF::PRunAsymmetryRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag) : PRunBase(msrInfo, rawData, runNo, tag)
|
||||
PRunAsymmetryRRF::PRunAsymmetryRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData) :
|
||||
PRunBase(msrInfo, rawData, runNo, tag), fTheoAsData(theoAsData)
|
||||
{
|
||||
// the 2 following variables are need in case fit range is given in bins, and since
|
||||
// the fit range can be changed in the command block, these variables need to be accessible
|
||||
@ -1228,15 +1230,18 @@ Bool_t PRunAsymmetryRRF::PrepareViewData(PRawRunData* runData, UInt_t histoNo[2]
|
||||
|
||||
// calculate theory
|
||||
UInt_t size = runData->GetDataBin(histoNo[0])->size();
|
||||
Double_t factor = 1.0;
|
||||
if (fData.GetValue()->size() * 10 > runData->GetDataBin(histoNo[0])->size()) {
|
||||
size = fData.GetValue()->size() * 10;
|
||||
factor = static_cast<Double_t>(runData->GetDataBin(histoNo[0])->size()) / static_cast<Double_t>(size);
|
||||
}
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
fData.SetTheoryTimeStep(fTimeResolution*factor);
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
size *= factor;
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep()/(Double_t)factor);
|
||||
}
|
||||
|
||||
for (UInt_t i=0; i<size; i++) {
|
||||
time = fData.GetTheoryTimeStart() + static_cast<Double_t>(i)*fTimeResolution*factor;
|
||||
time = fData.GetTheoryTimeStart() + static_cast<Double_t>(i)*fData.GetTheoryTimeStep();
|
||||
dval = fTheory->Func(time, par, fFuncValues);
|
||||
if (fabs(dval) > 10.0) { // dirty hack needs to be fixed!!
|
||||
dval = 0.0;
|
||||
|
@ -40,7 +40,8 @@
|
||||
* \param msrInfo pointer to the msr-file handler
|
||||
* \param data pointer to the run-data handler
|
||||
*/
|
||||
PRunListCollection::PRunListCollection(PMsrHandler *msrInfo, PRunDataHandler *data) : fMsrInfo(msrInfo), fData(data)
|
||||
PRunListCollection::PRunListCollection(PMsrHandler *msrInfo, PRunDataHandler *data, Bool_t theoAsData) :
|
||||
fMsrInfo(msrInfo), fData(data), fTheoAsData(theoAsData)
|
||||
{
|
||||
}
|
||||
|
||||
@ -120,32 +121,32 @@ Bool_t PRunListCollection::Add(Int_t runNo, EPMusrHandleTag tag)
|
||||
|
||||
switch (fitType) {
|
||||
case PRUN_SINGLE_HISTO:
|
||||
fRunSingleHistoList.push_back(new PRunSingleHisto(fMsrInfo, fData, runNo, tag));
|
||||
fRunSingleHistoList.push_back(new PRunSingleHisto(fMsrInfo, fData, runNo, tag, fTheoAsData));
|
||||
if (!fRunSingleHistoList[fRunSingleHistoList.size()-1]->IsValid())
|
||||
success = false;
|
||||
break;
|
||||
case PRUN_SINGLE_HISTO_RRF:
|
||||
fRunSingleHistoRRFList.push_back(new PRunSingleHistoRRF(fMsrInfo, fData, runNo, tag));
|
||||
fRunSingleHistoRRFList.push_back(new PRunSingleHistoRRF(fMsrInfo, fData, runNo, tag, fTheoAsData));
|
||||
if (!fRunSingleHistoRRFList[fRunSingleHistoRRFList.size()-1]->IsValid())
|
||||
success = false;
|
||||
break;
|
||||
case PRUN_ASYMMETRY:
|
||||
fRunAsymmetryList.push_back(new PRunAsymmetry(fMsrInfo, fData, runNo, tag));
|
||||
fRunAsymmetryList.push_back(new PRunAsymmetry(fMsrInfo, fData, runNo, tag, fTheoAsData));
|
||||
if (!fRunAsymmetryList[fRunAsymmetryList.size()-1]->IsValid())
|
||||
success = false;
|
||||
break;
|
||||
case PRUN_ASYMMETRY_RRF:
|
||||
fRunAsymmetryRRFList.push_back(new PRunAsymmetryRRF(fMsrInfo, fData, runNo, tag));
|
||||
fRunAsymmetryRRFList.push_back(new PRunAsymmetryRRF(fMsrInfo, fData, runNo, tag, fTheoAsData));
|
||||
if (!fRunAsymmetryRRFList[fRunAsymmetryRRFList.size()-1]->IsValid())
|
||||
success = false;
|
||||
break;
|
||||
case PRUN_ASYMMETRY_BNMR:
|
||||
fRunAsymmetryBNMRList.push_back(new PRunAsymmetryBNMR(fMsrInfo, fData, runNo, tag));
|
||||
fRunAsymmetryBNMRList.push_back(new PRunAsymmetryBNMR(fMsrInfo, fData, runNo, tag, fTheoAsData));
|
||||
if (!fRunAsymmetryBNMRList[fRunAsymmetryBNMRList.size()-1]->IsValid())
|
||||
success = false;
|
||||
break;
|
||||
case PRUN_MU_MINUS:
|
||||
fRunMuMinusList.push_back(new PRunMuMinus(fMsrInfo, fData, runNo, tag));
|
||||
fRunMuMinusList.push_back(new PRunMuMinus(fMsrInfo, fData, runNo, tag, fTheoAsData));
|
||||
if (!fRunMuMinusList[fRunMuMinusList.size()-1]->IsValid())
|
||||
success = false;
|
||||
break;
|
||||
|
@ -53,6 +53,7 @@ PRunMuMinus::PRunMuMinus() : PRunBase()
|
||||
{
|
||||
fNoOfFitBins = 0;
|
||||
fPacking = -1;
|
||||
fTheoAsData = false;
|
||||
|
||||
// the 2 following variables are need in case fit range is given in bins, and since
|
||||
// the fit range can be changed in the command block, these variables need to be accessible
|
||||
@ -76,7 +77,8 @@ PRunMuMinus::PRunMuMinus() : PRunBase()
|
||||
* \param runNo number of the run within the msr-file
|
||||
* \param tag tag showing what shall be done: kFit == fitting, kView == viewing
|
||||
*/
|
||||
PRunMuMinus::PRunMuMinus(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, Bool_t theoAsData) :
|
||||
PRunBase(msrInfo, rawData, runNo, tag), fTheoAsData(theoAsData)
|
||||
{
|
||||
fNoOfFitBins = 0;
|
||||
|
||||
@ -742,6 +744,7 @@ Bool_t PRunMuMinus::PrepareRawViewData(PRawRunData* runData, const UInt_t histoN
|
||||
|
||||
// calculate theory
|
||||
UInt_t size = fForward.size();
|
||||
/* //as35
|
||||
Double_t factor = 1.0;
|
||||
if (fData.GetValue()->size() * 10 > fForward.size()) {
|
||||
size = fData.GetValue()->size() * 10;
|
||||
@ -751,6 +754,20 @@ Bool_t PRunMuMinus::PrepareRawViewData(PRawRunData* runData, const UInt_t histoN
|
||||
Double_t theoryValue;
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
fData.SetTheoryTimeStep(fTimeResolution*factor);
|
||||
*/ //as35
|
||||
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
size *= factor;
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep()/(Double_t)factor);
|
||||
}
|
||||
|
||||
Double_t time;
|
||||
Double_t theoryValue;
|
||||
for (UInt_t i=0; i<size; i++) {
|
||||
time = fData.GetTheoryTimeStart() + i*fData.GetTheoryTimeStep();
|
||||
theoryValue = fTheory->Func(time, par, fFuncValues);
|
||||
|
@ -58,6 +58,7 @@ PRunSingleHisto::PRunSingleHisto() : PRunBase()
|
||||
fNoOfFitBins = 0;
|
||||
fBackground = 0;
|
||||
fPacking = -1;
|
||||
fTheoAsData = false;
|
||||
|
||||
// the 2 following variables are need in case fit range is given in bins, and since
|
||||
// the fit range can be changed in the command block, these variables need to be accessible
|
||||
@ -79,7 +80,8 @@ PRunSingleHisto::PRunSingleHisto() : PRunBase()
|
||||
* \param runNo number of the run within the msr-file
|
||||
* \param tag tag showing what shall be done: kFit == fitting, kView == viewing
|
||||
*/
|
||||
PRunSingleHisto::PRunSingleHisto(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag) : PRunBase(msrInfo, rawData, runNo, tag)
|
||||
PRunSingleHisto::PRunSingleHisto(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData) :
|
||||
PRunBase(msrInfo, rawData, runNo, tag), fTheoAsData(theoAsData)
|
||||
{
|
||||
fScaleN0AndBkg = IsScaleN0AndBkg();
|
||||
fNoOfFitBins = 0;
|
||||
@ -1070,15 +1072,18 @@ Bool_t PRunSingleHisto::PrepareRawViewData(PRawRunData* runData, const UInt_t hi
|
||||
|
||||
// calculate theory
|
||||
UInt_t size = fForward.size();
|
||||
Double_t factor = 1.0;
|
||||
if (fData.GetValue()->size() * 10 > fForward.size()) {
|
||||
size = fData.GetValue()->size() * 10;
|
||||
factor = static_cast<Double_t>(fForward.size()) / static_cast<Double_t>(size);
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
size *= factor;
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep()/(Double_t)factor);
|
||||
}
|
||||
|
||||
Double_t time;
|
||||
Double_t theoryValue;
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
fData.SetTheoryTimeStep(fTimeResolution*factor);
|
||||
for (UInt_t i=0; i<size; i++) {
|
||||
time = fData.GetTheoryTimeStart() + i*fData.GetTheoryTimeStep();
|
||||
theoryValue = fTheory->Func(time, par, fFuncValues);
|
||||
@ -1311,17 +1316,18 @@ Bool_t PRunSingleHisto::PrepareViewData(PRawRunData* runData, const UInt_t histo
|
||||
// calculate theory
|
||||
Double_t theoryValue;
|
||||
UInt_t size = fForward.size();
|
||||
Double_t factor = 1.0;
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
UInt_t rebinRRF = 0;
|
||||
|
||||
if (wRRF == 0) { // no RRF
|
||||
// check if a finer binning for the theory is needed
|
||||
if (fData.GetValue()->size() * 10 > fForward.size()) {
|
||||
size = fData.GetValue()->size() * 10;
|
||||
factor = static_cast<Double_t>(fForward.size()) / static_cast<Double_t>(size);
|
||||
}
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
fData.SetTheoryTimeStep(fTimeResolution*factor);
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
size *= factor;
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep()/(Double_t)factor);
|
||||
}
|
||||
} else { // RRF
|
||||
rebinRRF = static_cast<UInt_t>((TMath::Pi()/2.0/wRRF)/fTimeResolution); // RRF time resolution / data time resolution
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
|
@ -60,6 +60,7 @@ PRunSingleHistoRRF::PRunSingleHistoRRF() : PRunBase()
|
||||
fBackground = 0.0;
|
||||
fBkgErr = 1.0;
|
||||
fRRFPacking = -1;
|
||||
fTheoAsData = false;
|
||||
|
||||
// the 2 following variables are need in case fit range is given in bins, and since
|
||||
// the fit range can be changed in the command block, these variables need to be accessible
|
||||
@ -80,7 +81,8 @@ PRunSingleHistoRRF::PRunSingleHistoRRF() : PRunBase()
|
||||
* \param runNo number of the run within the msr-file
|
||||
* \param tag tag showing what shall be done: kFit == fitting, kView == viewing
|
||||
*/
|
||||
PRunSingleHistoRRF::PRunSingleHistoRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag) : PRunBase(msrInfo, rawData, runNo, tag)
|
||||
PRunSingleHistoRRF::PRunSingleHistoRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData) :
|
||||
PRunBase(msrInfo, rawData, runNo, tag), fTheoAsData(theoAsData)
|
||||
{
|
||||
fNoOfFitBins = 0;
|
||||
|
||||
@ -758,18 +760,19 @@ Bool_t PRunSingleHistoRRF::PrepareViewData(PRawRunData* runData, const UInt_t hi
|
||||
|
||||
// check if a finer binning for the theory is needed
|
||||
UInt_t size = fForward.size();
|
||||
Double_t factor = 1.0;
|
||||
Double_t time = 0.0;
|
||||
Double_t theoryValue = 0.0;
|
||||
|
||||
if (fData.GetValue()->size() * 10 > fForward.size()) {
|
||||
size = fData.GetValue()->size() * 10;
|
||||
factor = static_cast<Double_t>(fForward.size()) / static_cast<Double_t>(size);
|
||||
}
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
fData.SetTheoryTimeStep(fTimeResolution*factor);
|
||||
if (fTheoAsData) { // cacluate theory only at the data points
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep());
|
||||
} else {
|
||||
// finer binning for the theory (8 times as many points = factor)
|
||||
size *= factor;
|
||||
fData.SetTheoryTimeStep(fData.GetDataTimeStep()/(Double_t)factor);
|
||||
}
|
||||
|
||||
// calculate theory
|
||||
Double_t time = 0.0;
|
||||
Double_t theoryValue = 0.0;
|
||||
for (UInt_t i=0; i<size; i++) {
|
||||
time = fData.GetTheoryTimeStart() + static_cast<Double_t>(i)*fData.GetTheoryTimeStep();
|
||||
theoryValue = fTheory->Func(time, par, fFuncValues);
|
||||
|
@ -206,12 +206,12 @@ class PMusrCanvas : public TObject, public TQObject
|
||||
PMusrCanvas();
|
||||
PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh, const Bool_t batch,
|
||||
const Bool_t fourier=false, const Bool_t avg=false);
|
||||
const Bool_t fourier=false, const Bool_t avg=false, const Bool_t theoAsData=false);
|
||||
PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
|
||||
PMsrFourierStructure fourierDefault,
|
||||
const PIntVector markerList, const PIntVector colorList, const Bool_t batch,
|
||||
const Bool_t fourier=false, const Bool_t avg=false);
|
||||
const Bool_t fourier=false, const Bool_t avg=false, const Bool_t theoAsData=false);
|
||||
virtual ~PMusrCanvas();
|
||||
|
||||
virtual Bool_t IsValid() { return fValid; }
|
||||
@ -236,6 +236,7 @@ class PMusrCanvas : public TObject, public TQObject
|
||||
virtual void ExportData(const Char_t *fileName);
|
||||
|
||||
private:
|
||||
Bool_t fTheoAsData; ///< flag if true, calculate theory points only at the data points
|
||||
Bool_t fStartWithFourier; ///< flag if true, the Fourier transform will be presented bypassing the time domain representation
|
||||
Bool_t fStartWithAvg; ///< flag if true, the averaged data/Fourier will be presented
|
||||
Int_t fTimeout; ///< timeout after which the Done signal should be emited. If timeout <= 0, no timeout is taking place
|
||||
|
@ -40,7 +40,7 @@ class PRunAsymmetry : public PRunBase
|
||||
{
|
||||
public:
|
||||
PRunAsymmetry();
|
||||
PRunAsymmetry(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag);
|
||||
PRunAsymmetry(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData);
|
||||
virtual ~PRunAsymmetry();
|
||||
|
||||
virtual Double_t CalcChiSquare(const std::vector<Double_t>& par);
|
||||
@ -68,6 +68,7 @@ class PRunAsymmetry : public PRunBase
|
||||
UInt_t fAlphaBetaTag; ///< \f$ 1 \to \alpha = \beta = 1\f$; \f$ 2 \to \alpha \neq 1, \beta = 1\f$; \f$ 3 \to \alpha = 1, \beta \neq 1\f$; \f$ 4 \to \alpha \neq 1, \beta \neq 1\f$.
|
||||
UInt_t fNoOfFitBins; ///< number of bins to be be fitted
|
||||
Int_t fPacking; ///< packing for this particular run. Either given in the RUN- or GLOBAL-block.
|
||||
Bool_t fTheoAsData; ///< true=only calculate the theory points at the data points, false=calculate more points for the theory as compared to data are calculated which lead to 'nicer' Fouriers
|
||||
|
||||
PDoubleVector fForward; ///< forward histo data
|
||||
PDoubleVector fForwardErr; ///< forward histo errors
|
||||
|
@ -41,7 +41,7 @@ class PRunAsymmetryBNMR : public PRunBase
|
||||
{
|
||||
public:
|
||||
PRunAsymmetryBNMR();
|
||||
PRunAsymmetryBNMR(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag);
|
||||
PRunAsymmetryBNMR(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData);
|
||||
virtual ~PRunAsymmetryBNMR();
|
||||
|
||||
virtual Double_t CalcChiSquare(const std::vector<Double_t>& par);
|
||||
@ -68,6 +68,7 @@ class PRunAsymmetryBNMR : public PRunBase
|
||||
UInt_t fAlphaBetaTag; ///< \f$ 1 \to \alpha = \beta = 1\f$; \f$ 2 \to \alpha \neq 1, \beta = 1\f$; \f$ 3 \to \alpha = 1, \beta \neq 1\f$; \f$ 4 \to \alpha \neq 1, \beta \neq 1\f$.
|
||||
UInt_t fNoOfFitBins; ///< number of bins to be be fitted
|
||||
Int_t fPacking; ///< packing for this particular run. Either given in the RUN- or GLOBAL-block.
|
||||
Bool_t fTheoAsData; ///< true=only calculate the theory points at the data points, false=calculate more points for the theory as compared to data are calculated which lead to 'nicer' Fouriers
|
||||
|
||||
PDoubleVector fForwardp; ///< pos hel forward histo data
|
||||
PDoubleVector fForwardpErr; ///< pos hel forward histo errors
|
||||
|
@ -40,7 +40,7 @@ class PRunAsymmetryRRF : public PRunBase
|
||||
{
|
||||
public:
|
||||
PRunAsymmetryRRF();
|
||||
PRunAsymmetryRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag);
|
||||
PRunAsymmetryRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData);
|
||||
virtual ~PRunAsymmetryRRF();
|
||||
|
||||
virtual Double_t CalcChiSquare(const std::vector<Double_t>& par);
|
||||
@ -66,6 +66,7 @@ class PRunAsymmetryRRF : public PRunBase
|
||||
UInt_t fAlphaBetaTag; ///< \f$ 1 \to \alpha = \beta = 1\f$; \f$ 2 \to \alpha \neq 1, \beta = 1\f$; \f$ 3 \to \alpha = 1, \beta \neq 1\f$; \f$ 4 \to \alpha \neq 1, \beta \neq 1\f$.
|
||||
UInt_t fNoOfFitBins; ///< number of bins to be be fitted
|
||||
Int_t fRRFPacking; ///< RRF packing for this particular run. Given in the GLOBAL-block.
|
||||
Bool_t fTheoAsData; ///< true=only calculate the theory points at the data points, false=calculate more points for the theory as compared to data are calculated which lead to 'nicer' Fouriers
|
||||
|
||||
PDoubleVector fForward; ///< forward histo data
|
||||
PDoubleVector fForwardErr; ///< forward histo errors
|
||||
|
@ -49,7 +49,7 @@
|
||||
class PRunListCollection
|
||||
{
|
||||
public:
|
||||
PRunListCollection(PMsrHandler *msrInfo, PRunDataHandler *data);
|
||||
PRunListCollection(PMsrHandler *msrInfo, PRunDataHandler *data, Bool_t theoAsdata=false);
|
||||
virtual ~PRunListCollection();
|
||||
|
||||
enum EDataSwitch { kIndex, kRunNo };
|
||||
@ -108,6 +108,7 @@ class PRunListCollection
|
||||
virtual const Char_t* GetYAxisTitle(const TString &runName, const UInt_t idx) const;
|
||||
|
||||
private:
|
||||
Bool_t fTheoAsData; ///< if true: calculate theory points only at the data points
|
||||
PMsrHandler *fMsrInfo; ///< pointer to the msr-file handler
|
||||
PRunDataHandler *fData; ///< pointer to the run-data handler
|
||||
|
||||
|
@ -39,7 +39,7 @@ class PRunMuMinus : public PRunBase
|
||||
{
|
||||
public:
|
||||
PRunMuMinus();
|
||||
PRunMuMinus(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag);
|
||||
PRunMuMinus(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData);
|
||||
virtual ~PRunMuMinus();
|
||||
|
||||
virtual Double_t CalcChiSquare(const std::vector<Double_t>& par);
|
||||
@ -65,6 +65,7 @@ class PRunMuMinus : public PRunBase
|
||||
private:
|
||||
UInt_t fNoOfFitBins; ///< number of bins to be fitted
|
||||
Int_t fPacking; ///< packing for this particular run. Either given in the RUN- or GLOBAL-block.
|
||||
Bool_t fTheoAsData; ///< true=only calculate the theory points at the data points, false=calculate more points for the theory as compared to data are calculated which lead to 'nicer' Fouriers
|
||||
|
||||
Int_t fGoodBins[2]; ///< keep first/last good bins. 0=fgb, 1=lgb
|
||||
|
||||
|
@ -39,7 +39,7 @@ class PRunSingleHisto : public PRunBase
|
||||
{
|
||||
public:
|
||||
PRunSingleHisto();
|
||||
PRunSingleHisto(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag);
|
||||
PRunSingleHisto(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData);
|
||||
virtual ~PRunSingleHisto();
|
||||
|
||||
virtual Double_t CalcChiSquare(const std::vector<Double_t>& par);
|
||||
@ -72,6 +72,7 @@ class PRunSingleHisto : public PRunBase
|
||||
UInt_t fNoOfFitBins; ///< number of bins to be fitted
|
||||
Double_t fBackground; ///< needed if background range is given (units: 1/bin)
|
||||
Int_t fPacking; ///< packing for this particular run. Either given in the RUN- or GLOBAL-block.
|
||||
Bool_t fTheoAsData; ///< true=only calculate the theory points at the data points, false=calculate more points for the theory as compared to data are calculated which lead to 'nicer' Fouriers
|
||||
|
||||
Int_t fGoodBins[2]; ///< keep first/last good bins. 0=fgb, 1=lgb
|
||||
|
||||
|
@ -39,7 +39,7 @@ class PRunSingleHistoRRF : public PRunBase
|
||||
{
|
||||
public:
|
||||
PRunSingleHistoRRF();
|
||||
PRunSingleHistoRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag);
|
||||
PRunSingleHistoRRF(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData);
|
||||
virtual ~PRunSingleHistoRRF();
|
||||
|
||||
virtual Double_t CalcChiSquare(const std::vector<Double_t>& par);
|
||||
@ -68,6 +68,7 @@ class PRunSingleHistoRRF : public PRunBase
|
||||
Double_t fBackground; ///< needed if background range is given (units: 1/bin)
|
||||
Double_t fBkgErr; ///< estimate error on the estimated background
|
||||
Int_t fRRFPacking; ///< RRF packing for this particular run. Given in the GLOBAL-block.
|
||||
Bool_t fTheoAsData; ///< true=only calculate the theory points at the data points, false=calculate more points for the theory as compared to data are calculated which lead to 'nicer' Fouriers
|
||||
|
||||
Int_t fGoodBins[2]; ///< keep first/last good bins. 0=fgb, 1=lgb
|
||||
|
||||
|
@ -140,6 +140,8 @@ bool PAdminXMLParser::startElement()
|
||||
fKeyWord = eMusrviewShowFourier;
|
||||
} else if (qName == "musrview_show_avg") {
|
||||
fKeyWord = eMusrviewShowAvg;
|
||||
} else if (qName == "musrview_show_one_to_one") {
|
||||
fKeyWord = eMusrviewShowOneToOne;
|
||||
} else if (qName == "enable_musrt0") {
|
||||
fKeyWord = eEnableMusrT0;
|
||||
} else if (qName == "dark_theme_icons_menu") {
|
||||
@ -315,6 +317,13 @@ bool PAdminXMLParser::characters()
|
||||
flag = false;
|
||||
fAdmin->setMusrviewShowAvgFlag(flag);
|
||||
break;
|
||||
case eMusrviewShowOneToOne:
|
||||
if (str == "y")
|
||||
flag = true;
|
||||
else
|
||||
flag = false;
|
||||
fAdmin->setMusrviewShowOneToOneFlag(flag);
|
||||
break;
|
||||
case eEnableMusrT0:
|
||||
if (str == "y")
|
||||
flag = true;
|
||||
|
@ -72,7 +72,7 @@ class PAdminXMLParser
|
||||
private:
|
||||
enum EAdminKeyWords {eEmpty, eTimeout, eKeepMinuit2Output, eDumpAscii, eDumpRoot,
|
||||
eTitleFromDataFile, eChisqPreRunBlock, eEstimateN0,
|
||||
eMusrviewShowFourier, eMusrviewShowAvg, eEnableMusrT0,
|
||||
eMusrviewShowFourier, eMusrviewShowAvg, eMusrviewShowOneToOne, eEnableMusrT0,
|
||||
eDarkThemeIconsMenu, eDarkThemeIconsToolbar,
|
||||
eFontName, eFontSize, eExecPath, eDefaultSavePath,
|
||||
eRecentFile, eBeamline, eInstitute, eFileFormat, eLifetimeCorrection,
|
||||
@ -123,6 +123,7 @@ class PAdmin : public QObject
|
||||
bool getTitleFromDataFileFlag() { return fTitleFromDataFile; }
|
||||
bool getMusrviewShowFourierFlag() { return fMusrviewShowFourier; }
|
||||
bool getMusrviewShowAvgFlag() { return fMusrviewShowAvg; }
|
||||
bool getMusrviewShowOneToOneFlag() { return fMusrviewShowOneToOne; }
|
||||
bool getEnableMusrT0Flag() { return fEnableMusrT0; }
|
||||
bool getKeepMinuit2OutputFlag() { return fKeepMinuit2Output; }
|
||||
bool getDumpAsciiFlag() { return fDumpAscii; }
|
||||
@ -148,6 +149,7 @@ class PAdmin : public QObject
|
||||
void setTitleFromDataFileFlag(const bool flag) { fTitleFromDataFile = flag; }
|
||||
void setMusrviewShowFourierFlag(const bool flag) { fMusrviewShowFourier = flag; }
|
||||
void setMusrviewShowAvgFlag(const bool flag) { fMusrviewShowAvg = flag; }
|
||||
void setMusrviewShowOneToOneFlag(const bool flag) { fMusrviewShowOneToOne = flag; }
|
||||
void setEnableMusrT0Flag(const bool flag) { fEnableMusrT0 = flag; }
|
||||
void setKeepMinuit2OutputFlag(const bool flag) { fKeepMinuit2Output = flag; }
|
||||
void setDumpAsciiFlag(const bool flag) { fDumpAscii = flag; }
|
||||
@ -190,16 +192,17 @@ class PAdmin : public QObject
|
||||
|
||||
QVector<QString> fRecentFile; ///< keep vector of recent path-file names
|
||||
|
||||
bool fMusrviewShowFourier; ///< flag indicating if musrview should show at startup data (=false) or Fourier of data (=true).
|
||||
bool fMusrviewShowAvg; ///< flag indicating if musrview should show at startup averaged (=true) or original (=false) data/Fourier.
|
||||
bool fKeepMinuit2Output; ///< flag indicating if the Minuit2 output shall be kept (default: no)
|
||||
bool fDumpAscii; ///< flag indicating if musrfit shall make an ascii-dump file (for debugging purposes, default: no).
|
||||
bool fDumpRoot; ///< flag indicating if musrfit shall make an root-dump file (for debugging purposes, default: no).
|
||||
bool fTitleFromDataFile; ///< flag indicating if the title should be extracted from the data file (default: yes).
|
||||
bool fChisqPreRunBlock; ///< flag indicating if musrfit shall write 'per run block' chisq to the msr-file (default: no).
|
||||
bool fEstimateN0; ///< flag indicating if musrfit shall estimate N0 for single histogram fits (default: yes).
|
||||
bool fEnableMusrT0; ///< flag indicating if musrT0 shall be enabled at startup from within musredit (default: yes).
|
||||
bool fDarkThemeIconsMenu; ///< flag indicating if dark theme icons shall be used in the menu (default: no)
|
||||
bool fMusrviewShowFourier; ///< flag indicating if musrview should show at startup data (=false) or Fourier of data (=true).
|
||||
bool fMusrviewShowAvg; ///< flag indicating if musrview should show at startup averaged (=true) or original (=false) data/Fourier.
|
||||
bool fMusrviewShowOneToOne; ///< flag indicating if theory points are calculate only at the data points (=true) or a higher density theory points is calculated
|
||||
bool fKeepMinuit2Output; ///< flag indicating if the Minuit2 output shall be kept (default: no)
|
||||
bool fDumpAscii; ///< flag indicating if musrfit shall make an ascii-dump file (for debugging purposes, default: no).
|
||||
bool fDumpRoot; ///< flag indicating if musrfit shall make an root-dump file (for debugging purposes, default: no).
|
||||
bool fTitleFromDataFile; ///< flag indicating if the title should be extracted from the data file (default: yes).
|
||||
bool fChisqPreRunBlock; ///< flag indicating if musrfit shall write 'per run block' chisq to the msr-file (default: no).
|
||||
bool fEstimateN0; ///< flag indicating if musrfit shall estimate N0 for single histogram fits (default: yes).
|
||||
bool fEnableMusrT0; ///< flag indicating if musrT0 shall be enabled at startup from within musredit (default: yes).
|
||||
bool fDarkThemeIconsMenu; ///< flag indicating if dark theme icons shall be used in the menu (default: no)
|
||||
bool fDarkThemeIconsToolbar; ///< flag indicating if dark theme icons shall be used in the toolbar (default: no)
|
||||
|
||||
QString fBeamline; ///< name of the beamline. Used to generate default run header lines.
|
||||
|
@ -76,6 +76,7 @@ PPrefsDialog::PPrefsDialog(PAdmin *admin) : fAdmin(admin)
|
||||
fEstimateN0_checkBox->setChecked(fAdmin->getEstimateN0Flag());
|
||||
fFourier_checkBox->setChecked(fAdmin->getMusrviewShowFourierFlag());
|
||||
fAvg_checkBox->setChecked(fAdmin->getMusrviewShowAvgFlag());
|
||||
fOneToOne_checkBox->setChecked(fAdmin->getMusrviewShowOneToOneFlag());
|
||||
|
||||
fTimeout_lineEdit->setText(QString("%1").arg(fAdmin->getTimeout()));
|
||||
fTimeout_lineEdit->setValidator(new QIntValidator(fTimeout_lineEdit));
|
||||
|
@ -48,6 +48,7 @@ class PPrefsDialog : public QDialog, private Ui::PPrefsDialog
|
||||
|
||||
bool getMusrviewShowFourierFlag() { return fFourier_checkBox->isChecked(); }
|
||||
bool getMusrviewShowAvgFlag() { return fAvg_checkBox->isChecked(); }
|
||||
bool getMusrviewShowOneToOneFlag() { return fOneToOne_checkBox->isChecked(); }
|
||||
bool getKeepMinuit2OutputFlag() { return fKeepMn2Output_checkBox->isChecked(); }
|
||||
bool getTitleFromDataFileFlag() { return fTitleFromData_checkBox->isChecked(); }
|
||||
bool getEnableMusrT0Flag() { return fEnableMusrT0_checkBox->isChecked(); }
|
||||
@ -55,6 +56,7 @@ class PPrefsDialog : public QDialog, private Ui::PPrefsDialog
|
||||
bool getEstimateN0Flag() { return fEstimateN0_checkBox->isChecked(); }
|
||||
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu_checkBox->isChecked(); }
|
||||
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar_checkBox->isChecked(); }
|
||||
bool getOneToOneFlag() { return fOneToOne_checkBox->isChecked(); }
|
||||
int getDump();
|
||||
int getTimeout() { return fTimeout_lineEdit->text().toInt(); }
|
||||
|
||||
|
@ -2542,6 +2542,10 @@ void PTextEdit::musrView()
|
||||
if (fAdmin->getMusrviewShowAvgFlag())
|
||||
arg << "-a";
|
||||
|
||||
// check if theory shall only be calculated at the data points
|
||||
if (fAdmin->getMusrviewShowOneToOneFlag())
|
||||
arg << "-1";
|
||||
|
||||
QProcess *proc = new QProcess(this);
|
||||
connect(proc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(musrViewFinished(int, QProcess::ExitStatus)));
|
||||
|
||||
@ -2691,6 +2695,7 @@ void PTextEdit::musrPrefs()
|
||||
fAdmin->setDarkThemeIconsToolbarFlag(dlg->getDarkThemeIconsToolbarFlag());
|
||||
fAdmin->setMusrviewShowFourierFlag(dlg->getMusrviewShowFourierFlag());
|
||||
fAdmin->setMusrviewShowAvgFlag(dlg->getMusrviewShowAvgFlag());
|
||||
fAdmin->setMusrviewShowOneToOneFlag(dlg->getMusrviewShowOneToOneFlag());
|
||||
fAdmin->setKeepMinuit2OutputFlag(dlg->getKeepMinuit2OutputFlag());
|
||||
fAdmin->setTitleFromDataFileFlag(dlg->getTitleFromDataFileFlag());
|
||||
fAdmin->setEnableMusrT0Flag(dlg->getEnableMusrT0Flag());
|
||||
|
@ -33,7 +33,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="fTabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="fGeneral_tab">
|
||||
<attribute name="title">
|
||||
@ -52,13 +52,13 @@
|
||||
<string>Change Default Search Paths</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="">
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>12</x>
|
||||
<y>10</y>
|
||||
<width>415</width>
|
||||
<height>52</height>
|
||||
<height>62</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
@ -219,6 +219,19 @@
|
||||
<string>start with averaged data/Fourier</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="fOneToOne_checkBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>10</y>
|
||||
<width>181</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>theo at data points only</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="fMusrt0_tab">
|
||||
<attribute name="title">
|
||||
|
@ -16,6 +16,7 @@
|
||||
<estimate_n0>y</estimate_n0>
|
||||
<musrview_show_fourier>n</musrview_show_fourier>
|
||||
<musrview_show_avg>n</musrview_show_avg>
|
||||
<musrview_show_one_to_one>n</musrview_show_one_to_one>
|
||||
<enable_musrt0>y</enable_musrt0>
|
||||
<dark_theme_icons_menu>n</dark_theme_icons_menu>
|
||||
<dark_theme_icons_toolbar>n</dark_theme_icons_toolbar>
|
||||
|
@ -64,6 +64,7 @@ void musrview_syntax()
|
||||
std::cout << std::endl << " --show-dynamic-path : dumps the dynamic search paths and exit.";
|
||||
std::cout << std::endl << " -f, --fourier: will directly present the Fourier transform of the <msr-file>.";
|
||||
std::cout << std::endl << " -a, --avg: will directly present the averaged data/Fourier of the <msr-file>.";
|
||||
std::cout << std::endl << " -1, --one_to_one: calculate theory points only at data points.";
|
||||
std::cout << std::endl << " --<graphic-format-extension>: ";
|
||||
std::cout << std::endl << " will produce a graphics-output-file without starting a root session.";
|
||||
std::cout << std::endl << " the name is based on the <msr-file>, e.g. 3310.msr -> 3310_0.png";
|
||||
@ -105,6 +106,7 @@ int main(int argc, char *argv[])
|
||||
char fileName[128];
|
||||
bool fourier = false;
|
||||
bool avg = false;
|
||||
bool theoAtData = false; // theory points only at data points
|
||||
bool graphicsOutput = false;
|
||||
bool asciiOutput = false;
|
||||
char graphicsExtension[128];
|
||||
@ -149,6 +151,8 @@ int main(int argc, char *argv[])
|
||||
fourier = true;
|
||||
} else if (!strcmp(argv[i], "-a") || !strcmp(argv[i], "--avg")) {
|
||||
avg = true;
|
||||
} else if (!strcmp(argv[i], "-1") || !strcmp(argv[i], "--one_to_one")) {
|
||||
theoAtData = true;
|
||||
} else if (!strcmp(argv[i], "--eps") || !strcmp(argv[i], "--pdf") || !strcmp(argv[i], "--gif") ||
|
||||
!strcmp(argv[i], "--jpg") || !strcmp(argv[i], "--png") || !strcmp(argv[i], "--svg") ||
|
||||
!strcmp(argv[i], "--xpm") || !strcmp(argv[i], "--root")) {
|
||||
@ -280,7 +284,7 @@ int main(int argc, char *argv[])
|
||||
PRunListCollection *runListCollection = nullptr;
|
||||
if (result == PMUSR_SUCCESS) {
|
||||
// feed all the necessary histogramms for the view
|
||||
runListCollection = new PRunListCollection(msrHandler, dataHandler);
|
||||
runListCollection = new PRunListCollection(msrHandler, dataHandler, theoAtData);
|
||||
for (unsigned int i=0; i<msrHandler->GetMsrRunList()->size(); i++) {
|
||||
// if run is in plotList add it, otherwise go to the next
|
||||
runPresent = false;
|
||||
@ -324,12 +328,12 @@ int main(int argc, char *argv[])
|
||||
startupHandler->GetMarkerList(),
|
||||
startupHandler->GetColorList(),
|
||||
graphicsOutput||asciiOutput,
|
||||
fourier, avg);
|
||||
fourier, avg, theoAtData);
|
||||
else
|
||||
musrCanvas = new PMusrCanvas(i, msrHandler->GetMsrTitle()->Data(),
|
||||
10+i*100, 10+i*100, 800, 600,
|
||||
graphicsOutput||asciiOutput,
|
||||
fourier, avg);
|
||||
fourier, avg, theoAtData);
|
||||
|
||||
if (!musrCanvas->IsValid()) {
|
||||
std::cerr << std::endl << ">> musrview **SEVERE ERROR** Couldn't invoke all necessary objects, will quit.";
|
||||
|
Reference in New Issue
Block a user