diff --git a/src/classes/Makefile.PMusr b/src/classes/Makefile.PMusr index 85367e73e..35e632b0b 100644 --- a/src/classes/Makefile.PMusr +++ b/src/classes/Makefile.PMusr @@ -148,3 +148,5 @@ ifeq ($(OS),LINUX) cp -pv $(SHLIB) $(ROOTSYS)/lib cp -pv $(PMUSRPATH)/*.h $(ROOTSYS)/include endif + +cleaninstall: clean install \ No newline at end of file diff --git a/src/classes/PMusrCanvas.cpp b/src/classes/PMusrCanvas.cpp index 113131448..6ebbbab75 100644 --- a/src/classes/PMusrCanvas.cpp +++ b/src/classes/PMusrCanvas.cpp @@ -49,6 +49,7 @@ ClassImpQ(PMusrCanvas) PMusrCanvas::PMusrCanvas() { fValid = false; + fDifferencePlot = false; fPlotNumber = -1; fStyle = 0; @@ -166,6 +167,7 @@ void PMusrCanvas::CreateStyle() void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh) { fValid = false; + fDifferencePlot = false; fMainCanvas = 0; fTitlePad = 0; @@ -1066,4 +1068,19 @@ void PMusrCanvas::HandleDifference() { cout << endl << ">> will show the difference between the theory and the signal, to be implemented yet. fMainCanvas name = " << fMainCanvas->GetName(); cout << endl; + + if (fDifferencePlot) + fDifferencePlot = kFALSE; + else + fDifferencePlot = kTRUE; + + // difference plot wished hence feed difference data and plot them + if (fDifferencePlot) { + // check if it is necessary to calculate diff data + // get current x-range + } + + // switch back to the "normal" view + if (!fDifferencePlot) { + } } diff --git a/src/classes/PRunSingleHisto.cpp b/src/classes/PRunSingleHisto.cpp index 5c3ff886a..1ab896e41 100644 --- a/src/classes/PRunSingleHisto.cpp +++ b/src/classes/PRunSingleHisto.cpp @@ -455,6 +455,19 @@ bool PRunSingleHisto::PrepareFitData() } } + // crude estimate of the initial N0 (experimental), the idea is that the integral + // over N(t) would be N0 tau if there would be no asymmetry and bkg + value = 0.0; + for (unsigned i=start; ifDataBin[histoNo].size(); i++) { + value += runData->fDataBin[histoNo][i]; + } + // the factor 0.8 takes into account bkg and asymmetry uncertainties + value = value*fTimeResolution/PMUON_LIFETIME*0.8; +cout << endl << ">> histoNo = " << histoNo << ", NormParamNo = " << fRunInfo->fNormParamNo << ", N0 estimate = " << value; + // only update parameter list if fRunInfo->fNormParamNo is a parameter and not a function + if (fRunInfo->fNormParamNo < (int)fMsrInfo->GetNoOfParams()) + fMsrInfo->SetMsrParamValue(fRunInfo->fNormParamNo, value); + // count the number of bins to be fitted fNoOfFitBins=0; double time; diff --git a/src/include/PMusrCanvas.h b/src/include/PMusrCanvas.h index 63ec787dc..3260488f1 100644 --- a/src/include/PMusrCanvas.h +++ b/src/include/PMusrCanvas.h @@ -141,6 +141,7 @@ class PMusrCanvas : public TObject, public TQObject private: Bool_t fValid; + Bool_t fDifferencePlot; /// flag showing is a difference plot is shown Int_t fPlotNumber; TStyle *fStyle;