From b48ec8515e5fa12b7c5dd101bd29fc950aa00bda Mon Sep 17 00:00:00 2001 From: nemu Date: Wed, 20 Aug 2008 12:20:18 +0000 Subject: [PATCH] (1) added cleaninstall to Makefile.PMusr, (2) some minor changes in PMusrCanvas (towards showing difference between data and theory), (3) a very experimental inital guess of N0's for single histogram fits which should help minuit --- src/classes/Makefile.PMusr | 2 ++ src/classes/PMusrCanvas.cpp | 17 +++++++++++++++++ src/classes/PRunSingleHisto.cpp | 13 +++++++++++++ src/include/PMusrCanvas.h | 1 + 4 files changed, 33 insertions(+) diff --git a/src/classes/Makefile.PMusr b/src/classes/Makefile.PMusr index 85367e73..35e632b0 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 11313144..6ebbbab7 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 5c3ff886..1ab896e4 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 63ec787d..3260488f 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;